Contributors to this version: David Huard (@huard), Trevor James Smith (@Zeitsperre), Pascal Bourgault (@aulemahal), Juliette Lavoie (@juliettelavoie), Gabriel Rondeau-Genesse (@RondeauG), Marco Braun (@vindelico), Éric Dupuis (@coxipi).
Announcements
xclim
now usesplatformdirs
to writexclim-testdata
to the user's cache directory. Dynamic paths are now used to cache data dependent on the user's operating system. Developers can now safely delete the.xclim-testdata
folder in their home directory without affecting the functionality ofxclim
. (PR/1460).
New indicators
- Variations of already existing indices:
xclim.indices.snd_max
andxclim.indices.frost_free_spell_max_length
. (PR/1443, GH/1386).
New features and enhancements
- Added
ensembles.hawkins_sutton
method to partition the uncertainty sources in a climate projection ensemble. (GH/771, PR/1262), along with a notebook example. (PR/1466). - New function
xclim.core.calendar.convert_doy
to transform day-of-year data between calendars. Also accessible fromconvert_calendar
withdoy=True
. (GH/1283, PR/1406). - New
xclim.units.declare_relative_units
to enable relative unit checks. This was applied to most "generic" indices. (PR/1414). - Added new function
xclim.sdba.properties.std
to calculate the standard deviation of a variable over all years at a given time resolution. (PR/1445). - Amended the documentation of
xclim.sdba.properties.trend
to document already existing functionality of calculating the return values ofscipy.stats.linregress
. (PR/1445). - Add support for setting optional variables through the
ds
argument. (GH/1432, PR/1435). - New
xclim.core.calendar.is_offset_divisor
to test if a given freq divides another one evenly (PR/1446). - Missing value objects now support input timeseries of quarterly and yearly frequencies (PR/1446).
- Missing value checks enabled for all "generic" indicators (
return_level
,fit
andstats
) (PR/1446).
Bug fixes
- Fix
kldiv
docstring so the math formula renders to HTML. (GH/1408, PR/1409). - Fix the registry entries of "generic" indicators. (GH/1423, PR/1424).
- Fix
jetstream_metric_woollings
so it uses thevertical
coordinate identified bycf-xarray
, instead ofpressure
(GH/1421, PR/1422). - Fix virtual indicator attribute assignment, causing individual indicator's realm to be ignored. (GH/1425, PR/1426).
- Fixes the
raise_flags
argument ofxclim.core.dataflags.data_flags
so that anException
is only raised when some checkups fail. (GH/1456, PR/1457). - Fix
xclim.indices.generic.get_zones
so thatbins
can be given as input without error. (PR/1455).
Internal changes
- Tolerance thresholds for error in
test_stats::test_fit
have been relaxed to allow for more variation in the results. Previously untested*_moving_yearly_window
functions are now tested. (GH/1400, PR/1402). - Increased the guess of number of quantiles needed in
ExtremeValues
. (PR/1413). - Tolerance thresholds for error in
test_processing::test_adapt_freq
have been relaxed to allow for more variation in the results. (GH/1417, PR/1418). - Added
"streamflow"
to the list of known variables. (PR/1431). - Refactoring of index backend calculations. (PR/1443, GH/1386):
- Use
xclim.indices.generic.select_resample_op
for{tg|tn|tx}_{max|mean|min}
,max_1day_precipitation_amount
,{snw|snd}_max
- Directly use
{cold|hot}_spell_max_length
inmaximum_consecutive_{frost|tx}_days
xclim.indices.generic.select_resample_op
now gives an output with the correct units (xclim.core.units.to_agg_units
is used internally).
- Use
- Shuffle autogenerated documentation files into distinct folders that can be easily cleaned using Makefile. (PR/1449).
- Some docstring adjustments to existing classes. (PR/1449).
- The
pre-commit
dependencyidentify
now associates Jupyter Notebooks as JSON files.pre-commit
is now set to ignore JSON-formatting of notebooks. (PR/1449). - Added a helper module
_finder
in thenotebooks
folder so that the working directory can always be found, with redundancies in place to prevent scripts from failing if the helper file is not found. (PR/1449). - Added a manual cache-cleaning workflow (based on GitHub cache-cleaning example), triggered when a branch has been merged. (PR/1462).
- Added a workflow for posting updates to the xclim Mastodon account (using cbrgm/mastodon-github-action), triggered when a new version is published. (PR/1462).
- Refactor base indicator classes and fix misleading inheritance of
return_level
. (GH/1263, PR/1446).