Skip to contents

Aggregate and plot simulated variables saved in hru_pw_day

Usage

plot_hru_var(sim_verify, hru_id, var, period = "day", fn_summarize = "mean")

Arguments

sim_verify

Simulation output of the function run_swat_verification(). To plot the heat units at least the output option outputs = 'mgt' must be set in run_swat_verification().

hru_id

Numeric vector with HRU ids for which variables should be plotted.

var

Character vector that defines the variable names that are plotted.

period

(optional) character describing, which time interval to display (default is "day", other examples are "week", "month", etc). Default = "day"

fn_summarize

(optional) function to recalculate to time interval (default is "mean", other examples are "median", "sum", etc). Default = "mean"

Value

plotly figure object

Examples

if (FALSE) { # \dontrun{
id <- get_hru_id_by_attribute(sim_nostress, "wwht_lum")
plot_hru_var(sim_nostress, sample(id$id, 10), "lai")
} # }