issues: 1231399637
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1231399637 | I_kwDOAMm_X85JZarV | 6589 | xarray improperly decodes times from a NetCDF when it is a uint | 992873 | closed | 0 | 1 | 2022-05-10T16:17:52Z | 2022-05-15T14:42:32Z | 2022-05-15T14:42:32Z | NONE | What happened?
What did you expect to happen?
Minimal Complete Verifiable Example```Python import xarray as xr xr.open_dataset('both_times.nc').good_time xr.open_dataset('both_times.nc').time ``` MVCE confirmation
Relevant log output```Python In [1]: xr.open_dataset('both_times.nc').good_time <xarray.DataArray 'good_time' (trajectory: 284)> array(['2018-08-22T03:23:03.000000000', '2018-08-22T03:23:53.000000000', '2018-08-22T03:25:55.000000000', ..., '2018-08-22T08:18:10.000000000', '2018-08-22T08:19:00.000000000', '2018-08-22T08:19:50.000000000'], dtype='datetime64[ns]') Coordinates: * trajectory (trajectory) uint32 0 1 2 3 4 5 6 ... 278 279 280 281 282 283 Attributes: axis: T long_name: Time of observation standard_name: time In [2]: xr.open_dataset('both_times.nc').time <xarray.DataArray 'time' (trajectory: 284)> array(['2018-08-22T03:23:03.000000000', '2018-08-22T03:23:05.755359744', '2018-08-22T03:23:03.201308160', ..., '2018-08-22T03:23:06.144805888', '2018-08-22T03:23:04.605198336', '2018-08-22T03:23:03.065590784'], dtype='datetime64[ns]') Coordinates: * trajectory (trajectory) uint32 0 1 2 3 4 5 6 ... 278 279 280 281 282 283 Attributes: standard_name: time long_name: Time of observation axis: T ``` Anything else we need to know?No response Environment
INSTALLED VERSIONS
------------------
commit: None
python: 3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 06:04:10) [GCC 10.3.0]
python-bits: 64
OS: Linux
OS-release: 3.10.0-1160.62.1.el7.x86_64
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: ('en_US', 'UTF-8')
libhdf5: 1.10.6
libnetcdf: 4.8.0
xarray: 2022.3.0
pandas: 1.4.2
numpy: 1.22.3
scipy: 1.7.0
netCDF4: 1.5.7
pydap: None
h5netcdf: 1.0.0
h5py: 3.3.0
Nio: None
zarr: 2.11.3
cftime: 1.6.0
nc_time_axis: None
PseudoNetCDF: None
rasterio: None
cfgrib: 0.9.10.1
iris: None
bottleneck: 1.3.4
dask: 2022.04.1
distributed: 2022.4.1
matplotlib: 3.5.1
cartopy: None
seaborn: 0.11.2
numbagg: None
fsspec: 2021.06.1
cupy: None
pint: 0.19.1
sparse: None
setuptools: 62.1.0
pip: 22.0.4
conda: 4.12.0
pytest: 7.1.1
IPython: 8.2.0
sphinx: 4.5.0
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/6589/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |