Skip to content

Releases: Ouranosinc/xclim

v0.60.0

23 Jan 16:24
v0.60.0
929e01c

Choose a tag to compare

Contributors to this version: Éric Dupuis (@coxipi), Trevor James Smith (@Zeitsperre), Juliette Lavoie (@juliettelavoie), Ève Larose (@e-larose), Faisal Mahmood (@faimahsho), David Huard (@huard), Pascal Bourgault (@aulemahal).

Breaking changes

  • lmoments3 is now listed as a dependency to the extras installation recipe. This dependency is not installed by default with xclim and must be explicitly requested with $ pip install "xclim[extras]", if desired. (PR/2269).
  • numpy-related RuntimeWarnings for invalid operations are noisier when running calculations via the xclim.indices and muted by default for xclim.indicators. This change is made to ensure that users who perform indice calculations can be made more aware of potential inconsistencies in their source datasets. (GH/2277, PR/2276).
  • xclim.core.calendar.time_bnds now follows the CF conventions in that the "end" time is the same as the "start" of the next period (and not the timestep just before). (PR/2310).
  • The keep_attrs option was removed from xclim.set_options. The recent change in philosophy from xarray has rendered xclim attribute preservation logic irrelevant. The xarray option now controls all attribute management. (GH/2308, PR/2311).

New indicators and features

  • xclim now officially supports Python 3.14. (GH/2259, PR/2305).
  • New missing algorithm: xclim.core.missing.some_but_not_all. (PR/2290).
  • New hydrological indices added to xclim.indices._hydrology.py. (GH/1624, PR/2227).

Bug fixes

  • One of the conditions in xclim.atmos.cooling_degree_days_approximation had an erroneous computation and has been fixed: (tasmax - tasmin)/4 is replaced by (tasmax - thresh)/4. (GH/2272, PR/2273).
  • Fix some issues with pandas v3.0 in partitioning functions of xclim.ensembles and in xclim.indices.generic.aggregate_between_dates. (PR/2310).

Internal changes

  • Replaced the tox.ini file with a tox.toml file and simplified the conditionals for environment selection. (PR/2269).
  • Removed python-coveralls from the tox-only dependencies (abandoned software / not supported in Python 3.13+) and added the coverallsapp/github-action step to PyPI/tox-based builds on CI. (PR/2269).
  • The testing suite has been updated to support pytest >=9.0 (PR/2276):
    • The configuration in tox.toml now uses the new TOML conventions.
    • --strict-config and --strict-markers have been replaced with the new --strict mode. For more information, refer to the pytest documentation.
  • Added a GitHub Workflow for automatically approving Dependabot Pull Requests that are either patch or minor updates. Dependabot is now configured to run on a monthly basis (previously weekly). (PR/2292).
  • Dependabot auto-approved pull requests are now also set to auto-merge. (PR/2300).
  • Build-cancelling based on concurrency rules for the main.yml GitHub Workflow are now also divided according to the github.event_name (pull_request, pull_request_review). (PR/2301).
  • Added the rst-check hook to .pre-commit-config.yaml for ensuring that ReStructuredText roles, directives, and spacing are consistent with repository configurations. (GH/2133, PR/2306).
  • Replaced the formattext-pre-commit hook with mirrors-bibtex-tidy in order to enforce style and consistency on BibTeX files. (PR/2306).
  • Removed many obsolete noqa comments from throughout the code base. (PR/2307).
  • matplotlib is no longer loaded during the import process of xclim nor during the pytest setup phase if it is installed in the active environment. (PR/2307).

v0.59.1

31 Oct 20:16
v0.59.1
52481c9

Choose a tag to compare

Contributors to this version: Trevor James Smith (@Zeitsperre).

Internal changes

  • Updated the example.ipynb notebook to use a newer dataset based on CMIP6 for the workflow showcase; The previous dataset based on CMIP5 has since been retired, and the broken URL was causing documentation build failures. (PR/2261).

v0.59.0

30 Oct 17:50
v0.59.0
5b7bb1c

Choose a tag to compare

