Commit c928a8f8 authored by Delaigue Olivier's avatar Delaigue Olivier Committed by Dorchies David
Browse files

v1.4.7.4 CLEAN: commented command lines removed from plot.OutputsModel function #56

Showing with 7 additions and 12 deletions
+7 -12
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.4.7.3 Version: 1.4.7.4
Date: 2020-04-30 Date: 2020-05-01
Authors@R: c( Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
person("Olivier", "Delaigue", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7668-8468"), email = "airGR@inrae.fr"), person("Olivier", "Delaigue", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7668-8468"), email = "airGR@inrae.fr"),
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
### 1.4.7.3 Release Notes (2020-04-30) ### 1.4.7.4 Release Notes (2020-05-01)
#### New features #### New features
......
...@@ -159,23 +159,19 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea = ...@@ -159,23 +159,19 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea =
return(filter(x, filter = rep(1 / n, n), sides = 2, circular = TRUE)) return(filter(x, filter = rep(1 / n, n), sides = 2, circular = TRUE))
} }
BOOL_TS <- FALSE BOOL_TS <- FALSE
# TimeStep <- difftime(tail(OutputsModel$DatesR, 1), tail(OutputsModel$DatesR, 2), units = "secs")[[1]] if (inherits(OutputsModel, "hourly")) {
if (inherits(OutputsModel, "hourly")){# &
# TimeStep %in% (60 * 60)) {
BOOL_TS <- TRUE BOOL_TS <- TRUE
NameTS <- "hour" NameTS <- "hour"
plotunit <- "[mm/h]" plotunit <- "[mm/h]"
formatAxis <- "%m/%Y" formatAxis <- "%m/%Y"
} }
if (inherits(OutputsModel, "daily")) {# & if (inherits(OutputsModel, "daily")) {
# TimeStep %in% (24 * 60 * 60)) {
BOOL_TS <- TRUE BOOL_TS <- TRUE
NameTS <- "day" NameTS <- "day"
plotunit <- "[mm/d]" plotunit <- "[mm/d]"
formatAxis <- "%m/%Y" formatAxis <- "%m/%Y"
} }
if (inherits(OutputsModel, "monthly")){# & if (inherits(OutputsModel, "monthly")) {
# TimeStep %in% (c(28, 29, 30, 31) * 24 * 60 * 60)) {
BOOL_TS <- TRUE BOOL_TS <- TRUE
NameTS <- "month" NameTS <- "month"
plotunit <- "[mm/month]" plotunit <- "[mm/month]"
...@@ -184,8 +180,7 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea = ...@@ -184,8 +180,7 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea =
OutputsModel$DatesR <- as.POSIXlt(format(OutputsModel$DatesR, format = "%Y-%m-01"), tz = "UTC", format = "%Y-%m-%d") OutputsModel$DatesR <- as.POSIXlt(format(OutputsModel$DatesR, format = "%Y-%m-01"), tz = "UTC", format = "%Y-%m-%d")
} }
} }
if (inherits(OutputsModel, "yearly")){#} & if (inherits(OutputsModel, "yearly")) {
# TimeStep %in% (c(365, 366) * 24 * 60 * 60)) {
BOOL_TS <- TRUE BOOL_TS <- TRUE
NameTS <- "year" NameTS <- "year"
plotunit <- "[mm/y]" plotunit <- "[mm/y]"
......
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