-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
Problem
I am running into inconsistent time coordinates with a long climate model experiment that exceeds the limits of pandas.tslib.Timestamp
(covers roughly 17th to 23rd century).
Currently, xarray.open_mfdataset
delegates decoding of the time axis to xarray.open_dataset
which decodes either to pandas time stamps or, of this fails, to netcdftime.datetime
objects. xarray.open_mfdataset
later combines the single-file datasets and just concatenates all the time axes.
Solution
- Let auto_combine check for consistency and repair the time axis if necessary.
- Let
xarray.open_mfdataset
preventxarray.open_dataset
from decoding the times for each file and only decode times after everything is combined.
The latter is equivalent to a workaround I use for the moment: Pass decode_times=False
to xarray.open_mfdataset
and then explicitly call xarray.decode_cf
on the dataset.