pypi xclim 0.57.0
v0.57.0

latest releases: 0.58.1, 0.58.0
3 months ago

Contributors to this version: Éric Dupuis (@coxipi), Trevor James Smith (@Zeitsperre), Juliette Lavoie (@juliettelavoie), Pascal Bourgault (@aulemahal), Armin Hofmann (@HofmannGeo), Baptiste Hamon (@baptistehamon).

Announcements

  • The xclim.sdba module has been split from xclim into the new package xsdba. Users must install xsdba from PyPI or conda-forge in order to maintain xclim.sdba functionality. Refer to the xsdba Migration Guide for more information. (GH/2074, PR/2099).

New indicators and features

  • New indicator xclim.atmos.clearness_index computes the clearness_index (ratio of downwards solar radiation to extraterrestrial solar radiation). (PR/2140).
  • New conversion indice xclim.indices.shortwave_downwelling_radiation_from_clearness_index provides the inverse of xclim.indices.clearness_index. (PR/2140).
  • Added cooling_degree_days_approximation and heating_degree_days_approximation indices to compute the number of cooling and heating degree days with consideration for daily temperature cycles. (GH/1941, PR/2135).
  • Added dtr in variables.yml. (GH/2146, PR/2147).
  • Added Mahalanobis distance. (GH/2151, PR/2157).
  • Support for DataTree objects in indicators. All non-empty nodes of the tree must contain all required variables, non-variable parameters are the same for all nodes. (GH/2127, PR/2144).
  • Support for Dataset and DataTree objects in xclim.core.units.convert_units_to. Target units are passed as a mapping from variable name to units. Unmentioned variables are left untouched. (GH/2127, PR/2144).

Bug fixes

  • Adjustments were made to the xclim[docs] installation recipe to ensure that the documentation builds correctly. The minimum required Python for rendering the documentation is now 3.11. (PR/2141).
  • xclim.core.calendar.stack_periods was fixed to work with larger-than-daily source timesteps. Users are still encouraged to use da.resample(time=FREQ).construct('period') when possible. (GH/2148, PR/2150).
  • Updated the create_ensemble docstring to avoid confusion about how the function aligns realizations with different calendars. (GH/2108, PR/2164).
  • Fixed xclim.indices.run_length.find_events for multidimensional input using a cftime calendar. (PR/2172).
  • xclim.ensembles.robustness_fractions will now return '0' when all members are invalid (have missing values), avoiding faulty flags in robustness_categories. The latter was also modified to read the valid fraction and mask its output accordingly. (GH/2167, PR/2178).

Breaking changes

  • xclim.sdba is now a convenience mapping that imports xsdba members instead of being its own submodule. This implies a number of breaking changes (GH/2074, PR/2099, PR/2181):
    • The sub-module xclim.sdba is no longer installed by default. Users must install xsdba separately using pip install xclim[extras] or {pip|conda} install xsdba.
    • Units handling: The "infer" context is no longer used in unit conversion in xclim.sdba functions.
    • The SDBA_EXTRA_OUTPUT global option can no longer be activated with xclim.set_options; Instead use xsdba.set_options where the option is now called EXTRA_OUTPUT.
    • The other global variable SDBA_ENCODE_CF was removed as it has been rendered obsolete.
  • The previously deprecated functions sfcwind_2_uas_vas and uas_vas_2_sfcwind have been removed. (PR/2139).
  • xclim.testing.open_dataset has been significantly modified and is now a thin wrapper for the nimbus testing data fetching class. It also no longer supports the dap_url parameter. Contributors are encouraged to consult the documentation pertaining to xclim.testing.utils.nimbus for the new approach to fetching testing data. (PR/2139).
  • The xclim[dev] installation recipe now requires pytest-timeout for ending stalled tests. (PR/2176).

Internal changes

  • Added a pre-commit hook for formatting BibTeX files and reformatted existing BibTeX files. (PR/2135).
  • pre-commit hooks have been updated to their latest versions. (PR/2141).
  • Updated a deprecated pathlib usage in the xclim documentation that was causing failures under Python 3.13. (PR/2141).
  • Call signatures for most op arguments in xclim have been updated to use 'Literal' types instead of 'str'. This change is intended to improve type checking and code clarity. (GH/1810, PR/2168).
  • Changes to pylint configuration and to address low-hanging pylint issues. (PR/2170).
  • The pyproject.toml file has been adjusted to leverage pytest-timeout with a maximum session time of 15 minutes and a maximum test duration of five (5) minutes. (PR/2176).
  • Fixed a bug present in tests due to the netcdf4 engine found in test_wind.py that was causing failures when run in parallel. (GH/2179, PR/2176).
  • Faster backend for run length computations where the time is unchunked. xclim.indices.run_length._cumsum_reset was rewritten to include the fast track which is called with xclim.indices.run_length._cumsum_reset_np. The slow track uses xclim.indices.run_length._cumsum_reset_xr which preserves all functionalities of the old xclim.indices.run_length._cumsum_reset. (PR/2136).

Don't miss a new xclim release

NewReleases is sending notifications on new releases.