Commit ff7c567b authored by unknown's avatar unknown
Browse files

v1.0.6.14 plot.OutputsModel now returns a warning when the length of Qobs is...

v1.0.6.14 plot.OutputsModel now returns a warning when the length of Qobs is different from the length of Qsim
parent 6767797a
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.0.6.13
Version: 1.0.6.14
Date: 2017-04-05
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl")),
......
......@@ -16,7 +16,13 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea =
BOOL_Qsim <- FALSE;
if ("Qsim" %in% names(OutputsModel)) { BOOL_Qsim <- TRUE; }
BOOL_Qobs <- FALSE;
if (BOOL_Qsim & length(Qobs) == length(OutputsModel$Qsim)) { if (sum(is.na(Qobs)) != length(Qobs)) { BOOL_Qobs <- TRUE; } }
if (BOOL_Qsim & length(Qobs) == length(OutputsModel$Qsim)) {
if (sum(is.na(Qobs)) != length(Qobs)) {
BOOL_Qobs <- TRUE
}
} else {
warning("Incorrect length of Qobs. Time series of observed flow not drawn.")
}
BOOL_Snow <- FALSE;
if ("CemaNeigeLayers" %in% names(OutputsModel)) { if ("SnowPack" %in% names(OutputsModel$CemaNeigeLayers[[1]])) { BOOL_Snow <- TRUE; } }
BOOL_Psol <- FALSE;
......
Markdown is supported
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