earthkit.climate.atmos.precipitation.fraction_over_precip_doy_thresh

earthkit.climate.atmos.precipitation.fraction_over_precip_doy_thresh(pr: xarray.DataArray | str = 'pr', pr_per: xarray.DataArray | str = 'pr_per', ds: xarray.Dataset | Any = None, *, thresh: Any = '1 mm/day', freq: str = 'YS', bootstrap: bool = False, op: Literal['>', '>=', 'gt', 'ge'] = '>', **kwargs: Any) Any

Fraction of precipitation due to wet days with daily precipitation over a given daily percentile.

The percentage of the total precipitation over a period occurring for days when the precipitation is above a threshold defining wet days and above a given percentile for that day.

Units:

  • fraction_over_precip_doy_thresh: dimensionless

This function wraps xclim.indicators.atmos.fraction_over_precip_doy_thresh.

Parameters:
  • pr (xarray.DataArray | str) – Mean daily precipitation flux.

  • pr_per (xarray.DataArray | str) – Percentile of wet day precipitation flux. Either computed daily (one value per day of year) or computed over a period (one value per spatial point).

  • thresh (Any) – Precipitation value over which a day is considered wet.

  • freq (str) – Resampling frequency.

  • bootstrap (bool) – Flag to run bootstrapping of percentiles. Used by percentile_bootstrap decorator. Bootstrapping is only useful when the percentiles are computed on a part of the studied sample. This period, common to percentiles and the sample must be bootstrapped to avoid inhomogeneities with the rest of the time series. Do not enable bootstrap when there is no common period, otherwise it will provide the wrong results. Note that bootstrapping is computationally expensive.

  • op (Literal[``’>’, ``'>=', 'gt', 'ge']) – Comparison operation. Default: “>”.

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

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

Returns:

The computed index.

Return type:

Any