Breaking changes
- Statistical functions (
frequency_analysis
,fa
,fit
,parametric_quantile
) are now solely accessible viaindices.stats
.
New indicators
atmos.degree_days_depassment_date
, the day of year when the degree days sum exceeds a threshold.
New features and enhancements
- Added unique titles to
atmos
calculations employing wrapped_partials. xclim.core.calendar.convert_calendar
now accepts amissing
argument.- Added
xclim.core.calendar.date_range
andxclim.core.calendar.date_range_like
wrapping pandas'date_range
and xarray'scftime_range
. xclim.core.calendar.get_calendar
now accepts many different types of data, including datetime object directly.- New module
xclim.analog
and methodxclim.analog.spatial_analogs
to compute spatial analogs. - Indicators can now accept dataset in their new
ds
call argument. Variable arguments (that use theDataArray
annotation) can now be given with strings that correspond to variable names in the dataset, and default to their own name. - Clarification to
frequency_analysis
notebook. - Now officially supporting PEP596 (Python3.9).
- New methods
xclim.ensembles.change_significance
andxclim.ensembles.knutti_sedlacek
to qualify climate change agreement among members of an ensemble.
Bug fixes
- Fixed bug that prevented the use of
xclim.core.missing.MissingBase
and subclasses with an indexer and a cftime datetime coordinate. - Fixed issues with metadata handling in statistical indices.
- Various small fixes to the documentation (re-establishment of some internally and externally linked documents).
Internal changes
- Passing
align_on
toxclim.core.calendar.convert_calendar
without using '360_day' calendars will not raise a warning anymore. - Added formatting utilities for metadata attributes (
update_cell_methods
,prefix_attrs
andunprefix_attrs
). xclim/ensembles.py
moved toxclim/ensembles/*.py
, splitting stats/creation, reduction and robustness methods.- With the help of the
mypy
library, added several typing fixes to better identify inputs/outputs, and reduce object type mutations. - Fixed some doctests in
ensembles
andset_options
. clisops
v0.4.0+ is now an optional requirements for non-Windows builds.- New
xclim.core.units.str2pint
method to convert quantity strings to quantity objects. Main improvement is to make "3 degC days" a valid string that converts to "3 K days".