Releases: Ouranosinc/xclim
v0.60.0
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
lmoments3is now listed as a dependency to theextrasinstallation recipe. This dependency is not installed by default withxclimand must be explicitly requested with$ pip install "xclim[extras]", if desired. (PR/2269).numpy-relatedRuntimeWarningsfor invalid operations are noisier when running calculations via thexclim.indicesand muted by default forxclim.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_bndsnow 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_attrsoption was removed fromxclim.set_options. The recent change in philosophy fromxarrayhas renderedxclimattribute preservation logic irrelevant. Thexarrayoption now controls all attribute management. (GH/2308, PR/2311).
New indicators and features
xclimnow 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_approximationhad an erroneous computation and has been fixed:(tasmax - tasmin)/4is replaced by(tasmax - thresh)/4. (GH/2272, PR/2273). - Fix some issues with
pandasv3.0 in partitioning functions ofxclim.ensemblesand inxclim.indices.generic.aggregate_between_dates. (PR/2310).
Internal changes
- Replaced the
tox.inifile with atox.tomlfile and simplified the conditionals for environment selection. (PR/2269). - Removed
python-coverallsfrom thetox-only dependencies (abandoned software / not supported in Python 3.13+) and added thecoverallsapp/github-actionstep 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.tomlnow uses the new TOML conventions. --strict-configand--strict-markershave been replaced with the new--strictmode. For more information, refer to the pytest documentation.
- The configuration in
- Added a GitHub Workflow for automatically approving Dependabot Pull Requests that are either
patchorminorupdates. Dependabot is now configured to run on a monthly basis (previously weekly). (PR/2292). - Dependabot
auto-approvedpull requests are now also set toauto-merge. (PR/2300). - Build-cancelling based on concurrency rules for the
main.ymlGitHub Workflow are now also divided according to thegithub.event_name(pull_request,pull_request_review). (PR/2301). - Added the
rst-checkhook to.pre-commit-config.yamlfor ensuring that ReStructuredText roles, directives, and spacing are consistent with repository configurations. (GH/2133, PR/2306). - Replaced the
formattext-pre-commithook withmirrors-bibtex-tidyin order to enforce style and consistency onBibTeXfiles. (PR/2306). - Removed many obsolete
noqacomments from throughout the code base. (PR/2307). matplotlibis no longer loaded during the import process ofxclimnor during thepytestsetup phase if it is installed in the active environment. (PR/2307).
v0.59.1
Contributors to this version: Trevor James Smith (@Zeitsperre).
Internal changes
- Updated the
example.ipynbnotebook 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
Contributors to this version: Pascal Bourgault (@aulemahal), Trevor James Smith (@Zeitsperre), Sascha Hofmann (@saschahofmann).
New indicators and features
xclim.ensembles.robustness_fractionsnow accepts instances ofxclim.core.missingclasses as a newinvalidargument to control how data points are flagged as invalid. (PR/2245).xclim.indices.stats.fitnow returns NaNs when running with methodPWDand a lmoments distribution. Before it failed with anL-Moments invaliderror. (GH/2235, PR/2239).
Breaking changes
- The relative humidity computations from specific humidity, pressure and temperature (
vapor_pressureandrelative_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). blackandblackdocare no longer required for development.ruffis 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.0andh5py >=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_datasetoption is activated. (GH/2240, PR/2251). xclim.core.formatting.update_historynow places the updated history at the top of the new attribute, not at the bottom. (PR/2251).$ xclim infoCLI utility now provides information for module-loaded indicators (cf,anuclim,icclim). (GH/2219, PR/2255).- A few functions have been adapted to the new
xarraydefault (True) for optionkeep_attrs. (GH/2250, PR/2257).
Internal changes
v0.58.1
Contributors to this version: Pascal Bourgault (@aulemahal).
Internal changes
- Unpin
scipyto allow version 1.16 and higher. (PR/2236).
v0.58.0
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_indexcomputes theantecedent_precipitation_index(weighted summation of daily precipitation amounts for a given window). (GH/2166, PR/2184). - Argument
indexeradded to indicatorsmax_n_day_precipitation_amount,max_pr_intensity, andblowing_snow. (GH/2187, PR/2190). - Argument
windowadded to indicatorrain_on_frozen_ground_days. (PR/2190). - New helper
xclim.indices.generic.season_length_from_boundariestakesseason_startandseason_endas input and givesseason_length. This is used when starts and ends are computed with different resampling frequencies:days_sinceare used to compute temporal lengths in this case. (PR/2189). - Allow
invalid_valuesas argument forrelative_humidity_from_dewpoint. (GH/2202, PR/2203). - New thermodynamic conversion indicators (GH/2165, PR/2206):
xclim.convert.vapor_pressureto compute the partial pressure of water vapor from specific humidity and total pressure.xclim.convert.dewpoint_from_specific_humidityto 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_threshandwater_threshparameters. (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_COEFFICIENTSnow stores the August-Roche-Magnus formula's coefficients.
- New methods
- New indicator
xclim.atmos.hot_daysas counterpart toxclim.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_lengthfunction now accepts aninfill_polar_daysargument 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, andcffwis_indicesnow provide their outputs via theNamedTupleformat. This provides a method for accessing indice outputs using variable names in addition to positional indexing. (PR/2224). - The new
xclim.indicators.convertmodule 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 viaxclim.convert. (GH/1289, PR/2224). - New methods
dai_annualanddai_seasonalforxclim.convert.snowfall_approximationandxclim.convert.rain_approximation, taken from :cite:t:dai_snowfall_2008. Indicator also take new argumentlandmaskto switch between the land and ocean formulations. (PR/2208, GH/1752).
Breaking changes
- The
"jones"method for calculating'k'inxclim.indices.huglin_indexandxclim.indices.biologically_effective_degree_daysnow 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 than1.0. This is to avoid values below1.0for"k"which were previously allowed inxclimbut not supported by the source literature. - Incomplete growing seasons (where the values of
"k"for all latitudes during the growing season are all below1.0) will now raiseValueError. This is to ensure that the expected output is consistent with the literature.
- The
- The
"gladstones"method for calculating'k'inxclim.indices.biologically_effective_degree_daysnow 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_coefficientwithmethod="gladstones".
- The
- The
"icclim"method for calculating'k'inxclim.indices.huglin_indexhas been renamed the"huglin"method. The"icclim"method was identical to the implementation proposed in Huglin (1978). (GH/2201, PR/2207). - The
xclim.indices._conversionsubmodule has been refactored into the newxclim.indices.convertersmodule. Directly importing functions from the older location will still work but will emit aDeprecationWarning. This workaround will be removed in a future release. (GH/1289, PR/2224). - The
xclim.indicators.atmosandxclim.indicators.landsubmodules have been refactored to move all conversion-based indicators to the newxclim.indices.convertersmodule. This change is intended to improve code organization and clarity. Directly importing indicators that were previously accessible viaatmosandlandwill still work but will emit aDeprecationWarning. This workaround will be removed in a future release. (GH/1289, PR/2224). xclim.indicators.atmos.tghas been refactored toxclim.indicators.convert.mean_temperature_from_max_and_min. Importingtgfromxclim.indices.atmosorxclim.indicators.convertwill still work but will emit aDeprecationWarning. This workaround will be removed in a future release. (GH/1289, PR/2224).
Internal changes
- Modified internal logic for
xclim.testing.utils.default_testdata_cacheto support mocking ofpooch. (PR/2188). - The
xclim.indices.helpersmodule 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.pyinto newtests/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_versionsnow uses theimportlib.metadatalibrary to more accurately gather dependency information. (PR/2229).- Replaced the deprecated
"time.week"grouping strings withda.time.dt.isocalendar().weekinxclim.indices.stats.standardized_indexfunctions. (PR/2230). xclim.indices.run_length.lazy_indexingmoved to utils. (GH/2107, PR/2231).- Updated the command-line configuration to address ``DeprecationWarni...
v0.57.0
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.sdbamodule has been split fromxcliminto the new package xsdba. Users must installxsdbafromPyPIorconda-forgein order to maintainxclim.sdbafunctionality. Refer to the xsdba Migration Guide for more information. (GH/2074, PR/2099).
New indicators and features
- New indicator
xclim.atmos.clearness_indexcomputes theclearness_index(ratio of downwards solar radiation to extraterrestrial solar radiation). (PR/2140). - New conversion indice
xclim.indices.shortwave_downwelling_radiation_from_clearness_indexprovides the inverse ofxclim.indices.clearness_index. (PR/2140). - Added
cooling_degree_days_approximationandheating_degree_days_approximationindices 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
DataTreeobjects 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
DatasetandDataTreeobjects inxclim.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_periodswas fixed to work with larger-than-daily source timesteps. Users are still encouraged to useda.resample(time=FREQ).construct('period')when possible. (GH/2148, PR/2150).- Updated the
create_ensembledocstring to avoid confusion about how the function aligns realizations with different calendars. (GH/2108, PR/2164). - Fixed
xclim.indices.run_length.find_eventsfor multidimensional input using acftimecalendar. (PR/2172). xclim.ensembles.robustness_fractionswill now return '0' when all members are invalid (have missing values), avoiding faulty flags inrobustness_categories. The latter was also modified to read thevalidfraction and mask its output accordingly. (GH/2167, PR/2178).
Breaking changes
xclim.sdbais now a convenience mapping that importsxsdbamembers instead of being its own submodule. This implies a number of breaking changes (GH/2074, PR/2099, PR/2181):- The sub-module
xclim.sdbais no longer installed by default. Users must installxsdbaseparately usingpip install xclim[extras]or{pip|conda} install xsdba. - Units handling: The "infer" context is no longer used in unit conversion in
xclim.sdbafunctions. - The
SDBA_EXTRA_OUTPUTglobal option can no longer be activated withxclim.set_options; Instead usexsdba.set_optionswhere the option is now calledEXTRA_OUTPUT. - The other global variable
SDBA_ENCODE_CFwas removed as it has been rendered obsolete.
- The sub-module
- The previously deprecated functions
sfcwind_2_uas_vasanduas_vas_2_sfcwindhave been removed. (PR/2139). xclim.testing.open_datasethas been significantly modified and is now a thin wrapper for thenimbustesting data fetching class. It also no longer supports thedap_urlparameter. Contributors are encouraged to consult the documentation pertaining toxclim.testing.utils.nimbusfor the new approach to fetching testing data. (PR/2139).- The
xclim[dev]installation recipe now requirespytest-timeoutfor ending stalled tests. (PR/2176).
Internal changes
- Added a
pre-commithook for formatting BibTeX files and reformatted existing BibTeX files. (PR/2135). pre-commithooks have been updated to their latest versions. (PR/2141).- Updated a deprecated
pathlibusage in thexclimdocumentation that was causing failures under Python 3.13. (PR/2141). - Call signatures for most
oparguments inxclimhave 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
pylintconfiguration and to address low-hangingpylintissues. (PR/2170). - The
pyproject.tomlfile has been adjusted to leveragepytest-timeoutwith 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
netcdf4engine found intest_wind.pythat 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_resetwas rewritten to include the fast track which is called withxclim.indices.run_length._cumsum_reset_np. The slow track usesxclim.indices.run_length._cumsum_reset_xrwhich preserves all functionalities of the oldxclim.indices.run_length._cumsum_reset. (PR/2136).
v0.56.0
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_indexandxclim.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).
xclimnow uses theoperatorstandard library instead of usingxarray's derivedget_opfunction. A refactoring inxarrayhad changed the position ofget_opwhich caused breakage. (GH/2113, PR/2114).- All other uses of
xarray's internal API were also removed. (PR/2116).
- All other uses of
- Fixed an issue with star-annotated call signatures to maintain Python 3.10 compatibility. (PR/2116).
- Fixed
to_agg_unitsthat was converting units of temperature differences prematurely, without changing the values accordingly in the related DataArrays. (GH/2121, PR/2122). get_calendarnow supportspandas.DatetimeIndex.xclimno longer usesxarray.cftime_range, which has been deprecated. (PR/2130).- Avoid unnecessary time resampling in
xclim.indices.stats.preprocess_standardized_indexwhenfreqis notNonebut the same as the input data. (GH/2111, PR/2112). - Fixed an issue with
fire_seasonthat made it fail with datasets having non-uniform chunks. (GH/2129, PR/2132).
Breaking changes
xclimno 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
xclimv0.57.0. (GH/2039, PR/2117):sfcwind_2_uas_vas: Usesfcwind_to_uas_vasinstead.uas_vas_2_sfcwind: Useuas_vas_to_sfcwindinstead.
Internal changes
black,isort, andnbqahave all been dropped from the development dependencies. (GH/1805, PR/2082).ruffhas 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
blackdocpre-commit hook now only examines.rstand.mdfiles. (PR/2083). - The
xclimdocumentation now has asupportpage for detailing the project's usage and version support policies. (PR/2100). - The indicator
heat_wave_indexnow useshot_spell_total_lengthindex. Theheat_wave_indexindex is identical tohot_spell_total_lengthand 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
v0.55.0
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
xclimnow officially supports Python 3.13 (usingnumbav0.61.0). (GH/2022, PR/2054).xclimversion 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_daysto 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_daysto 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_deficitto 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_occurrencesfunction to count instances where operations and performed and validated for two variables. (PR/2030). xclim.testing.helpers.test_timeseriesnow accepts acalendarargument that is forwarded toxr.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_continuousinstances can now be given directly as thedistargument instandardized_precipitation_indexandstandardized_precipitation_evapotranspiration_indexindicators. This includeslmoments3distributions when specifyingmethod="PWM". (GH/2043, PR/2045).- Time selection in
xclim.core.calendar.select_timeand the**indexerargument 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_indexthat didn't correctly interpolate seasonal values (GH/2014, PR/2019). - Fixed a bug where
xclim.indicators.atmos.potential_evapotranspirationwould return wrong results whenhurswas 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
TestOfficialYamltest to use a dynamic method for finding the installed location ofxclim. (PR/2028). - Adjusted two tests for better handling when running in Windows environments. (PR/2057).
- Refactor of the
xclim.core.missingmodule, usage of theMissingobjects 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_missingmethods. - Subclasses receive the array of valid timesteps
validinstead ofnull, the invalid ones. MissingWMOnow usesxclim.indices.helpers.resample_mapwhich should greatly improve performance in a dask context.
- There is now a warning stating that
fitkwargsare not employed when using thelmoments3distribution. 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 thelmoments3distribution sinceloc=0is always assumed in the library. (GH/2043, PR/2045). xclimnow tracks energy usage and carbon emissions ("last run", "average", and "total") during CI workflows using theeco-ci-energy-estimationGitHub Action. (PR/2046).
v0.54.0
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_unitnow accepts a new argumentpositive_onlyto compute the daily positive chill units. (PR/2003).
Breaking changes
- The minimum required version of
daskhas been increased to2024.8.1. (GH/1992, PR/1991). - The docstrings of many
xclimmodules, classes, methods, and functions have been slightly adjusted to ensure stricter compliance with establishednumpydocstring conventions. (PR/1988). - Using different time for
refandhistis now explicitly forbidden in many bias adjustment methods (e.g.EmpiricalQuantileMapping). Methods that combineref,hist, andsimin the samemap_groupsalso require that time arrays be equal in size. (GH/1903, PR/1995, PR/2013). xclimnow uses asrclayout for the codebase. Structure-dependent functions, documentation, and build commands have been adapted to reflect these changes. Developers will need to reinstallxclimusingpip install -e .. (PR/1971).- The call signature of
xclim.indices.hot_spell_magnitudeoriginally asked for anopargument that was not used. This argument has been removed. (PR/2018).
Bug fixes
- Fixed pickling issue with
xclim.sdba.Grouperand other classes for usage withdask>=2024.11. (GH/1992, PR/1993). - Fixed an issue with
nimbusthat was causing URL path components to be improperly joined. (PR/1997). base_kws_varsinMBCnis now copied inside theadjustfunction so that in-place changes do not change the dict globally. (PR/1999).- Fixed a bug in the logic of
xclim.testing.utils.load_registrythat impacted the ability to load aregistry.txtfrom 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
OTCanddOTCare only dropped and replaced at the lowest level so that the size of time arrays never changes onxarraylevels. (PR/1995, PR/2013) streamflowentry replaced with"q"invariables.yml. (GH/1912, PR/1996).- In order to address
Error 403(forbidden) requests when retrieving data from GitHub via ReadTheDocs, thenimbusclass has been modified to use an overloadedfetchmethod that appends a modified User-Agent header to the request. (PR/2001). - Addressed a very rare race condition that can happen if
pytestis tearing down the test environment when running across multiple workers. (PR/1863). - The
numpydoclinting tool has been added to the development dependencies, linting checks, and thepre-commitconfiguration. (PR/1988). - Added a more robust
yamllintconfiguration 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
xclimcodebase. (PR/2018).
CI changes
- Added the
green-coding-solutions/eco-ci-energy-estimationGitHub 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.ymlversion string parsing to harden against template injection. - Further de-escalated privileges for most workflows.
- Simplified the