Commit 0b8cd438 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v0.2.7.0 NEW: add GR4H and GR5H hourly models with or whithout CemaNeige

parent 3ab70fc1
Package: airGRteaching Package: airGRteaching
Type: Package Type: Package
Title: Teaching Hydrological Modelling with the GR Rainfall-Runoff Models ('Shiny' Interface Included) Title: Teaching Hydrological Modelling with the GR Rainfall-Runoff Models ('Shiny' Interface Included)
Version: 0.2.6.31 Version: 0.2.7.0
Date: 2020-01-07 Date: 2020-01-23
Authors@R: c( Authors@R: c(
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"),
person("Laurent", "Coron", role = c("aut"), comment = c(ORCID = "0000-0002-1503-6204")), person("Laurent", "Coron", role = c("aut"), comment = c(ORCID = "0000-0002-1503-6204")),
......
...@@ -14,7 +14,15 @@ output: ...@@ -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&#42;()</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
____________________________________________________________________________________ ____________________________________________________________________________________
......
...@@ -39,7 +39,7 @@ PrepGR <- function(ObsDF = NULL, DatesR = NULL, Precip = NULL, PotEvap = NULL, Q ...@@ -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\"") 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)) { if (! any(HydroModel %in% SuiteGR)) {
stop("Non convenient model") stop("Non convenient model")
...@@ -47,10 +47,10 @@ PrepGR <- function(ObsDF = NULL, DatesR = NULL, Precip = NULL, PotEvap = NULL, Q ...@@ -47,10 +47,10 @@ PrepGR <- function(ObsDF = NULL, DatesR = NULL, Precip = NULL, PotEvap = NULL, Q
if (! CemaNeige) { if (! CemaNeige) {
TypeModel <- sprintf("RunModel_%s", HydroModel) TypeModel <- sprintf("RunModel_%s", HydroModel)
} }
if (CemaNeige && grepl("J", HydroModel)) { if (CemaNeige && grepl("J|H", HydroModel)) {
TypeModel <- sprintf("RunModel_CemaNeige%s", 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) warning("CemaNeige can not be used with ", HydroModel)
TypeModel <- sprintf("RunModel_%s", HydroModel) TypeModel <- sprintf("RunModel_%s", HydroModel)
} }
......
...@@ -31,9 +31,9 @@ PrepGR(ObsDF = NULL, DatesR = NULL, Precip = NULL, PotEvap = NULL, ...@@ -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{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}
} }
......
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