diff --git a/DESCRIPTION b/DESCRIPTION index 46f13e2c9e7975614420b83132343a7339f4ec24..3fd4ad07ad1f7213636031db9b59d0e628165d8d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: airGR Type: Package Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling -Version: 1.4.7.3 -Date: 2020-04-30 +Version: 1.4.7.4 +Date: 2020-05-01 Authors@R: c( 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"), diff --git a/NEWS.md b/NEWS.md index 19623bbdbe13681d35d83859f56009375e9f1fa3..495cd011cc3f5dac52662506325b019332d2c46a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,7 +4,7 @@ -### 1.4.7.3 Release Notes (2020-04-30) +### 1.4.7.4 Release Notes (2020-05-01) #### New features diff --git a/R/plot.OutputsModel.R b/R/plot.OutputsModel.R index f80438cb90b2b48b5572e658d311e82bc9d9d449..619e5ea9618613258f6f2d0928361468b89a29bd 100644 --- a/R/plot.OutputsModel.R +++ b/R/plot.OutputsModel.R @@ -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)) } BOOL_TS <- FALSE - # TimeStep <- difftime(tail(OutputsModel$DatesR, 1), tail(OutputsModel$DatesR, 2), units = "secs")[[1]] - if (inherits(OutputsModel, "hourly")){# & - # TimeStep %in% (60 * 60)) { + if (inherits(OutputsModel, "hourly")) { BOOL_TS <- TRUE NameTS <- "hour" plotunit <- "[mm/h]" formatAxis <- "%m/%Y" } - if (inherits(OutputsModel, "daily")) {# & - # TimeStep %in% (24 * 60 * 60)) { + if (inherits(OutputsModel, "daily")) { BOOL_TS <- TRUE NameTS <- "day" plotunit <- "[mm/d]" formatAxis <- "%m/%Y" } - if (inherits(OutputsModel, "monthly")){# & - # TimeStep %in% (c(28, 29, 30, 31) * 24 * 60 * 60)) { + if (inherits(OutputsModel, "monthly")) { BOOL_TS <- TRUE NameTS <- "month" plotunit <- "[mm/month]" @@ -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") } } - if (inherits(OutputsModel, "yearly")){#} & - # TimeStep %in% (c(365, 366) * 24 * 60 * 60)) { + if (inherits(OutputsModel, "yearly")) { BOOL_TS <- TRUE NameTS <- "year" plotunit <- "[mm/y]"