pypi xclim 0.34.0
v0.34.0

latest releases: 0.49.0, 0.48.2, 0.48.1...
2 years ago

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 the xclim 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 for Indicators.
  • The cell_methods string attribute appends only the operation from the indicator itself. In previous version, some indicators also appended the input data's own cell_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 the indices and translations 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 of bottleneck. This workaround will be removed once the fix is merged upstream. (PR/1013, see: bottleneck PR/397).
  • 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's int. This ensures a THREDDS server can read it when the variable is saved to a netCDF file with xarray/netCDF4-python. (GH/980, PR/1019).

Don't miss a new xclim release

NewReleases is sending notifications on new releases.