From 6e8d6c9f691828331d5331a7e767ef3e5021b70b Mon Sep 17 00:00:00 2001 From: unknown <olivier.delaigue@ANPI1430.antony.irstea.priv> Date: Wed, 15 Mar 2017 16:06:21 +0100 Subject: [PATCH] v1.0.5.26 warning message in RunModel_*() fixed when X1 and X3 < 1e-2 --- DESCRIPTION | 2 +- R/RunModel_CemaNeigeGR4J.R | 2 +- R/RunModel_CemaNeigeGR5J.R | 2 +- R/RunModel_CemaNeigeGR6J.R | 2 +- R/RunModel_GR4H.R | 2 +- R/RunModel_GR4J.R | 4 ++-- R/RunModel_GR5J.R | 2 +- R/RunModel_GR6J.R | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 99421689..dd96f525 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.0.5.25 +Version: 1.0.5.26 Date: 2017-03-15 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl")), diff --git a/R/RunModel_CemaNeigeGR4J.R b/R/RunModel_CemaNeigeGR4J.R index 94e24f07..28151667 100644 --- a/R/RunModel_CemaNeigeGR4J.R +++ b/R/RunModel_CemaNeigeGR4J.R @@ -22,7 +22,7 @@ RunModel_CemaNeigeGR4J <- function(InputsModel,RunOptions,Param){ Param[1L] <- Param_X1X3_threshold } if (Param[3L] < Param_X1X3_threshold) { - warning(sprintf("Param[1] (X3: routing store capacity [mm]) < %.2f\n New X3 value: %.2f", Param_X1X3_threshold, Param_X1X3_threshold)) + warning(sprintf("Param[3] (X3: routing store capacity [mm]) < %.2f\n New X3 value: %.2f", Param_X1X3_threshold, Param_X1X3_threshold)) Param[3L] <- Param_X1X3_threshold } diff --git a/R/RunModel_CemaNeigeGR5J.R b/R/RunModel_CemaNeigeGR5J.R index 6e7a49d9..b99e4c2d 100644 --- a/R/RunModel_CemaNeigeGR5J.R +++ b/R/RunModel_CemaNeigeGR5J.R @@ -22,7 +22,7 @@ RunModel_CemaNeigeGR5J <- function(InputsModel,RunOptions,Param){ Param[1L] <- Param_X1X3_threshold } if (Param[3L] < Param_X1X3_threshold) { - warning(sprintf("Param[1] (X3: routing store capacity [mm]) < %.2f\n New X3 value: %.2f", Param_X1X3_threshold, Param_X1X3_threshold)) + warning(sprintf("Param[3] (X3: routing store capacity [mm]) < %.2f\n New X3 value: %.2f", Param_X1X3_threshold, Param_X1X3_threshold)) Param[3L] <- Param_X1X3_threshold } diff --git a/R/RunModel_CemaNeigeGR6J.R b/R/RunModel_CemaNeigeGR6J.R index 641ed08d..120899b5 100644 --- a/R/RunModel_CemaNeigeGR6J.R +++ b/R/RunModel_CemaNeigeGR6J.R @@ -22,7 +22,7 @@ RunModel_CemaNeigeGR6J <- function(InputsModel,RunOptions,Param){ Param[1L] <- Param_X1X3_threshold } if (Param[3L] < Param_X1X3_threshold) { - warning(sprintf("Param[1] (X3: routing store capacity [mm]) < %.2f\n New X3 value: %.2f", Param_X1X3_threshold, Param_X1X3_threshold)) + warning(sprintf("Param[3] (X3: routing store capacity [mm]) < %.2f\n New X3 value: %.2f", Param_X1X3_threshold, Param_X1X3_threshold)) Param[3L] <- Param_X1X3_threshold } diff --git a/R/RunModel_GR4H.R b/R/RunModel_GR4H.R index d803c7e4..541d9dfc 100644 --- a/R/RunModel_GR4H.R +++ b/R/RunModel_GR4H.R @@ -19,7 +19,7 @@ RunModel_GR4H <- function(InputsModel,RunOptions,Param){ Param[1L] <- Param_X1X3_threshold } if (Param[3L] < Param_X1X3_threshold) { - warning(sprintf("Param[1] (X3: routing store capacity [mm]) < %.2f\n New X3 value: %.2f", Param_X1X3_threshold, Param_X1X3_threshold)) + warning(sprintf("Param[3] (X3: routing store capacity [mm]) < %.2f\n New X3 value: %.2f", Param_X1X3_threshold, Param_X1X3_threshold)) Param[3L] <- Param_X1X3_threshold } diff --git a/R/RunModel_GR4J.R b/R/RunModel_GR4J.R index a5f6e7d5..c657d694 100644 --- a/R/RunModel_GR4J.R +++ b/R/RunModel_GR4J.R @@ -19,7 +19,7 @@ RunModel_GR4J <- function(InputsModel,RunOptions,Param){ Param[1L] <- Param_X1X3_threshold } if (Param[3L] < Param_X1X3_threshold) { - warning(sprintf("Param[1] (X3: routing store capacity [mm]) < %.2f\n New X3 value: %.2f", Param_X1X3_threshold, Param_X1X3_threshold)) + warning(sprintf("Param[3] (X3: routing store capacity [mm]) < %.2f\n New X3 value: %.2f", Param_X1X3_threshold, Param_X1X3_threshold)) Param[3L] <- Param_X1X3_threshold } @@ -54,7 +54,7 @@ RunModel_GR4J <- function(InputsModel,RunOptions,Param){ ) RESULTS$Outputs[ round(RESULTS$Outputs ,3)==(-999.999)] <- NA; RESULTS$StateEnd[round(RESULTS$StateEnd,3)==(-999.999)] <- NA; - +print(head(RESULTS$Outputs[, c(3,9)])) ##Output_data_preparation IndPeriod2 <- (length(RunOptions$IndPeriod_WarmUp)+1):LInputSeries; ExportDatesR <- "DatesR" %in% RunOptions$Outputs_Sim; diff --git a/R/RunModel_GR5J.R b/R/RunModel_GR5J.R index e0ee240a..f7357c09 100644 --- a/R/RunModel_GR5J.R +++ b/R/RunModel_GR5J.R @@ -19,7 +19,7 @@ RunModel_GR5J <- function(InputsModel,RunOptions,Param){ Param[1L] <- Param_X1X3_threshold } if (Param[3L] < Param_X1X3_threshold) { - warning(sprintf("Param[1] (X3: routing store capacity [mm]) < %.2f\n New X3 value: %.2f", Param_X1X3_threshold, Param_X1X3_threshold)) + warning(sprintf("Param[3] (X3: routing store capacity [mm]) < %.2f\n New X3 value: %.2f", Param_X1X3_threshold, Param_X1X3_threshold)) Param[3L] <- Param_X1X3_threshold } diff --git a/R/RunModel_GR6J.R b/R/RunModel_GR6J.R index 8bfd01b8..d96bd13a 100644 --- a/R/RunModel_GR6J.R +++ b/R/RunModel_GR6J.R @@ -19,7 +19,7 @@ RunModel_GR6J <- function(InputsModel,RunOptions,Param){ Param[1L] <- Param_X1X3_threshold } if (Param[3L] < Param_X1X3_threshold) { - warning(sprintf("Param[1] (X3: routing store capacity [mm]) < %.2f\n New X3 value: %.2f", Param_X1X3_threshold, Param_X1X3_threshold)) + warning(sprintf("Param[6] (X3: routing store capacity [mm]) < %.2f\n New X3 value: %.2f", Param_X1X3_threshold, Param_X1X3_threshold)) Param[3L] <- Param_X1X3_threshold } -- GitLab