Commit e538aac6 authored by unknown's avatar unknown
Browse files

v1.0.9.19 bug fixed when verbose = FALSE in CreateIniStates, default favlues are now set

Showing with 20 additions and 10 deletions
+20 -10
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.0.9.18 Version: 1.0.9.19
Date: 2017-08-11 Date: 2017-08-11
Authors@R: c( Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl")), person("Laurent", "Coron", role = c("aut", "trl")),
......
...@@ -67,25 +67,33 @@ CreateIniStates <- function(FUN_MOD, InputsModel, ...@@ -67,25 +67,33 @@ CreateIniStates <- function(FUN_MOD, InputsModel,
stop("'RunModel_*GR6J' need an 'ExpStore' value") stop("'RunModel_*GR6J' need an 'ExpStore' value")
return(NULL) return(NULL)
} }
} else if (!is.null(ExpStore) & verbose) { } else if (!is.null(ExpStore)) {
warning("This 'FUN_MOD' does not require 'ExpStore'. Value set to NA") if (verbose) {
warning("This 'FUN_MOD' does not require 'ExpStore'. Value set to NA")
}
ExpStore <- Inf ExpStore <- Inf
} }
if (identical(FUN_MOD, RunModel_GR2M) & verbose) { if (identical(FUN_MOD, RunModel_GR2M)) {
if (!is.null(UH1)) { if (!is.null(UH1)) {
warning("This 'FUN_MOD' does not require 'UH1'. Values set to NA") if (verbose) {
warning("This 'FUN_MOD' does not require 'UH1'. Values set to NA")
}
UH1 <- rep(Inf, UH1n) UH1 <- rep(Inf, UH1n)
} }
if (!is.null(UH2)) { if (!is.null(UH2)) {
warning("This 'FUN_MOD' does not require 'UH2'. Values set to NA") if (verbose) {
warning("This 'FUN_MOD' does not require 'UH2'. Values set to NA")
}
UH2 <- rep(Inf, UH2n) UH2 <- rep(Inf, UH2n)
} }
} }
if ((identical(FUN_MOD, RunModel_GR5J) | identical(FUN_MOD, RunModel_CemaNeigeGR5J)) & !is.null(UH1) & verbose) { if ((identical(FUN_MOD, RunModel_GR5J) | identical(FUN_MOD, RunModel_CemaNeigeGR5J)) & !is.null(UH1)) {
warning("This 'FUN_MOD' does not require 'UH1'. Values set to NA") if (verbose) {
warning("This 'FUN_MOD' does not require 'UH1'. Values set to NA")
}
UH1 <- rep(Inf, UH1n) UH1 <- rep(Inf, UH1n)
} }
...@@ -95,8 +103,10 @@ CreateIniStates <- function(FUN_MOD, InputsModel, ...@@ -95,8 +103,10 @@ CreateIniStates <- function(FUN_MOD, InputsModel,
return(NULL) return(NULL)
} }
if(!"CemaNeige" %in% ObjectClass & if(!"CemaNeige" %in% ObjectClass &
(!is.null(GCemaNeigeLayers) | !is.null(eTGCemaNeigeLayers)) & verbose) { (!is.null(GCemaNeigeLayers) | !is.null(eTGCemaNeigeLayers))) {
warning("This 'FUN_MOD' does not require 'GCemaNeigeLayers' and 'GCemaNeigeLayers'. Values set to NA") if (verbose) {
warning("This 'FUN_MOD' does not require 'GCemaNeigeLayers' and 'GCemaNeigeLayers'. Values set to NA")
}
GCemaNeigeLayers <- Inf GCemaNeigeLayers <- Inf
eTGCemaNeigeLayers <- Inf eTGCemaNeigeLayers <- Inf
} }
......
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