Commit 52c24906 authored by unknown's avatar unknown
Browse files

v1.0.9.38 CreateIniStates stops if state values < 0

Showing with 7 additions and 1 deletion
+7 -1
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.0.9.37
Version: 1.0.9.38
Date: 2017-09-05
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl")),
......
......@@ -62,6 +62,12 @@ CreateIniStates <- function(FUN_MOD, InputsModel,
## check states
if (any(ProdStore < 0) | any(RoutStore < 0) | any(ExpStore < 0) |
any(UH1 < 0) | any(UH2 < 0) |
any(GCemaNeigeLayers < 0) | any(eTGCemaNeigeLayers < 0)) {
stop("Negative values are not allowed for any state variables")
}
if (identical(FUN_MOD, RunModel_GR6J) | identical(FUN_MOD, RunModel_CemaNeigeGR6J)) {
if (is.null(ExpStore)) {
stop("'RunModel_*GR6J' need an 'ExpStore' value")
......
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