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

Ouranosinc / xscen / 26175401727 / 8
90%
main: 90%

Build:
DEFAULT BRANCH: main
Ran 20 May 2026 04:48PM UTC
Files 17
Run time 7s
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

20 May 2026 04:19PM UTC coverage: 89.74% (+0.04%) from 89.701%
26175401727.8

push

github

web-flow
Actually vectorized subsetting on warming levels (#736)

<!-- 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] (If applicable) Documentation has been added / updated (for bug
fixes / features).
- [x] (If applicable) Tests have been added.
- [x] This PR does not seem to break the templates.
- [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?
Rewrites `subset_warminglevel` to use a vectorized `sel` instead of
re-building the output with `concats`. Then gain is a drastic decrease
in dask complexity. For a simple case where the input has 15 tasks, I
went from 950 to 170. In general, I think the increase in dask tasks is
x10 for simple inputs (not much done since opening), compared to x63
before.

This was achieved by building an array to pass to `da.sel(time=...)`
instead of doing this part by part. Involves a few `apply_ufunc`, but I
hope the code is still readable ?

Also, I added support for non-yearly frequencies here. It's no big deal
for a scalar subset, but still requires an uniform time coordinate on
the vectorized subset since we need to align all elements on the same
"fake" time axis at the end.

Finally, I changed the definition of the `warminglevel_bounds` variable.
In CF, common bounds are supposed to be identical for two
non-overlapping but contiguous periods. This means that the right (end)
bound should not be "1 second before the end", it should simply be the
end, so midnight on January 1st of the year following the period. This
change has been made in xclim for `time_bnds` a while ago, in both cases
it was because of my faulty reading of the conventions.

### ... (continued)

4426 of 4932 relevant lines covered (89.74%)

0.9 hits per line

Source Files on job run-Python3.13-conda-ubuntu-latest - 26175401727.8
  • Tree
  • List 17
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 26175401727
  • c48c1636 on github
  • Prev Job for on main (#26109984055.11)
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