Calculates Goodness-of-Fit functions for two runoff series
Arguments
- GOF_fun
a function, or (todo consider only a functional) a string with function name, of the format
GOF_fun(Qsim, Qobs, na.rm = "TRUE")
, typically from thehydroGOF
package- Qsim
vector, matrix, data.frame etc of simulated runoff values
- Qobs
vector, matrix, data.frame etc of observed runoff values
- na.rm
a logical value indicating if NA should be removed
Note
This function requires the hydroGOF
package to be installed. Not
imported as this package depends on deprecated packages as sp etc.
Examples
# hydroGOF must be loaded
library(hydroGOF)
calc_hydroGOF(KGE, 1:10, seq(0, 9))
#> [1] 0.7777778
# this is NA
calc_hydroGOF("KGE", 1:10, rep(0, 10))
#> Warning: the standard deviation is zero
#> [1] NA
# this is also NA
calc_hydroGOF(KGE, 1:10, as.numeric(rep(NA, 10)))
#> Warning: 'sim' and 'obs' are empty or they do not have any common pair of elements with data !!
#> Warning: There are no pairs of 'sim' and 'obs' without missing values !
#> [1] NA