issues: 312633077
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
312633077 | MDU6SXNzdWUzMTI2MzMwNzc= | 2044 | Feature request: writing xarray list-type attributes to netCDF | 13837821 | closed | 0 | 2 | 2018-04-09T18:14:33Z | 2018-04-17T15:39:34Z | 2018-04-17T15:39:34Z | CONTRIBUTOR | Migrated from Stack Overflow. NetCDF supports the NC_STRING type, which can stores arrays of strings in attributes. Xarray already supports reading arrays of strings from attributes in netCDF files, and It would be great if it also supported writing the same. Reading already works```python import xarray as xr import netCDF4 as nc rg = nc.Dataset('test_string.nc', 'w', format='NETCDF4')
rg.setncattr_string('testing', ['a', 'b'])
rg.close()
ds = xr.open_dataset('test_string.nc')
print(ds)
This works because I used the Writing doesn't work
Note the list elements have been concatenated. So this is a request for xarray to implement something like netCDF4's |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/2044/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |