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
83b2b56e
Commit
83b2b56e
authored
Feb 01, 2018
by
unknown
Browse files
v0.1.11.22 new scale for the GR6J exponetial store in model diagram of ShinyGR
parent
8c2ee001
Changes
2
Hide whitespace changes
Inline
Side-by-side
DESCRIPTION
View file @
83b2b56e
Package: airGRteaching
Type: Package
Title: Tools to Simplify the Use of the airGR Hydrological Package for Education (Including a Shiny Interface)
Version: 0.1.11.2
1
Version: 0.1.11.2
2
Date: 2018-02-01
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.9.43)
...
...
R/Utils.R
View file @
83b2b56e
...
...
@@ -93,6 +93,7 @@ DiagramGR <- function(OutputsModel, Param, SimPer, EventDate, HydroModel) {
xy_Q1
<-
c
(
800
,
310
)
y_routage
<-
100
fact_res
<-
200
/
800
/
3
fact_resExp
<-
1
base_res
<-
300
NH
<-
10
xy_min_PROD
<-
c
(
200
,
610
)
...
...
@@ -628,23 +629,25 @@ DiagramGR <- function(OutputsModel, Param, SimPer, EventDate, HydroModel) {
# Triche pour la taille du reservoire exponentiel
tmp_triche
<-
0
#80
# Exp en log
signExp
<-
ifelse
(
OutputsModel
$
Exp
[
i_pdt
]
>
0
,
+1
,
-1
)
logExpIpdt
<-
log
(
abs
(
OutputsModel
$
Exp
[
i_pdt
])
+1e-6
)
*
signExp
logExpMax
<-
log
(
max
(
abs
(
OutputsModel
$
Exp
))
+1e-6
)
# Reservoir exponentiel
rect
(
xleft
=
xy_min_EXPO
[
1
],
xright
=
xy_min_EXPO
[
1
]
+
base_res
,
ybottom
=
xy_min_EXPO
[
2
],
ytop
=
xy_min_EXPO
[
2
]
+
OutputsModel
$
Exp
[
i_
pdt
]
*
fact_res
+
tmp_triche
,
ybottom
=
xy_min_EXPO
[
2
],
ytop
=
xy_min_EXPO
[
2
]
+
logExpI
pdt
*
fact_res
Exp
+
tmp_triche
,
col
=
ifelse
(
OutputsModel
$
Exp
[
i_pdt
]
>
0
,
"#10B510"
,
"#FF0303"
),
border
=
NA
)
# rect(xleft = xy_min_EXPO[1], xright = xy_min_EXPO[1]+base_res,
# ybottom = xy_min_EXPO[2], ytop = xy_min_EXPO[2]-OutputsModel$Exp[i_pdt]*fact_res-tmp_triche,
# col = col_SR, border = NA)
segments
(
x0
=
xy_min_EXPO
[
1
],
x1
=
xy_min_EXPO
[
1
]
+
base_res
,
y0
=
xy_min_EXPO
[
2
],
y1
=
xy_min_EXPO
[
2
])
segments
(
x0
=
xy_min_EXPO
[
1
],
x1
=
xy_min_EXPO
[
1
],
y0
=
xy_min_EXPO
[
2
],
y1
=
xy_min_EXPO
[
2
]
+
max
(
abs
(
OutputsModel
$
Exp
))
*
fact_res
+
tmp_triche
)
y0
=
xy_min_EXPO
[
2
],
y1
=
xy_min_EXPO
[
2
]
+
logExpMax
*
fact_res
Exp
+
tmp_triche
)
segments
(
x0
=
xy_min_EXPO
[
1
]
+
base_res
,
x1
=
xy_min_EXPO
[
1
]
+
base_res
,
y0
=
xy_min_EXPO
[
2
],
y1
=
xy_min_EXPO
[
2
]
+
max
(
abs
(
OutputsModel
$
Exp
))
*
fact_res
+
tmp_triche
)
y0
=
xy_min_EXPO
[
2
],
y1
=
xy_min_EXPO
[
2
]
+
logExpMax
*
fact_res
Exp
+
tmp_triche
)
segments
(
x0
=
xy_min_EXPO
[
1
],
x1
=
xy_min_EXPO
[
1
],
y0
=
xy_min_EXPO
[
2
],
y1
=
xy_min_EXPO
[
2
]
-
max
(
abs
(
OutputsModel
$
Exp
))
*
fact_res
-
tmp_triche
)
y0
=
xy_min_EXPO
[
2
],
y1
=
xy_min_EXPO
[
2
]
-
logExpMax
*
fact_res
Exp
-
tmp_triche
)
segments
(
x0
=
xy_min_EXPO
[
1
]
+
base_res
,
x1
=
xy_min_EXPO
[
1
]
+
base_res
,
y0
=
xy_min_EXPO
[
2
],
y1
=
xy_min_EXPO
[
2
]
-
max
(
abs
(
OutputsModel
$
Exp
))
*
fact_res
-
tmp_triche
)
y0
=
xy_min_EXPO
[
2
],
y1
=
xy_min_EXPO
[
2
]
-
logExpMax
*
fact_res
Exp
-
tmp_triche
)
text
(
x
=
30
,
y
=
xy_min_EXPO
[
2
]
+00
,
labels
=
"Exp.\nstore"
,
cex
=
1.4
,
pos
=
4
)
points
(
x
=
180
,
y
=
xy_min_EXPO
[
2
]
+20
,
pch
=
43
,
# +
cex
=
2.0
,
col
=
"#10B510"
)
...
...
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