pypi xclim 0.52.0
v0.52.0

latest releases: 0.52.2, 0.52.1
one month ago

Contributors to this version: David Huard (@huard), Trevor James Smith (@Zeitsperre), Hui-Min Wang (@Hem-W), Éric Dupuis (@coxipi), Sarah Gammon (@SarahG-579462), Pascal Bourgault (@aulemahal), Juliette Lavoie (@juliettelavoie), Adrien Lamarche (@LamAdr).

Announcements

  • xclim now supports both numpy versions >=1.20 and >=2.0. (GH/1785, PR/1814, PR/1870).
  • xclim now needs cf_xarray>=0.9.3 but continues to support older versions of pint (<0.24) for compatibility reasons. (PR/1870).

New features and enhancements

  • xclim.sdba.nbutils.quantile and its child functions are now faster. If the fastnanquantile library is installed, it is used as the backend for the computation of quantiles and yields even faster results. This dependency is now listed in the xclim[extras] recipe. (GH/1255, PR/1513).
  • New multivariate bias adjustment class MBCn, giving a faster and more accurate implementation of the MBCn algorithm. (GH/1551, PR/1580).
  • New multivariate bias adjustment classes OTC and dOTC. Requires the POT library which can be installed via the xclim[extras] recipe. (PR/1787).
  • xclim is now compatible with pytest versions >=8.0.0. (PR/1632).

Breaking changes

  • As of cf_xarray>=0.9.3, dimensionless quantities now use the "1" units attribute as specified by the CF conventions, previously an empty string was returned. (PR/1814).
  • The definitions of the frost_free_season_start and frost_free_season_end have been slightly changed to be coherent with the frost_free_season_length and xclim's notion of season in general. Indicator and indices signature have been adapted to the new conventions. (PR/1845).
  • Season length indicators have been modified to return 0 for all cases where a proper season was not found, but the data is valid. Previously, a nan was given if neither a start nor an end were found, even if the data was valid, and a 0 was given if an end was found but without a valid start. (PR/1845).

Bug fixes

  • Fixed the indexer bug in the xclim.indices.standardized_index_fit_params when multiple or non-array indexers are specified and fitted parameters are reloaded from netCDF. (GH/1842, PR/1843).
  • Addressed a bug found in wet_spell_* indicators that was contributing to erroneous results. A new generic spell length statistic function (xclim.indices.generic.spell_length_statistics) is now used in wet and dry spells indicators. (GH/1834, PR/1838).
  • Syntax for nan and inf was adapted to support numpy>=2.0. (PR/1814, GH/1785).
  • The type in jitter now works with modern version of dask (>=2024.8.0). (PR/1864).

Internal changes

  • Changed the French translation of "wet days" from "jours mouillés" to "jours pluvieux". (GH/1825, PR/1826).
  • In order to adapt to changes in pytest, the doctest fixtures have been split from the main testing suite and doctests are now run using $ python -c 'from xclim.testing.utils import run_doctests; run_doctests()'. (PR/1632).
  • tox has been reconfigured to run doctests in a separate environment (tox -e doctests). (PR/1632).
  • Added xclim.indices.generic.season to make season start, end, and length indices. Added a stat argument to xclim.indices.run_length.season to avoid returning a dataset. (PR/1845).

CI changes

  • pip-tools (pip-compile) has been used to generate a lock file with hashes for the CI dependencies. (PR/1841).
  • The main.yml workflow has been updated to use simpler trigger logic. (PR/1841).
  • A workflow bug has been fixed that was causing multiple duplicate comments to be made on Pull Requests originating from forks. (PR/1841).
  • The upstream.yml workflow was adapted to not install upstream Python dependencies using hashes (as it is impossible to install directly from GitHub sources using --require-hashes). (PR/1859).
  • The tox-gh configuration has been set to handle the environment configurations on GitHub Workflows. The tox.ini file is also a bit more organized/consistent. (PR/1859).

Don't miss a new xclim release

NewReleases is sending notifications on new releases.