-
Notifications
You must be signed in to change notification settings - Fork 40
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
Add support for 'common_year' and 'common_years' units #246
Conversation
According to the udunits docs a So, I think there may some ambiguity in allowing |
seems like if it works for 'noleap', 'years since' should also be supported for 'all_leap' and '360_day' calendars |
Allowing 'year' units is a rabbit hole I don't think we really want to go all the way down. The only examples of netcdf files with that use the 'common_years' time units in the wild that I can find seem to be output from the ice-sheet model in CESM, which uses the '365_day' calendar. I'm willing to merge this PR to deal with this particular use-case, but after thinking about this some more I don't think enabling this for other calendars is a good idea. |
Needs a Changelog entry |
Thank you for your feedback, @jswhit! I concur. I'm going to remove the |
@jswhit, the CI isn't running because this is my first time contribution to cftime. could you approve running workflows when you get a moment? |
This PR is my attempt at fixing #5. As discussed in #5, the only supported calendars for year units are
365_day
andnoleap
.Using
common_year
oryears
units with other calendars results in failures as intended:@kmpaul, let me know if this PR fully addresses #5.