Contributors to this version: Pascal Bourgault (@aulemahal), Trevor James Smith (@Zeitsperre), Sascha Hofmann (@saschahofmann).

New indicators and features

  • xclim.ensembles.robustness_fractions now accepts instances of xclim.core.missing classes as a new invalid argument to control how data points are flagged as invalid. (PR/2245).
  • xclim.indices.stats.fit now returns NaNs when running with method PWD and a lmoments distribution. Before it failed with an L-Moments invalid error. (GH/2235, PR/2239).

Breaking changes

  • The relative humidity computations from specific humidity, pressure and temperature (vapor_pressure and relative_humidity) were modified to use the fraction of vapour pressure to saturation vapour pressure instead of an incomplete equation with the mixing ratios. Changes are small, but sometimes not negligible. (PR/2254).
  • black and blackdoc are no longer required for development. ruff is now exclusively used for code and code-block formatting. (PR/2249).
  • Python HDF5 libraries now have lower pins to ensure modern versions are preferably installed (h5netcdf >=1.5.0 and h5py >=3.12.1) (PR/2253).

Bug fixes

  • Fix dimensions of "prsn" in the variable dictionary. (PR/2242).
  • History is not written to the DataArray if the as_dataset option is activated. (GH/2240, PR/2251).
  • xclim.core.formatting.update_history now places the updated history at the top of the new attribute, not at the bottom. (PR/2251).
  • $ xclim info CLI utility now provides information for module-loaded indicators (cf, anuclim, icclim). (GH/2219, PR/2255).
  • A few functions have been adapted to the new xarray default (True) for option keep_attrs. (GH/2250, PR/2257).

Internal changes

  • Fixed an issue with a test that can fail when running with older versions of numpy. (PR/2253).
  • Updated flit to v3.11.0 and adopted PEP 639 for specifying licensing metadata. (PR/2260).

v0.58.1

28 Aug 17:12
v0.58.1
ab3a5d4

Choose a tag to compare

Contributors to this version: Pascal Bourgault (@aulemahal).

Internal changes

  • Unpin scipy to allow version 1.16 and higher. (PR/2236).

v0.58.0

27 Aug 18:56
v0.58.0
5741c8f

Choose a tag to compare

Contributors to this version: Sebastian Lehner (@seblehner), Trevor James Smith (@Zeitsperre), Pascal Bourgault (@aulemahal), Éric Dupuis (@coxipi), Baptiste Hamon (@baptistehamon).

New indicators and features

  • New indicator xclim.atmos.antecedent_precipitation_index computes the antecedent_precipitation_index (weighted summation of daily precipitation amounts for a given window). (GH/2166, PR/2184).
  • Argument indexer added to indicators max_n_day_precipitation_amount, max_pr_intensity, and blowing_snow. (GH/2187, PR/2190).
  • Argument window added to indicator rain_on_frozen_ground_days. (PR/2190).
  • New helper xclim.indices.generic.season_length_from_boundaries takes season_start and season_end as input and gives season_length. This is used when starts and ends are computed with different resampling frequencies: days_since are used to compute temporal lengths in this case. (PR/2189).
  • Allow invalid_values as argument for relative_humidity_from_dewpoint. (GH/2202, PR/2203).
  • New thermodynamic conversion indicators (GH/2165, PR/2206):
    • xclim.convert.vapor_pressure to compute the partial pressure of water vapor from specific humidity and total pressure.
    • xclim.convert.dewpoint_from_specific_humidity to compute the dewpoint temperature from specific humidity and total pressure.
  • All functions using saturation vapour pressure can now compute it with a smooth transition between saturation over ice and saturation over water. The transition is controlled by the interp_power , ice_thresh and water_thresh parameters. (GH/2165, PR/2206).
    • New methods "buck81" and "aerk96" and new method "ECMWF" which is "buck81" on water and "aerk96" on ice.
    • Saturation vapor pressure calculations were reorganized. xclim.indices.converters.ESAT_FORMULAS_COEFFICIENTS now stores the August-Roche-Magnus formula's coefficients.
  • New indicator xclim.atmos.hot_days as counterpart to xclim.atmos.frost_days. (GH/2194, PR/2213).
  • New helper indices for computing the day-length coefficient for viticulture growing seasons based on several approaches:
    • xclim.indices.helpers.gladstones_day_length_coefficient: Based on the Gladstones (1992, 2011) method.
    • xclim.indices.helpers.huglin_day_length_coefficient: Based on the Huglin (1978, 1998) method.
    • xclim.indices.helpers.jones_day_length_coefficient: Based on the approach outlined in Hall and Jones (2010).
  • The xclim.indices.helpers.day_length function now accepts an infill_polar_days argument to control whether polar days or polar nights are filled with NaNs (infill_polar_days=False; default behaviour) or with a day length of 0 or 24 hours, depending on the date (infill_polar_days=True). (GH/2201, PR/2207).
  • The indices for uas_vas_to_sfcwind, sfcwind_to_uas_vas, rle_1d, and cffwis_indices now provide their outputs via the NamedTuple format. This provides a method for accessing indice outputs using variable names in addition to positional indexing. (PR/2224).
  • The new xclim.indicators.convert module is now available to provide a distinct API for conversion-focused indicators. This module is intended to regroup all conversion-based indicators that were previously scattered across different indicato realms. This module is also accessible via xclim.convert. (GH/1289, PR/2224).
  • New methods dai_annual and dai_seasonal for xclim.convert.snowfall_approximation and xclim.convert.rain_approximation, taken from :cite:t:dai_snowfall_2008. Indicator also take new argument landmask to switch between the land and ocean formulations. (PR/2208, GH/1752).

