View source: R/function_PlotBasinOutput.R
PlotBasinOutput | R Documentation |
Plot a standard suite of time series plots from a basin output file, typically used for model performance inspection and/or during manual calibration
PlotBasinOutput(
x,
filename,
driver = c("default", "pdf", "png", "screen"),
timestep = attr(x, "timestep"),
hype.vars = "all",
vol.err = TRUE,
log.q = FALSE,
start.mon = 1,
from = 1,
to = nrow(x),
date.format = "",
name = "",
area = NULL,
subid = attr(x, "subid"),
gd = NULL,
bd = NULL,
ylab.t1 = "Conc."
)
x |
Data frame, with column-wise equally-spaced time series of HYPE variables. Date-times in
|
filename |
String, file name for plotting to file device, see argument |
driver |
String, device driver name, one of |
timestep |
Character string, timestep of |
hype.vars |
Either a keyword string or a character vector of HYPE output variables. User-specified selection of HYPE variables
to plot. Default ( |
vol.err |
Logical, if |
log.q |
Logical, y-axis scaling for flow duration curve and discharge time series, set to |
start.mon |
Integer between 1 and 12, starting month of the hydrological year. For runoff regime plot, see also
|
from , to |
Integer or date string of format \
interpreted as row indices of |
date.format |
String format for x-axis dates/times. See |
name |
Character string, name to be printed on the plot. |
area |
Numeric, upstream area of sub-basin in m^2. Required for calculation of accumulated volume error. Optional argument,
either this or arguments |
subid |
Integer, HYPE SUBID of a target sub-catchment (must exist in |
gd |
A data frame, containing 'SUBID' and 'MAINDOWN' columns, e.g. an imported 'GeoData.txt' file. Mandatory with argument
|
bd |
A data frame, containing 'BRANCHID' and 'SOURCEID' columns, e.g. an imported 'BranchData.txt' file. Optional with argument
|
ylab.t1 |
String or |
PlotBasinOutput
plots a suite of time series along with a flow duration curve, a flow regime plot, and a selection of
goodness-of-fit measures from an imported HYPE basin output file. The function selects from a range of "known" variables, and plots
those which are available in the user-supplied basin output. It is mostly meant as a support tool during calibration, manual or
automatic, providing a quick and comprehensive overview of model dynamics in a subbasin of interest.
HYPE outputs which are known to PlotBasinOutput
include:
precipitation
air temperature
discharge
lake water level
water temperature
evapotranspiration
snow water equivalent
sub-surface storage components
nitrogen concentrations
phosphorus concentrations
suspended sediment concentrations
total sediment concentrations
tracer concentration
Below a complete list of HYPE variables known to the function in HYPE info.txt format, ready to copy-paste into an info.txt file. For a detailed description of the variables, see the HYPE online documentation.
basinoutput variable upcprf upcpsf temp upepot upevap cout rout soim sm13 upsmfp snow upcprc cct2 ret2 ccin rein ccon reon cctn retn
ccsp resp ccpp repp cctp retp wcom wstr ccss ress ccts rets cct1 ret1
Device dimensions are hard-coded to a width of 15 inches and height depending on the number of plotted time series. When plotting
to a screen device, a maximum height of 10 inches is enforced in order to prevent automatic resizing with slow redrawing.
PlotBasinOutput
throws a warning if the plot height exceeds 10 inches, which can lead to overlapping plot elements. On screens with
less than 10 inch screen, redrawing is inhibited, which can lead to an empty plot. The recommended solution for both effects
is to plot to pdf or png file devices instead.
Returns a multi-panel plot in a new graphics device.
PlotBasinSummary
, PlotAnnualRegime
, PlotDurationCurve
, ReadBasinOutput
# Source data, HYPE basin output with a number of result variables
te1 <- ReadBasinOutput(filename = system.file("demo_model",
"results","0003587.txt", package = "HYPEtools"))
te2 <- ReadGeoData(filename = system.file("demo_model",
"GeoData.txt", package = "HYPEtools"))
## Not run:
# Plot selected water variables on screen device
PlotBasinOutput(x = te1, gd = te2, driver = "screen",hype.vars = c("cout", "rout",
"snow", "upcprf", "upcpsf"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.