home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 185709414

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
185709414 MDU6SXNzdWUxODU3MDk0MTQ= 1064 Differences on datetime values appears after writing reindexed variable on netCDF file 16919188 closed 0     12 2016-10-27T15:54:34Z 2023-09-24T15:05:27Z 2023-09-24T15:05:27Z NONE      

In my Dataset i've got a time serie coordinate who begins like this

<xarray.DataArray 'time' (time: 10)> array(['2014-02-15T00:00:00.000000000+0100', '2014-02-15T18:10:00.000000000+0100', '2014-02-16T18:10:00.000000000+0100', '2014-02-17T18:10:00.000000000+0100', '2014-02-18T18:10:00.000000000+0100', '2014-02-19T18:10:00.000000000+0100', '2014-02-20T18:10:00.000000000+0100', '2014-02-21T18:10:00.000000000+0100', '2014-02-22T00:00:00.000000000+0100', '2014-02-23T00:00:00.000000000+0100'], dtype='datetime64[ns]') Coordinates: * time (time) datetime64[ns] 2014-02-14T23:00:00 2014-02-15T17:10:00 ...

And all is ok when I write and re-open the netdcdf file

Then i try to add to this dataset a reindexed variable like this

da["MeanRainfallHeigh"] = rain.reindex(time =da.time).fillna(0)

Everything is still good for the writing, but when I reopen the netcdf file, the time values are modified for the minutes part.

<xarray.DataArray 'time' (time: 10)> array(['2014-02-15T00:00:00.000000000+0100', '2014-02-15T18:00:00.000000000+0100', '2014-02-16T18:00:00.000000000+0100', '2014-02-17T18:00:00.000000000+0100', '2014-02-18T18:00:00.000000000+0100', '2014-02-19T18:00:00.000000000+0100', '2014-02-20T18:00:00.000000000+0100', '2014-02-21T18:00:00.000000000+0100', '2014-02-22T00:00:00.000000000+0100', '2014-02-23T00:00:00.000000000+0100'], dtype='datetime64[ns]') Coordinates: * time (time) datetime64[ns] 2014-02-14T23:00:00 2014-02-15T17:00:00 ...

Thanks!

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1064/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.757ms · About: xarray-datasette