ECA&D indices#
icclim 5.2 comes with convenience functions to call each individual
index from icclim namespace. These functions are autogenerated and are
stored in _generated/_ecad.py. Custom climate calculations should now
be expressed with the generic index API rather than the deprecated
user_index bridge.
For example, to use this API with the index su you can do:
import glob
import icclim
tasmax = glob.glob("netcdf_files/tasmax*.nc")
# Old API
# via icclim::index
summer_days = icclim.index(in_files=tasmax, index_name="SU")
# New API
## via the ECAD module
summer_days = icclim.ecad.su(in_files=tasmax)
## via generic indices (output metadata will be different)
summer_days = icclim.count_occurrences(tasmax, threshold="> 25 °C")
The full API is now here icclim.ecad.