Breaking changes

  • The "jones" method for calculating 'k' in xclim.indices.huglin_index and xclim.indices.biologically_effective_degree_days now require daily data computed at annual frequencies (freq="YS"|"YS-JAN"|"YS-JUL"). The previous behaviour for non-annual frequencies was undefined. (GH/2201, PR/2207).
    • The "jones" method now sets a floor value for "k" where it is not allowed to be less than 1.0. This is to avoid values below 1.0 for "k" which were previously allowed in xclim but not supported by the source literature.
    • Incomplete growing seasons (where the values of "k" for all latitudes during the growing season are all below 1.0) will now raise ValueError. This is to ensure that the expected output is consistent with the literature.
  • The "gladstones" method for calculating 'k' in xclim.indices.biologically_effective_degree_days now uses a dedicated function based on a dynamic day_length compared to a reference latitude (40 degrees). The previous implementation of the "gladstones" method was based off an approximation found in Hall and Jones (2010). (GH/2201, PR/2207).
    • The "gladstones" approximation is now available as a separate helper function: xclim.indices.helpers.jones_day_length_coefficient with method="gladstones".
  • The "icclim" method for calculating 'k' in xclim.indices.huglin_index has been renamed the "huglin" method. The "icclim" method was identical to the implementation proposed in Huglin (1978). (GH/2201, PR/2207).
  • The xclim.indices._conversion submodule has been refactored into the new xclim.indices.converters module. Directly importing functions from the older location will still work but will emit a DeprecationWarning. This workaround will be removed in a future release. (GH/1289, PR/2224).
  • The xclim.indicators.atmos and xclim.indicators.land submodules have been refactored to move all conversion-based indicators to the new xclim.indices.converters module. This change is intended to improve code organization and clarity. Directly importing indicators that were previously accessible via atmos and land will still work but will emit a DeprecationWarning. This workaround will be removed in a future release. (GH/1289, PR/2224).
  • xclim.indicators.atmos.tg has been refactored to xclim.indicators.convert.mean_temperature_from_max_and_min. Importing tg from xclim.indices.atmos or xclim.indicators.convert will still work but will emit a DeprecationWarning. This workaround will be removed in a future release. (GH/1289, PR/2224).

