-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<!--Please ensure the PR fulfills the following requirements! --> <!-- If this is your first PR, make sure to add your details to the AUTHORS.rst! --> ### Pull Request Checklist: - [ ] This PR addresses an already opened issue (for bug fixes / features) - This PR fixes #xyz - [x] Tests for the changes have been added (for bug fixes / features) - [x] (If applicable) Documentation has been added / updated (for bug fixes / features) - [x] CHANGELOG.rst has been updated (with summary of main changes) - [x] Link to issue (:issue:`number`) and pull request (:pull:`number`) has been added ### What kind of change does this PR introduce? * 3 new indicators `heat_spell_frequency`, `heat_spell_max_length` and `heat_spell_total_length`. The "heat_wave" indicators test that a bivariate condition on each day and then find consecutive runs of a minimum length. The new functions adhere to xclim's concept of "spell" : the condition is tested against a rolling N-day window and if it is fulfilled *all days* of the window are considered part of the spell. * New generic function `spell_mask` that encapsulate the spell notion. It returns a boolean mask of the days part of spells. The code has been added two features: + Multivariate : input data can be a list (and so must be the thresholds). The way we check for the conditions across variables is decided by new argument `var_reducer` ('all' or 'any'). + Weights : if the spell stat is a mean, weights can be given (used by the INSPQ, but not for the actual PC indicators). * Indicator parameters can now be assigned new names. See examples in how the heat spell indicators are created. We could already do something similar with data variables. The internals of `Indicator` have changed accordingly (sorry). ### Does this PR introduce a breaking change? No. ### Other information: I kinda decided that "heat" meant "tasmax and tasmin".
- Loading branch information
Showing
9 changed files
with
626 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.