diff --git a/DESCRIPTION b/DESCRIPTION index 0b28246fa9847212a1452ab648362d316b641bec..81f3d9a217974be8e9bad75516218da2215fd867 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: airGR Type: Package Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling -Version: 1.1.2.1 +Version: 1.1.2.2 Date: 2018-10-22 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), diff --git a/R/ErrorCrit_KGE2.R b/R/ErrorCrit_KGE2.R index 66f0f889a5e34d4b01a6756dbe6a5babeeb8021b..8a8791a4de6f31ebf971ff81ea2e5ee4964af478 100644 --- a/R/ErrorCrit_KGE2.R +++ b/R/ErrorCrit_KGE2.R @@ -6,6 +6,10 @@ ErrorCrit_KGE2 <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = stop("InputsCrit must be of class 'InputsCrit' \n") return(NULL) } + if (inherits(InputsCrit, "Multi") | inherits(InputsCrit, "Compo")) { + stop("InputsCrit must be of class 'Single' \n") + return(NULL) + } if (!inherits(OutputsModel, "OutputsModel")) { stop("OutputsModel must be of class 'OutputsModel' \n") return(NULL) @@ -36,7 +40,7 @@ ErrorCrit_KGE2 <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = ##Data_preparation_______________________________ - VarObs <- InputsCrit$Qobs + VarObs <- InputsCrit$obs VarObs[!InputsCrit$BoolCrit] <- NA VarSim <- OutputsModel$Qsim VarSim[!InputsCrit$BoolCrit] <- NA