earthkit.meteo.extreme.cpf

earthkit.meteo.extreme.cpf(clim: ArrayLike, ens: ArrayLike, sort_clim: bool = True, sort_ens: bool = True, epsilon: float | None = None, symmetric: bool = False, from_zero: bool = False, clim_dim: int | None = None, ens_dim: int | None = None) ArrayLike
earthkit.meteo.extreme.cpf(clim: xarray.DataArray, ens: xarray.DataArray, sort_clim: bool = True, sort_ens: bool = True, epsilon: float | None = None, symmetric: bool = False, from_zero: bool = False, clim_dim: str | None = None, ens_dim: str | None = None) xarray.DataArray

Compute Crossing Point Forecast (CPF).

WARNING: this code is experimental, use at your own risk!

Parameters:
  • clim (array-like or xarray.DataArray) – Per-point climatology. The reduction dimension (quantiles) is set by clim_dim.

  • ens (array-like or xarray.DataArray) – Ensemble forecast. The reduction dimension (ensemble members) is set by ens_dim.

  • sort_clim (bool) – If True, sort the climatology first

  • sort_ens (bool) – If True, sort the ensemble first

  • epsilon (float or None) – If set, use this as a threshold for low-signal regions. Ignored if symmetric is True

  • symmetric (bool) – If True, make CPF values below 0.5 use a symmetric computation (CPF of opposite values)

  • from_zero (bool) – If True, start looking for a crossing from the minimum, rather than the median

  • clim_dim (str or int, optional) – Name (or dimension index for array-like) of the climatology/quantile dimension in clim.

  • ens_dim (str or int, optional) – Name (or dimension index for array-like) of the ensemble/member dimension in ens.

Returns:

CPF values.

Return type:

array-like or xarray.DataArray

Implementations

cpf() calls one of the following implementations depending on the type of the input arguments:

The function returns an object of the same type as the input arguments.