github Ouranosinc/xclim v0.41.0

14 months ago

Contributors to this version: Trevor James Smith (@Zeitsperre), Pascal Bourgault (@aulemahal), Ludwig Lierhammer (@ludwiglierhammer), Éric Dupuis (@coxipi).

New features and enhancements

  • New properties xclim.sdba.properties.decorrelation_length and xclim.sdba.properties.transition_probability. (PR/1252)

New indicators

  • ensembles.change_significance now supports Mann-whitney U-test and flexible realization. (PR/1285).
  • New indices and indicators for converting from snow water equivalent to snow depth (snw_to_snd) and snow depth to snow water equivalent (snd_to_snw) using snow density [kg / m^3]. (PR/1271).
  • New indices and indicators for determining upwelling radiation (shortwave_upwelling_radiation_from_net_downwelling and longwave_upwelling_radiation_from_net_downwelling; CF variables rsus and rlus) from net and downwelling radiation (shortwave: rss and rsds; longwave: rls and rlds). (PR/1271).
  • New indice and indicator {snd | snw}_season_{length | start | end} which generalize snow_cover_duration and continuous_snow_cover_{start | end} to allow using these functions with variable snw (PR/1275).
  • New indice and indicator (dryness_index) for estimating soil humidity classifications for winegrowing regions (based on Riou et al. (1994)). (GH/355, PR/1235).

Breaking changes

  • xclim testing default behaviours have been changed (GH/1295, PR/1297):
    • Running $ pytest will no longer use pytest-xdist distributed testing be default (can be set with -n auto|logical|#. Coverage is also no longer gathered/reported by default.
    • Running $ tox will now set pytest-xdist to use -n logical processes (with a max of 10).
    • Default behaviour for testing is to no longer always fetch xclim-testdata. If testdata is found in $HOME/.xclim_testing_data, files will be copied to individual processes, otherwise, will be fetched as needed.
  • Environment variables evaluated when running pytest have been changed (GH/1295, PR/1297):
    • For testing against specific branches of xclim-testdata: MAIN_TESTDATA_BRANCH -> XCLIM_TESTDATA_BRANCH
    • The option to skip fetching of testdata (SKIP_TEST_DATA) has been removed
    • A new environment variable (XCLIM_PREFETCH_TESTING_DATA) is now available to gather xclim-testdata before running test ensemble (default: False).
    • Environment variables are now passed to tox on execution.

Bug fixes

  • build_indicator_module_from_yaml now accepts a reload argument. When re-building a module that already exists, reload=True removes all previous indicator before creating the new ones. (GH/1192, PR/1284).
  • The test for French translations of official indicators was fixed and translations for CFFWIS indices, FFDI, KDBI, DF and Jetstream metric woollings have been added or fixed. (PR/1271).
  • use_ufunc in windowed_run_count is now supplied with argument freq to warn users that the 1d method does not support resampling after run length operations (GH/1279, PR/1291).
  • {snd | snw}_max_doy now avoids an error due to xr.argmax when there are all-NaN slices. (PR/1277).

Internal changes

  • xclim has adopted PEP 517 and PEP 621 (pyproject.toml using the flit backend) to replace the legacy setup.py used to manage package organisation and building. Many tooling configurations that already supported the pyproject.toml standard have been migrated to this file. CI and development tooling documentation has been updated to reflect these changes. (PR/1278, suggested from PyOpenSci Software Review).
  • Documentation source files have been moved around to remove some duplicated image files. (PR/1278).
  • Coveralls GitHub Action removed as it did not support pyproject.toml-based configurations. (PR/1278).
  • Add a remark about how xclim's CFFWIS is different from the original 1982 implementation. (GH/1104, PR/1284).
  • Update CI runs to use Python3.9 when examining upstream dependencies. Replace setup-conda action with provision-with-micromamba action. (PR/1286).
  • Update CI runs to always use tox~=4.0 and the latest virtual machine images (now ubuntu-22.04). (PR/1288, PR/1297).
  • SBCK installation command now points to the official development repository. (PR/1288).
  • Some references in the BibTeX were updated to point to better resources. (PR/1288).
  • Add a GitHub CI workflow for performing dependency security review scanning. (PR/1287).
  • Grammar and spelling corrections were applied to some docstrings. (PR/1271).
  • Added [radiation] ([power] / [area]) to list of defined acceptable units. (PR/1271).
  • Updated testing data used to generate the atmosds dataset to use more reproducibly-converted ERA5 data, generated with the miranda Python package. (PR/1269).
  • Updated testing dependencies to use pytest-xdist>=3.2, allowing for the new --dist=worksteal scheduler for distributing the pool of remaining tests across workers after individual workers have exhausted their own queues. (PR/1235).
  • Adding infer context to the unit conversion in of the training of ExtremeValues. (PR/1299).
  • Added sphinxcontrib-svg2pdfconverter for converting SVG graphics within documentation to PDF-compatible images. (PR/1296).
  • README badges for supported Python versions and repository health have been added. (GH/1304, PR/1307).

Don't miss a new xclim release

NewReleases is sending notifications on new releases.