Published May 3, 2024 | Version v0.49.0
Software Open

xclim: xarray-based climate data analytics

  • 1. Ouranos, Montréal, Québec, Canada
  • 2. Centre européen de recherche et de formation avancée en calcul scientifique (CERFACS), Toulouse, France
  • 3. University College London, London, United Kingdom
  • 4. University College London, London, United Kingdom, and The Grantham Institute for Climate Change and the Environment, Imperial College London, London, United Kingdom
  • 5. Hydro-Québec, Québec, Canada
  • 6. Jakarto, Montréal, Québec, Canada
  • 7. Deutsches Klimarechenzentrum (DKRZ), Hamburg, Germany
  • 8. Environment and Climate Change Canada (ECCC), Canada
  • 9. Ouranos Consortium, Montréal, Québec, Canada
  • 10. Helmholtz-Zentrum Hereon, Geesthacht, Germany
  • 11. Independent Researcher, Canada
  • 12. Institut de recherche d'Hydro-Québec (IREQ), Varennes, Québec, Canada
  • 13. Commonwealth Scientific and Industrial Research Organisation (CSIRO), Adelaide, Australia
  • 14. Centre for Environmental Data Analysis (CEDA), United Kingdom
  • 15. UK Centre for Ecology & Hydrology (UKCEH), Wallingford, United Kingdom
  • 16. Independent Researcher, United States
  • 17. Santander Meteorology Group, Instituto de Física de Cantabria (CSIC-UC), Santander, Spain

Description

Contributors to this version: Trevor James Smith (@Zeitsperre), Pascal Bourgault (@aulemahal), Juliette Lavoie (@juliettelavoie), David Huard (@huard), Gabriel Rondeau-Genesse (@RondeauG), Javier Diez-Sierra (@JavierDiezSierra), Sarah Gammon (@SarahG-579462), Éric Dupuis (@coxipi).

Announcements

  • xclim has migrated its development branch name from master to main. (GH/1667, PR/1669).

New features and enhancements

  • Indicator xclim.atmos.potential_evapotranspiration and indice xclim.indices.potential_evapotranspiration now accept a new value (DA02) for argument method implementing potential evapotranspiration based on Droogers and Allen (2002). (GH/1710, PR/1723).
  • The documentation now uses the furo theme for Sphinx. This theme supports native "light" and "dark" modes, adaptive screen resolution, as well as provides a better navigation layout for pages housing long lists of entries (e.g. indices). (GH/1693, PR/1731).
  • xclim.ensembles.ensemble_percentiles now takes a method argument, accepting one of: 'interpolated_inverted_cdf', 'hazen', 'weibull', 'linear' (default), 'median_unbiased', or 'normal_unbiased'. (GH/1694, PR/1732).
  • Distributions with negative values are directly fitted without need for an offset for distributions such as 'gamma' and 'fisk' in xclim.indices.standardized_precipitation_evapotranspiration_index. (GH/1477 PR/1720).
  • xclim.indices.stats_fit_start gives an estimate of the loc parameter for 'gamma' and 'fisk' distributions. (GH/1477 PR/1720).

New indicators

  • New snw_season_length and snd_season_length computing the duration between the start and the end of the snow season, both defined as the first day of a continuous period with snow above/under a threshold. Previous versions of these indicators were renamed snw_days_above and snd_days_above to better reflect what they computed : the number of days with snow above a given threshold (with no notion of continuity). (GH/1703, PR/1708).
  • Added xclim.atmos.duff_moisture_code, part of the Canadian Forest Fire Weather Index System. It was already an output of the xclim.atmos.cffwis_indices, but now has its own standalone indicator. (GH/1698, PR/1712).

