-
With these NetCDF files there is a dummy ‘crs’ variable that exists to store projection info for the data vars, as per CF conventions for a When xarray reads one dataset with I've created a notebook, with wget calls to download example files for a reprex. The notebook uses xarray 2022.3.0, but I tested as well with latest (xarray: 2022.6.1.dev60+g63ba862d). https://github.com/mdsumner/xarray_vrt_expt/blob/master/issues/crs_time.ipynb The files are NSIDC 25km south polar sea ice concentrations, newly released to replace the old binary files. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
By default, Does setting |
Beta Was this translation helpful? Give feedback.
-
it does! import xarray as xr
## open two and crs is living on the time dimension
xr.open_mfdataset(['NSIDC0051_SEAICE_PS_S25km_20220522_v2.0.nc',
'NSIDC0051_SEAICE_PS_S25km_20220523_v2.0.nc'], engine = 'netcdf4')
# ..
# Data variables:
# crs (time) |S1 b'' b''
# F17_ICECON (time, y, x) float32 dask.array<chunksize=(1, 332, 316), meta=np.ndarray>
## set minimal crs is properly hanging loose
xr.open_mfdataset(['NSIDC0051_SEAICE_PS_S25km_20220522_v2.0.nc',
'NSIDC0051_SEAICE_PS_S25km_20220523_v2.0.nc'], engine = 'netcdf4', coords='minimal', data_vars='minimal')
# Data variables:
# crs |S1 b''
# F17_ICECON (time, y, x) float32 dask.array<chunksize=(1, 332, 316), meta=np.ndarray> awesome |
Beta Was this translation helpful? Give feedback.
By default,
xarray
will concatenate all variables regardless of whether they have the concat dimension, but that's customizable using thedata_vars
andcoords
parameters.Does setting
coords="minimal", data_vars="minimal"
in the call toopen_mfdataset
help?