Internal changes

  • Modified internal logic for xclim.testing.utils.default_testdata_cache to support mocking of pooch. (PR/2188).
  • The xclim.indices.helpers module now uses an __all__ variable to explicitly define the public API of the module. (PR/2207).
  • Viticulture indices are more heavily tested and employ type guarding to ensure that parameters passed are those of the expected types. (PR/2207).
  • Fixed some tests relying on floating-point imprecision. Avoid numbagg on sensitive fitting tests. (PR/2228).
  • Conversion indicators have been split from tests/test_atmos.py into new tests/test_converters.py. This is to ensure that conversion indicators are tested separately from other atmospheric indicators. (GH/1289, PR/2224).
  • xclim.testing.utils.show_versions now uses the importlib.metadata library to more accurately gather dependency information. (PR/2229).
  • Replaced the deprecated "time.week" grouping strings with da.time.dt.isocalendar().week in xclim.indices.stats.standardized_index functions. (PR/2230).
  • xclim.indices.run_length.lazy_indexing moved to utils. (GH/2107, PR/2231).
  • Updated the command-line configuration to address ``DeprecationWarni...
Read more

v0.57.0

22 May 21:21
656db9d

Choose a tag to compare

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).

v0.56.0

27 Mar 18:12
431d4f9

Choose a tag to compare

Contributors to this version: Trevor James Smith (@Zeitsperre), Hui-Min Wang (@Hem-W), Jack Kit-tai Wong (@jack-ktw), Adrien Lamarche (@LamAdr), Éric Dupuis (@coxipi), Jens de Bruijn (@jensdebruijn), Pascal Bourgault (@aulemahal), Sarah Gammon (@SarahG-579462).

New indicators

  • Added standardized indicators for hydrology: xclim.land.standardized_streamflow_index and xclim.land.standardized_groundwater_index. (GH/1444, PR/1877).

Bug fixes

  • Fix installation instructions in the Contributing guide. (GH/2088, PR/2089).
  • Fixed parameter order in typing.cast() causing intermittent errors in solar_zenith_angle calculation. (GH/2097, PR/2098).
  • xclim now uses the operator standard library instead of using xarray's derived get_op function. A refactoring in xarray had changed the position of get_op which caused breakage. (GH/2113, PR/2114).
    • All other uses of xarray's internal API were also removed. (PR/2116).
  • Fixed an issue with star-annotated call signatures to maintain Python 3.10 compatibility. (PR/2116).
  • Fixed to_agg_units that was converting units of temperature differences prematurely, without changing the values accordingly in the related DataArrays. (GH/2121, PR/2122).
  • get_calendar now supports pandas.DatetimeIndex. xclim no longer uses xarray.cftime_range, which has been deprecated. (PR/2130).
  • Avoid unnecessary time resampling in xclim.indices.stats.preprocess_standardized_index when freq is not None but the same as the input data. (GH/2111, PR/2112).
  • Fixed an issue with fire_season that made it fail with datasets having non-uniform chunks. (GH/2129, PR/2132).

Breaking changes

  • xclim no longer supports Python 3.10. The minimum required version is now Python 3.11. (PR/2082).
    • Reverted: Extended support for Python3.10 will continue until further notice. (PR/2100).
  • The minimum versions of several key dependencies have been raised (numpy >=1.24.0; scikit-learn >=1.2.0; scipy >=1.11.0). (PR/2082).
  • To ensure consistent naming of converters, the following indices have been deprecated with replacements. Changes will be made permanent in xclim v0.57.0. (GH/2039, PR/2117):
    • sfcwind_2_uas_vas: Use sfcwind_to_uas_vas instead.
    • uas_vas_2_sfcwind: Use uas_vas_to_sfcwind instead.

Internal changes

  • black, isort, and nbqa have all been dropped from the development dependencies. (GH/1805, PR/2082).
  • ruff has been configured to provide code formatting. (PR/2083):
    • The maximum line-length is now 120 characters.
    • Docstring formatting is now enabled.
    • Line endings in files now must be Unix-compatible (LF).
  • The blackdoc pre-commit hook now only examines .rst and .md files. (PR/2083).
  • The xclim documentation now has a support page for detailing the project's usage and version support policies. (PR/2100).
  • The indicator heat_wave_index now uses hot_spell_total_length index. The heat_wave_index index is identical to hot_spell_total_length and will be dropped in future versions. (GH/2031, PR/2102).
  • Updated pre-commit hooks to their latest versions. (PR/2116).
  • .. math:: tags in documentation are now properly indented with three (3) spaces. (PR/2128).

