The SWMM simulations (years: 2008 - 2019) and calculation of
performance metrics (volume rainfall retended, rainfall event sums/max)
for four LIDs with different parameterisations and for five different
climate zones in China (in total: 575 model runs, which takes about 30
seconds per run, i.e. in total 5 hours -12 minutes on my
laptop).
### takes about 2.5h for all four LIDs to simulate
catchment_area_m2 <- 1000
lid_area_fractions <- c(0,0.25,0.5,0.75,1)
### Bioretention Cell
br <- keys.lid::simulate_performances(
lid_selected = scenarios[scenarios$lid_name_tidy == "bioretention_cell",],
lid_area_fractions = lid_area_fractions,
catchment_area_m2 = catchment_area_m2,
swmm_exe = paths$swmm_exe
)
### Green Roof
gr <- keys.lid::simulate_performances(
lid_selected = scenarios[scenarios$lid_name_tidy == "green_roof",],
lid_area_fractions = lid_area_fractions,
catchment_area_m2 = catchment_area_m2,
swmm_exe = paths$swmm_exe
)
### Permeable Pavement
pp <- keys.lid::simulate_performances(
lid_selected = scenarios[scenarios$lid_name_tidy == "permeable_pavement",],
lid_area_fractions = lid_area_fractions,
catchment_area_m2 = catchment_area_m2,
swmm_exe = paths$swmm_exe
)
performances <- br %>%
dplyr::bind_rows(gr) %>%
dplyr::bind_rows(pp)
keys.lid::plot_vrr_median("bioretention_cell")
#> Warning: `aes_string()` was deprecated in ggplot2 3.0.0.
#> ℹ Please use tidy evaluation idioms with `aes()`.
#> ℹ See also `vignette("ggplot2-in-packages")` for more information.
#> ℹ The deprecated feature was likely used in the keys.lid package.
#> Please report the issue at <https://github.com/KWB-R/keys.lid/issues>.
#> This warning is displayed once per session.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.Zone 1
keys.lid::boxplot_vrr(lid = "bioretention_cell", zone_id = 1)
#> Warning in RColorBrewer::brewer.pal(max(N, 3L), "Set2"): n too large, allowed maximum for palette Set2 is 8
#> Returning the palette you asked for with that many colors
#> Warning in RColorBrewer::brewer.pal(max(N, 3L), "Set2"): n too large, allowed maximum for palette Set2 is 8
#> Returning the palette you asked for with that many colorsZone 2
keys.lid::boxplot_vrr(lid = "bioretention_cell", zone_id = 2)
#> Warning in RColorBrewer::brewer.pal(max(N, 3L), "Set2"): n too large, allowed maximum for palette Set2 is 8
#> Returning the palette you asked for with that many colors
#> Warning in RColorBrewer::brewer.pal(max(N, 3L), "Set2"): n too large, allowed maximum for palette Set2 is 8
#> Returning the palette you asked for with that many colorsZone 3
performances <- keys.lid::performances %>% dplyr::filter(lid_area_fraction == 1)
keys.lid::boxplot_vrr("bioretention_cell", zone_id = 3, performances = performances)
#> Warning in RColorBrewer::brewer.pal(max(N, 3L), "Set2"): n too large, allowed maximum for palette Set2 is 8
#> Returning the palette you asked for with that many colors
#> Warning in RColorBrewer::brewer.pal(max(N, 3L), "Set2"): n too large, allowed maximum for palette Set2 is 8
#> Returning the palette you asked for with that many colorsZone 4
keys.lid::boxplot_vrr(lid = "bioretention_cell", zone_id = 4)
#> Warning in RColorBrewer::brewer.pal(max(N, 3L), "Set2"): n too large, allowed maximum for palette Set2 is 8
#> Returning the palette you asked for with that many colors
#> Warning in RColorBrewer::brewer.pal(max(N, 3L), "Set2"): n too large, allowed maximum for palette Set2 is 8
#> Returning the palette you asked for with that many colorsZone 5
keys.lid::boxplot_vrr("bioretention_cell", zone_id = 5, performances = performances)
#> Warning in RColorBrewer::brewer.pal(max(N, 3L), "Set2"): n too large, allowed maximum for palette Set2 is 8
#> Returning the palette you asked for with that many colors
#> Warning in RColorBrewer::brewer.pal(max(N, 3L), "Set2"): n too large, allowed maximum for palette Set2 is 8
#> Returning the palette you asked for with that many colorsZone 1
Zone 2
Zone 3
Zone 4
Zone 5
Zone 1
Zone 2
Zone 3
Zone 4
Zone 5
Zone 1
Zone 5