library(airGRteaching)
## data.frame of observed data
data(L0123001, package = "airGR")
BasinObs2 <- BasinObs[, c("DatesR", "P", "E", "Qmm", "T")]
## Preparation of observed data for modelling when inputs set by using a data.frame
PREP <- PrepGR(ObsDF = BasinObs2, HydroModel = "GR4J", CemaNeige = FALSE)
## Structure of PrepGR object
str(PREP)
## Static plot of observed time series
plot(PREP)
## Dynamic plot of observed time series
dyplot(PREP)
## Preparation of observed data for modelling when inputs set by using independant vectors
PREP <- PrepGR(DatesR = BasinObs2$DatesR, Precip = BasinObs2$P,
PotEvap = BasinObs2$E, Qobs = BasinObs2$Qmm,
HydroModel = "GR4J", CemaNeige = FALSE)
## Preparation of observed data for an ungauged catchment (i.e. no observed discharge available)
## Observed discharge set to NA in the Qobs argument
## or in the 4th column of the data.frame if the ObsDF argument is used
PREP <- PrepGR(DatesR = BasinObs2$DatesR, Precip = BasinObs2$P,
PotEvap = BasinObs2$E, Qobs = NA,
HydroModel = "GR4J", CemaNeige = FALSE)
Run the code above in your browser using DataLab