earthkit.meteo.score.standard_deviation_of_error

earthkit.meteo.score.standard_deviation_of_error(fcst, obs, over, weights=None)

Calculates the standard deviation of error between a forecast and observations.

Warning

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

The standard deviation of error is defined as:

\[e = \sqrt{ \frac{ \sum_{i=1}^N (f_i - o_i - m_e)^2 w_i }{ \sum_{i=1}^N w_i } }\]

where:

\[m_e = \frac{\sum_{i=1}^N (f_i - o_i) w_i}{\sum_{i=1}^N w_i}\]

where:

  • \(f_i\) is the forecast,

  • \(o_i\) are the observations,

  • \(w_i\) are the weights,

  • \(e\) is the standard deviation of error.

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

  • obs (xarray object) – The observations xarray.

  • over (str or list of str) – The dimension(s) over which to aggregate.

  • weights (xarray object, optional) – Weights to apply during aggregation. Default is None.

Returns:

  • xarray object – The standard deviation of error between the forecast and observations.

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

Return type:

T