diff --git a/DESCRIPTION b/DESCRIPTION index 733b3d8d9ea59d7eff581462bb079a3d098916ae..0c9e311c6fe5789ead47fc42cb5491c17fc2f738 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: airGRteaching Type: Package Title: Teaching Hydrological Modelling with the GR Rainfall-Runoff Models ('Shiny' Interface Included) -Version: 0.2.6.31 -Date: 2020-01-07 +Version: 0.2.7.0 +Date: 2020-01-23 Authors@R: c( person("Olivier", "Delaigue", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7668-8468"), email = "airGR@inrae.fr"), person("Laurent", "Coron", role = c("aut"), comment = c(ORCID = "0000-0002-1503-6204")), diff --git a/NEWS.Rmd b/NEWS.Rmd index 9386ad756cd0b5a72d9701bd429008971ef498fa..500b737abef045d3a7b41108f6d7a1793d72d1c8 100644 --- a/NEWS.Rmd +++ b/NEWS.Rmd @@ -14,7 +14,15 @@ output: -### 0.2.6.31 Release Notes (2020-01-23) +### 0.2.7.0 Release Notes (2020-01-23) + +#### User-visible changes + +- when the package is loaded, a message warns the users if they use a version of 'htmlwidgets' < 1.5.1.9000. The latest version of this package, available on GitHub, avoids troubles with the use of dynamic graphics of the 'dygraphs' package (called by the <code>dyplot*()</code> and the <code>ShinyGR()</code> functions) + +- it is now possible to use the GR4H and GR5H hourly models with or whithout CemaNeige. For that, in the <code>PrepGR()</code>, the <code>HydroModel</code> argument could be set to <code>"GR4H"</code> or <code>"GR5H"</code>. In the GUI, launched by <code>ShinyGR()</code> function, nothing changed, only the daily models are available + + ____________________________________________________________________________________ diff --git a/R/PrepGR.R b/R/PrepGR.R index c08932c5966c91d3f25d09e008bb5e2635cc39d3..cc5a740ede16a42eaff27f32759a2d80a94a7a5b 100644 --- a/R/PrepGR.R +++ b/R/PrepGR.R @@ -39,7 +39,7 @@ PrepGR <- function(ObsDF = NULL, DatesR = NULL, Precip = NULL, PotEvap = NULL, Q stop("Non convenient date format. Time zone must be defined as \"UTC\"") } - SuiteGR <- paste0("GR", c("1A", "2M", "4J", "5J", "6J", "4H")) + SuiteGR <- paste0("GR", c("1A", "2M", "4J", "5J", "6J", "4H", "5H")) if (! any(HydroModel %in% SuiteGR)) { stop("Non convenient model") @@ -47,10 +47,10 @@ PrepGR <- function(ObsDF = NULL, DatesR = NULL, Precip = NULL, PotEvap = NULL, Q if (! CemaNeige) { TypeModel <- sprintf("RunModel_%s", HydroModel) } - if (CemaNeige && grepl("J", HydroModel)) { + if (CemaNeige && grepl("J|H", HydroModel)) { TypeModel <- sprintf("RunModel_CemaNeige%s", HydroModel) } - if (CemaNeige && !grepl("J", HydroModel)) { + if (CemaNeige && !grepl("J|H", HydroModel)) { warning("CemaNeige can not be used with ", HydroModel) TypeModel <- sprintf("RunModel_%s", HydroModel) } diff --git a/man/PrepGR.Rd b/man/PrepGR.Rd index 680417d9058e9ae2da618bbbc0c4cbb471bf2642..a383e09225a57da4dc6bc6664859092b8765811c 100644 --- a/man/PrepGR.Rd +++ b/man/PrepGR.Rd @@ -31,9 +31,9 @@ PrepGR(ObsDF = NULL, DatesR = NULL, Precip = NULL, PotEvap = NULL, \item{NLayers}{(optional) [numeric] integer giving the number of elevation layers requested [-], required to create CemaNeige (if used) model inputs} - \item{HydroModel}{[character] name of the hydrological model (must be one of \code{"GR1A"}, \code{"GR2M"}, \code{"GR4J"}, \code{"GR5J"}, \code{"GR6J"} or \code{"GR4H"})} + \item{HydroModel}{[character] name of the hydrological model (must be one of \code{"GR1A"}, \code{"GR2M"}, \code{"GR4J"}, \code{"GR5J"}, \code{"GR6J"}, \code{"GR4H"} or \code{"GR5H"})} - \item{CemaNeige}{[boolean] option indicating whether CemaNeige should be activated (only available when \code{HydroModel} is equal to any of \code{"GR4J"}, \code{"GR5J"} or \code{"GR6J"}). See details} + \item{CemaNeige}{[boolean] option indicating whether CemaNeige should be activated (only available for hourly or daily models, when \code{HydroModel} is equal to any of \code{"GR4J"}, \code{"GR5J"}, \code{"GR6J"}, \code{"GR4H"} or \code{"GR5H"}). See details} }