Skip to content

Commit e2cef3e

Browse files
committed
Include relative values in deviating_hours()
1 parent be11587 commit e2cef3e

1 file changed

Lines changed: 10 additions & 12 deletions

File tree

inst/extdata/scripts/impetus/readData_BerlinWaterModel_v2.R

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# Documentation of aggregation and visualization of Qsim results
22

3-
43
project_path <-
54
"Y:/iGB/Projects/IMPETUS/"
6-
# "C:/Users/dwicke/Documents/work/IMPETUS"
7-
5+
# "C:/Users/dwicke/Documents/work/IMPETUS"
86

97
data_path <- "Work-packages/WP4_Demonstration_KWB/CS-Berlin/04_Modelling/OGewaesser/BerlinWaterModel/Ergebnisse"
108
file_name <- "qsimVis_input_days_test_250905.csv"
@@ -33,10 +31,11 @@ reference_vector <- rep(0, nrow(df_pro))
3331
output <- list(
3432
"def_hours" =
3533
qsimVis::deviating_hours(
36-
dataFrame = df_pro,
37-
thresholds = c(5, 10, 15, 20, 40, 60)/100, # Anzahl flexibel
38-
# thresholds = c(0,10, 20, 40, 60, 80)/100,
39-
dev_type = "egt"), # auch "elt" = equal or lower than möglich
34+
dataFrame = df_pro,
35+
thresholds = c(5, 10, 15, 20, 40, 60)/100, # Anzahl flexibel
36+
# thresholds = c(0,10, 20, 40, 60, 80)/100,
37+
dev_type = "egt", # auch "elt" = equal or lower than möglich
38+
relative = TRUE), # If TRUE --> relative values in %
4039
"adv_deviation" =
4140
qsimVis::adverse_deviation_from_reference(
4241
dataFrame = df_pro,
@@ -54,7 +53,6 @@ output <- list(
5453
)
5554

5655
head(output$def_hours)
57-
head(output$crit_events)
5856

5957
# Combine river stretch and simulations data
6058
mapping_table <- read.table(
@@ -78,10 +76,10 @@ classBreaks <-
7876
# c(0, 720, 2160, 4320, 8760, 43800, 184056)
7977
# c(0, 2160, 4320, 8760, 43800, 87600, 184056)
8078

81-
rivers <- qsimVis::value_to_classes(
82-
river_list = rivers,
83-
classBreaks = classBreaks
84-
)
79+
rivers <- qsimVis::value_to_classes(
80+
river_list = rivers,
81+
classBreaks = classBreaks
82+
)
8583

8684
# plot data
8785
# qsimVis::plot_empty_map(rivers = rivers_ext, plot_toner = FALSE)

0 commit comments

Comments
 (0)