Generates a time series plot comparing simulated and observed values (e.g., streamflow) from the outputs of evaluate_swat.
Arguments
- data
data frame. Time series of simulated and observed values, typically one of the outputs from evaluate_swat (daily_data, monthly_data, or annual_data).
- x_label
character. Label for the x-axis. Default is "Time".
- y_label
character. Label for the y-axis. Default is "Q [m3/s]".
- show_legend
logical. Whether to display the legend. Default is TRUE.
See also
Other Performance evaluation:
evaluate_swat(),
fdc_signature(),
gof_metrics(),
pbias_fdc_midsegment(),
pbias_fdc_target_segment(),
plot_fdc(),
plot_mean_annual_cycle()
Examples
tmpdir <- tempdir()
get_swat_example(tmpdir)
rch_file <- file.path(tmpdir, "TxtInOut", "output.rch")
rch_data <- output_rch(
file = rch_file, variable = "FLOW_OUTcms",
target_id = 3, time_step = "daily",
output_start_date = "2011-01-01"
)
observed_data <- tibble::tibble(
Date = qobserved$Date,
value = qobserved$Flow,
target_id = 3
)
evaluation_results <- evaluate_swat(
rch_output = rch_data,
observed_data = observed_data,
target_id = 3,
variable = "FLOW_OUTcms",
metrics = c("NSE","KGE","MAE","PBIAS"),
start_dates = c("2011-01-01","2014-01-01"),
end_dates = c("2013-12-31","2015-12-31")
)
# Plot daily time series of observed vs simulated flow
plot_timeseries(evaluation_results$daily_data)