Skip to contents

Calculate Rain Events

Usage

calculate_rainevent_stats(
  results_system,
  col_eventsep = "total_runoff",
  aggregation_function = "sum",
  signalThreshold = 0,
  eventSeparationTime = 6 * 3600,
  ...
)

Arguments

results_system

data frame as retrieved by get_results

col_eventsep

column to be used for event separation (default: "total_runoff")

aggregation_function

function to be used for aggregation and passed to getEventStatistics (default: "sum")

signalThreshold

passed to getEvents, Value that needs to be exceeded (signalComparisonOperator == "gt") or reached (signalComparisonOperator == "ge") by the rain heights (or intensities) in order to be counted as a "signal". default: 0

eventSeparationTime

eventSeparationTime passed to getEvents (default: 6*3600)

...

additional arguments passed to getEvents

Value

tibble with statistics for all rain events

Examples

if (FALSE) {
path_out_file <- "path-to-my-swmm-output-file"
results_system <- kwb.swmm::get_results(path_out = path_out_file)
rainevent_stats <- calculate_rainevent_stats(results_system,
                           aggregation_function = "sum",
                           signalThreshold = 0,
                           eventSeparationTime = 6*3600)
}