KeyError: 'lon_bnds'
raised occasionally when opening (mostly NetCDF) datasets
#930
Labels
bug
Something isn't working
Describe the bug
We sometimes see
KeyError: 'lon_bnds'
raised when opening datasets, mostly NetCDF. Cause of the problem is that an (internal) xcube functionget_dataset_bounds()
expects bounds coordinates, e.g.lon_bnds
, to always be inxarray.Dataset.coords
. However, xarray often puts such coordinates inxarray.Dataset.data_vars
. The name of bounds coordinates are usually given by the value of a coordinate attribute namedbounds
- according to CF conventions.Expected behavior
xarray.Dataset.variables
, notxarray.Dataset.coords
Traceback
The text was updated successfully, but these errors were encountered: