processing.indicators#
Functions
|
Calculate an xclim indicator on a data tree. |
- xclim_indicator(dt: DataTree, indicator: Indicator, vars: str | list, **kwargs) DataTree [source]#
Calculate an xclim indicator on a data tree.
This function is a wrapper around the xclim indicator functions. It takes a data tree and applies the indicator to each dataset in the tree. The indicator function should be a
xclim.indicator
and the variables should match the expected order of that indicator function.- Parameters:
dt (DataTree) – A data tree containing the datasets to calculate the indicator on.
indicator (
xclim.indicator
) – An xclim indicator function.vars (str or list) – The variable(s) to calculate the indicator with. The order of the variables is important and should match the order expected by the xclim indicator.
**kwargs – Additional keyword arguments to pass to the indicator function.
- Returns:
A new dataset with the indicator calculated
- Return type:
xr.Dataset