earthkit.meteo.score.xarray.crps_from_gaussian¶
- earthkit.meteo.score.xarray.crps_from_gaussian(fcst, obs)¶
Calculates the continuous ranked probability score (CRPS) of a forecast described by mean and standard deviation.
Warning
Experimental API. This function may change or be removed without notice.
The CRPS score for a Gaussian distribution is defined as:
\begin{align*} \operatorname{CRPS}\left[ \mathcal{N}(\mu, \sigma^2), o \right] = &\sigma \left\{ \frac{o - \mu}{\sigma} \left[ 2 \Phi \left( \frac{o-\mu}{\sigma} \right) - 1\right] \right. \\ &\left. +2\phi\left( \frac{o - \mu}{\sigma} \right) - \frac{1}{\sqrt{\pi}} \right\} \end{align*}where:
\(\mathcal{N}(\mu, \sigma^2)\) is the probabilistic (Gaussian) forecast,
\(o\) are the observations,
\(\phi\left( (o - \mu)/\sigma \right)\) denotes the probability density function of the normal distribution with mean 0 and variance 1 evaluated at the normalised prediction error, \((o - \mu)/\sigma\),
\(\Phi\left( (o - \mu)/\sigma \right)\) denotes the cumulative distribution function of the normal distribution with mean 0 and variance 1 evaluated at the normalised prediction error, \((o - \mu)/\sigma\).
Reference: Gneiting, Tilmann, et al. “Calibrated probabilistic forecasting using ensemble model output statistics and minimum CRPS estimation.” Monthly weather review 133.5 (2005): 1098-1118.
- Parameters:
fcst (
xarray Dataset) – The forecast xarray. Must have variables “mean” and “stdev”.obs (
xarray DataArray) – The observations DataArray.
- Returns:
The CRPS of the Gaussian forecast compared to the observations.
- Return type:
xarray.DataArray