home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

8 rows where issue = 307224717 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: reactions, created_at (date), updated_at (date)

user 3

  • JanisGailis 4
  • fujiisoup 3
  • fmaussion 1

author_association 2

  • MEMBER 4
  • NONE 4

issue 1

  • Unexpected decoded time in xarray >= 0.10.1 · 8 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
375911669 https://github.com/pydata/xarray/issues/2002#issuecomment-375911669 https://api.github.com/repos/pydata/xarray/issues/2002 MDEyOklzc3VlQ29tbWVudDM3NTkxMTY2OQ== fmaussion 10050469 2018-03-24T17:47:57Z 2018-03-24T17:47:57Z MEMBER

The problem comes from the fact that the times in the files are stored in int32. This mwe reproduces the error:

python import xarray as xr import numpy as np ds = xr.Dataset() ds['time'] = xr.DataArray([np.int32(788961600)], dims=['time']) ds['time'].attrs['units'] = 'seconds since 1981-01-01' xr.decode_cf(ds)['time']

This is due to https://github.com/pydata/xarray/pull/1414/, I'm looking into it

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Unexpected decoded time in xarray >= 0.10.1 307224717
374965933 https://github.com/pydata/xarray/issues/2002#issuecomment-374965933 https://api.github.com/repos/pydata/xarray/issues/2002 MDEyOklzc3VlQ29tbWVudDM3NDk2NTkzMw== fujiisoup 6815844 2018-03-21T14:54:22Z 2018-03-21T14:54:22Z MEMBER

Oh, thanks. I misunderstood the problem. Related to #1803? but I did not follow that well. Can anyone look into this issue? The minimal working example would be 1 download from one file from here 2 Load and see xr.open_dataset(path/to/file)['time'] 3 compare with netCDF4.Dataset(path/to/file)['time']

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Unexpected decoded time in xarray >= 0.10.1 307224717
374956179 https://github.com/pydata/xarray/issues/2002#issuecomment-374956179 https://api.github.com/repos/pydata/xarray/issues/2002 MDEyOklzc3VlQ29tbWVudDM3NDk1NjE3OQ== JanisGailis 9655353 2018-03-21T14:27:57Z 2018-03-21T14:27:57Z NONE

You have just reproduced the issue.

The correct datetime values are in the filenames. So, you open two files, one from 1991-09-01T12:00:00.00 and the other from 1991-09-02T12:00:00.00, but the decoded time dimension becomes: array(['1981-01-01T00:00:00.564166656', '1980-12-31T23:59:58.707073024'], dtype='datetime64[ns]')

Which is exactly the problem I'm facing.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Unexpected decoded time in xarray >= 0.10.1 307224717
374954224 https://github.com/pydata/xarray/issues/2002#issuecomment-374954224 https://api.github.com/repos/pydata/xarray/issues/2002 MDEyOklzc3VlQ29tbWVudDM3NDk1NDIyNA== fujiisoup 6815844 2018-03-21T14:22:42Z 2018-03-21T14:22:42Z MEMBER

Could you try investigating minimal working example? I tried with two of your examples, but the issue is not reproduced python In [9]: ds = xr.open_mfdataset(['Desktop/19910901120000-ESACCI-L4_GHRSST-SSTdepth-OSTIA-GLOB_LT-v02.0-fv01.1.nc', 'Desktop/19910902120000-ESACCI-L4_GHRSST-SSTdepth-OSTIA-GLOB_LT-v02.0-fv01.1.nc'], decode_cf=True) In [11]: ds['time'] Out[11]: <xarray.DataArray 'time' (time: 2)> array(['1981-01-01T00:00:00.564166656', '1980-12-31T23:59:58.707073024'], dtype='datetime64[ns]') Coordinates: * time (time) datetime64[ns] 1981-01-01T00:00:00.564166656 ... Attributes: standard_name: time axis: T bounds: time_bnds comment: long_name: reference time of sst file

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Unexpected decoded time in xarray >= 0.10.1 307224717
374951019 https://github.com/pydata/xarray/issues/2002#issuecomment-374951019 https://api.github.com/repos/pydata/xarray/issues/2002 MDEyOklzc3VlQ29tbWVudDM3NDk1MTAxOQ== JanisGailis 9655353 2018-03-21T14:13:35Z 2018-03-21T14:13:35Z NONE

Thanks for looking into this!

I did try 0.10.2, same result as 0.10.1.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Unexpected decoded time in xarray >= 0.10.1 307224717
374949934 https://github.com/pydata/xarray/issues/2002#issuecomment-374949934 https://api.github.com/repos/pydata/xarray/issues/2002 MDEyOklzc3VlQ29tbWVudDM3NDk0OTkzNA== fujiisoup 6815844 2018-03-21T14:10:21Z 2018-03-21T14:10:21Z MEMBER

I think it is related to #1932. Can you try xarray=0.10.2?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Unexpected decoded time in xarray >= 0.10.1 307224717
374922820 https://github.com/pydata/xarray/issues/2002#issuecomment-374922820 https://api.github.com/repos/pydata/xarray/issues/2002 MDEyOklzc3VlQ29tbWVudDM3NDkyMjgyMA== JanisGailis 9655353 2018-03-21T12:39:40Z 2018-03-21T12:39:40Z NONE

Actual data can be retrieved from here: ftp://anon-ftp.ceda.ac.uk/neodc/esacci/sst/data/lt/Analysis/L4/v01.1

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Unexpected decoded time in xarray >= 0.10.1 307224717
374920483 https://github.com/pydata/xarray/issues/2002#issuecomment-374920483 https://api.github.com/repos/pydata/xarray/issues/2002 MDEyOklzc3VlQ29tbWVudDM3NDkyMDQ4Mw== JanisGailis 9655353 2018-03-21T12:29:28Z 2018-03-21T12:29:28Z NONE

1859 seems to be related.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Unexpected decoded time in xarray >= 0.10.1 307224717

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 13.491ms · About: xarray-datasette