vs2dh.plotMassBalance: Plotting of mass balance time series

Description Usage Arguments Value Examples

View source: R/vs2dhPlot.R

Description

Plotting of mass balance time series

Usage

1
2
3
vs2dh.plotMassBalance(paras = c("TOTAL__FLOW_IN", "TOTAL__FLOW_OUT",
  "FLUID__STORAGE"), paraUnit = "TIMESTEP", data,
  mainLabel = "Flow mass balance", ...)

Arguments

paras

vector with at least one or multiple parameters in model results, for checking available paras run (see example: validParas). The parameter "TIME" is not allowed!

paraUnit

TIMESTEP RATE or

data

as returned by vs2di.run()$balance

mainLabel

a text to be written above the plot

...

further parameters passed to xyplot()

Value

Temporal time series plot of mass balance variables

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
### Location of example vs2dh model contained in "kwb.vs2dh package"
model.path <- system.file("extdata", "vs2dh_example/tutorial2", package = "kwb.vs2dh")
res <- vs2di.run(model.path = model.path)  
#### Checking available parameter names for "paras":
validParas <- gsub(pattern="__TOTAL|__RATE|__TIMESTEP|TIME", 
                   replacement = "", 
                   colnames(res$balance))
validParas 
### Flow mass balance components (inflow, outflow, storage):
vs2dh.plotMassBalance(data=res$balance)  
### Only resulting flow mass balance error (per timestep):
vs2dh.plotMassBalance(paras="FLUID__VOL_BAL", 
                       data = res$balance, 
                     mainLabel = "Flow mass balance error")  
### Energy mass balance components (inflow, outflow, storage):
vs2dh.plotMassBalance(paras=c("TOTAL__ENERGY_IN",
                              "TOTAL__ENERGY_OUT",
                              "ENERGY__STORAGE"),
                              data=res$balance,
                              mainLabel="Energy mass balance") 
### Only resulting energy mass balance error (per timestep):
vs2dh.plotMassBalance(paras="ENERGY__BALANCE",
                       data = res$balance,
                    mainLabel = "Energy mass balance error")   

KWB-R/kwb.vs2dh documentation built on Sept. 10, 2019, 12:20 p.m.