diff --git a/DESCRIPTION b/DESCRIPTION index 99e9edd29c874c6a560346be3a77dfcec21dbac9..c3d702687cf81760ca191bfd04a25d880b839c31 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.2.9.11 +Version: 1.2.9.12 Date: 2019-03-18 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), diff --git a/NEWS.rmd b/NEWS.rmd index 1eb486b208a6c58edac4d923d01dd5c5efca37b1..af6dc01270f18f798398b02b66a0b1cb6347221b 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -13,7 +13,7 @@ output: -### 1.2.9.11 Release Notes (2019-03-18) +### 1.2.9.12 Release Notes (2019-03-18) diff --git a/R/CreateInputsCrit.R b/R/CreateInputsCrit.R index d41f1dbcc30b5aa9b9d34aabf0dfafb47e452f35..6a349ddea1e4db18bd3adab956abc6f7b457ed46 100644 --- a/R/CreateInputsCrit.R +++ b/R/CreateInputsCrit.R @@ -169,7 +169,7 @@ CreateInputsCrit <- function(FUN_CRIT, stop("incorrect 'FUN_CRIT' for use in 'CreateInputsCrit'", call. = FALSE) } if (identical(iListArgs2$FUN_CRIT, ErrorCrit_RMSE) & length(listArgs$weights) > 1 & all(!is.null(unlist(listArgs$weights)))) { - stop("calculating a composite criterion with the RMSE is not allowed since RMSE is not an adimensional measure", call. = FALSE) + stop("calculating a composite criterion with the RMSE is not allowed since RMSE is not a dimensionless metric", call. = FALSE) } ## check 'obs' @@ -198,7 +198,7 @@ CreateInputsCrit <- function(FUN_CRIT, idSCA <- which(iListArgs2$varObs == "SCA") vecSCA <- unlist(iListArgs2$obs[idSCA]) if (min(vecSCA, na.rm = TRUE) < 0 | max(vecSCA, na.rm = TRUE) > 1) { - stop("'obs' outside [0,1] for \"SCA\" for 'varObs'", call. = FALSE) + stop("'obs' outside [0,1] for \"SCA\"", call. = FALSE) } } inPosVarObs <- c("Q", "SWE") @@ -206,7 +206,7 @@ CreateInputsCrit <- function(FUN_CRIT, idQSS <- which(iListArgs2$varObs %in% inPosVarObs) vecQSS <- unlist(iListArgs2$obs[idQSS]) if (min(vecQSS, na.rm = TRUE) < 0) { - stop(sprintf("'obs' outside [0,Inf[ for \"%s\" for 'varObs'", iListArgs2$varObs), call. = FALSE) + stop(sprintf("'obs' outside [0,Inf[ for \"%s\"", iListArgs2$varObs), call. = FALSE) } } @@ -229,12 +229,12 @@ CreateInputsCrit <- function(FUN_CRIT, stop("'epsilon' must be a single (list of) positive value(s)", call. = FALSE) } } else if (iListArgs2$transfo %in% c("log", "inv") & any(iListArgs2$obs %in% 0) & warnings) { - warning("zeroes detected in obs: the corresponding time-steps will be excluded by the 'ErrorCrit*' functions if the epsilon agrument = NULL", call. = FALSE) + warning("zeroes detected in obs: the corresponding time-steps will be excluded by the 'ErrorCrit*' functions as the epsilon argument was set to NULL", call. = FALSE) } ## check 'transfo' + 'FUN_CRIT' if (iListArgs2$transfo == "log" & warnings) { - warn_log_kge <- "we do not advise using the %s with a log transformation on obs (see the details part in the 'CreateInputsCrit' help)" + warn_log_kge <- "we do not advise using the %s with a log transformation on obs (see the details section in the 'CreateInputsCrit' help)" if (identical(iListArgs2$FUN_CRIT, ErrorCrit_KGE)) { warning(sprintf(warn_log_kge, "KGE"), call. = FALSE) } @@ -263,7 +263,7 @@ CreateInputsCrit <- function(FUN_CRIT, inCnVarObs <- c("SCA", "SWE") if (!"ZLayers" %in% names(InputsModel)) { if(any(listVarObs %in% inCnVarObs)) { - stop(sprintf("'varOBS' can not be equal to %i if CemaNeige is not used", + stop(sprintf("'varObs' can not be equal to %i if CemaNeige is not used", paste(sapply(inCnVarObs, shQuote), collapse = " or "))) } } else {