Contributors to this version: Pascal Bourgault (@aulemahal), Travis Logan (@tlogan2000), Trevor James Smith (@Zeitsperre), Abel Aoun (@bzah), David Huard (@huard), Clair Barnes (@clairbarnes), Raquel Alegre (@raquel-ucl), Jamie Quinn (@JamieJQuinn), Maliko Tanguy (@malngu), Aaron Spring (@aaronspring).
Announcements
- Code coverage (
coverage/coveralls
) is now a required CI check for merging Pull Requests. Requirements are now:- No individual run may report <80% code coverage.
- Some drop in coverage is now tolerable, but runs cannot dip below -0.25% relative to the main branch.
New features and enhancements
- Added an optimized pathway for
xclim.indices.run_length
functions whenwindow=1
. (PR/911, GH/910). - The data input frequency expected by
Indicator
is now in thesrc_freq
attribute and is thus controllable by subclassing existing indicators. (GH/898, PR/927). - New
**indexer
keyword args added to many indicators, it accepts the same arguments asxclim.indices.generic.select_time
, which has been improved. Unless otherwise specified, the time selection is done before any computation. (PR/934, GH/899). - Rewrite of
xclim.sdba.ExtremeValues
, now fixed with a correct algorithm. It has not been tested extensively and should be considered experimental. (PR/914, GH/789, GH/790). - Added
days_over_precip_doy_thresh
andfraction_over_precip_doy_thresh
indicators to distinguish between WMO and ECAD definition of the Rxxp and RxxpTot indices. (GH/931, PR/940). - Update
xclim.core.utils.nan_calc_percentiles
to improve maintainability. (PR/942). - Added
heat_index
indicator. Addedheat_index
indicator. This is similar tohumidex
but uses a different dew point as well as heat balance equations which account for variables other than vapor pressure. (GH/807) and (PR/915). - Added alternative method for
xclim.indices.potential_evapotranspiration
based onmcguinnessbordne05
(from Tanguay et al. 2018). (PR/926, GH/925). - Added
snw_max
andsnw_max_doy
indicators to compute the maximum snow amount and the day of year of the maximum snow amount respectively. (GH/776, PR/950). - Added index for calculating ratio of convective to total precipitation. (GH/920, PR/921).
- Added
wetdays_prop
indicator to calculate the proportion of days in a period where the precipitation is greater than a threshold. (PR/919, GH/918).
Breaking changes
- Following version 1.9 of the CF Conventions, published in September 2021, the calendar name "gregorian" is deprecated.
core.calendar.get_calendar
will return "standard", even if the underlying cftime objects still use "gregorian" (cftime <= 1.5.1). (PR/935). xclim.sdba.utils.extrapolate_qm
is now deprecated and will be removed in version 0.33. ([PR/941](https://github.com/Ourano- Dependency
pint
minimum necessary version is now 0.10. (PR/959).
sinc/xclim/pull/941)).
Internal changes
- Removed some logging configurations in
xclim.core.dataflags
that were polluting python's main logging configuration. (PR/909). - Synchronized logging formatters in
xclim.ensembles
andxclim.core.utils
. (PR/909). - Added a helper function for generating the release notes with dynamically-generated ReStructuredText or Markdown-formatted hyperlinks (PR/922, GH/907).
- Split of resampling-related functionality of
Indicator
into newResamplingIndicator
andResamplingIndicatorWithIndexing
subclasses. The use of new (private) methods makes it easier to inject functionality in indicator subclasses. (GH/867, PR/927, PR/934). - French translation metadata fields are now cleaner and much more internally consistent, and many empty metadata fields (e.g.
comment_fr
) have been removed. (PR/930, GH/929). - Adjustments to the
tox
builds so that slow tests are now run alongside standard tests (for more accurate coverage reporting). (PR/938). - Use
xarray.apply_ufunc
to vectorize statistical functions. (PR/943). - Refactor of
xclim.sdba.utils.interp_on_quantiles
so that it now handles the extrapolation directly and to better handle missing values. (PR/941). - Updated
heating_degree_days
andfraction_over_precip_thresh
documentations. (GH/952, PR/953). - Added an intersphinx mapping to xarray. (PR/955).
- Added a CodeQL security analysis GitHub CI hook on push to master and on Friday nights. (PR/960).
Bug fixes
- Fix bugs in the
cf_attrs
and/orabstract
ofcontinuous_snow_cover_end
andcontinuous_snow_cover_start
. (PR/908). - Remove unnecessary
keep_attrs
fromresample
call which would raise an error in futur Xarray version. (PR/937). - Fixed a bug in the regex that parses usernames in the history. (PR/945).
- Fixed a bug in
xclim.indices.generic.doymax
andxclim.indices.generic.doymin
that prevented the use of the functions on multidimensional data. (PR/950, GH/951). - Skip all missing values in
xclim.sdba.utils.interp_on_quantiles
, drop them from both the old and new coordinates, as well as from the old values. (PR/941). - "degrees_north" and "degrees_east" (and their variants) are now considered independent units, so that
pint
andxclim.core.units.ensure_cf_units
don't convert them to "deg". (PR/959). - Fixed a bug in
xclim.core.dataflags
that would misidentify the "extra" variable to be called when running multivariate checks. (PR/957, GH/861).