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
When I open a ncml that contains groups and sub-groups, the result is flatten: each variable is added to a single "root" Dataset and the initial hierarchy is lost.
This behavior is different from xarray open_dataset() which will only open the root group (but not subgroups) and, given the group="/data" kwarg, would only open the group "/data".
It would be nice if we could keep the hierarchy in either a DataArray encoding property (like the parent group path of the variable) or, even better, to output a Datatree which would contain all groups and subgroups.
My objective is for open_ncml to behave as much as possible as open_dataset.
Then we could add a group kwarg to open_ncml and only open the selected group, by default opening the root group just like open_dataset.
As I work with datasets with many layered groups, I would also be interested if we can keep the current behavior, maybe with a special flag argument all_group, default to False, which would order to open every group and add the paths in encoding or attrs of the DataArrays.
It might take a long time before Datatree is merged into xarray, hence the above proposal would be a satisfactory solution (for me) until it is merged.
Feature request
When I open a ncml that contains groups and sub-groups, the result is flatten: each variable is added to a single "root" Dataset and the initial hierarchy is lost.
This behavior is different from
xarray open_dataset()
which will only open the root group (but not subgroups) and, given thegroup="/data"
kwarg, would only open the group "/data".It would be nice if we could keep the hierarchy in either a DataArray
encoding
property (like the parent group path of the variable) or, even better, to output a Datatree which would contain all groups and subgroups.Or should we wait until datatree is merged into xarray before considering this feature ?
Ref
The text was updated successfully, but these errors were encountered: