From 65f087013aae5c08a3b26bd015f4a345ae5f3606 Mon Sep 17 00:00:00 2001 From: Delaigue Olivier <olivier.delaigue@irstea.priv> Date: Wed, 4 Sep 2019 15:48:53 +0200 Subject: [PATCH] v1.3.2.25 BUG: RunModel_CemaNeige now returns a ts of precipitation with an exact length when IndPeriod_WarmUp = 0L (no warm-up) in CreateRunOptions #5622 --- DESCRIPTION | 4 ++-- NEWS.rmd | 8 +++++++- R/RunModel_CemaNeige.R | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index a76ad401..7de3e2e1 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.3.2.24 -Date: 2019-06-21 +Version: 1.3.2.25 +Date: 2019-09-04 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), person("Olivier", "Delaigue", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7668-8468"), email = "airGR@irstea.fr"), diff --git a/NEWS.rmd b/NEWS.rmd index 2151fcd4..c46cbec1 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -14,7 +14,13 @@ output: -### 1.3.2.24 Release Notes (2019-06-21) +### 1.3.2.25 Release Notes (2019-06-21) + + + +#### 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). ____________________________________________________________________________________ diff --git a/R/RunModel_CemaNeige.R b/R/RunModel_CemaNeige.R index 929a5f90..235a2427 100644 --- a/R/RunModel_CemaNeige.R +++ b/R/RunModel_CemaNeige.R @@ -40,7 +40,7 @@ RunModel_CemaNeige <- function(InputsModel, RunOptions, Param) { } ## Input_data_preparation - if (identical(RunOptions$IndPeriod_WarmUp, 0)) { + if (identical(RunOptions$IndPeriod_WarmUp, as.integer(0))) { RunOptions$IndPeriod_WarmUp <- NULL } IndPeriod1 <- c(RunOptions$IndPeriod_WarmUp, RunOptions$IndPeriod_Run) -- GitLab