home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 474580481

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/521#issuecomment-474580481 https://api.github.com/repos/pydata/xarray/issues/521 474580481 MDEyOklzc3VlQ29tbWVudDQ3NDU4MDQ4MQ== 20947797 2019-03-19T20:54:45Z 2019-03-19T20:54:45Z NONE

In case anyone is still struggling with the CESM POP time units convention, with the new CF support of version 0.12 the problem is (almost) solved.

I have slightly different CESM POP netcdf output with time attributes {'units': 'days since 0-1-1 00:00:00', 'calendar': '365_day'} and crucially a dimension d2 (without coordinates) that trips up the decode_cf function.

```python import xarray as xr # version >= 0.12

ds = xr.open_dataset('some_CESM_output_file.nc', decode_times=False) ds = ds.drop_dims(['d2']) ds = xr.decode_cf(ds, use_cftime=True) ```

Now the xarray Dataset has a cftime.DatetimeNoLeap type time coordinate.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  99836561
Powered by Datasette · Queries took 1.0ms · About: xarray-datasette