issue_comments: 441226736
This data as json
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/pydata/xarray/issues/2565#issuecomment-441226736 | https://api.github.com/repos/pydata/xarray/issues/2565 | 441226736 | MDEyOklzc3VlQ29tbWVudDQ0MTIyNjczNg== | 6628425 | 2018-11-23T12:15:36Z | 2018-11-23T12:15:36Z | MEMBER | @fmaussion I have run into this issue before and it is a bit cumbersome. My workaround in the past has been to open the dataset without decoding the times initially, copy the ``` In [1]: import xarray In [2]: ds = xarray.open_dataset('cesm.TREFHT.160001-200512.selection.nc', decode_times=False) In [3]: ds.time_bnds.attrs['units'] = ds.time.attrs['units'] In [4]: ds.time_bnds.attrs['calendar'] = ds.time.attrs['calendar'] In [5]: ds_decoded = xarray.decode_cf(ds) ```
It would be nice if we could handle this automatically, though one issue that concerns me is how we would automatically determine which variable represents the time bounds in an arbitrary netCDF file (as mentioned above we currently do not have any variable-name-specific logic in xarray, which I think is a good thing). I do notice the time variable in your file has a |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
383791450 |