Commit 83b2b56e authored by unknown's avatar unknown
Browse files

v0.1.11.22 new scale for the GR6J exponetial store in model diagram of ShinyGR

parent 8c2ee001
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.21
Version: 0.1.11.22
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)
......
......@@ -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]+logExpIpdt*fact_resExp+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_resExp+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_resExp+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_resExp-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_resExp-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")
......
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