-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make compatible with CFTime #34
Comments
|
Apparently it does work with files that have a monthly resolution in time or better - more than one time step. There is no issue with the time axis for times after year 2262 or so. |
But it still fails with some |
No. It's because the type of the time dim is not recognised. (See above). XORCA makes sure that time dims are not squeezed away. |
XORCA checks for datetime64, which the yearly time values before year 26?? clearly are. I double checked with: |
I think I found a solution. Probably improvable in coding style, but it works. All variables from the aux files are correctly transferred to the new data set and time axis are carfeuly checked. All complies to cftime. See #35. |
https://github.com/willirath/xorca/blob/1cab7220aa2cea8698db5d86b3e0d75449959539/xorca/lib.py#L67_L68 tries to find time dimensions by ckecking their data types. This fails if cftime objects are used on the time axis.
Road to fully support cftime:
We pass
use_cftime
kwarg to all theopen_dataset
calls.Fix
to sth like
(But note that it would be better to actively check for valid time types. this is likely also done somewhere in xarray's plotting backend.)
The text was updated successfully, but these errors were encountered: