pypi xclim 0.45.0
v0.45.0

latest releases: 0.53.2, 0.53.1, 0.53.0...
14 months ago

Contributors to this version: David Huard (@huard), Trevor James Smith (@Zeitsperre), Pascal Bourgault (@aulemahal), Juliette Lavoie (@juliettelavoie), Gabriel Rondeau-Genesse (@RondeauG), Marco Braun (@vindelico), Éric Dupuis (@coxipi).

Announcements

  • xclim now uses platformdirs to write xclim-testdata to the user's cache directory. Dynamic paths are now used to cache data dependent on the user's operating system. Developers can now safely delete the .xclim-testdata folder in their home directory without affecting the functionality of xclim. (PR/1460).

New indicators

  • Variations of already existing indices: xclim.indices.snd_max and xclim.indices.frost_free_spell_max_length. (PR/1443, GH/1386).

New features and enhancements

  • Added ensembles.hawkins_sutton method to partition the uncertainty sources in a climate projection ensemble. (GH/771, PR/1262), along with a notebook example. (PR/1466).
  • New function xclim.core.calendar.convert_doy to transform day-of-year data between calendars. Also accessible from convert_calendar with doy=True. (GH/1283, PR/1406).
  • New xclim.units.declare_relative_units to enable relative unit checks. This was applied to most "generic" indices. (PR/1414).
  • Added new function xclim.sdba.properties.std to calculate the standard deviation of a variable over all years at a given time resolution. (PR/1445).
  • Amended the documentation of xclim.sdba.properties.trend to document already existing functionality of calculating the return values of scipy.stats.linregress. (PR/1445).
  • Add support for setting optional variables through the ds argument. (GH/1432, PR/1435).
  • New xclim.core.calendar.is_offset_divisor to test if a given freq divides another one evenly (PR/1446).
  • Missing value objects now support input timeseries of quarterly and yearly frequencies (PR/1446).
  • Missing value checks enabled for all "generic" indicators (return_level, fit and stats) (PR/1446).

Bug fixes

  • Fix kldiv docstring so the math formula renders to HTML. (GH/1408, PR/1409).
  • Fix the registry entries of "generic" indicators. (GH/1423, PR/1424).
  • Fix jetstream_metric_woollings so it uses the vertical coordinate identified by cf-xarray, instead of pressure (GH/1421, PR/1422).
    • Add logic to handle coordinates in decreasing order, or for longitudes defined from 0-360 instead of -180 to 180. (GH/1429, PR/1430).
  • Fix virtual indicator attribute assignment, causing individual indicator's realm to be ignored. (GH/1425, PR/1426).
  • Fixes the raise_flags argument of xclim.core.dataflags.data_flags so that an Exception is only raised when some checkups fail. (GH/1456, PR/1457).
  • Fix xclim.indices.generic.get_zones so that bins can be given as input without error. (PR/1455).

Internal changes

  • Tolerance thresholds for error in test_stats::test_fit have been relaxed to allow for more variation in the results. Previously untested *_moving_yearly_window functions are now tested. (GH/1400, PR/1402).
  • Increased the guess of number of quantiles needed in ExtremeValues. (PR/1413).
  • Tolerance thresholds for error in test_processing::test_adapt_freq have been relaxed to allow for more variation in the results. (GH/1417, PR/1418).
  • Added "streamflow" to the list of known variables. (PR/1431).
  • Refactoring of index backend calculations. (PR/1443, GH/1386):
    • Use xclim.indices.generic.select_resample_op for {tg|tn|tx}_{max|mean|min}, max_1day_precipitation_amount, {snw|snd}_max
    • Directly use {cold|hot}_spell_max_length in maximum_consecutive_{frost|tx}_days
    • xclim.indices.generic.select_resample_op now gives an output with the correct units (xclim.core.units.to_agg_units is used internally).
  • Shuffle autogenerated documentation files into distinct folders that can be easily cleaned using Makefile. (PR/1449).
  • Some docstring adjustments to existing classes. (PR/1449).
  • The pre-commit dependency identify now associates Jupyter Notebooks as JSON files. pre-commit is now set to ignore JSON-formatting of notebooks. (PR/1449).
  • Added a helper module _finder in the notebooks folder so that the working directory can always be found, with redundancies in place to prevent scripts from failing if the helper file is not found. (PR/1449).
  • Added a manual cache-cleaning workflow (based on GitHub cache-cleaning example), triggered when a branch has been merged. (PR/1462).
  • Added a workflow for posting updates to the xclim Mastodon account (using cbrgm/mastodon-github-action), triggered when a new version is published. (PR/1462).
  • Refactor base indicator classes and fix misleading inheritance of return_level. (GH/1263, PR/1446).

Breaking changes

  • Fix and adapt percentile_doy for an error raised by xarray > 2023.7.0. (GH/1417, PR/1450).
  • integral replaces prod and delta_prod as possible input in xclim.core.units.to_agg_units (PR/1443, GH/1386).

Don't miss a new xclim release

NewReleases is sending notifications on new releases.