diff --git a/DESCRIPTION b/DESCRIPTION index 168a3e55b9d5d1ea745f2d9839df4444796abd38..012f5d141f968308bd02ed52a2b164cc073ee451 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.0.1 +Version: 1.3.0.2 Date: 2019-05-20 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 e40e821ef2b80e1326124f3a2d1897aae27a2fdb..a95daa5194f933c937f459ed9408c663d30cd168 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -14,7 +14,7 @@ output: -### 1.3.0.1 Release Notes (2019-05-20) +### 1.3.0.2 Release Notes (2019-05-20) #### New features diff --git a/R/CreateRunOptions.R b/R/CreateRunOptions.R index 0dc15e76b0a45b6880e3547ba74e50c73519e242..d1eb8b1c131569f3c32a403456d5bd7076b531a6 100644 --- a/R/CreateRunOptions.R +++ b/R/CreateRunOptions.R @@ -40,6 +40,10 @@ CreateRunOptions <- function(FUN_MOD, InputsModel, IndPeriod_WarmUp = NULL, IndP ObjectClass <- c(ObjectClass, "GR", "CemaNeige", "daily") BOOL <- TRUE } + if (identical(FUN_MOD, RunModel_CemaNeigeGR4H)) { + ObjectClass <- c(ObjectClass, "GR", "CemaNeige", "hourly") + BOOL <- TRUE + } if (IsHyst) { ObjectClass <- c(ObjectClass, "hysteresis") } @@ -156,7 +160,7 @@ CreateRunOptions <- function(FUN_MOD, InputsModel, IndPeriod_WarmUp = NULL, IndP if (!is.vector(IniResLevels) | !is.numeric(IniResLevels) | any(is.na(IniResLevels))) { stop("'IniResLevels' must be a vector of numeric values") } - if ((identical(FUN_MOD, RunModel_GR4H) | + if ((identical(FUN_MOD, RunModel_GR4H) | identical(FUN_MOD, RunModel_CemaNeigeGR4H) | identical(FUN_MOD, RunModel_GR4J) | identical(FUN_MOD, RunModel_CemaNeigeGR4J) | identical(FUN_MOD, RunModel_GR5J) | identical(FUN_MOD, RunModel_CemaNeigeGR5J) | identical(FUN_MOD, RunModel_GR2M)) & @@ -194,7 +198,7 @@ CreateRunOptions <- function(FUN_MOD, InputsModel, IndPeriod_WarmUp = NULL, IndP NState <- NULL if ("GR" %in% ObjectClass | "CemaNeige" %in% ObjectClass) { if ("hourly" %in% ObjectClass) { - NState <- 7 + 3 * 24 * 20 + NState <- 7 + 3 * 24 * 20+ 4 * NLayers } if ("daily" %in% ObjectClass) { NState <- 7 + 3 * 20 + 4 * NLayers @@ -267,7 +271,7 @@ CreateRunOptions <- function(FUN_MOD, InputsModel, IndPeriod_WarmUp = NULL, IndP ##Outputs_all Outputs_all <- NULL - if (identical(FUN_MOD,RunModel_GR4H)) { + if (identical(FUN_MOD,RunModel_GR4H) | identical(FUN_MOD,RunModel_CemaNeigeGR4H)) { Outputs_all <- c(Outputs_all, .FortranOutputs(GR = "GR4H")$GR) } if (identical(FUN_MOD,RunModel_GR4J) | identical(FUN_MOD,RunModel_CemaNeigeGR4J)) {