home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 99836561

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
99836561 MDU6SXNzdWU5OTgzNjU2MQ== 521 time decoding error with "days since" 1197350 closed 0     20 2015-08-08T21:54:24Z 2021-03-29T14:12:38Z 2015-08-14T17:23:26Z MEMBER      

I am trying to use xray with some CESM POP model netCDF output, which supposedly follows CF-1.0 conventions. It is failing because the models time units are "'days since 0000-01-01 00:00:00". When calling open_dataset, I get the following error:

ValueError: unable to decode time units u'days since 0000-01-01 00:00:00' with the default calendar. Try opening your dataset with decode_times=False. Full traceback: Traceback (most recent call last): File "/home/rpa/xray/xray/conventions.py", line 372, in __init__ # Otherwise, tracebacks end up swallowed by Dataset.__repr__ when users File "/home/rpa/xray/xray/conventions.py", line 145, in decode_cf_datetime dates = _decode_datetime_with_netcdf4(flat_num_dates, units, calendar) File "/home/rpa/xray/xray/conventions.py", line 97, in _decode_datetime_with_netcdf4 dates = np.asarray(nc4.num2date(num_dates, units, calendar)) File "netCDF4/_netCDF4.pyx", line 4522, in netCDF4._netCDF4.num2date (netCDF4/_netCDF4.c:50388) File "netCDF4/_netCDF4.pyx", line 4337, in netCDF4._netCDF4._dateparse (netCDF4/_netCDF4.c:48234) ValueError: year is out of range

Full metadata for the time variable:

double time(time) ; time:long_name = "time" ; time:units = "days since 0000-01-01 00:00:00" ; time:bounds = "time_bound" ; time:calendar = "noleap" ;

I guess this is a problem with the underlying netCDF4 num2date package?

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/521/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 2 rows from issues_id in issues_labels
  • 20 rows from issue in issue_comments
Powered by Datasette · Queries took 478.313ms · About: xarray-datasette