github Ouranosinc/xclim v0.31.0

latest releases: v0.41.0, v0.40.0, v0.39.0...
2 years ago

Contributors to this version: Abel Aoun (@bzah), Pascal Bourgault (@aulemahal), David Huard (@huard), Juliette Lavoie (@juliettelavoie), Travis Logan (@tlogan2000), Trevor James Smith (@Zeitsperre).

New indicators

  • thawing_degree_days indicator returns degree-days above a default of thresh="0 degC". (PR/895, GH/887).
  • freezing_degree_days indicator returns degree-days below a default of thresh="0 degC". (PR/895, GH/887).
  • Several frost-free season calculations are now available as both indices and indicators. (PR/895, GH/887):
    • frost_free_season_start
    • frost_free_season_end
    • frost_free_season_length
  • growing_season_start is now offered as an indice and as an indicator to complement other growing season-based indicators (threshold calculation with op=">="). (PR/895, GH/887).

New features and enhancements

  • Improve cell_methods checking to search the wanted method within the whole string. (PR/866, GH/863).
  • New align_on='random option for xclim.core.calendar.convert_calendar, for conversions involving '360_day' calendars. (PR/875, GH/841).
  • dry_spell_frequency now has a parameter op: {"sum", "max"} to choose if the threshold is compared against the accumulated or maximal precipitation, over the given window. (PR/879).
  • maximum_consecutive_frost_free_days is now checking that the minimum temperature is above or equal to the threshold ( instead of only above). (PR/883, GH/881).
  • The ANUCLIM virtual module has been updated to accept weekly and monthly inputs and with improved metadata. (PR/885, GH/538)
  • The sdba.loess algorithm has been optimized to run faster in all cases, with an even faster special case (equal_spacing=True) when the x coordinate is equally spaced. When activated, this special case might return results different from without, up to around 0.1%. (PR/865).
  • Add support for group's window and additional dimensions in LoessDetrend. Add new RollingMeanDetrend object. (PR/865).
  • Missing value algorithms now try to infer the source timestep of the input data when it is not given. (PR/885).
  • On indices, bootstrap parameter documentation has been updated to explain when and why it should be used. (PR/893, GH/846).

Breaking changes

  • Major changes in the YAML schema for virtual submodules, now closer to how indicators are declared dynamically, see the doc for details. (PR/849, GH/848).
  • Removed xclim.generic.daily_downsampler, as it served no purpose now that xarray's resampling works with cftime (PR/888, GH/889).
  • Refactor of xclim.core.calendar.parse_offset, output types were changed to useful ones (PR/885).
  • Major changes on how parameters are passed to indicators. (PR/873):
    • Their signature is now consistent : input variables (DataArrays, optional or not) are positional or keyword arguments and all other parameters are keyword only. (GH/855, GH/857)
    • Some indicators have modified signatures because we now rename variables when wrapping generic indices. This is the case for the whole cf module, for example.
    • Indicator.parameters is now a property generated from Indicator._all_parameters, as the latter includes the injected parameters. The keys of the former are instances of new xclim.core.indicator.Parameter, and not dictionaries as before.
    • New Indicator.injected_parameters to see which compute function arguments will be injected at call time.
    • See the pull request (PR/873) for all information.
  • The call signature for huglin_index has been modified to reflect the correct variables used in its formula (tasmin -> tas; thresh_tasmin -> thresh). (PR/903, GH/902).

Internal changes

  • Pull Request contributions now require hyperlinks to the issue and pull request pages on GitHub listed alongside changess in HISTORY.rst. (PR/860,GH/854).
  • Updated the contribution guidelines to better give credit to contributors and more easily track changes. (PR/869, GH/868).
  • Enabled coveralls code coverage reporting for GitHub CI. (PR/870).
  • Added automated TestPyPI and PyPI-publishing workflows for GitHub CI. (PR/872).
  • Changes on how indicators are constructed. (PR/873).
  • Added missing algorithms tests for conversion from hourly to daily. (PR/888).
  • Updated pre-commit hooks to use black v21.10.b0. (PR/896).
  • Moved stack_variables, unstack_variables, construct_moving_yearly_window and unpack_moving_yearly_window from xclim.sdba.base to xclim.sdba.processing. They still are imported in xclim.sdba as before. (PR/892).
  • Many improvements to the documentation. (PR/892, GH/880).
  • Added regex replacement handling in setup.py to facilitate publishing contributor/contribution links on PyPI. (PR/906).

Bug fixes

  • Fix a bug in bootstrapping where computation would fail when the dataset time coordinate is encoded using cftime.datetime. (PR/859).
  • Fix a bug in build_indicator_module_from_yaml where bases classes (Daily, Hourly, etc) were not usable with the base field. (PR/885).
  • percentile_doy alpha and beta parameters are now properly transmitted to bootstrap calls of this function. (PR/893, GH/846).
  • When called with a 1D da and ND index, xclim.indices.run_length.lazy_indexing now drops the auxiliary coordinate corresponding to da's index. This fixes a bug with ND data in xclim.indices.run_length.season. (PR/900).
  • Fix name of heating degree days in French ("chauffe" -> "chauffage"). (PR/895).
  • Corrected several French indicator translation description strings (bad usages of "." in description and long_name fields). (PR/895).
  • Fixed an error with the formula for huglin_index where tasmin was being used in the calculation instead of tas. (PR/903, GH/902).

Don't miss a new xclim release

NewReleases is sending notifications on new releases.