-
Notifications
You must be signed in to change notification settings - Fork 39
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
decode 'months since' for 360_day calendars #68
Labels
Comments
To clarify, currently in cftime, I get the following: cftime.num2date(0, 'months since 1960-01-01', '360_day')
|
Created a new pull request #75 which includes both the date2num and num2date implementations, and works with the latest updates to master. |
jswhit
added a commit
that referenced
this issue
Oct 27, 2018
allow 'months_since' for '360_day' calendar (issue #68)
merged pull request #75 |
Sorry, I've not been able to look at this for a few days - does this mean that "months since ..." are always decoded as 30 day months when the calendar is "360_day"? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The IRI Data Library contains tons of datasets with the following time attributes:
(edited to correct typo in original post)
(example dataset)
I would like to be able to open and decode these datasets in xarray, with time decoding handled by cftime.
There are two problems:
360_day
. But that is easy to fix by rewriting the calendar attribute.calendar = 360_day
,months
is not considered a valid time unitHowever, in a 360-day calendar month==30 days, so this should be valid.
This was discussed over in Unidata/netcdf4-python#434 (comment), where @jswhit commented:
The text was updated successfully, but these errors were encountered: