You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The saved netCDF file contains negative time values since "292 years is the maximum length of time a np.timedelta64 object with nanosecond precision can represent" (see here in the documentation) and it therefore runs into an overflow in the example (via skcs explanation to my question on StackOverflow).
Expected Output
Correct time values.
Possible solution:
For dates outside of the np.datetime range the behaviour is already correct since xarray falls back to cftime.datetime. I don't know if this could be a feasible solution but I wanted to mention it here.
Problem description
The saved netCDF file contains negative time values since "292 years is the maximum length of time a np.timedelta64 object with nanosecond precision can represent" (see here in the documentation) and it therefore runs into an overflow in the example (via skcs explanation to my question on StackOverflow).
Expected Output
Correct time values.
Possible solution:
For dates outside of the
np.datetime
range the behaviour is already correct since xarray falls back tocftime.datetime
. I don't know if this could be a feasible solution but I wanted to mention it here.Output of
xr.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.6.4.final.0
python-bits: 64
OS: Linux
OS-release: 4.15.0-24-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8
LOCALE: en_GB.UTF-8
xarray: 0.10.7
pandas: 0.22.0
numpy: 1.14.2
scipy: 1.0.1
netCDF4: 1.3.1
h5netcdf: 0.6.1
h5py: 2.8.0
Nio: None
zarr: None
bottleneck: 1.2.1
cyordereddict: None
dask: 0.18.1
distributed: 1.22.0
matplotlib: 2.2.2
cartopy: 0.16.0
seaborn: 0.8.1
setuptools: 39.0.1
pip: 9.0.1
conda: None
pytest: None
IPython: 6.2.1
sphinx: 1.7.2
The text was updated successfully, but these errors were encountered: