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

Ouranosinc / xclim / 16603306744 / 5
92%
main: 92%

Build:
DEFAULT BRANCH: main
Ran 30 Jul 2025 05:35PM UTC
Files 59
Run time 4s
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

29 Jul 2025 05:37PM UTC coverage: 88.792% (-0.04%) from 88.834%
16603306744.5

push

github

web-flow
Refactoring wine climatology indices (#2207)

### What kind of change does this PR introduce?

* Refactors the latitude correction algorithms into `xc.indices.helpers`
* Adjusts existing wine-climatology call signatures to be more
restrictive about allowed time frequencies
* Adjusted the `"jones"`, method for the `huglin_index` to drop
latitudes falling within the polar extremes:
* For cases where all latitude values for a growing season fall below
`1.0`, that season is dropped from the array.
    * If no season has values above `1.0`, a `ValueError` is raised.
* Added a `cap_value` for simple latitude coefficient functions to allow
users to set an arbitrary value for extreme latitudes (e.g. `np.nan`,
`1.0`, `1.08`, etc.).
* Added the option of setting values for polar days and polar nights in
`day_lengths`
* `day_lengths` no longer modifies the `lat` DataArray passed to it
* latitude-day-length-coefficient algorithms are now found in
`xclim.indices.helpers`:
  * gladstones_day_length_latitude_coefficient
  * huglin_day_length_latitude_coefficient
  * jones_day_length_latitude_coefficient

### Does this PR introduce a breaking change?

Yes. The `icclim` method for calculating Heliothermal Index of Huglin
(HI) has been renamed the `huglin` method. This algorithm is directly
based on the original [Huglin
(1978)](https://www-iuem.univ-brest.fr/wapps/letg/adviclim/BDX/PDF/CR_Acad%C3%A9mie_agriculture_1978_64_Huglin.pdf)
paper. The `icclim` option is still accepted (reverts to `huglin`) but
should be deprecated.

The seasonally-aggregated method for calculating the latitude adjustment
factors in HI and BEDD based on [Hall and Jones
(2010)](https://onlinelibrary.wiley.com/doi/10.1111/j.1755-0238.2010.00100.x)
are now restricted to `YS-JAN` or `YS-JUL` time frequencies.
Additionally, the previous version of the `jones` day-length calculation
were providing erroneous values for extreme latitudes where day-lengths
can extend to either 0 or 24 hours; The new be... (continued)

7455 of 8396 relevant lines covered (88.79%)

0.89 hits per line

Source Files on job run-3.11-ubuntu-latest-py311-coverage-extras-sbck-offline-prefetch - 16603306744.5
  • Tree
  • List 59
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 16603306744
  • 542e37a1 on github
  • Prev Job for on main (#16601897091.6)
  • Next Job for on main (#16728747444.1)
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