Commit 33986184 authored by unknown's avatar unknown
Browse files

v1.0.9.39 state values checking fixed in CreateIniStates

Showing with 8 additions and 5 deletions
+8 -5
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.0.9.38
Date: 2017-09-05
Version: 1.0.9.39
Date: 2017-09-07
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl")),
person("Charles", "Perrin", role = c("aut", "ths")),
......
......@@ -62,11 +62,14 @@ CreateIniStates <- function(FUN_MOD, InputsModel,
## check states
if (any(ProdStore < 0) | any(RoutStore < 0) | any(ExpStore < 0) |
if (any(ProdStore < 0) | any(RoutStore < 0) |
any(UH1 < 0) | any(UH2 < 0) |
any(GCemaNeigeLayers < 0) | any(eTGCemaNeigeLayers < 0)) {
stop("Negative values are not allowed for any state variables")
any(GCemaNeigeLayers < 0)) {
stop("Negative values are not allowed for any of 'ProdStore', 'RoutStore', 'UH1', 'UH2', 'GCemaNeigeLayers'")
}
if (any(eTGCemaNeigeLayers > 0)) {
stop("Positive values are not allowed for 'eTGCemaNeigeLayers'")
}
if (identical(FUN_MOD, RunModel_GR6J) | identical(FUN_MOD, RunModel_CemaNeigeGR6J)) {
if (is.null(ExpStore)) {
......
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