Skip to content
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

address deprecation of calendar='gregorian' in CF v1.9 (issue #256) #257

Merged
merged 16 commits into from
Nov 25, 2021

Conversation

jswhit
Copy link
Collaborator

@jswhit jswhit commented Nov 5, 2021

add a DeprecationWarning if calendar='gregorian' used, replace DatetimeGregorian with DatetimeStandard (but keep DatetimeGregorian for backwards compatibility)

@jswhit
Copy link
Collaborator Author

jswhit commented Nov 5, 2021

We could add a CFversion attribute to cftime.datetime and only raise the warnings if CFversion >= 1.9. The question will then become what should the default value be?

@jswhit
Copy link
Collaborator Author

jswhit commented Nov 7, 2021

DeprecationWarning has been removed, and cftime.datetime.__add__ and __sub__ still return DatetimeGregorian objects so as not to break xarray. The only thing this PR really does is create a DatetimeStandard class and switch calendar='gregorian' to calendar='standard' internally everywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant