earthkit.climate.atmos.precip_average

earthkit.climate.atmos.precip_average(pr: xarray.DataArray | str = 'pr', ds: xarray.Dataset | Any = None, *, thresh: Any = '0 degC', freq: str = 'YS', **kwargs: Any) Any

Averaged precipitation (solid and liquid).

Averaged precipitation. If the average daily temperature is given, the phase parameter can be used to restrict the calculation to precipitation of only one phase (liquid or solid). Precipitation is considered solid if the average daily temperature is below 0°C threshold (and vice versa).

Units:

  • prcpavg: mm

This function wraps xclim.indicators.atmos.precip_average.

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

  • thresh (Any) – Threshold of tas over which the precipication is assumed to be liquid rain.

  • freq (str) – Resampling frequency.

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

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

Returns:

The computed index.

Return type:

Any