Commit f5873d84 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.2.15.6 CLEAN: minor simplification of the plot.OutputsModel code

Showing with 7 additions and 10 deletions
+7 -10
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.2.15.5
Version: 1.2.15.6
Date: 2019-05-03
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -14,7 +14,7 @@ output:
### 1.2.15.5 Release Notes (2019-05-03)
### 1.2.15.6 Release Notes (2019-05-03)
#### New features
......
......@@ -286,14 +286,11 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea =
}
if (!is.null(BasinArea)) {
Factor_MMH_M3S <- 60 * 60
Factor_MMD_M3S <- 60 * 60 * 24
Factor_MMM_M3S <- 60 * 60 * 24 * 365.25 / 12
Factor_MMY_M3S <- 60 * 60 * 24 * 365.25
if (NameTS == "hour" ) Factor_UNIT_M3S <- Factor_MMH_M3S
if (NameTS == "day" ) Factor_UNIT_M3S <- Factor_MMD_M3S
if (NameTS == "month") Factor_UNIT_M3S <- Factor_MMM_M3S
if (NameTS == "year" ) Factor_UNIT_M3S <- Factor_MMY_M3S
Factor_UNIT_M3S <- switch(NameTS,
hour = 60 * 60,
day = 60 * 60 * 24,
month = 60 * 60 * 24 * 365.25 / 12,
year = 60 * 60 * 24 * 365.25)
Factor_UNIT_M3S <- BasinArea / (Factor_UNIT_M3S / 1000)
}
}
......
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