0

I have 30 .nc files with dimensions: time, lat, lon, pres; coordinates: time, lat, lon, pres and 18 different variables. I would like to open them in one dataset. If I use xarray.open_mfdataset (), it won't work, as the dimensions of pres are all different. Is there any way to open them as one anyway?

This is what I tried, and which Error I got:

import xarray as xr 

path = ('Data/*.nc')
ds = xr.open_mfdataset(paths = sorted (glob(path)),
                       chunks={"time_counter":1, "y":100, "x":100},
                      coords = 'all', combine = 'by_coords')

ValueError: Resulting object does not have monotonic global indexes along dimension PRES
Cathi
  • 1
  • There are various ways to configure `open_mfdataset` but this this question does not include enough information in it. Please update the question to include a reproducible example: https://stackoverflow.com/help/minimal-reproducible-example – jhamman Jan 04 '23 at 17:51

0 Answers0