diff --git a/DESCRIPTION b/DESCRIPTION index 9d091b5377a22ff870ed1dd74ead5f4d81a8a6c3..4e1d7d011ac605a36235c1c03b7c4d83a9c6d96c 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.3.2.26 +Version: 1.3.2.27 Date: 2019-09-04 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), diff --git a/NEWS.rmd b/NEWS.rmd index 83bda464820c57f1b1564770d50737ccdcc760a2..adba53665e73d1eb522f0e27e62098c98cfd27cc 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -14,13 +14,14 @@ output: -### 1.3.2.26 Release Notes (2019-09-04) +### 1.3.2.27 Release Notes (2019-09-04) #### Bug fixes - Fixed bug in <code>RunModel_CemaNeige()</code>. The function now runs correctly when <code>IndPeriod_WarmUp = 0L</code> in <code>CreateRunOptions()</code> value without <code>"CumFreq"</code> in order to completely disable the warm-up period (e.g. to perform a forecast form a given initial state). +- Fixed bug in <code>CreateIniStates()</code>. The function now returns the right number of end states when CemaNeige is used whithout hysteresis. - Fixed bug in the <code>RunModel_CemaNeige*()</code> functions. G and Gthr end states are no more inversed in the output values. ____________________________________________________________________________________ diff --git a/R/CreateIniStates.R b/R/CreateIniStates.R index c3774e8e5215f339d4e47c60ee97b8fe784ec7bc..b1748a896c5ab8fd6670f9372acec4a95b30cf27 100644 --- a/R/CreateIniStates.R +++ b/R/CreateIniStates.R @@ -200,10 +200,10 @@ CreateIniStates <- function(FUN_MOD, InputsModel, IsHyst = FALSE, if (is.null(eTGCemaNeigeLayers)) { eTGCemaNeigeLayers <- rep(Inf, NLayers) } - if (is.null(GthrCemaNeigeLayers)) { + if (is.null(GthrCemaNeigeLayers) | is.infinite(GthrCemaNeigeLayers)) { GthrCemaNeigeLayers <- rep(Inf, NLayers) } - if (is.null(GlocmaxCemaNeigeLayers)) { + if (is.null(GlocmaxCemaNeigeLayers) | is.infinite(GlocmaxCemaNeigeLayers)) { GlocmaxCemaNeigeLayers <- rep(Inf, NLayers) }