Function which computes an error criterion based on the KGE formula proposed by Gupta et al. (2009).
ErrorCrit_KGE(InputsCrit, OutputsModel, warnings = TRUE, verbose = TRUE)[object of class InputsCrit] see CreateInputsCrit for details
[object of class OutputsModel] see RunModel_GR4J or RunModel_CemaNeigeGR4J for details
(optional) [boolean] boolean indicating if the warning messages are shown, default = TRUE
(optional) [boolean] boolean indicating if the function is run in verbose mode or not, default = TRUE
[list] list containing the function outputs organised as follows:
| $CritValue | [numeric] value of the criterion |
| $CritName | [character] name of the criterion |
| $SubCritValues | [numeric] values of the sub-criteria |
| $SubCritNames | [character] names of the components of the criterion |
| $CritBestValue | [numeric] theoretical best criterion value |
| $Multiplier | [numeric] integer indicating whether the criterion is indeed an error (+1) or an efficiency (-1) |
| $Ind_notcomputed | [numeric] indices of the time steps where InputsCrit$BoolCrit = FALSE or no data is available |
In addition to the criterion value, the function outputs include a multiplier (-1 or +1) which allows the use of the function for model calibration: the product CritValue * Multiplier is the criterion to be minimised (Multiplier = -1 for KGE). The KGE formula is $$KGE = 1 - \sqrt{(r - 1)^2 + (\alpha - 1)^2 + (\beta - 1)^2}$$ with the following sub-criteria: $$r = \mathrm{the\: linear\: correlation\: coefficient\: between\:} sim\: \mathrm{and\:} obs$$ $$\alpha = \frac{\sigma_{sim}}{\sigma_{obs}}$$ $$\beta = \frac{\mu_{sim}}{\mu_{obs}}$$
Gupta, H. V., Kling, H., Yilmaz, K. K. and Martinez, G. F. (2009), Decomposition of the mean squared error and NSE performance criteria: Implications for improving hydrological modelling, Journal of Hydrology, 377(1-2), 80-91, doi:10.1016/j.jhydrol.2009.08.003.
# NOT RUN {
## see example of the ErrorCrit function
# }
Run the code above in your browser using DataLab