Commit 704137ed authored by unknown's avatar unknown
Browse files

v0.1.3.1 add GR5J in the Model diagram of ShinyGR #4704

parent 46afbd2a
Package: airGRteaching
Type: Package
Title: Tools to Simplify the Use of the airGR Hydrological Package for Education (Including a Shiny Application)
Version: 0.1.3.0
Version: 0.1.3.1
Date: 2017-06-13
Authors@R: c(person("Olivier", "Delaigue", role = c("aut", "cre"), email = "airGR@irstea.fr"), person("Laurent", "Coron", role = c("aut")), person("Pierre", "Brigode", role = c("aut")), person("Guillaume", "Thirel", role = c("ctb")))
Depends: airGR (>= 1.0.5.22)
Imports: xts, dygraphs, shiny, plotrix
Depends: airGR (>= 1.0.8.0)
Imports: xts, dygraphs, shiny, plotrix, markdown
Description: Add-on package to the airGR package that simplifies its use and is teaching-oriented. The package provides three functions that allow to complete very simply a hydrological modelling exercise and plotting functions to help students to explore observed data and to interpret the results of calibration and simulation of the GR models. It includes a shiny graphical interface that allows for displaying in real-time model parameters impacts on hydrographs.
License: GPL-2
NeedsCompilation: no
......
This diff is collapsed.
......@@ -16,7 +16,8 @@ shinyServer(function(input, output, session) {
OBS <- ObsGR(ObsBV = get(input$Dataset), TypeModel = input$TypeModel,
CemaNeige = input$CemaNeige == "CemaNeige",
Precip = .ShinyGR.args$Precip, PotEvap = .ShinyGR.args$PotEvap, Qobs = get(input$Dataset), TempMean = .ShinyGR.args$TempMean,
Precip = .ShinyGR.args$Precip, PotEvap = .ShinyGR.args$PotEvap,
Qobs = get(input$Dataset), TempMean = .ShinyGR.args$TempMean,
ZInputs = .ShinyGR.args$ZInputs, HypsoData = .ShinyGR.args$HypsoData,
NLayers = .ShinyGR.args$NLayers)
......@@ -40,7 +41,7 @@ shinyServer(function(input, output, session) {
Transfo = gsub("(\\D{3} \\[)(\\w{0,4})(\\W*Q\\W*\\])", "\\2", input$TypeCrit))
CAL <- CalGR(ObsGR = OBS, CalCrit = CAL_opt$Crit, transfo = CAL_opt$Transfo,
WupPer = .ShinyGR.args$WupPer, CalPer = substr(c(input$Period[1], input$Period[2]), 1, 10), verbose = FALSE)
WupPer = .ShinyGR.args$WupPer, CalPer = substr(c(input$Period[1], input$Period[2]), 1, 10), verbose = FALSE)
PARAM <- CAL$OutputsCalib$ParamFinalR
updateSliderInput(session, inputId = "X1", value = PARAM[1L])
......@@ -161,7 +162,7 @@ shinyServer(function(input, output, session) {
## Models available considering the plot type
if (getPlotType() == 4) {
observe({
updateSelectInput(session, inputId = "TypeModel", choice = c("GR4J"))
updateSelectInput(session, inputId = "TypeModel", choice = c("GR4J", "GR5J"), selected = input$TypeModel)
updateSelectInput(session, inputId = "CemaNeige", choice = c("None"))
})
} else {
......@@ -185,7 +186,9 @@ shinyServer(function(input, output, session) {
## Model diagram
if (getPlotType() == 4) {
airGRteaching:::DiagramGR4J(OutputsModel = OutputsModel2, Param = getRES()$PARAM, SimPer = input$Period, EventDate = input$Event)
airGRteaching:::DiagramGR(OutputsModel = OutputsModel2, Param = getRES()$PARAM,
SimPer = input$Period, EventDate = input$Event,
TypeModel = input$TypeModel)
}
## State variables
......
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