Breaking changes

  • The previously deprecated functions xclim.sdba.processing.construct_moving_yearly_window and xclim.sdba.processing.unpack_moving_yearly_window have been removed. These functions have been replaced by xclim.core.calendar.stack_periods and xclim.core.calendar.unstack_periods. (PR/1717).
  • The previously deprecated function xclim.ensembles.change_significance has been removed. (PR/1737).
  • Indicators snw_season_length and snd_season_length have been modified. (GH/1703, PR/1708).
  • The 'hargeaves85'/'hg85' method for the potential_evapotranspiration indicator and indice has been modified for precision and consistency with recent academic literature. (GH/1710, PR/1723).
  • The __getitem__ method of xclim.core.indicator.Parameter instances has been removed. Accessing members of Parameters now uniquely uses dot notation. (PR/1721).
  • The obsolete function wrapper for generating Indicators xclim.core.utils.wrapped_partial has been removed. (PR/1721).
  • The default documentation theme has changed from sphinx-rtd-theme to furo; Several modifications to the documentation configuration and CSS overrides have been made to accommodate the changes. furo is now a docs dependency. (GH/1693, PR/1731).
  • Estimation of parameters using _fit_start for gamma and fisk has been changed and can affect the results obtained with full-fledged (e.g. "ML") methods. (GH/1477 PR/1720).
  • Method APP in xclim.indices.standardized_precipitation_index and xclim.indices.standardized_precipitation_evapotranspiration_index now requires the user to impose a loc parameter through fitkwargs['floc']. (GH/1477, PR/1720).
  • Zero inflated distributions used in xclim.stats.standardized_index now appropriately use the probability of zeroes in the calibration data and not the entire dataset. (GH/1477 PR/1720).

Bug fixes

  • Fixed a bug in sdba's map_groups that prevented passing DataArrays with cftime coordinates if the sdba_encode_cf option was 'True'. (GH/1673, PR/1674).
  • Fixed bug in sdba where a loaded training dataset could not be used for adjustment. (GH/1678, PR/1679).
  • Fixed bug with loess smoothing for an array full of NaNs. (PR/1699).
  • Fixed and adapted time_bnds to the newest xarray. (PR/1700).
  • Fixed "agreement fraction" in robustness_fractions to distinguish between negative change and no change. Added "negative" and "changed negative" fractions (GH/1690, PR/1711).
  • make_criteria now skips columns with NaNs across all realizations. (PR/1713).
  • Fixed bug where QuantileDeltaMapping adjustment was failing for seasonal grouping. (GH/1704, PR/1716).
  • The codebase has been adjusted to address several (~400) mypy-related errors attributable to inaccurate function call signatures and variable name shadowing. (GH/1719, PR/1721).
  • xclim.core.formatting.generate_indicator_docstring has been modified to ensure that the numpy-docstrings of all Indicators are consistent in their formatting. (PR/1731).
  • Fixed documentation example for frequency adaptation with sdba. (GH/1740, PR/1742).

Internal changes

  • Added "doymin" and "doymax" to the possible operations of generic.stats. Fixed a warning issue when op was "integral". (PR/1672).
  • Reorganized GitHub CI build matrices to run the doctests more consistently. (PR/1709).
  • Removed the experimental numba and llvm dependency installation steps in the tox.ini file. Added numba@main to the upstream dependencies. (PR/1709).
  • Added the tox-gh dependency to the development installation recipe. This will soon be required for running the tox test ensemble on GitHub Workflows. (PR/1709).
  • Added the vulture static code analysis tool for finding dead code to the development dependency list and linters (makefile, tox and pre-commit hooks). (PR/1717).
  • Added error message when using xclim.indices.stats.dist_method with nnlf and included note in docstring. (GH/1683, PR/1714).
  • PEP8 rule N802 is now enabled in the ruff formatter. Function names should follow Snake case, with rare exceptions. (PR/1721).
  • Linting dependencies have been updated to the latest versions and made consistent across environment.yml, pyproject.toml and tox.ini files. (PR/1717).
  • Code styling for the documentation now uses sas ("light" theme) and lightbulb ("dark" theme) in order to ensure adequate contrast for code blocks. (PR/1731).
  • Added several CSS overrides related to the HTML elements generated by xarray in the notebook-sourced documentation. (PR/1731).

Files

Ouranosinc/xclim-v0.49.0.zip

Files (1.0 MB)

Name Size Download all
md5:c283c0a6a023262ac419412333c7c9ca
1.0 MB Preview Download

Additional details

Related works