home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 56817968

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
56817968 MDU6SXNzdWU1NjgxNzk2OA== 316 Not-quite-ISO timestamps 141709 closed 0   799013 7 2015-02-06T14:30:11Z 2015-02-18T04:45:25Z 2015-02-18T04:45:25Z CONTRIBUTOR      

I have trouble reading NetCDF files obtained from MERRA. It turns out that their time unit is of the form "hours since 1982-1-10 0". Because there is only a single "0" for the hour, rather than "00", this is not an ISO compliant datetime string and pandas.Timestamp raises an error (see pydata/pandas#9434).

This makes it impossible to open such files unless passing decode_times=False to open_dataset().

I wonder if this is a rare edge case or if xray could attempt to intelligently handle it somewhere (maybe in conventions._unpack_netcdf_time_units). For now, I just used NCO to append an extra 0 to the time unit (luckily all files are the same, so I can just do this across the board): ncatted -O -a units,time,a,c,"0" file.nc

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/316/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

  • 1 row from issues_id in issues_labels
  • 7 rows from issue in issue_comments
Powered by Datasette · Queries took 0.62ms · About: xarray-datasette