v0.55.1

26 Feb 18:37

Choose a tag to compare

Contributors to this version: Éric Dupuis (@coxipi).

Bug fixes

  • Re-allow the use of interp="linear" in adjustments that use day-of-year grouping, group=Grouper("time.dayofyear", window). (PR/2087).

v0.55.0

17 Feb 21:51
7093afc

Choose a tag to compare

Contributors to this version: Juliette Lavoie (@juliettelavoie), Trevor James Smith (@Zeitsperre), Sascha Hofmann (@saschahofmann), Pascal Bourgault (@aulemahal), Éric Dupuis (@coxipi), Baptiste Hamon (@baptistehamon), Sarah Gammon (@SarahG-579462).

Breaking changes

  • Missing value method "WMO" was modified to remove the criterion that the timeseries needs to be continuous (without holes). (PR/2058).

Announcements

  • xclim now officially supports Python 3.13 (using numba v0.61.0). (GH/2022, PR/2054).
  • xclim version 0.55.0 will be the last version to support Python 3.10. The next version will require Python 3.11 or higher. (PR/2054).

New indicators

  • Added xclim.land.holiday_snow_days to compute the number of days with snow on the ground during holidays ("Christmas Days"). (GH/2029, PR/2030).
  • Added xclim.land.holiday_snow_and_snowfall_days to compute the number of days with snow on the ground and measurable snowfall during holidays ("Perfect Christmas Days"). (GH/2029, PR/2030).
  • Added xclim.atmos.vapor_pressure_deficit to compute the vapor pressure deficit from temperature and relative humidity. (GH/1917, PR/2072).

New features and enhancements

  • New function ensemble.partition.general_partition. (PR/2035).
  • Added a new xclim.indices.generic.bivariate_count_occurrences function to count instances where operations and performed and validated for two variables. (PR/2030).
  • xclim.testing.helpers.test_timeseries now accepts a calendar argument that is forwarded to xr.cftime_range. (PR/2019).
  • New xclim.indices.fao_allen98, exporting the FAO-56 Penman-Monteith equation for potential evapotranspiration (GH/2004, PR/2067).
  • Missing values method "pct" and "at_least_n" now accept a new "subfreq" option that allows to compute the missing mask in two steps. When given, the algorithm is applied at this "subfreq" resampling frequency first and then the result is resampled at the target indicator frequency. In the output, a period is invalid if any of its subgroup where flagged as invalid by the chosen method. (PR/2058, GH/1820).
  • scipy.stats.rv_continuous instances can now be given directly as the dist argument in standardized_precipitation_index and standardized_precipitation_evapotranspiration_index indicators. This includes lmoments3 distributions when specifying method="PWM". (GH/2043, PR/2045).
  • Time selection in xclim.core.calendar.select_time and the **indexer argument of indicators now supports day-of-year bounds given as DataArrays with spatial and/or temporal dimensions. (GH/1987, PR/2055).
  • Maximum Spacing Estimation method for distribution fitting has been added to xclim.indices.stats.fit (GH/2078, PR/2077)

Bug fixes

  • Fixed a bug in xclim.sdba.Grouper.get_index that didn't correctly interpolate seasonal values (GH/2014, PR/2019).
  • Fixed a bug where xclim.indicators.atmos.potential_evapotranspiration would return wrong results when hurs was provided in % (PR/2067).
  • Fixed the default "op" argument of xclim.atmos.growing_season_end (GH/2056, PR/2080).
  • Removed the useless "thresh" argument from xclim.atmos.precip_accumulation (GH/1763, PR/2080).

