earthkit.meteo.score.kge¶
- earthkit.meteo.score.kge(fcst, obs, over, method='original', return_components=False)¶
Calculates the Kling-Gupta Efficiency (KGE) between a forecast and observations.
Warning
Experimental API. This function may change or be removed without notice.
The KGE is defined as follows:
\begin{align*} \text{KGE} = & \begin{cases} 1 - \sqrt{(\rho - 1)^2 + (\alpha - 1)^2 + (\beta - 1)^2} & \text{if method = "original"} \\ 1 - \sqrt{(\rho - 1)^2 + (\gamma - 1)^2 + (\beta - 1)^2} & \text{if method = "modified"} \\ \end{cases} \end{align*}Each of the components of the KGE is defined as follows:
\[\beta = \frac{\mu_f}{\mu_o} \alpha = \frac{\sigma_f}{\sigma_o} \gamma = \frac{\alpha}{\beta}\]- where:
\(\rho\) = Pearson’s correlation coefficient between observed and forecast values.
\(f\) and \(o\) are forecast and observed values, respectively
\(\mu_f\) and \(\mu_o\) are the means of forecast and observed values, respectively
\(\sigma_f\) and \(\sigma_o\) are the standard deviations of forecast and observed values, respectively
See also
This function leverages the scores.continuous.kge function.
- Parameters:
fcst (
xarray.DataArray) – The forecast xarray.obs (
xarray.DataArray) – The observations xarray.over (
strorlistofstr) – The dimension(s) over which to compute the kge.method (
str, optional) – The method to compute the variability term \(\alpha\). Can be either “original” or “modified”. Default is “modified”.return_components (
bool, optional) – Whether to return the individual components (\(\rho\), \(\alpha\) (or \(\gamma\)), \(\beta\)) along with the KGE value. Default is False.
- Returns:
The KGE between the forecast and observations.
- Return type:
xarray object