I have 34 netCDF (nc) files containing latitude, longitude, and the data in every file. Every filename containing a number which corresponds to the Pressure level in hPa (starts from 1 to 34 for respective pressure level from (1000 hPa to 0.4 hPa). I want to join all files into a single nc file with this vertical level dimension information.
I tried to read whole files using xarray open_mfdataset but I cannot con_cat with the level dimension since it isn't in the files.
import xarray as xr
ds = xr.open_mfdataset('/media/MediaCentre/Dataset/d9/data*.nc',concat_dim='level')
The files do not have any information in the global attributes regarding the pressure. They are names sequentially: data1.nc, data2.nc, ... dataN.nc and correspond to the pressure levels (hPa) of: 1000 975 950 925 900 850 800 750 700 650 600 550 500 450 400 350 300 *250 200 150 100 70 50 40 30 20 15 10 7 5 3 2 1 0.4
How can I merge these together using python xarray, or cdo/nco?
Sample data are here https://www.dropbox.com/sh/linfn0721ze3j1f/AACwxTsQVNyiE7mF_gRbpRfra?dl=0