Internal changes

  • Adjusted the TestOfficialYaml test to use a dynamic method for finding the installed location of xclim. (PR/2028).
  • Adjusted two tests for better handling when running in Windows environments. (PR/2057).
  • Refactor of the xclim.core.missing module, usage of the Missing objects has been broken. (PR/2058, PR/2055, PR/2076, GH/1820, GH/2000).
    • Objects are initialized with their options and then called with the data, input frequency, target frequency and indexer.
    • Subclasses receive non-resampled DataArray in their is_missing methods.
    • Subclasses receive the array of valid timesteps valid instead of null, the invalid ones.
    • MissingWMO now uses xclim.indices.helpers.resample_map which should greatly improve performance in a dask context.
  • There is now a warning stating that fitkwargs are not employed when using the lmoments3 distribution. One exception is the use of 'floc' which is allowed with the gamma distribution. 'floc' is used to shift the distribution before computing fitting parameters with the lmoments3 distribution since loc=0 is always assumed in the library. (GH/2043, PR/2045).
  • xclim now tracks energy usage and carbon emissions ("last run", "average", and "total") during CI workflows using the eco-ci-energy-estimation GitHub Action. (PR/2046).

v0.54.0

16 Dec 22:18
7af92dd

Choose a tag to compare

Contributors to this version: Trevor James Smith (@Zeitsperre), Pascal Bourgault (@aulemahal), Éric Dupuis (@coxipi), Sascha Hofmann (@saschahofmann).

New features and enhancements

  • Python 3.9 coding conventions have been dropped in favour of Python 3.10+ conventions. (PR/1988).
  • xclim.indices.chill_unit now accepts a new argument positive_only to compute the daily positive chill units. (PR/2003).

Breaking changes

  • The minimum required version of dask has been increased to 2024.8.1. (GH/1992, PR/1991).
  • The docstrings of many xclim modules, classes, methods, and functions have been slightly adjusted to ensure stricter compliance with established numpy docstring conventions. (PR/1988).
  • Using different time for ref and hist is now explicitly forbidden in many bias adjustment methods (e.g. EmpiricalQuantileMapping). Methods that combine ref, hist, and sim in the same map_groups also require that time arrays be equal in size. (GH/1903, PR/1995, PR/2013).
  • xclim now uses a src layout for the codebase. Structure-dependent functions, documentation, and build commands have been adapted to reflect these changes. Developers will need to reinstall xclim using pip install -e .. (PR/1971).
  • The call signature of xclim.indices.hot_spell_magnitude originally asked for an op argument that was not used. This argument has been removed. (PR/2018).

Bug fixes

  • Fixed pickling issue with xclim.sdba.Grouper and other classes for usage with dask>=2024.11. (GH/1992, PR/1993).
  • Fixed an issue with nimbus that was causing URL path components to be improperly joined. (PR/1997).
  • base_kws_vars in MBCn is now copied inside the adjust function so that in-place changes do not change the dict globally. (PR/1999).
  • Fixed a bug in the logic of xclim.testing.utils.load_registry that impacted the ability to load a registry.txt from a non-default repository. (PR/2001).

Internal changes

  • Changed French translations with word "pluvieux" to "avec précipitations". (GH/1960, PR/1994).
  • Nan values in OTC and dOTC are only dropped and replaced at the lowest level so that the size of time arrays never changes on xarray levels. (PR/1995, PR/2013)
  • streamflow entry replaced with "q" in variables.yml. (GH/1912, PR/1996).
  • In order to address Error 403 (forbidden) requests when retrieving data from GitHub via ReadTheDocs, the nimbus class has been modified to use an overloaded fetch method that appends a modified User-Agent header to the request. (PR/2001).
  • Addressed a very rare race condition that can happen if pytest is tearing down the test environment when running across multiple workers. (PR/1863).
  • The numpydoc linting tool has been added to the development dependencies, linting checks, and the pre-commit configuration. (PR/1988).
  • Added a more robust yamllint configuration to ensure that all YAML files are linted consistently. (PR/1971).
  • Addressed a very rare singular matrix error that can happen in test_loess_smoothing_nan. (PR/2015).
  • Addressed a handful of typing and call signature issues in the xclim codebase. (PR/2018).

CI changes

  • Added the green-coding-solutions/eco-ci-energy-estimation GitHub Action to the workflows to establish energy and carbon usage of CI activity. (PR/1863).
  • Various workflow security fixes: (PR/2023)
    • Simplified the bump-version.yml version string parsing to harden against template injection.
    • Further de-escalated privileges for most workflows.