earthkit.climate.atmos.cold_spell_days

earthkit.climate.atmos.cold_spell_days(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 days.

The number of days that are part of a cold spell. A cold spell is defined as a minimum number of consecutive days with mean daily temperature below a given threshold.

Units:

  • cold_spell_days: days

This function wraps xclim.indicators.atmos.cold_spell_days.

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 length encoding (or a similar algorithm) is applied to runs.

  • ds (xarray.Dataset | Any) – Input dataset.

  • **kwargs (Any) – Additional keyword arguments.

Returns:

The computed index.

Return type:

Any