Plotting of mass balance time series

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

### 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)
#> 1. Step: Create vs2dh.fil...Done! #> #> #> 2. Step: Run model...finished after 0.0 seconds #> #> 4. Step: Import model results...Done! #> #> Print warnings during simulation (vs2dh.out): #> Line: 28 ::: STOP SOLUTION IF MAXIMUM NO. OF ITERATIONS EXCEEDED IN ANY TIME STEP? T #> Line: 212 ::: DATA FOR RECHARGE PERIOD 1 #> Line: 228 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 2 #> Line: 229 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 3 #> Line: 230 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 4 #> Line: 231 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 5 #> Line: 232 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 6 #> Line: 233 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 7 #> Line: 234 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 8 #> Line: 235 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 9 #> Line: 236 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 10 #> Line: 237 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 11 #> Line: 238 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 12 #> Line: 239 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 13 #> Line: 240 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 14 #> Line: 241 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 15 #> Line: 242 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 16 #> Line: 243 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 17 #> Line: 244 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 18 #> Line: 245 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 19 #> Line: 246 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 20 #> Line: 247 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 21 #> Line: 248 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 22 #> Line: 249 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 23 #> Line: 250 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 24 #> Line: 251 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 25 #> Line: 252 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 26 #> Line: 253 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 27 #> Line: 254 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 28 #> Line: 255 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 29 #> Line: 256 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 30 #> Line: 257 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 31 #> Line: 258 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 32 #> Line: 259 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 33 #> Line: 260 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 34 #> Line: 261 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 35 #> Line: 262 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 36 #> Line: 263 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 37 #> Line: 264 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 38 #> Line: 265 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 39 #> Line: 266 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 40 #> Line: 267 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 41 #> Line: 268 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 42 #> Line: 269 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 43 #> Line: 270 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 44 #> Line: 271 ::: ******** WARNING --- NODE TYPE OF 0 ASSIGNED TO BOUNDARY NODE 33 45 #> Line: 330 ::: EXCEEDED PERMITTED NUMBER OF ITERATIONS ( = 201) #> Line: 336 ::: EXCEEDED PERMITTED NUMBER OF ITERATIONS ( = 201) #> Line: 354 ::: EXCEEDED PERMITTED NUMBER OF ITERATIONS ( = 201) #> Line: 506 ::: DATA FOR RECHARGE PERIOD 2 #> Line: 599 ::: EXCEEDED PERMITTED NUMBER OF ITERATIONS ( = 201)
#### Checking available parameter names for "paras": validParas <- gsub(pattern="__TOTAL|__RATE|__TIMESTEP|TIME", replacement = "", colnames(res$balance)) validParas
#> [1] "" "FLOW_IN__SP_HEAD" "FLOW_IN__SP_HEAD" #> [4] "FLOW_IN__SP_HEAD" "FLOW_OUT__SP_HEAD" "FLOW_OUT__SP_HEAD" #> [7] "FLOW_OUT__SP_HEAD" "FLOW_IN__SP_FLUX" "FLOW_IN__SP_FLUX" #> [10] "FLOW_IN__SP_FLUX" "FLOW_OUT__SP_FLUX" "FLOW_OUT__SP_FLUX" #> [13] "FLOW_OUT__SP_FLUX" "TOTAL__FLOW_IN" "TOTAL__FLOW_IN" #> [16] "TOTAL__FLOW_IN" "TOTAL__FLOW_OUT" "TOTAL__FLOW_OUT" #> [19] "TOTAL__FLOW_OUT" "EVAPORATION__" "EVAPORATION__" #> [22] "EVAPORATION__" "TRANSPIRATION__" "TRANSPIRATION__" #> [25] "TRANSPIRATION__" "EVAP_plus_TRANS__TRANS" "EVAP_plus_TRANS__TRANS" #> [28] "EVAP_plus_TRANS__TRANS" "FLUID__STORAGE" "FLUID__STORAGE" #> [31] "FLUID__STORAGE" "FLUID__VOL_BAL" "FLUID__VOL_BAL" #> [34] "FLUID__VOL_BAL" "TOTAL__ENERGY_IN" "TOTAL__ENERGY_IN" #> [37] "TOTAL__ENERGY_IN" "TOTAL__ENERGY_OUT" "TOTAL__ENERGY_OUT" #> [40] "TOTAL__ENERGY_OUT" "ENERGY__STORAGE" "ENERGY__STORAGE" #> [43] "ENERGY__STORAGE" "ENERGY__BALANCE" "ENERGY__BALANCE" #> [46] "ENERGY__BALANCE"
### 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")