earthkit.climate.atmos.precipitation.rain_season

earthkit.climate.atmos.precipitation.rain_season(pr: xarray.DataArray | str = 'pr', ds: xarray.Dataset | Any = None, *, thresh_wet_start: Any = '25.0 mm', window_wet_start: int = 3, window_not_dry_start: int = 30, thresh_dry_start: Any = '1.0 mm', window_dry_start: int = 7, method_dry_start: str = 'per_day', date_min_start: str = '05-01', date_max_start: str = '12-31', thresh_dry_end: Any = '0.0 mm', window_dry_end: int = 20, method_dry_end: str = 'per_day', date_min_end: str = '09-01', date_max_end: str = '12-31', freq: Any = 'YS-JAN', **kwargs: Any) Any

Rain season.

Start time, end time and length of the rain season, notably useful for West Africa (sivakumar, 1998). The rain season starts with a period of abundant rainfall, followed by a period without prolonged dry sequences, which must happen before a given date. The rain season stops during a dry period happening after a given date.

Units:

  • rain_season_start: dimensionless

  • rain_season_end: dimensionless

  • rain_season_length: days

This function wraps xclim.indicators.atmos.rain_season.

Parameters:
  • pr (xarray.DataArray | str) – Precipitation data.

  • thresh_wet_start (Any) – Accumulated precipitation threshold associated with window_wet_start.

  • window_wet_start (int) – Number of days when accumulated precipitation is above thresh_wet_start. Defines the first condition to start the rain season.

  • window_not_dry_start (int) – Number of days, after window_wet_start days, during which no dry period must be found as a second and last condition to start the rain season. A dry sequence is defined with thresh_dry_start, window_dry_start and method_dry_start.

  • thresh_dry_start (Any) – Threshold length defining a dry day in the sequence related to window_dry_start.

  • window_dry_start (int) – Number of days used to define a dry sequence in the start of the season. Daily precipitations lower than thresh_dry_start during window_dry_start days are considered a dry sequence. The precipitations must be lower than thresh_dry_start for either every day in the sequence (method_dry_start == “per_day”) or for the total (method_dry_start == “total”).

  • method_dry_start (str) – Method used to define a dry sequence associated with window_dry_start. The threshold thresh_dry_start is either compared to every daily precipitation (method_dry_start == “per_day”) or to total precipitations (method_dry_start == “total”) in the sequence window_dry_start days.

  • date_min_start (str) – First day of year when season can start (“mm-dd”).

  • date_max_start (str) – Last day of year when season can start (“mm-dd”).

  • thresh_dry_end (Any) – Threshold length defining a dry day in the sequence related to window_dry_end.

  • window_dry_end (int) – Number of days used to define a dry sequence in the end of the season. Daily precipitations lower than thresh_dry_end during window_dry_end days are considered a dry sequence. The precipitations must be lower than thresh_dry_end for either every day in the sequence (method_dry_end == “per_day”) or for the total (method_dry_end == “total”).

  • method_dry_end (str) – Method used to define a dry sequence associated with window_dry_end. The threshold thresh_dry_end is either compared to every daily precipitation (method_dry_end == “per_day”) or to total precipitations (method_dry_end == “total”) in the sequence window_dry days.

  • date_min_end (str) – First day of year when season can end (“mm-dd”).

  • date_max_end (str) – Last day of year when season can end (“mm-dd”).

  • freq (Any) – Resampling frequency.

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

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

Returns:

The computed index.

Return type:

Any