Adapt to CF conventions 1.9 - remove gregorian calendar#935
Adapt to CF conventions 1.9 - remove gregorian calendar#935
Conversation
Co-authored-by: David Huard <huard.david@ouranos.ca>
| if obj.calendar == "gregorian": | ||
| return "standard" |
There was a problem hiding this comment.
Perhaps this comment is out of scope, but would we want to emit a warning here about this change of calendar? I don't think we specify any output Conventions to our datasets. Should we be appending this information to our output Datasets?
There was a problem hiding this comment.
I think we do not add this attribute, simply because we don't output Datasets. If we ever do, than I guess we could append the info. And if we do, we'll have to be even more careful about this kind of change.
It's a good question. But I believe that this change doesn't need a warning :
- CF conventions have always accepted "standard" as equivalent to "gregorian", they just dropped the latter recently.
- Code might "break", but only with cftime <= 1.5.1. For people using the forthcoming cftime 1.5.2, this break will be generalized and we will be able to shift responsability to them ;).
There was a problem hiding this comment.
If that's the case, is this an event where we should bump the required version of CFtime within xclim?
EDIT: the new CFtime isn't released yet. Never mind for now.
There was a problem hiding this comment.
It's not released yet! That bug was found because of our smart tox builds using the master!
Pull Request Test Coverage Report for Build 1505393848
💛 - Coveralls |
…s/heat_index * 'indices/heat_index' of github.com:UCL/xclim: (42 commits) Added french metadata for heat index. Apply changes to fraction indicator [sdba] Re-write of Extreme's adjustment (Ouranosinc#914) update history Update history [Ouranosinc#931] Fix indicator for Rxxp index Add missing type for `threshold_count` Add dev notes - add indexer example - other small changes run all available tests in one call for slow builds update makefile target black, only install coveralls in tox if coveralls is needed Indexing within indicators (Ouranosinc#934) Update history finish needs doctests Remove unnecessary keep_attrs Adapt to CF conventions 1.9 - remove gregorian calendar (Ouranosinc#935) Bump version: 0.31.2-beta → 0.31.3-beta update HISTORY.rst suggested corrections Apply suggestions from code review Resampling indicator (Ouranosinc#927) ...
…es/wetday_prop * 'indices/wetday_prop' of github.com:UCL/xclim: (46 commits) Add moi-meme as 0.32 contributor do not redefine builtin next use array_almost_equal in tests Update history Improve quantile function Apply changes to fraction indicator [sdba] Re-write of Extreme's adjustment (Ouranosinc#914) update history Update history [Ouranosinc#931] Fix indicator for Rxxp index Add missing type for `threshold_count` Add dev notes - add indexer example - other small changes run all available tests in one call for slow builds update makefile target black, only install coveralls in tox if coveralls is needed Indexing within indicators (Ouranosinc#934) Update history finish needs doctests Remove unnecessary keep_attrs Adapt to CF conventions 1.9 - remove gregorian calendar (Ouranosinc#935) Bump version: 0.31.2-beta → 0.31.3-beta ...
Pull Request Checklist:
number) and pull request (:pull:number) has been added.bumpversion patchhas been called on this branch.zenodo.jsonWhat kind of change does this PR introduce?
cftimethat made this change yesterday (address deprecation of calendar='gregorian' in CF v1.9 (issue #256) Unidata/cftime#257).get_calendarandensure_ctime_arrayto fix a bug I saw while making this change. Both were failing in some edgecases involvingxr.CFTimeIndexobjects.Does this PR introduce a breaking change?
Yes,
get_calendarwill never return "gregorian", but "standard".