earthkit.climate.atmos.temperature.hot_spell_frequency¶
- earthkit.climate.atmos.temperature.hot_spell_frequency(tasmax: xarray.DataArray | str = 'tasmax', ds: xarray.Dataset | Any = None, *, thresh: Any = '30 degC', window: int = 3, freq: str = 'YS', op: Literal['>', 'gt', '>=', 'ge'] = '>', resample_before_rl: bool = True, **kwargs: Any) Any¶
Hot spell frequency.
The frequency of hot periods of N days or more, during which the temperature over a given time window of days is above a given threshold.
Units:
hot_spell_frequency: dimensionless
This function wraps xclim.indicators.atmos.hot_spell_frequency.
- Parameters:
tasmax (
xarray.DataArray | str) – Maximum daily temperature.thresh (
Any) – Threshold temperature below which a hot spell begins.window (
int) – Minimum number of days with temperature above the threshold to qualify as a hot spell.freq (
str) – Resampling frequency.op (
Literal[``’>’, ``'gt','>=','ge']) – Comparison operation. Default: “>”.resample_before_rl (
bool) – Determines if the resampling should take place before or after the run.ds (
xarray.Dataset | Any) – Input dataset.**kwargs (
Any) – Additional keyword arguments.
- Returns:
The computed index.
- Return type:
Any