Commit 73d49238 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.3.0.2 UPDATE: CreateRunOptions modified to take into account RunModel_CemaNeigeGR4H

Showing with 9 additions and 5 deletions
+9 -5
Package: airGR Package: airGR
Type: Package Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.3.0.1 Version: 1.3.0.2
Date: 2019-05-20 Date: 2019-05-20
Authors@R: c( Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
...@@ -14,7 +14,7 @@ output: ...@@ -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 #### New features
......
...@@ -40,6 +40,10 @@ CreateRunOptions <- function(FUN_MOD, InputsModel, IndPeriod_WarmUp = NULL, IndP ...@@ -40,6 +40,10 @@ CreateRunOptions <- function(FUN_MOD, InputsModel, IndPeriod_WarmUp = NULL, IndP
ObjectClass <- c(ObjectClass, "GR", "CemaNeige", "daily") ObjectClass <- c(ObjectClass, "GR", "CemaNeige", "daily")
BOOL <- TRUE BOOL <- TRUE
} }
if (identical(FUN_MOD, RunModel_CemaNeigeGR4H)) {
ObjectClass <- c(ObjectClass, "GR", "CemaNeige", "hourly")
BOOL <- TRUE
}
if (IsHyst) { if (IsHyst) {
ObjectClass <- c(ObjectClass, "hysteresis") ObjectClass <- c(ObjectClass, "hysteresis")
} }
...@@ -156,7 +160,7 @@ CreateRunOptions <- function(FUN_MOD, InputsModel, IndPeriod_WarmUp = NULL, IndP ...@@ -156,7 +160,7 @@ CreateRunOptions <- function(FUN_MOD, InputsModel, IndPeriod_WarmUp = NULL, IndP
if (!is.vector(IniResLevels) | !is.numeric(IniResLevels) | any(is.na(IniResLevels))) { if (!is.vector(IniResLevels) | !is.numeric(IniResLevels) | any(is.na(IniResLevels))) {
stop("'IniResLevels' must be a vector of numeric values") 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_GR4J) | identical(FUN_MOD, RunModel_CemaNeigeGR4J) |
identical(FUN_MOD, RunModel_GR5J) | identical(FUN_MOD, RunModel_CemaNeigeGR5J) | identical(FUN_MOD, RunModel_GR5J) | identical(FUN_MOD, RunModel_CemaNeigeGR5J) |
identical(FUN_MOD, RunModel_GR2M)) & identical(FUN_MOD, RunModel_GR2M)) &
...@@ -194,7 +198,7 @@ CreateRunOptions <- function(FUN_MOD, InputsModel, IndPeriod_WarmUp = NULL, IndP ...@@ -194,7 +198,7 @@ CreateRunOptions <- function(FUN_MOD, InputsModel, IndPeriod_WarmUp = NULL, IndP
NState <- NULL NState <- NULL
if ("GR" %in% ObjectClass | "CemaNeige" %in% ObjectClass) { if ("GR" %in% ObjectClass | "CemaNeige" %in% ObjectClass) {
if ("hourly" %in% ObjectClass) { if ("hourly" %in% ObjectClass) {
NState <- 7 + 3 * 24 * 20 NState <- 7 + 3 * 24 * 20+ 4 * NLayers
} }
if ("daily" %in% ObjectClass) { if ("daily" %in% ObjectClass) {
NState <- 7 + 3 * 20 + 4 * NLayers NState <- 7 + 3 * 20 + 4 * NLayers
...@@ -267,7 +271,7 @@ CreateRunOptions <- function(FUN_MOD, InputsModel, IndPeriod_WarmUp = NULL, IndP ...@@ -267,7 +271,7 @@ CreateRunOptions <- function(FUN_MOD, InputsModel, IndPeriod_WarmUp = NULL, IndP
##Outputs_all ##Outputs_all
Outputs_all <- NULL 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) Outputs_all <- c(Outputs_all, .FortranOutputs(GR = "GR4H")$GR)
} }
if (identical(FUN_MOD,RunModel_GR4J) | identical(FUN_MOD,RunModel_CemaNeigeGR4J)) { if (identical(FUN_MOD,RunModel_GR4J) | identical(FUN_MOD,RunModel_CemaNeigeGR4J)) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment