graphDWB: Graph for DWB model results

Description Usage Arguments Details Value Author(s) Examples

View source: R/graphDWB.R

Description

This function dynamically graphs the inputs and results of the DWBmodelUN.

Usage

1
graphDWB(var, tp, main, ...)

Arguments

var

It is a list that contains a time series of type ts which you want to graph.
For (tp = 2), it is recommended to list the simulated runoff series first, followed by the observed.
For (tp = 3), it must first contain the observed precipitation series, followed by the simulated runoff series and finally the observed runoff.
For (tp = 4), it must first contain the observed precipitation series, followed by the evapotranspiration series and finally the runoff time series.

tp

Variable which is defined to choose the type of graph.

main

Main title for the graph.

...

Other parameters of the dygraphs package.

Details

It has three types of graphs:

Value

Prints a dynamic graph according to the requirements.

Author(s)

Carolina Vega Viviescas <cvegav@unal.edu.co>
Pedro Felipe Arboleda Obando <pfarboledao@unal.edu.co>
David Zamora <dazamoraa@unal.edu.co>
Nicolas Duque Gardeazabal <nduqueg@unal.edu.co>

Water Resources Engineering Research Group - GIREH Universidad Nacional de Colombia - sede Bogota

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
25
26
27
28
29
30
31
32
# Example 1
data(P_sogamoso)
P.est <- ts(c(t(P_sogamoso[1, -2:-1])), star = c(2001, 1), frequency = 12)
var <- list("Precipitation" = P.est)

graphDWB(var, tp = 1, main = "Precipitation Lat:7.0 Lon:-72.94")

# Example 2
data(simDWB.sogamoso, EscSogObs)
runoff.sim <- ts(simDWB.sogamoso[,25], star = c(2001, 1), frequency = 12)
runoff.obs <- ts(EscSogObs[,25] , star = c(2001, 1), frequency = 12)
var <- list("Runoff.sim" = runoff.sim, "Runoff.obs" = runoff.obs)

graphDWB(var, tp = 2, main = "Runoff at basin closure: Gauge 24067010")

# Example 3
data(P_sogamoso, simDWB.sogamoso, EscSogObs)
P.est <- ts(c(t(P_sogamoso[1, 15:110])), star = c(2002, 1), frequency = 12)
runoff.sim <- ts(simDWB.sogamoso[13:108 ,25], star = c(2002, 1), frequency = 12)
runoff.obs <- ts(EscSogObs[13:108 ,25] , star = c(2002, 1), frequency = 12)
var <- list("Precipitation" = P.est,"Runoff.sim" = runoff.sim, "Runoff.obs" = runoff.obs)

graphDWB(var, tp = 3, main = "DWB results at Sogamoso Basin closure point")

# Example 4
data(P_sogamoso, PET_sogamoso, simDWB.sogamoso)
P <- ts(c(t(P_sogamoso[1, -2:-1])), star = c(2001, 1), frequency = 12)
PET <- ts(c(t(PET_sogamoso[1, -2:-1])), star = c(2001, 1), frequency = 12)
runoff.sim <- ts(simDWB.sogamoso[ ,25], star = c(2001, 1), frequency = 12)
var <- list("P" = P,"PET" = PET, "Runoff.sim" = runoff.sim)

graphDWB(var, tp = 4, main = "General Comparison Sogamoso Basin")

dazamora/DWBmodelUN documentation built on Aug. 29, 2020, 11:41 a.m.