Commit 78450ae3 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.0.13.11 warning in ErrorCrit* functions when Qobs = 0 or Qsim = 0 and epsilon = NULL

Showing with 37 additions and 3 deletions
+37 -3
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.0.13.10
Version: 1.0.13.11
Date: 2018-08-31
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -14,7 +14,7 @@ output:
### 1.0.13.10 Release Notes (2018-08-31)
### 1.0.13.11 Release Notes (2018-08-31)
#### Deprectated and defunct
......@@ -34,7 +34,9 @@ output:
- <code>CreateInputsCrit()</code> now returns an error when <code>epsilon</code is not positive.
- <code>CreateInputsCrit()</code> now returns a warning message if the era zeroes values in <code>Qobs<$code> and <code>epsilon = NULL</code>.
- <code>CreateInputsCrit()</code> now returns a warning message if there are zeroes values in <code>Qobs</code> and <code>epsilon = NULL</code>.
- <code>ErrorCrit*()</code> functions now return a warning message if there are zeroes values in <code>Qobs</code> or <code>Qsim</code> and <code>epsilon = NULL</code>.
#### Minor user-visible changes
......
......@@ -42,6 +42,14 @@ ErrorCrit_KGE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = T
VarSim[!InputsCrit$BoolCrit] <- NA
##Data_transformation
if (InputsCrit$transfo %in% c("log", "inv") & is.null(InputsCrit$epsilon) & verbose) {
if (any(VarObs %in% 0)) {
warning("zeroes detected in Qobs: the corresponding time-steps will be exclude from the criteria computation if the epsilon agrument of 'CreateInputsCrit' = NULL")
}
if (any(VarSim %in% 0)) {
warning("zeroes detected in Qsim: the corresponding time-steps will be exclude from the criteria computation if the epsilon agrument of 'CreateInputsCrit' = NULL")
}
}
if ("epsilon" %in% names(InputsCrit) & !is.null(InputsCrit$epsilon)) {
VarObs <- VarObs + InputsCrit$epsilon
VarSim <- VarSim + InputsCrit$epsilon
......
......@@ -42,6 +42,14 @@ ErrorCrit_KGE2 <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose =
VarSim[!InputsCrit$BoolCrit] <- NA
##Data_transformation
if (InputsCrit$transfo %in% c("log", "inv") & is.null(InputsCrit$epsilon) & verbose) {
if (any(VarObs %in% 0)) {
warning("zeroes detected in Qobs: the corresponding time-steps will be exclude from the criteria computation if the epsilon agrument of 'CreateInputsCrit' = NULL")
}
if (any(VarSim %in% 0)) {
warning("zeroes detected in Qsim: the corresponding time-steps will be exclude from the criteria computation if the epsilon agrument of 'CreateInputsCrit' = NULL")
}
}
if ("epsilon" %in% names(InputsCrit) & !is.null(InputsCrit$epsilon)) {
VarObs <- VarObs + InputsCrit$epsilon
VarSim <- VarSim + InputsCrit$epsilon
......
......@@ -42,6 +42,14 @@ ErrorCrit_NSE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = T
VarSim[!InputsCrit$BoolCrit] <- NA
##Data_transformation
if (InputsCrit$transfo %in% c("log", "inv") & is.null(InputsCrit$epsilon) & verbose) {
if (any(VarObs %in% 0)) {
warning("zeroes detected in Qobs: the corresponding time-steps will be exclude from the criteria computation if the epsilon agrument of 'CreateInputsCrit' = NULL")
}
if (any(VarSim %in% 0)) {
warning("zeroes detected in Qsim: the corresponding time-steps will be exclude from the criteria computation if the epsilon agrument of 'CreateInputsCrit' = NULL")
}
}
if ("epsilon" %in% names(InputsCrit) & !is.null(InputsCrit$epsilon)) {
VarObs <- VarObs + InputsCrit$epsilon
VarSim <- VarSim + InputsCrit$epsilon
......
......@@ -42,6 +42,14 @@ ErrorCrit_RMSE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose =
VarSim[!InputsCrit$BoolCrit] <- NA
##Data_transformation
if (InputsCrit$transfo %in% c("log", "inv") & is.null(InputsCrit$epsilon) & verbose) {
if (any(VarObs %in% 0)) {
warning("zeroes detected in Qobs: the corresponding time-steps will be exclude from the criteria computation if the epsilon agrument of 'CreateInputsCrit' = NULL")
}
if (any(VarSim %in% 0)) {
warning("zeroes detected in Qsim: the corresponding time-steps will be exclude from the criteria computation if the epsilon agrument of 'CreateInputsCrit' = NULL")
}
}
if ("epsilon" %in% names(InputsCrit) & !is.null(InputsCrit$epsilon)) {
VarObs <- VarObs + InputsCrit$epsilon
VarSim <- VarSim + InputsCrit$epsilon
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment