• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Ouranosinc / xclim / 10742777452 / 3
92%
main: 92%

Build:
DEFAULT BRANCH: main
Ran 06 Sep 2024 05:53PM UTC
Files 73
Run time 5s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Sep 2024 05:39PM UTC coverage: 81.645% (+0.04%) from 81.601%
10742777452.3

push

github

web-flow
Heat spells (#1885)

<!--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".

8318 of 10188 relevant lines covered (81.65%)

0.82 hits per line

Source Files on job 10742777452.3
  • Tree
  • List 0
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 10742777452
  • 38875350 on github
  • Prev Job for on main (#10707481039.5)
  • Next Job for on main (#10774929791.8)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc