Published October 17, 2024
| Version v0.53.0
Software
Open
xclim: xarray-based climate data analytics
Authors/Creators
-
Bourgault, Pascal1
-
Huard, David1
-
Smith, Trevor James1
-
Logan, Travis1
-
Aoun, Abel2
-
Lavoie, Juliette1
-
Dupuis, Éric1
-
Rondeau-Genesse, Gabriel1
-
Gammon, Sarah1
-
Alegre, Raquel3
-
Barnes, Clair4
- Beaupré Laperrière, Alexis1
-
Biner, Sébastien5
- Caron, David6
- Ehbrecht, Carsten7
-
Fyke, Jeremy8
-
Keel, Tom3
-
Labonté, Marie-Pier9
-
Lierhammer, Ludwig10
-
Low, Jwen-Fai11
- Quinn, Jamie3
-
Roy, Philippe12
-
Squire, Dougie13
-
Stephens, Ag14
-
Tanguy, Maliko15
- Whelan, Chistopher16
-
Braun, Marco9
- Castro, Dante10
-
Diez-Sierra, Javier17
-
Lamarche, Adrien
-
Wang, Hui-Min18
-
Lehner, Sebastian19
- 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
- 18. National University of Singapore, Singapore, Singapore
- 19. GeoSphere Austria, Vienna, Austria
Description
Contributors to this version: Adrien Lamarche (@LamAdr), Trevor James Smith (@Zeitsperre), Éric Dupuis (@coxipi), Pascal Bourgault (@aulemahal), Sascha Hofmann (@saschahofmann), David Huard (@huard).
Announcements
xclimhas now adopted the Scientific Python SPEC 0 conventions for its suggested dependency support schedule. (GH/1914, PR/1915).xclimhas dropped support for Python 3.9 and adopted Python 3.10+ code styling conventions. (GH/1914, PR/1915).
New indicators
- New
heat_spell_frequency,heat_spell_max_lengthandheat_spell_total_length: spell length statistics on a bivariate condition that uses the average over a window by default. (PR/1885, PR/1778). - New
hot_spell_max_magnitude: yields the magnitude of the most intensive heat wave. (PR/1926). - New
chill_portionandchill_unit: chill portion based on the Dynamic Model and chill unit based on the Utah model indicators. (GH/1753, PR/1909). - New
water_cycle_intensity: yields the sum of precipitation and actual evapotranspiration. (GH/410, PR/1947).
New features and enhancements
- New generic
xclim.indices.generic.spell_maskthat returns a mask of which days are part of a spell. Supports multivariate conditions and weights. Used in new generic indexxclim.indices.generic.bivariate_spell_length_statisticsthat extendsspell_length_statisticsto two variables. (PR/1885). - Indicator parameters can now be assigned a new name, different from the argument name in the compute function. (PR/1885).
- Add attribute
units_metadatato outputs representing a difference between temperatures. This is needed to disambiguate temperature differences from absolute temperature. Changes affect indicatorsdaily_temperature_range,daily_temperature_range_variability,extreme_temperature_range,interday_diurnal_temperature_range, and all degree-day indicators. Implemented using a newpint2cfattrsfunction to convert pint units to a dictionary of CF attributes.units2pintis also modified to supportunits_metadataattributes in DataArrays. Some SDBA properties and measures previously returning units ofdelta_degCwill now return the original input DataArray units accompanied with theunits_metadataattribute. (GH/1822, PR/1830). xclim.indices.run_length.windowed_max_run_sumaccumulates positive values across runs and yields the maximum valued run. (PR/1926).- Helper function
xclim.indices.helpers.make_hourly_temperatureto estimate hourly temperatures from daily min and max temperatures. (PR/1909). - New global option
resample_map_blocksto wrap allresample().map()code inside axr.map_blocksto lower the number of dask tasks. Uses utilityxclim.indices.helpers.resample_mapand requiresfloxto ensure the chunking allows such block-mapping. Defaults to False. (PR/1848). xclim.indices.run_length.runs_with_holesallows to input a condition that must be met for a run to start and a second condition that must be met for the run to stop. (PR/1778).- New generic compute function
xclim.indices.generic.thresholded_eventsthat finds events based on a threshold condition and returns basic stats for each. See also:xclim.indices.run_length.find_events. (PR/1778). xclim.core.units.rate2amountandxclim.core.units.amount2ratecan now also accept quantities (pint objects or strings), in which case thedimargument must be thetimecoordinate through which we can find the sampling rate. (PR/1778).xclim.indices.stats.standardized_indexnow supports a weekly resampling frequency. Only "standard" calendars usingnumpy'sdatetime64dtype are supported for this mode. (GH/1892, PR/1952)
Bug fixes
- Fixed
rate2amountandamount2ratefor sub-daily frequencies. (GH/1962, PR/1963). - Added the liquid water equivalent thickness ("[length]") to amount ("[mass]/[area]") transformation to the
hydrocontext (the inverse operation was already there). (PR/1963). - Fixed a small inefficiency in
_otc_adjust, and thestandardizemethod ofOTC/dOTCis now applied on individual variable. (PR/1890, PR/1896). - Removed deprecated cells in the tutorial notebook
sdba.ipynb. (PR/1895).
Breaking changes
platformdirsis no longer a direct dependency ofxclim, butpoochis required to use many of the new testing functions (installable viapip install poochorpip install 'xclim[dev]'). (PR/1889).- The following previously-deprecated functions have now been removed from
xclim:xclim.core.calendar.convert_calendar,xclim.core.calendar.date_range,xclim.core.calendar.date_range_like,xclim.core.calendar.interp_calendar,xclim.core.calendar.days_in_year,xclim.core.calendar.datetime_to_decimal_year. For guidance on how to migrate to alternatives, see the version 0.50.0 Breaking changes. (GH/1010, PR/1845). - The
transformargument ofOTC/dOTCclasses (and child functions) has been changed tonormalization, andnumIterMaxhas been changed tonum_iter_maxinxclim.core.utils.optimal_transport(PR/1896). xclimnow requiresnumpy >=1.23.0andscikit-learn >=1.1.0, as well as (optionally)ipython >=8.5.0,nbsphinx >=0.9.5, andmatplotlib >=3.6.0. (GH/1914, PR/1915).
Internal changes
- The
Ouranosinc/xclim-testdatarepository has been restructured for better organization and to make better use ofpoochand data registries for testing data fetching (see: xclim-testdata PR/29). (PR/1889). - The
xclim.testingmodule has been refactored to make use ofpoochwith file registries. Several testing functions have been removed as a result: (PR/1889)xclim.testing.utils.open_datasetnow uses apoochinstance to deliver locally-stored datasets. Its call signature has also changed.xclimnow accepts more environment variables to control the behaviour of the testing setup functions. These includeXCLIM_TESTDATA_BRANCH,XCLIM_TESTDATA_REPO_URL, andXCLIM_TESTDATA_CACHE_DIR.xclim.testing.utils.get_file,xclim.testing.utils.get_local_testdata,xclim.testing.utils.list_datasets, andxclim.testing.utils.file_md5_checksumhave been removed.xclim.testing.utils.nimbusreplaces much of this functionality. See thexclimdocumentation for more information.
- Many tests focused on evaluating the normal operation of remote file access tools under
xclim.testinghave been removed. (PR/1889). - Setup and teardown functions that were found under
tests/conftest.pyhave been optimised to reduce redundant calls when runningpytest xclim. Some obsoletepytestfixtures have also been removed. (PR/1889). - Many
DeprecationWarningandFutureWarningmessages emitted fromxarrayandpinthave been addressed. (GH/1719, PR/1881). - The code base has been adjusted to address many
pylint-related warnings and errors. In some cases,castingwas used to redefine somenumpyandxarrayobjects. (GH/1719, PR/1881). xclim.corenow uses absolute imports for clarity and some objects commonly used in the module have been moved to hidden submodules. (GH/1719, PR/1881).xclim.core.indicator.Parameterhas a new attributecompute_namewhilexclim.core.indicator.Indicatorlost its_variable_mapping. The translation from parameter (and variable) names in the indicator to the names on the compute function is now handled byIndicator._get_compute_args. (PR/1885).- Adopted many linting and formatting suggestions from the Scientific Python repo-review tool: (PR/1910)
- Applied several linting suggestions adopted by the
scipycommunity. - Replaced
isortwithruff-based import-sorting formatting. - Added formatting for
Markdownfiles. - Added the
bugbear,pyupgradechecks to theruffformatter. - Adjusted
mypychecks to be more standardized.
- Applied several linting suggestions adopted by the
- Renamed annual deprecated frequency alias
"A"to"Y"(PR/1930). - The
indicesdocumentation now includes the members ofxclim.indices.stats. (GH/1913, PR/1958). - The default URL for fetching testing data is now set to the
raw.githubusercontent.commirror ofxclim-testdata. (PR/1961). - The
upstreamtoxenvironment has been updated to not install the latestnumpyuntilnumbasupports it. (PR/1961).
CI changes
- The
pipcache,toxenvironments, and thexclim-testdatacache are now saved between workflow runs (usingactions/cache) to reduce the time spent installing dependencies and downloading testing data. (PR/1906).
Files
Ouranosinc/xclim-v0.53.0.zip
Files
(1.1 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:b5a44a53ca094a2ddf09c51f1912eedc
|
1.1 MB | Preview Download |
Additional details
Related works
- Is supplement to
- Software: https://github.com/Ouranosinc/xclim/tree/v0.53.0 (URL)