home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

7 rows where issue = 216626776 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 5

  • shoyer 2
  • mmartini-usgs 2
  • rvalenzuelar 1
  • rafa-guedes 1
  • stale[bot] 1

author_association 3

  • NONE 4
  • MEMBER 2
  • CONTRIBUTOR 1

issue 1

  • Choose time units in output netcdf · 7 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
549373858 https://github.com/pydata/xarray/issues/1324#issuecomment-549373858 https://api.github.com/repos/pydata/xarray/issues/1324 MDEyOklzc3VlQ29tbWVudDU0OTM3Mzg1OA== stale[bot] 26384082 2019-11-04T14:17:33Z 2019-11-04T14:17:33Z NONE

In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity

If this issue remains relevant, please comment here or remove the stale label; otherwise it will be marked as closed automatically

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Choose time units in output netcdf 216626776
348967433 https://github.com/pydata/xarray/issues/1324#issuecomment-348967433 https://api.github.com/repos/pydata/xarray/issues/1324 MDEyOklzc3VlQ29tbWVudDM0ODk2NzQzMw== rvalenzuelar 6894066 2017-12-04T13:50:42Z 2017-12-04T13:50:42Z NONE

Hello,

I'm having similar issues. However, I'm creating a dataset from a dict (data are packed in Matlab file).

The dataset is ds_ivt and I have tried: python ds_ivt.time.encode['units'] = 'days since 1900-01-01' and

python ds_ivt.to_netcdf('ds_ivt.nc',encoding={'time':{'units':'days since 1900-01-01'}}) The .info() method retrieves:

bash ds_ivt.info() xarray.Dataset { dimensions: lat = 161 ; lon = 291 ; time = 1460 ; variables: float32 lat(lat) ; lat:units = degrees ; float32 lon(lon) ; lon:units = degrees ; datetime64[ns] time(time) ; time:units = days since 1900-01-01 ; float32 iqu(time, lat, lon) ; iqu:units = kg m-1 s-1 ; float32 iqv(time, lat, lon) ; iqv:units = kg m-1 s-1 ; // global attributes: }

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Choose time units in output netcdf 216626776
323180681 https://github.com/pydata/xarray/issues/1324#issuecomment-323180681 https://api.github.com/repos/pydata/xarray/issues/1324 MDEyOklzc3VlQ29tbWVudDMyMzE4MDY4MQ== mmartini-usgs 23199378 2017-08-17T20:10:34Z 2017-08-17T20:10:34Z NONE

Thanks - It turns out the workaround is to open the file with decoding_times = False

Is this a bug, or a feature?

In the notebook, those variables called time and time2 are not datetime objects (I demonstrate that). In fact, there are no datetime objects in the Notebook's scope, unless you count the CF time variable that is part of the open Dataset. And yet, time and time2 seem to be treated as such when the dataset is written to a file. Or, is it that the CF time in the Dataset is getting re-encoded somehow in spite of encoding=None? Why would that fail? Would you explain what is going on here?

I have updated my gist with the .info() information here:
https://gist.github.com/anonymous/ff055f732029585605b965f282685d73

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Choose time units in output netcdf 216626776
322894648 https://github.com/pydata/xarray/issues/1324#issuecomment-322894648 https://api.github.com/repos/pydata/xarray/issues/1324 MDEyOklzc3VlQ29tbWVudDMyMjg5NDY0OA== shoyer 1217238 2017-08-16T20:48:13Z 2017-08-16T20:48:13Z MEMBER

@mmartini-usgs The here comes up because your time variables have dtype datetime64. There are two ways to handle this: - If you don't want xarray to convert from datetime64 to numbers when saving the netCDF file, you need to convert the data yourself to a float or integer array. - If you do want to make use of xarray's automated conversion, you need to specify units in encoding instead of attrs.

If something else seems to be going on, please share the result of calling .info() on your dataset.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Choose time units in output netcdf 216626776
322853199 https://github.com/pydata/xarray/issues/1324#issuecomment-322853199 https://api.github.com/repos/pydata/xarray/issues/1324 MDEyOklzc3VlQ29tbWVudDMyMjg1MzE5OQ== mmartini-usgs 23199378 2017-08-16T18:06:56Z 2017-08-16T18:06:56Z NONE

I think I have a similar problem.

I have a netCDF file with CF time. I'm trying to add two variables with a different kind of time (EPIC time, time2). These variables should not be datetime. They should be ordinary numbers.

Even when I don't include any units, it chokes on "units". Even with encoding = None ValueError: Failed hard to prevent overwriting key 'units' The gist is here: https://gist.github.com/anonymous/4614dfb55778cd0d51427daf6503cd8c

It's a time specific thing, because if I do the same operation with a different variable in the same file (read a variable, do something with it, then save it) it works fine. One clue is that it still carries the attributes (generally desired behavior) to the new file. But my EPIC time and time2 above, if they NOT datetime and have NO attributes... should work the same way.

This could be my misunderstanding of xarray and time operations, I'm a python newbie, if so I would appreciate someone setting me straight. It's preventing me from using xarray.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Choose time units in output netcdf 216626776
289321422 https://github.com/pydata/xarray/issues/1324#issuecomment-289321422 https://api.github.com/repos/pydata/xarray/issues/1324 MDEyOklzc3VlQ29tbWVudDI4OTMyMTQyMg== rafa-guedes 7799184 2017-03-26T22:25:25Z 2017-03-26T22:25:25Z CONTRIBUTOR

Thanks!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Choose time units in output netcdf 216626776
288942654 https://github.com/pydata/xarray/issues/1324#issuecomment-288942654 https://api.github.com/repos/pydata/xarray/issues/1324 MDEyOklzc3VlQ29tbWVudDI4ODk0MjY1NA== shoyer 1217238 2017-03-24T06:17:36Z 2017-03-24T06:17:36Z MEMBER

Yes, you can control this by setting encoding, e.g., time.encoding['units'] = 'days since '1900-01-01' http://xarray.pydata.org/en/stable/io.html#time-units

It looks like this error message is not very helpful currently -- a PR to improve it would be appreciated!

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Choose time units in output netcdf 216626776

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 59.592ms · About: xarray-datasette
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows