earthkit.climate.atmos.heat_spell_total_length¶
- earthkit.climate.atmos.heat_spell_total_length(tasmin: xarray.DataArray | str = 'tasmin', tasmax: xarray.DataArray | str = 'tasmax', ds: xarray.Dataset | Any = None, *, window: int = 3, win_reducer: Literal['min', 'max', 'sum', 'mean'] = 'mean', freq: str = 'YS', min_gap: int = 1, resample_before_rl: bool = True, thresh_tasmin: Any = '20 °C', thresh_tasmax: Any = '33 °C', **kwargs: Any) Any¶
Heat spell total length.
Total length of heat spells. A heat spell occurs when rolling averages of daily minimum and maximum temperatures exceed given thresholds for a number of days.
Units:
heat_spell_total_length: days
This function wraps xclim.indicators.atmos.heat_spell_total_length.
- Parameters:
tasmin (
xarray.DataArray | str) – Minimum surface temperature.tasmax (
xarray.DataArray | str) – Maximum surface temperature.window (
int) – Minimum length of a spell.win_reducer (
Literal[``’min’, ``'max','sum','mean']) – Reduction along the spell length to compute the spell value. Note that this does not matter when window is 1.freq (
str) – Resampling frequency.min_gap (
int) – The shortest possible gap between two spells. Spells closer than this are merged by assigning the gap steps to the merged spell.resample_before_rl (
bool) – Determines if the resampling should take place before or after the run length encoding (or a similar algorithm) is applied to runs.thresh_tasmin (
Any) – Threshold for tasminthresh_tasmax (
Any) – Threshold for tasmaxds (
xarray.Dataset | Any) – Input dataset.**kwargs (
Any) – Additional keyword arguments.
- Returns:
The computed index.
- Return type:
Any