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-likeorxarray.DataArray) – Per-point climatology. The reduction dimension (quantiles) is set byclim_dim.ens (
array-likeorxarray.DataArray) – Ensemble forecast. The reduction dimension (ensemble members) is set byens_dim.sort_clim (
bool) – If True, sort the climatology firstsort_ens (
bool) – If True, sort the ensemble firstepsilon (
floatorNone) – If set, use this as a threshold for low-signal regions. Ignored if symmetric is Truesymmetric (
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 medianclim_dim (
strorint, optional) – Name (or dimension index for array-like) of the climatology/quantile dimension inclim.ens_dim (
strorint, optional) – Name (or dimension index for array-like) of the ensemble/member dimension inens.
- Returns:
CPF values.
- Return type:
array-likeorxarray.DataArray
Implementations¶
cpf()calls one of the following implementations depending on the type of the input arguments:earthkit.meteo.extreme.array.cpf()for array-likeearthkit.meteo.extreme.xarray.cpf()for xarray.DataArray
The function returns an object of the same type as the input arguments.