pastas.stats.metrics.kge_2012

kge_2012(obs, sim, missing='drop', weighted=False, max_gap=30)[source]

Compute the (weighted) Kling-Gupta Efficiency (KGE).

Parameters
  • sim (pandas.Series) – Series with the simulated values.

  • obs (pandas.Series) – Series with the observed values.

  • missing (str, optional) – string with the rule to deal with missing values. Only “drop” is supported now.

  • weighted (bool, optional) – Weight the values by the normalized time step to account for irregular time series. Default is False.

  • max_gap (int, optional) – maximum allowed gap period in days to use for the computation of the weights. All time steps larger than max_gap are replace with the max_gap value. Default value is 30 days.

Notes

The (weighted) Kling-Gupta Efficiency [kling_2012] is computed as follows:

\[\text{KGE} = 1 - \sqrt{(r-1)^2 + (\beta-1)^2 - (\gamma-1)^2}\]

where \(\beta = \bar{x} / \bar{y}\) and \(\gamma = \frac{\bar{\sigma}_x / \bar{x}}{\bar{\sigma}_y / \bar{y}}\). If weighted equals True, the weighted mean, variance and pearson correlation are used.

References

kling_2012

Kling, H., Fuchs, M., and Paulin, M. (2012). Runoff conditions in the upper Danube basin under an ensemble of climate change scenarios. Journal of Hydrology, 424-425:264 - 277.