issues: 337733183
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
337733183 | MDU6SXNzdWUzMzc3MzMxODM= | 2265 | .to_zarr with datetime64[ns] | 4338975 | closed | 0 | 4 | 2018-07-03T03:31:21Z | 2018-07-04T00:25:33Z | 2018-07-04T00:25:33Z | NONE | Hi I've noticed a possible inconsistency with datetime storing. ``` t=xr.open_dataset(files[0]) t['JULD_LOCATION'][0] <xarray.DataArray 'JULD_LOCATION' ()> array('2008-07-29T20:20:58.000000000', dtype='datetime64[ns]') Attributes: long_name: Julian day (UTC) of the location relative to REFERENCE_DATE... conventions: Relative julian days with decimal part (as parts of day) resolution: 0.0 t.to_zarr(r'D:\argo\argo2.zarr',mode='w') za =zarr.open(r'D:\argo\argo2.zarr',mode='w+') za['JULD_LOCATION'].info Out[442]: Name : /JULD_LOCATION Type : zarr.core.Array Data type : float64 Shape : (197,) Chunk shape : (197,) Order : C Read-only : False Compressor : Zlib(level=1) Store type : zarr.storage.DirectoryStore No. bytes : 1576 (1.5K) No. bytes stored : 2000 (2.0K) Storage ratio : 0.8 Chunks initialized : 1/1 ``` if I try this
There also seems to be a problem with the actual values stored are different using the two methods ``` pd.to_datetime(za['JULD_LOCATION'][0]) Timestamp('1970-01-01 00:00:00.000021394') pd.to_datetime(za['JULD_LOCATION1'][0])
Timestamp('2008-07-29 20:20:58')
I hope this makes sense |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/2265/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |