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

Ouranosinc / xscen / 25073828750
90%

Build:
DEFAULT BRANCH: main
Ran 28 Apr 2026 07:48PM UTC
Jobs 12
Files 17
Run time 1min
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

28 Apr 2026 07:41PM UTC coverage: 90.031%. Remained the same
25073828750

push

github

web-flow
Drop nans before interpolating WL period (#722)

<!-- 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
- [ ] (If applicable) Documentation has been added / updated (for bug
fixes / features).
- [ ] (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?
It seems that `get_period_from_warming_level` can't handle timeseries
with nans at the beginning, scipy's interpolator returns the first value
when it is nan.

This fixes the issue by dropping any nans in the timeseries, letting the
interpolator work only on "known" data points.

I think we didn't see the issue before because it would only happen when
the beginning of a tas timeseries is missing, which only happens when a
window larger than 50 is requested (as we always have 1850-1900 for all
simulations).

Another way to do this would be `bfill('time')` as NaNs can only be
present at the beginning of the series. Both approach seem equivalent.

### Illustration of issue
```python3
xs.get_period_from_warming_level("CMIP6_NorESM2-MM_ssp126_r1i1p1f1", 0.69, window=55)
# ['1823', '1877']
```

```python3
ds = xr.open_dataset('/home/pbourg/Projets/xscen/src/xscen/data/IPCC_annual_global_tas.nc')

t = ds.tas.where((ds.experiment == 'ssp126') & (ds.source == 'NorESM2-MM'), drop=True).squeeze('simulation')
r = t.sel(time=slice('1850', '1900')).mean('time')

rd = (t - r).rolling(time=55, center=True, min_periods=55).mean().shift(time=1).cumulative('time').max()
```
Where "rd" is the rolling diff, the yearly max of warming level reached
by the model. For ... (continued)

1 of 1 new or added line in 1 file covered. (100.0%)

4389 of 4875 relevant lines covered (90.03%)

10.52 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-Python3.10-conda-ubuntu-latest - 25073828750.1 28 Apr 2026 07:58PM UTC 17
89.35
GitHub Action Run
2 run-Python3.12-conda-ubuntu-latest - 25073828750.2 28 Apr 2026 07:52PM UTC 17
89.74
GitHub Action Run
3 run-Python3.11-pypi-windows-latest - 25073828750.3 28 Apr 2026 07:57PM UTC 17
79.94
GitHub Action Run
4 run-Python3.10-pypi-ubuntu-latest - 25073828750.4 28 Apr 2026 07:52PM UTC 17
87.08
GitHub Action Run
5 run-Python3.12-pypi-ubuntu-latest - 25073828750.5 28 Apr 2026 07:51PM UTC 17
87.38
GitHub Action Run
6 run-Python3.14-conda-ubuntu-latest - 25073828750.6 28 Apr 2026 07:48PM UTC 17
89.74
GitHub Action Run
7 run-Python3.13-conda-ubuntu-latest - 25073828750.7 28 Apr 2026 07:52PM UTC 17
89.74
GitHub Action Run
8 run-Python3.11-pypi-ubuntu-latest - 25073828750.8 28 Apr 2026 07:52PM UTC 17
87.38
GitHub Action Run
9 run-Python3.14-pypi-ubuntu-latest - 25073828750.9 28 Apr 2026 07:54PM UTC 17
87.36
GitHub Action Run
10 run-Python3.12-pypi-macos-latest - 25073828750.10 28 Apr 2026 07:49PM UTC 17
87.32
GitHub Action Run
11 run-Python3.13-pypi-ubuntu-latest - 25073828750.11 28 Apr 2026 07:52PM UTC 17
87.38
GitHub Action Run
12 run-Python3.11-conda-ubuntu-latest - 25073828750.12 28 Apr 2026 07:51PM UTC 17
89.74
GitHub Action Run
Source Files on build 25073828750
  • Tree
  • List 17
  • Changed 1
  • Source Changed 1
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25073828750
  • 5da87d22 on github
  • Prev Build on main (#24753849216)
  • Next Build on main (#25233485102)
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