### see examples of RunModel_GR4J or RunModel_CemaNeigeGR4J functions
### to understand how the example datasets have been prepared
## loading examples dataset for GR4J and GR4J + CemaNeige
data(exampleSimPlot)
### Qobs and outputs from GR4J and GR4J + CemaNeige models
str(simGR4J, max.level = 1)
str(simCNGR4J, max.level = 1)
### default dashboard (which = "synth")
## GR models whithout CemaNeige
plot(simGR4J$OutputsModel, Qobs = simGR4J$Qobs)
## GR models whith CemaNeige ("Temp" and "SnowPack" added)
plot(simCNGR4J$OutputsModel, Qobs = simCNGR4J$Qobs)
### "Error" and "CorQQ" plots cannot be display whithout Qobs
plot(simGR4J$OutputsModel, which = "all", Qobs = simGR4J$Qobs)
plot(simGR4J$OutputsModel, which = "all", Qobs = NULL)
### complex plot arrangements
plot(simGR4J$OutputsModel, Qobs = simGR4J$Qobs,
which = c("Flows", "Regime", "CumFreq", "CorQQ"),
LayoutMat = matrix(c(1, 2, 3, 1, 4, 4), ncol = 2),
LayoutWidths = c(1.5, 1),
LayoutHeights = c(0.5, 1, 1))
### customize x-axis on time series plot
FunAxisTS <- function(x) {
axis.POSIXct(side = 1, x = x$DatesR,
at = pretty(x$DatesR, n = 10),
format = "%Y-%m-%d")
}
plot(simGR4J$OutputsModel, Qobs = simGR4J$Qobs, AxisTS = FunAxisTS)
### add a main title
## the whole list of settable par's
opar <- par(no.readonly = TRUE)
## define outer margins and a title inside it
par(oma = c(0, 0, 3, 0))
plot(simGR4J$OutputsModel, Qobs = simGR4J$Qobs)
title(main = "GR4J outputs", outer = TRUE, line = 1.2, cex.main = 1.4)
## reset original par
par(opar)
Run the code above in your browser using DataLab