-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Convert 360_day calendars by choosing random dates to drop or add #8603
Conversation
@spencerkclark |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @aulemahal—sorry for taking so long to take a look at this. The tests / implementation look reasonable.
Co-authored-by: Spencer Clark <[email protected]>
@spencerkclark I think everything here is done. Thanks! |
Yup looks good—thanks! |
* main: (feat): Support for `pandas` `ExtensionArray` (pydata#8723) Migrate datatree mapping.py (pydata#8948) Add mypy to dev dependencies (pydata#8947) Convert 360_day calendars by choosing random dates to drop or add (pydata#8603)
whats-new.rst
Small PR to add a new "method" to convert to and from 360_day calendars. The current two methods (chosen with the
align_on
keyword) will always remove or add the same day-of-year for all years of the same length.This new option will randomly chose the days, one for each fifth of the year (72-days period). It emulates the method of the LOCA datasets (see web page and article ). February 29th is always removed/added when the source/target is a leap year.
I copied the implementation from xclim (which I wrote), see code here .