diff --git a/DESCRIPTION b/DESCRIPTION index a6d748381624aac8d7c537713a977bd4f7e166a7..1556c1207ab575582c91cb816cc708e41c8437c8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: airGR Type: Package Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling -Version: 1.0.9.38 -Date: 2017-09-05 +Version: 1.0.9.39 +Date: 2017-09-07 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl")), person("Charles", "Perrin", role = c("aut", "ths")), diff --git a/R/CreateIniStates.R b/R/CreateIniStates.R index faa603ec660afeb0a8d71f1914e698d84a79dcf7..6cf925a44db67ce039bf7959b3026d957bff3ada 100644 --- a/R/CreateIniStates.R +++ b/R/CreateIniStates.R @@ -62,11 +62,14 @@ CreateIniStates <- function(FUN_MOD, InputsModel, ## check states - if (any(ProdStore < 0) | any(RoutStore < 0) | any(ExpStore < 0) | + if (any(ProdStore < 0) | any(RoutStore < 0) | any(UH1 < 0) | any(UH2 < 0) | - any(GCemaNeigeLayers < 0) | any(eTGCemaNeigeLayers < 0)) { - stop("Negative values are not allowed for any state variables") + any(GCemaNeigeLayers < 0)) { + stop("Negative values are not allowed for any of 'ProdStore', 'RoutStore', 'UH1', 'UH2', 'GCemaNeigeLayers'") } + if (any(eTGCemaNeigeLayers > 0)) { + stop("Positive values are not allowed for 'eTGCemaNeigeLayers'") + } if (identical(FUN_MOD, RunModel_GR6J) | identical(FUN_MOD, RunModel_CemaNeigeGR6J)) { if (is.null(ExpStore)) {