Commit 220069cc authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v0.2.4.0 CemaNeige now allowed in model diagram of ShinyGR

parent 633f6b52
Package: airGRteaching
Type: Package
Title: Teaching Hydrological Modelling with the GR Rainfall-Runoff Models ('Shiny' Interface Included)
Version: 0.2.3.5
Date: 2018-08-12
Version: 0.2.4.0
Date: 2018-08-13
Authors@R: c(
person("Olivier", "Delaigue", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7668-8468"), email = "airGR@irstea.fr"),
person("Laurent", "Coron", role = c("aut"), comment = c(ORCID = "0000-0002-1503-6204")),
......
############# Release History of the airGRteaching Package
## 0.2.3.5 Release Notes (2018-08-12)
## 0.2.4.0 Release Notes (2018-08-12)
User-visible changes
- the CemaNeige model is now allowed when the model diagram is drawn in ShinyGR()
## 0.2.3.2 Release Notes (2018-08-08)
......
......@@ -48,7 +48,7 @@ if (getRversion() >= "2.15.1") {
## function to plot the gr models diagrams (only GR4J and GR5J)
## =================================================================================
.DiagramGR <- function(OutputsModel, Param, SimPer, EventDate, HydroModel) {
.DiagramGR <- function(OutputsModel, Param, SimPer, EventDate, HydroModel, CemaNeige) {
# --------------------------------------------------------------------------------
......@@ -233,6 +233,9 @@ if (getRversion() >= "2.15.1") {
# --------------------------------------------------------------------------------
# Entrees P et ETP
if (CemaNeige) {
text(x = xy_P[1]*1.65, y = xy_P[2]*0.98, labels = "+ CemaNeige", adj = c(1, 1), font = 2, col = "grey40", cex = 1.6)
}
text(x = xy_P[1], y = xy_P[2], labels = "P", pos = 3, font = 2, col = col_P, cex = 1.8)
text(x = xy_E[1], y = xy_E[2], labels = "E", pos = 3, font = 2, col = col_E, cex = 1.8)
......
......@@ -248,15 +248,15 @@ shinyServer(function(input, output, session) {
## Models available considering the plot type
observe({
if (getPlotType() == 4) {
updateSelectInput(session, inputId = "HydroModel", choice = c("GR4J", "GR5J", "GR6J"), selected = input$HydroModel)
updateSelectInput(session, inputId = "SnowModel" , choice = c("None"))
} else {
updateSelectInput(session, inputId = "HydroModel", choice = c("GR4J", "GR5J", "GR6J"), selected = input$HydroModel)
updateSelectInput(session, inputId = "SnowModel" , choice = c("None", "CemaNeige") , selected = input$SnowModel)
}
})
# observe({
# if (getPlotType() == 4) {
# updateSelectInput(session, inputId = "HydroModel", choice = c("GR4J", "GR5J", "GR6J"), selected = input$HydroModel)
# updateSelectInput(session, inputId = "SnowModel" , choice = c("None"))
# } else {
# updateSelectInput(session, inputId = "HydroModel", choice = c("GR4J", "GR5J", "GR6J"), selected = input$HydroModel)
# updateSelectInput(session, inputId = "SnowModel" , choice = c("None", "CemaNeige") , selected = input$SnowModel)
# }
# })
## Plots available considering the model type
......@@ -646,7 +646,8 @@ shinyServer(function(input, output, session) {
par(getPlotPar()$par)
try(.DiagramGR(OutputsModel = OutputsModel2, Param = getSim()$PARAM,
SimPer = input$Period, EventDate = input$Event,
HydroModel = input$HydroModel), silent = TRUE)
HydroModel = input$HydroModel, CemaNeige = input$SnowModel == "CemaNeige"),
silent = TRUE)
}, bg = "transparent")
......
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