earthkit.climate.atmos.cold_spell_frequency¶
- earthkit.climate.atmos.cold_spell_frequency(tas: xarray.DataArray | str = 'tas', ds: xarray.Dataset | Any = None, *, thresh: Any = '-10 degC', window: int = 5, freq: str = 'YS-JUL', op: Literal['<', 'lt', '<=', 'le'] = '<', resample_before_rl: bool = True, **kwargs: Any) Any¶
Cold spell frequency.
The frequency of cold periods of N days or more, during which the temperature over a given time window of days is below a given threshold.
Units:
cold_spell_frequency: dimensionless
This function wraps xclim.indicators.atmos.cold_spell_frequency.
- Parameters:
tas (
xarray.DataArray | str) – Mean daily temperature.thresh (
Any) – Threshold temperature below which a cold spell begins.window (
int) – Minimum number of days with temperature below the threshold to qualify as a cold spell.freq (
str) – Resampling frequency.op (
Literal[``’<’, ``'lt','<=','le']) – 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