earthkit.climate.atmos.precipitation.dry_spell_max_length

earthkit.climate.atmos.precipitation.dry_spell_max_length(pr: xarray.DataArray | str = 'pr', ds: xarray.Dataset | Any = None, *, thresh: Any = '1.0 mm', window: int = 1, op: Literal['max', 'sum'] = 'sum', freq: str = 'YS', resample_before_rl: bool = True, **kwargs: Any) Any

Dry spell maximum length.

The maximum length of a dry period of N days or more, during which the accumulated or maximum precipitation over a given time window of days is below a given threshold.

Units:

  • dry_spell_max_length: days

This function wraps xclim.indicators.atmos.dry_spell_max_length.

Parameters:
  • pr (xarray.DataArray | str) – Daily precipitation.

  • thresh (Any) – Accumulated precipitation value under which a period is considered dry.

  • window (int) – Number of days when the maximum or accumulated precipitation is under the threshold.

  • op (Literal[``’max’, ``'sum']) – Reduce operation.

  • freq (str) – Resampling frequency.

  • 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