From b41d921142c3079b63bb0362efe8fc57dd2d59b6 Mon Sep 17 00:00:00 2001 From: unknown <olivier.delaigue@ANPI1430.antony.irstea.priv> Date: Wed, 15 Mar 2017 17:09:23 +0100 Subject: [PATCH] v1.0.5.27 when X6 < 1e-2, new value set to 1e-2 --- R/RunModel_CemaNeigeGR6J.R | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/R/RunModel_CemaNeigeGR6J.R b/R/RunModel_CemaNeigeGR6J.R index 89c01dc0..fb7985d0 100644 --- a/R/RunModel_CemaNeigeGR6J.R +++ b/R/RunModel_CemaNeigeGR6J.R @@ -16,14 +16,14 @@ RunModel_CemaNeigeGR6J <- function(InputsModel,RunOptions,Param){ if(sum(!is.na(Param))!=NParam){ stop(paste("Param must be a vector of length ",NParam," and contain no NA \n",sep="")); return(NULL); } Param <- as.double(Param); - Param_X1X3_threshold <- 1e-2 - if (Param[1L] < Param_X1X3_threshold) { - warning(sprintf("Param[1] (X1: production store capacity [mm]) < %.2f\n New X1 value: %.2f", Param_X1X3_threshold, Param_X1X3_threshold)) - Param[1L] <- Param_X1X3_threshold + Param_X1X3X6_threshold <- 1e-2 + if (Param[1L] < Param_X1X3X6_threshold) { + warning(sprintf("Param[1] (X1: production store capacity [mm]) < %.2f\n New X1 value: %.2f", Param_X1X3X6_threshold, Param_X1X3X6_threshold)) + Param[1L] <- Param_X1X3X6_threshold } - if (Param[3L] < 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 + if (Param[3L] < Param_X1X3X6_threshold) { + warning(sprintf("Param[3] (X3: routing store capacity [mm]) < %.2f\n New X3 value: %.2f", Param_X1X3X6_threshold, Param_X1X3X6_threshold)) + Param[3L] <- Param_X1X3X6_threshold } if (Param[6L] < Param_X1X3X6_threshold) { warning(sprintf("Param[6] (X6: coefficient for emptying exponential store [mm]) < %.2f\n New X6 value: %.2f", Param_X1X3X6_threshold, Param_X1X3X6_threshold)) -- GitLab