Skip to content

Releases: cerfacs-globc/icclim

7.0.0

30 Apr 14:30
f970729
Compare
Choose a tag to compare

What's Changed

date: 2024-03

Breaking Changes Summary

  • New package architecture.
  • New toolchain with flit and ruff.
  • clt standard variable uint changed.
  • clone method added to Indicators.

Changes Details

  • [maint] BREAKING CHANGE
    Created a _core package which should not be used outside icclim source.
    Its content may change without deprecation warnings.

  • [enh] Added DCSC indices under icclim.dcsc namespace.

  • [doc] Adapt Christian's notebooks from ISENES and add them as
    tutorials in our documentation.

  • [doc] Add nbshpinx extension to render jupyter notebooks in
    the online documentation.

  • [maint] Migrate from [black, blackdoc, flake8, isort, pyupgrade,
    pydocstyle] to ruff

  • [maint] Migrate from setup.py to pyproject.toml

  • [maint] Make readthedocs build fail when there are warnings

  • [maint] Fix warnings in doc build

  • [maint] BREAKING CHANGE
    Update architecture to have a src/ and a tests/ directory at root level

  • [maint] BREAKING CHANGE
    Migrate build toolchain from setuptools to flit

  • [maint] Remove version number from constants module as it was
    causing the build process to import icclim. The version number is now
    statically set in src/icclim/init.py

  • [fix] Force xarray to read dataset sequentially to avoid a netcdf-c
    threading issue causing seg faults.

  • [enh] Add publish-to-pypi.yml github action to automatically build
    and publish icclim to pypi. This action is triggered by a github
    release being published. This action requires a manual approval on
    github.

  • [enh] Add the following ECAD indices: PP (average of pressure),
    SS (sum of sunshine) and RH (average of humidity).

  • [fix] BREAKING CHANGE
    the default unit of clt standard variable is now % as expected
    (was a wind strenght unit).

  • [maint] BREAKING CHANGE
    Rework architecture to have a _core private package
    containing the core logic of icclim. Idea taken from numpy 2.0.

  • [doc] Add docstring to almost all functions, classes and modules.
    This has been done to improve the generated documentation.
    co-authored: Github's copilot.

  • [maint] Add missing type hints.

  • [doc] Make use of readthedocs' autoapi library to generate the API
    documentation.

  • [maint] Improve maintainability of tools/extract-icclim-funs.py to
    ease adding new registries (still not perfect).

  • [fix] Add clone method to Indicators to avoid modifying the original instance
    when setting templating metadata.

Full Changelog: v6.5.0...v7.0.0

v6.5.0

20 Dec 09:06
404f8fe
Compare
Choose a tag to compare

