| Title: | R Package for Simulating the Impact of Different LIDs under Varying Climate Boundary Conditions on Annual Volume Rainfall Retention |
|---|---|
| Description: | R Package for Simulating the Impact of Different LIDs (Low Impact Development) under Varying Climate Boundary Conditions in China on annual VRR (Volume Rainfall Retention). |
| Authors: | Michael Rustler [aut, cre] (ORCID: <https://orcid.org/0000-0003-0647-7726>), Roberto Tatis-Muvdi [aut] (ORCID: <https://orcid.org/0000-0003-0490-7999>), KEYS [fnd], Kompetenzzentrum Wasser Berlin gGmbH (KWB) [cph] |
| Maintainer: | Michael Rustler <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-06-24 15:35:36 UTC |
| Source: | https://github.com/KWB-R/keys.lid |
Boxplot Runoff Maximum per Event
boxplot_runoff_max( lid = "bioretention_cell", zone_id = 1, performances = keys.lid::performances )boxplot_runoff_max( lid = "bioretention_cell", zone_id = 1, performances = keys.lid::performances )
lid |
tidy name of LID (default: "bioretention_cell") |
zone_id |
climate zone id to plot (default: 1) |
performances |
nested tibble (default: |
interactive plot of performance results
## Not run: boxplot_runoff_max(lid = "bioretention_cell", zone_id = 1) ## End(Not run)## Not run: boxplot_runoff_max(lid = "bioretention_cell", zone_id = 1) ## End(Not run)
Boxplot Runoff Volume per Event
boxplot_runoff_volume( lid = "bioretention_cell", zone_id = 1, performances = keys.lid::performances )boxplot_runoff_volume( lid = "bioretention_cell", zone_id = 1, performances = keys.lid::performances )
lid |
tidy name of LID (default: "bioretention_cell") |
zone_id |
climate zone id to plot (default: 1) |
performances |
nested tibble (default: |
interactive plot of performance results
## Not run: boxplot_runoff_volume(lid = "bioretention_cell", zone_id = 1) ## End(Not run)## Not run: boxplot_runoff_volume(lid = "bioretention_cell", zone_id = 1) ## End(Not run)
Boxplot Volume Rainfall Retended per Year
boxplot_vrr( lid = "bioretention_cell", zone_id = 1, performances = keys.lid::performances )boxplot_vrr( lid = "bioretention_cell", zone_id = 1, performances = keys.lid::performances )
lid |
tidy name of LID (default: "bioretention_cell") |
zone_id |
climate zone id to plot (default: 1) |
performances |
nested tibble (default: |
interactive plot of performance results
## Not run: boxplot_vrr(lid = "bioretention_cell", zone_id = 1) ## End(Not run)## Not run: boxplot_vrr(lid = "bioretention_cell", zone_id = 1) ## End(Not run)
compute runoff volume for runoff in mm/s
computeVol(data, timeColumn, Qcolumn)computeVol(data, timeColumn, Qcolumn)
data |
data |
timeColumn |
timeColumn |
Qcolumn |
Qcolumn |
???
Title
export_performances(export_dir = tempdir())export_performances(export_dir = tempdir())
export_dir |
default: tempdir() |
write "performances" to "swmm_lid-performances.xlsx" in directory "export_dir" and return path to fike
Get Path to File in This Package
extdata_file(...)extdata_file(...)
... |
parts of path passed to |
Get Percentiles for Events
get_event_percentiles(performances = keys.lid::performances)get_event_percentiles(performances = keys.lid::performances)
performances |
nested tibble (default: |
list with percentiles for "event_sum" and "event_max"
Convert LID config to SWMM LID controls
lidconfig_to_swmm(df)lidconfig_to_swmm(df)
df |
data frame for a single scenario of a LID (as returned by
|
data frame with SWMM LID controls
scenarios <- keys.lid::read_scenarios() unique(scenarios$lid_name_tidy) lid <- "permeable_pavement" lid_selected <- scenarios %>% dplyr::filter(.data$lid_name_tidy == lid) scenario_names <- unique(lid_selected$scenario_name) scenario_name <- scenario_names[1] scenario_name lid_selected_scenario <- lid_selected[lid_selected$scenario_name == scenario_name,] lid_controls <- lidconfig_to_swmm(lid_selected_scenario) str(lid_controls)scenarios <- keys.lid::read_scenarios() unique(scenarios$lid_name_tidy) lid <- "permeable_pavement" lid_selected <- scenarios %>% dplyr::filter(.data$lid_name_tidy == lid) scenario_names <- unique(lid_selected$scenario_name) scenario_name <- scenario_names[1] scenario_name lid_selected_scenario <- lid_selected[lid_selected$scenario_name == scenario_name,] lid_controls <- lidconfig_to_swmm(lid_selected_scenario) str(lid_controls)
makeRainfallRunoffEvents
makeRainfallRunoffEvents(rainfalldata, runoffdata)makeRainfallRunoffEvents(rainfalldata, runoffdata)
rainfalldata |
rainfalldata |
runoffdata |
runoffdata |
????
monthlyPattern
monthlyPattern(data)monthlyPattern(data)
data |
data |
???
A dataset containing the performance of LIDs for different climate conditions created with R script in /data-raw/performances.R
performancesperformances
A nested tibble with 575 rows and 16 variables:
climate zone id
tidy LID name
name of LID scenario
catchment area in squaremeters
fraction of LID compared to total catchment
total LID area
tibble with LID usage parameterisation
tibble with LID controls parameterisation
tibble with subcatchment parameterisation
tibble with two columns "year" and "vrr" (volume rainfall retended for each year
tibble with maximum values for each rainfall event
tibble with sum values for each rainfall event
name of SWMM results used for event separation
path to SWMM model input file
path to SWMM model report file
path to SWMM model output file
Plot Median VRR
plot_vrr_median( lid = "bioretention_cell", performances = keys.lid::performances )plot_vrr_median( lid = "bioretention_cell", performances = keys.lid::performances )
lid |
tidy name of LID |
performances |
nested tibble (default: |
interactive plot of performance results
## Not run: lids <- unique(keys.lid::performances$lid_name_tidy) sapply(lids, function(lid) print(keys.lid::plot_vrr_median(lid))) ## End(Not run)## Not run: lids <- unique(keys.lid::performances$lid_name_tidy) sapply(lids, function(lid) print(keys.lid::plot_vrr_median(lid))) ## End(Not run)
read_scenarios
read_scenarios( scenarios_xlsx = extdata_file("scenarios/swmm_lid-parameterisation.xlsx") )read_scenarios( scenarios_xlsx = extdata_file("scenarios/swmm_lid-parameterisation.xlsx") )
scenarios_xlsx |
path to LID scenarios Excel file (default:
|
tidy scenarios data frame
readObservations
readObservations( subfolder, rainFile, runoffFile, temperatureFile, dateTimetz, dateTimeformat, to_mmperhour, NAval )readObservations( subfolder, rainFile, runoffFile, temperatureFile, dateTimetz, dateTimeformat, to_mmperhour, NAval )
subfolder |
subfolder |
rainFile |
rainFile |
runoffFile |
runoffFile |
temperatureFile |
temperatureFile |
dateTimetz |
dateTimetz |
dateTimeformat |
dateTimeformat |
to_mmperhour |
to_mmperhour |
NAval |
NAval |
????
readPredictions
readPredictions( subfolder, rainFile, runoffFile, temperatureFile, dateTimetz, dateTimeformat, to_mmperhour, parTcontinuous )readPredictions( subfolder, rainFile, runoffFile, temperatureFile, dateTimetz, dateTimeformat, to_mmperhour, parTcontinuous )
subfolder |
subfolder |
rainFile |
rainFile |
runoffFile |
runoffFile |
temperatureFile |
temperatureFile |
dateTimetz |
dateTimetz |
dateTimeformat |
dateTimeformat |
to_mmperhour |
to_mmperhour |
parTcontinuous |
parTcontinuous |
????
Simulate Performance of LID
simulate_performance( lid_selected, lid_area_fraction = 0, catchment_area_m2 = 1000, swmm_base_inp = keys.lid::extdata_file("scenarios/models/model_template.inp"), swmm_climate_dir = keys.lid::extdata_file("rawdata/weather_sponge_regions"), swmm_exe = NULL, model_dir = keys.lid::extdata_file("scenarios/models"), zone_ids = 1L:5L )simulate_performance( lid_selected, lid_area_fraction = 0, catchment_area_m2 = 1000, swmm_base_inp = keys.lid::extdata_file("scenarios/models/model_template.inp"), swmm_climate_dir = keys.lid::extdata_file("rawdata/weather_sponge_regions"), swmm_exe = NULL, model_dir = keys.lid::extdata_file("scenarios/models"), zone_ids = 1L:5L )
lid_selected |
tibble with a selected LID as retrieved by |
lid_area_fraction |
fraction of LID in subcatchment (default: 0) |
catchment_area_m2 |
catchment area (default: 1000 m2) |
swmm_base_inp |
path to SWMM model to be used as template for modification (default: keys.lid::extdata_file("scenarios/models/model_template.inp")) |
swmm_climate_dir |
directory with climate data (default: keys.lid::extdata_file("rawdata/weather_sponge_regions") |
swmm_exe |
Name and path to swmm5 executable. If not manually set, the following paths are looked up: linux: "/usr/bin/swmm5" darwin: "/Applications/swmm5" windows: "C:/Program Files (x86)/EPA SWMM 5.1/swmm5.exe", (default: NULL) |
model_dir |
default: keys.lid::extdata_file("scenarios/models") |
zone_ids |
climate zone ids to be used for simulation (default: 1L:5L) |
tibble with nested lists containing all scenario performance
## Not run: scenarios <- keys.lid::read_scenarios() unique(scenarios$lid_name_tidy) lid <- "permeable_pavement" lid_selected <- scenarios %>% dplyr::filter(.data$lid_name_tidy == lid) pp_0.00 <- keys.lid::simulate_performance(lid_selected, lid_area_fraction = 0.00) pp_1.0 <- keys.lid::simulate_performance(lid_selected, lid_area_fraction = 1.0) pp <- dplyr::bind_rows(pp_0.00, pp_1.0) ## End(Not run)## Not run: scenarios <- keys.lid::read_scenarios() unique(scenarios$lid_name_tidy) lid <- "permeable_pavement" lid_selected <- scenarios %>% dplyr::filter(.data$lid_name_tidy == lid) pp_0.00 <- keys.lid::simulate_performance(lid_selected, lid_area_fraction = 0.00) pp_1.0 <- keys.lid::simulate_performance(lid_selected, lid_area_fraction = 1.0) pp <- dplyr::bind_rows(pp_0.00, pp_1.0) ## End(Not run)
Simulate Performances of LID
simulate_performances( lid_selected, lid_area_fractions = c(0, 1), catchment_area_m2 = 1000, swmm_base_inp = keys.lid::extdata_file("scenarios/models/model_template.inp"), swmm_climate_dir = keys.lid::extdata_file("rawdata/weather_sponge_regions"), swmm_exe = NULL, model_dir = keys.lid::extdata_file("scenarios/models"), zone_ids = 1L:5L )simulate_performances( lid_selected, lid_area_fractions = c(0, 1), catchment_area_m2 = 1000, swmm_base_inp = keys.lid::extdata_file("scenarios/models/model_template.inp"), swmm_climate_dir = keys.lid::extdata_file("rawdata/weather_sponge_regions"), swmm_exe = NULL, model_dir = keys.lid::extdata_file("scenarios/models"), zone_ids = 1L:5L )
lid_selected |
tibble with a selected LID as retrieved by |
lid_area_fractions |
fractions of LID in subcatchment (default: c(0,1) |
catchment_area_m2 |
catchment area (default: 1000 m2) |
swmm_base_inp |
path to SWMM model to be used as template for modification (default: keys.lid::extdata_file("scenarios/models/model_template.inp")) |
swmm_climate_dir |
directory with climate data (default: keys.lid::extdata_file("rawdata/weather_sponge_regions") |
swmm_exe |
Name and path to swmm5 executable. If not manually set, the following paths are looked up: linux: "/usr/bin/swmm5" darwin: "/Applications/swmm5" windows: "C:/Program Files (x86)/EPA SWMM 5.1/swmm5.exe", (default: NULL) |
model_dir |
default: keys.lid::extdata_file("scenarios/models") |
zone_ids |
climate zone ids to be used for simulation (default: 1L:5L) |
tibble with nested lists containing all scenario performances for varying lid_area_fractions
## Not run: scenarios <- keys.lid::read_scenarios() unique(scenarios$lid_name_tidy) lid <- "permeable_pavement" lid_selected <- scenarios %>% dplyr::filter(.data$lid_name_tidy == lid) pp <- keys.lid::simulate_performances(lid_selected, lid_area_fractions = c(0,1) ) ## End(Not run)## Not run: scenarios <- keys.lid::read_scenarios() unique(scenarios$lid_name_tidy) lid <- "permeable_pavement" lid_selected <- scenarios %>% dplyr::filter(.data$lid_name_tidy == lid) pp <- keys.lid::simulate_performances(lid_selected, lid_area_fractions = c(0,1) ) ## End(Not run)