diff --git a/DESCRIPTION b/DESCRIPTION index d5e6224e60c3f9851fae41a8200607def6f69be3..995ff8e3e550f384b7990086505dbd968e0bfb38 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.46 -Date: 2017-09-12 +Version: 1.0.9.47 +Date: 2017-09-13 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl")), person("Charles", "Perrin", role = c("aut", "ths")), diff --git a/NEWS.html b/NEWS.html index d0a41b5a922dc4733b40b2d1a00db9de612015e6..0928177629730981507b4bdc4ef042d063a4f913 100644 --- a/NEWS.html +++ b/NEWS.html @@ -203,8 +203,8 @@ div.tocify { </div> -<div id="release-notes-2017-09-12" class="section level3"> -<h3>1.0.9.46 Release Notes (2017-09-12)</h3> +<div id="release-notes-2017-09-13" class="section level3"> +<h3>1.0.9.47 Release Notes (2017-09-13)</h3> <div id="new-features" class="section level4"> <h4>New features</h4> <ul> diff --git a/NEWS.md b/NEWS.md index a410bc945c097ff1069fe1b4ce21e4ee13f86c76..e3235de3c5188a77ad97e4b33663d1980bb1db9e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,7 +3,7 @@ -### 1.0.9.46 Release Notes (2017-09-12) +### 1.0.9.47 Release Notes (2017-09-13) #### New features diff --git a/NEWS.rmd b/NEWS.rmd index cc730197c941e73f33cd48ca6eab86059d780b1f..b34afa84e72f701b8f157837cbb3542d0bc7d876 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -14,7 +14,7 @@ output: -### 1.0.9.46 Release Notes (2017-09-12) +### 1.0.9.47 Release Notes (2017-09-13) #### New features diff --git a/R/CreateIniStates.R b/R/CreateIniStates.R index 6cf925a44db67ce039bf7959b3026d957bff3ada..290105d035b37a7117b89376c0bff5674e5bbe9f 100644 --- a/R/CreateIniStates.R +++ b/R/CreateIniStates.R @@ -62,11 +62,6 @@ CreateIniStates <- function(FUN_MOD, InputsModel, ## check states - if (any(ProdStore < 0) | any(RoutStore < 0) | - any(UH1 < 0) | any(UH2 < 0) | - 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'") } @@ -185,7 +180,15 @@ CreateIniStates <- function(FUN_MOD, InputsModel, } if (is.null(eTGCemaNeigeLayers)) { eTGCemaNeigeLayers <- rep(Inf, NLayers) - } + } + + + # check negative values + if (any(ProdStore < 0) | any(RoutStore < 0) | + any(UH1 < 0) | any(UH2 < 0) | + any(GCemaNeigeLayers < 0)) { + stop("Negative values are not allowed for any of 'ProdStore', 'RoutStore', 'UH1', 'UH2', 'GCemaNeigeLayers'") + } ## check length