earthkit.meteo.score.xarray.quantile_score

earthkit.meteo.score.xarray.quantile_score(fcst, obs, tau, over)

Calculates the quantile score of a forecast compared to a set of observations.

Warning

Experimental API. This function may change or be removed without notice.

The quantile score is defined as:

\begin{align*} q_i &= \text{Quantile of the forecast at level } \tau \\ qs_i &= |o_i - q_i| + (2 \tau - 1) (o_i - q_i) \end{align*}

where:

  • \(f_i\) is the forecast,

  • \(o_i\) are the observations,

  • \(\tau\) is the quantile level,

  • \(qs_i\) is the quantile score.

Parameters:
  • fcst (xarray object) – The forecast xarray.

  • obs (xarray object) – The observations xarray.

  • tau (float) – The quantile level in the range (0, 1).

  • over (str or list of str) – The dimension(s) over which to compute the quantile score.

Returns:

The quantile score of the forecast compared to the observations.

Return type:

xarray object