Breaking changes
- Renamed indicator
atmos.degree_days_depassment_date
toatmos.degree_days_exceedance_date
. - In
degree_days_exceedance_date
: renamed argumentstart_date
toafter_date
. - Added cfchecks for Pr+Tas-based indicators.
- Refactored test suite to now be available as part of the standard library installation (
xclim.testing.tests
). - Running
pytest
withxdoctest
now requires therootdir
to point attests
location (pytest --rootdir xclim/testing/tests/ --xdoctest xclim
). - Development checks now require working jupyter notebooks (assessed via the
pytest --nbval
command).
New indicators
rain_approximation
andsnowfall_approximation
for computingprlp
andprsn
frompr
andtas
(ortasmin
ortasmax
) according to some threshold and method.solid_precip_accumulation
andliquid_precip_accumulation
now accept athresh
parameter to control the binary snow/rain temperature threshold.first_snowfall
andlast_snowfall
to compute the date of first/last snowfall exceeding a threshold in a period.
New features and enhancements
- New
kind
entry in theparameters
property of indicators, differentiating between [optional] variables and parameters. - The git pre-commit hooks (
pre-commit run --all
) now clean the jupyter notebooks withnbstripout
call.
Bug fixes
- Fixed a bug in
indices.run_length.lazy_indexing
that occurred with 1D coords and 0D indexes when using the dask backend. - Fixed a bug with default frequency handling affecting
fit
indicator. - Set missing method to 'skip' for
freq_analysis
indicator. - Fixed a bug in
ensembles._ens_align_datasets
that occurred when inputs are.nc
filepaths but files lack a time dimension.
Internal changes
core.cfchecks.check_valid
now accepts a sequence of strings as itsexpected
argument.- Clean up in the tests to speed up testing. Addition of a marker to include "slow" tests when desired (
-m slow
). - Fixes in the tests to support
sklearn>=0.24
,clisops>=0.5
and build xarray@master against python 3.7. - Moved the testing suite to within xclim and simplified
tox
to manage its own tempdir. - Indicator class now has a
default_freq
method.