earthkit.meteo.score.error

earthkit.meteo.score.error(fcst, obs, agg_method=None, agg_dim=None, agg_weights=None)

Calculates the error between a forecast and observations.

Warning

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

The error is defined as:

\[e_i = f_i - o_i\]

where:

  • \(f_i\) is the forecast,

  • \(o_i\) are the observations,

  • \(e_i\) is the error.

See also

This function leverages the scores.continuous.additive_bias function.

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

  • obs (xarray object) – The observations xarray.

  • agg_method (str, optional) – The aggregation method to apply over agg_dim. Default is None, which means no aggregation.

  • agg_dim (str or list of str, optional) – The dimension(s) over which to aggregate. Default is None.

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

Returns:

  • xarray object – The error between the forecast and observations, possibly aggregated.

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

Return type:

T