Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
HYCAR-Hydro
airGRteaching
Commits
220069cc
Commit
220069cc
authored
Sep 13, 2018
by
Delaigue Olivier
Browse files
v0.2.4.0 CemaNeige now allowed in model diagram of ShinyGR
parent
633f6b52
Changes
4
Hide whitespace changes
Inline
Side-by-side
DESCRIPTION
View file @
220069cc
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-1
2
Version: 0.2.
4.0
Date: 2018-08-1
3
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")),
...
...
NEWS
View file @
220069cc
############# 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)
...
...
R/Utils.R
View file @
220069cc
...
...
@@ -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
)
...
...
inst/ShinyGR/server.R
View file @
220069cc
...
...
@@ -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"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment