Contributors to this version: Pascal Bourgault (@aulemahal), Trevor James Smith (@Zeitsperre), David Huard (@huard), Aoun Abel (@bzah).
Announcements
xclim
now officially supports Python3.10. (PR/1013).
Breaking changes
- The version pin for
bottleneck
(<1.4) has been lifted. (PR/1013). packaging
has been removed from thexclim
run dependencies. (PR/1013).- Quantile mapping adjustment objects (EQM, DQM and QDM) and
sdba.utils.equally_spaced_nodes
will not add additional endpoints to the quantile range. With those endpoints, variables are capped to the reference's range in the historical period, which can be dangerous with high variability in the extremes (ex: pr), especially if the reference doesn't reproduce those extremes credibly. (GH/1015, PR/1016). To retrieve the same functionality as before use:
from xclim import sdba
# NQ is the the number of equally spaced nodes, the argument previously given to nquantiles directly.
EQM = sdba.EmpiricalQuantileMapping.train(ref, hist, nquantiles=sdba.equally_spaced_nodes(NQ, eps=1e-6), ...)
- The "history" string attribute added by xclim has been modified for readability: (GH/963, PR/1018).
- The trailing dot (
.
) was dropped. None
inputs are now printed as "None" (and not "").- Arguments are now always shown as keyword-arguments. This mostly impacts
sdba
functions, as it was already the case forIndicators
.
- The trailing dot (
- The
cell_methods
string attribute appends only the operation from the indicator itself. In previous version, some indicators also appended the input data's owncell_method
. The clix-meta importer has been modified to follow the same convention. (GH/983, PR/1022)
New features and enhancements
publish_release_notes
now leverages much more regular expression logic for link translations to markdown. (PR/1023).- Improve performances of percentile bootstrap algorithm by using
xarray.map_block
(GH/932, PR/1017).
Bug fixes
- Loading virtual python modules with
build_indicator_module_from_yaml
is now fixed on some systems where the current directory was not part of python's path. Furthermore, paths of the python and json files can now be passed directly to theindices
andtranslations
arguments, respectively. (GH/1020, PR/1021).
Internal changes
- Due to an upstream bug in
bottleneck
's support of virtualenv,tox
builds for Python3.10 now depend on a patched fork ofbottleneck
. This workaround will be removed once the fix is merged upstream. (PR/1013, see: bottleneck PR/397).- This has been removed with the release of bottleneck version 1.3.4. (PR/1025).
- GitHub CI actions now use the deadsnakes python PPA Action for gathering the Python3.10 development headers. (PR/1013).
- The "is_dayofyear" attribute added by several indices is now a
numpy.int32
instance, instead of python'sint
. This ensures a THREDDS server can read it when the variable is saved to a netCDF file withxarray
/netCDF4-python
. (GH/980, PR/1019).