Closed yantosca closed 5 years ago
I just did; https://github.com/pydata/xarray/issues/3286
According to the xarray support team, xarray cannot gracefully handle merging files that contain variables with repeated dimension names (cf. https://github.com/pydata/xarray/issues/3286 and https://github.com/pydata/xarray/issues/1378).
The easiest solution is to exclude the offending variable (which in this case is the "anchor" variable from GCHP output using MAPL v1.0.0) in all calls to xr.open_dataset and xr.open_mfdataset. This is done by passing the "drop_variables" keyword argument to these functions.
I have pushed commit https://github.com/geoschem/gcpy/commit/5411f3d71292c3a88442eb597813d0cd8f62b44a to master, which should resolve this issue.
Also pushed commit https://github.com/geoschem/gcpy/commit/bfe65040455aa2125552d7610364831908fc4180 to fix a typo in commit https://github.com/geoschem/gcpy/commit/5411f3d71292c3a88442eb597813d0cd8f62b44a.
Describe the bug The xarray open_mfdataset function dies with an error when trying to read more than one file created by GCHP using the new MAPL v1.0.0 (i.e. in GCHP 12.5.0 and later versions).
To Reproduce
Expected behavior The returned dataset should contain the merged data from e.g. file1.nc and file2.nc.
Screenshots Instead, this error occurs:
Required information:
Additional context The problem seems to be caused by a single variable called "anchor".