Breaking changes

  • Pin xclim between 0.45 and 0.47
  • [#281] Adapt icclim to xclim 0.45 by updating excess and deficit generic functions
  • Drop support for python 3.8

Fixes

  • [#273] Avoid resampling to compute time_bounds on SPI3 and SPI6 indices
  • [#256] Fix unit conversion issue for fraction_of_total generic indices (used by RxxpTOT family of indices)

v6.4.0

16 May 06:14
f68ad3c
Compare
Choose a tag to compare

Minor release to support latest xclim version (0.43.x).

v6.3.0

25 Apr 16:02
3e36aeb
Compare
Choose a tag to compare

BREAKING CHANGES

  • [fix] The indicators based on the difference between two variables (ecad: DTR, ETR, vDTR and anomaly) gave wrong values due to a bad unit conversion of the output. This was for example the case when the input variables are in Kelvin, the difference between the two variables is still in Kelvin but it cannot be converted to degree Celsius with the ususal +273.15. To workaround this issue, we first convert inputs to the expected output unit and then we compute the index.
  • [fix] Indices based on both a percentile threshold and a threshold_min_value (for ecad: r75p, r75pTOT, r95p, r95pTOT, r99p, r99pTOT) are now computing the exceedance rate on values above threshold_min_value as well. Previously this threshold_min_value was used to compute the percentile and the total (for rxxpTOT indices) but not the exceedance rate.
  • [maint] The only compatible version of icclim 6.3.0 is xclim 0.42

6.2.0

15 Feb 17:01
b93c8b1
Compare
Choose a tag to compare

Maintenance release to update icclim according to latest changes on xclim 0.40:

  • Moved PercentileDataArray from xclim to icclim.
  • Adapted the unit conversion to use the hydro context.

v6.1.5

30 Nov 14:39
1f8731b
Compare
Choose a tag to compare

icclim v6.1.5 is a small release again, to fix a problem assuming datasets having latitude and longitude not as lat and lon but as the full names, when creating the output file metadata.

Bug fix

  • Supports either lat or latitude, and lon or longitude, in put datasets.

v6.1.3

28 Nov 10:29
b597dbb
Compare
Choose a tag to compare

icclim v6.1.3 is a small release to fix TnX.

Bug fix

  • TnX was calculating the minimum instead of the maximum.

v6.1.2

25 Nov 19:09
a58523c
Compare
Choose a tag to compare

icclim v6.1.2 brings new ECAD wind indices as well as new humidity-based indices.

Enhancements

  • ECAD wind indices were added: fxx, fg6bft, fgcalm, fg, ddnorth, ddeast, ddsouth, ddwest. Also, ddnorth and ddsouth were added but do not follow the ECAD's ATBD v11 requirements as their definition seems to be wrong in the document.[0]
  • Added ECAD's indices GSL, SPI3, SPI6.

Documentation

  • Added documentation for generic indicators stand-alone functions.
  • Added a recipe "how to" documentation for generic indicators.

Internal changes

  • Added generic indicators as stand-alone functions in icclim namespace.
  • Upgraded to xclim 0.39.0

[0] ATBD: https://knmi-ecad-assets-prd.s3.amazonaws.com/documents/atbd.pdf

v6.0.0

21 Oct 08:44
471f1b3
Compare
Choose a tag to compare

icclim v6.0.0 is a major release introducing the concept of generic indices.
Generic indices allow users to create their own indices and still benefit from:

  • icclim machinery to parse inputs
  • metadata generation
  • the actual numerical computation of the index

The metadata generation is based on jinja2 templates. These templates may be adjust in future releases once we get some feedback on their outputs.
Generic indices aim to be easy to use, to improve and to extend. They brings 2 concepts together:

  • An abstract threshold such as >= 25 degree_Celsius or >= 99 doy_per AND >= 30 degree_Celsius. These are mere examples of threshold capabilities, see Threshold documentation for more examples.
  • A catalog of generic operators such as count_occurrences, max_consecutive_occurrence, max_of_rolling_sum, that can be passed to index_name argument of icclim.index. A list of all possible operator will be available soon in the documentation.

Generic Index example

precip_threshold = icclim.models.threshold.build_threshold(">= 50 period_per", threshold_min_value="1 mmday")
result_dataset = icclim.index("precipitation.nc",
                             index_name="max_of_rolling_sum",
                             var_name=["precip"],
                             threshold=precip_threshold).compute()

Breaking changes

  • ECAD indices are no longer configurable. This choice was made to ensure that ECAD's indices truly follow the ECAD's ATBD specification[0]
    To create your own index you should now use generic indices.
  • icclim no longer rely directly on xclim to compute indices. Instead we use xclim as a tool box for features such as units handling, calendar operations, percentiles computations etc.
  • The indices [CW, CD, WW, WD] were not properly computed. The computation of precipitation percentiles now use "period percentiles" instead of "doy percentiles" as the ECAD definition suggest.
  • clipped_season option for the slice_mode parameter has been removed.
  • ECAD snow indices now expect a snow (snd) variable.
  • Convert input data that are recognized as a precipitation amount into precipitation rate to handle e-obs dataset

Deprecation

  • Custom indices (a.k.a user indices) are now deprecated in favor of generic indices. For now, they are mapped to their generic indices counterpart, but they could be removed in the future.

Enhancements

  • Generic indices
  • The RR precipitation index has been added.
  • A dictionary can be used for in_files to describe input configuration per variable:
icclim.index(in_files={
  "tasmax": {
                "study": "tasmax-store.zarr",
                "threshold": build_threshold(operator=">", ["per-1.nc", "per-2.nc"]),
                 },
  "pr": "pr.nc"
} 
  • Improve icclim.indices to make it possible to compute every ecad indices based on a variable name (e.g. "tasmax").

Internal changes

  • Upgrade to xclim 0.38 and to xarray 2022.6.
  • icclim no longer rely on clix-meta yaml file. We will still keep a close eye to their recommendation for the specification of climate indices.
  • Add BlackDoc to C.I
  • Add icclim logo

[0] ATBD: https://knmi-ecad-assets-prd.s3.amazonaws.com/documents/atbd.pdf

v5.4.0

10 Aug 13:00
0fbbf28
Compare
Choose a tag to compare

icclim v5.4 is a small summer release with a few fixes.

What's Changed

  • [fix] When giving input as a list of netcdf files, the coordinate values are now merged using the override strategy.
    Hence, the first file having a given dimension define this dimension for all the subsequent files.
  • [fix] Fixed the output unit of some indices (from "ºC" to the standard "degree_Celsius")
  • [fix] Fixed issue where dataset having a time bounds variable could not be processed (due to chunking). We now chunk only the studied variables thus the DataArray(s) instead of the whole Dataset.

Full Changelog: v5.3.0...v5.4.0