Skip to contents

Convert LID config to SWMM LID controls

Usage

lidconfig_to_swmm(df)

Arguments

df

data frame for a single scenario of a LID (as returned by read_scenarios)

Value

data frame with SWMM LID controls

Examples

scenarios <- keys.lid::read_scenarios()
unique(scenarios$lid_name_tidy)
#> [1] "bioretention_cell"  "green_roof"         "permeable_pavement"
#> [4] "rain_barrel"       
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
#> [1] "45mm.per.hour_with-drainage"
lid_selected_scenario <- lid_selected[lid_selected$scenario_name == scenario_name,]
lid_controls <- lidconfig_to_swmm(lid_selected_scenario)
str(lid_controls)
#> tibble [5 × 9] (S3: tbl_df/tbl/data.frame)
#>  $ Name      : chr [1:5] "permeable_pavement.45mm.per.hour_with-drainage" "permeable_pavement.45mm.per.hour_with-drainage" "permeable_pavement.45mm.per.hour_with-drainage" "permeable_pavement.45mm.per.hour_with-drainage" ...
#>  $ Type/Layer: chr [1:5] "PP" "SURFACE" "PAVEMENT" "STORAGE" ...
#>  $ Par1      : num [1:5] NA 0 80 350 1
#>  $ Par2      : num [1:5] NA 0 0.165 0.3 0.4
#>  $ Par3      : num [1:5] NA 0.12 0.85 1.8 0
#>  $ Par4      : num [1:5] NA 2.5 45 0 0
#>  $ Par5      : num [1:5] NA 5 0 NA 0
#>  $ Par6      : num [1:5] NA NA 0 NA NA
#>  $ Par7      : num [1:5] NA NA 0 NA NA