pypi icclim 6.0.0
v6.0.0

latest releases: 7.0.0, 6.5.0, 6.4.0...
2 years ago

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

Don't miss a new icclim release

NewReleases is sending notifications on new releases.