v0.50.0
Contributors to this version: Trevor James Smith (@Zeitsperre), Éric Dupuis (@coxipi).
New features and enhancements
- New properties: Bivariate Spell Length (
xclim.sdba.properties.bivariate_spell_length
), Generalized Spell Lengths with an argument forwindow
, and Specific Spell Lengths withwindow
fixed to '1' (xclim.sdba.properties.threshold_count
,xclim.sdba.properties.bivariate_threshold_count
). (PR/1758). - New option
normalize
insdba.measures.taylordiagram
to obtain normalized Taylor Diagrams (divide standard deviations by standard deviation of the reference). (PR/1764).
Breaking changes
pint
has been pinned below v0.24 untilxclim
can be updated to support the latest version. (GH/1771, PR/1772).numpy
has been pinned below v2.0.0 untilxclim
can be updated to support the latest version. (PR/1783).- Calendar utilities that have an equivalent in
xarray
have been deprecated and will be removed inxclim
v0.51.0. (GH/1010, PR/1761). This concerns the following members ofxclim.core.calendar
:convert_calendar
: UseDataset.convert_calendar
,DataArray.convert_calendar
orxr.coding.calendar_ops.convert_calendar
instead.- If your code passes
target
as an array, first convert the source to the target's calendar and then reindex the result totarget
. - If you were using the
doy=True
option, replace it withxc.core.calendar.convert_doy(source, target_cal).convert_calendar(target_cal)
. "default"
is no longer a valid calendar name for any xclim functions and will not be returned byget_calendar
. Xarray has ause_cftime
argument, xclim exposes it when the distinction is needed.
- If your code passes
date_range
: Usexarray.date_range
instead.date_range_like
: Usexarray.date_range_like
instead.interp_calendar
: UseDataset.interp_calendar
orxarray.coding.calendar_ops.interp_calendar
instead.days_in_year
: Usexarray.coding.calendar_ops._days_in_year
instead.datetime_to_decimal_year
: Usexarray.coding.calendar_ops._datetime_to_decimal_year
instead.
Internal changes
- Synchronized tooling versions across
pyproject.toml
andtox.ini
and pinned them to the latest stable releases in GitHub Workflows. (PR/1744). - Fixed a few small spelling and grammar issues that were causing errors with
codespell
. Now ignoringSVG
files. (PR/1769). - Temporarily skipping the
test_hawkins_sutton_smoke
test due to strange behaviour withxarray
. (PR/1769). - Fixed some previously uncaught errors raised from recent versions of
pylint
andcodespell
. (PR/1772). - Set the
doctest
examples to all useh5netcdf
with worker-separated caches to load datasets. (PR/1772).