issues: 792651098
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
792651098 | MDU6SXNzdWU3OTI2NTEwOTg= | 4840 | Opening a dataset doesn't display groups. | 11861183 | open | 0 | 2 | 2021-01-23T21:16:32Z | 2022-04-09T02:31:03Z | NONE | ProblemI know xarray doesn't support netCDF4 Group functionality. That's fine, I bet it's incredibly thorny. My issue is, when you open the root group of a netCDF4 file which contains groups, xarray doesn't even tell you that there are groups; they are totally invisible. This seems like a big flaw; you've opened a file, shouldn't you at least be told what's in it? SolutionWhen you open a dataset with the netcdf4-python library, you get something like this:
"groups" shows up sort of like an auto-generated attribute. Surely xarray can do something similar:
WorkaroundThe workaround I am considering is to actually add an attribute to my root group which contains a list of the groups in the file, so people using xarray will see that there are more groups in the file. However, this is redundant considering the information is already in the netCDF file, and also brittle since there's no guarantee the attribute truly reflects the groups in the file. ConclusionConsidering that |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/4840/reactions", "total_count": 4, "+1": 4, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
13221727 | issue |