earthkit.climate.atmos.temperature.heat_wave_total_length

earthkit.climate.atmos.temperature.heat_wave_total_length(tasmin: xarray.DataArray | str = 'tasmin', tasmax: xarray.DataArray | str = 'tasmax', ds: xarray.Dataset | Any = None, *, thresh_tasmin: Any = '22.0 degC', thresh_tasmax: Any = '30 degC', window: int = 3, freq: str = 'YS', op: Literal['>', '>=', 'gt', 'ge'] = '>', resample_before_rl: bool = True, **kwargs: Any) Any

Heat wave total length.

Total length of heat waves. A heat wave occurs when daily minimum and maximum temperatures exceed given thresholds for a number of days.

Units:

  • heat_wave_total_length: days

This function wraps xclim.indicators.atmos.heat_wave_total_length.

Parameters:
  • tasmin (xarray.DataArray | str) – Minimum daily temperature.

  • tasmax (xarray.DataArray | str) – Maximum daily temperature.

  • thresh_tasmin (Any) – The minimum temperature threshold needed to trigger a heatwave event.

  • thresh_tasmax (Any) – The maximum temperature threshold needed to trigger a heatwave event.

  • window (int) – Minimum number of days with temperatures above thresholds to qualify as a heatwave.

  • 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 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