You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have the function that loads variables go up the group hierarchy to see if some coordinate arrays can be found for dimensions lacking them within this group:
Context
Consider a netCDF4 file with a group structure. For example, the following toy:
Current behavior
It is currently a hassle to get a DataArray from variable in a group with multiple non-coordinate variables:
Also, coordinates defined at a group level closer tot the root are not taken into account:
So the DataArray is not loaded correctly, as part of its defining coordinates are missing.
Suggested behavior
Add a
variable
kwarg in theopen_dataarray
method:Have the function that loads variables go up the group hierarchy to see if some coordinate arrays can be found for dimensions lacking them within this group:
I guess care needs to be taken as well upon writing to netCDF, to make sure no spurious dimension/coordinate definitions are added.
Version
xarray 0.9.6
The text was updated successfully, but these errors were encountered: