home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 291565176

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
291565176 MDU6SXNzdWUyOTE1NjUxNzY= 1859 Time decoding has round-off error 0.10.0. Gone now. 3404817 closed 0     3 2018-01-25T13:12:13Z 2018-02-02T02:01:47Z 2018-02-02T02:01:47Z CONTRIBUTOR      

Note: This problem occurs with version 0.10.0, but is gone when using current master (0.10.0+dev44.g0a0593d).

Here is a complete example: https://gist.github.com/j08lue/34498cf17b176d15933e778278ba2921

Problem description

I have this time variable from a netCDF file: float32 time(time) units: days since 1980-1-1 0:0:0 standard_name: time calendar: gregorian And when I open the file with xr.open_dataset(..., decode_times=True) the first time stamp becomes 1982-12-31T23:59:59.560122368, while it should be 1983-01-01. For reference, netCDF4.num2date gets it right.

I tracked the problem down to xarray.conventions.decode_cf_datetime. But then also noticed that you in https://github.com/pydata/xarray/commit/50b0a69a7aa0fb7ac3afb28e7bd971cf08055f99 made major changes to the decoding.

So I also tested with current master (0.10.0+dev44.g0a0593d) and the problem is gone.

Up to you what you make of this. 😄 Maybe you can just close the issue.

Output of xr.show_versions()

INSTALLED VERSIONS ------------------ commit: None python: 3.6.4.final.0 python-bits: 64 OS: Windows OS-release: 10 machine: AMD64 processor: Intel64 Family 6 Model 60 Stepping 3, GenuineIntel byteorder: little LC_ALL: None LANG: ZZ LOCALE: None.None xarray: 0.10.0 pandas: 0.21.1 numpy: 1.13.3 scipy: 1.0.0 netCDF4: 1.3.1 h5netcdf: 0.5.0 Nio: None bottleneck: 1.2.1 cyordereddict: 1.0.0 dask: 0.16.1 matplotlib: 2.1.1 cartopy: None seaborn: None setuptools: 38.2.4 pip: 9.0.1 conda: None pytest: 3.3.1 IPython: 6.2.1 sphinx: None In [4]:
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1859/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

  • 0 rows from issues_id in issues_labels
  • 3 rows from issue in issue_comments
Powered by Datasette · Queries took 3.402ms · About: xarray-datasette