diff --git a/DESCRIPTION b/DESCRIPTION index b2f5df39a96da0ab467ea019dc4e86467ab327c6..710083766a7f7fb8f8304ac7b99b3dd96f6c5ce5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: airGR Type: Package Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling -Version: 1.4.2.7 +Version: 1.4.2.8 Date: 2019-12-10 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), diff --git a/NEWS.md b/NEWS.md index 9119f0952d00591c2e8414b3769af5aff4fe3c3f..bf5d743491257ee1752d6431cf73663816815aaf 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,7 +2,7 @@ -### 1.4.2.7 Release Notes (2019-12-10) +### 1.4.2.8 Release Notes (2019-12-10) #### New features diff --git a/man/Imax.Rd b/man/Imax.Rd new file mode 100644 index 0000000000000000000000000000000000000000..41d2a692734e8c9843566bcbacb3f918c6ab4c25 --- /dev/null +++ b/man/Imax.Rd @@ -0,0 +1,103 @@ +\encoding{UTF-8} + + +\name{Imax} +\alias{Imax} + + +\title{Compute the maximum capacity of the GR5H interception store} + + +\usage{ +Imax(InputsModel, RunOptions, Param) +} + + +\arguments{ +\item{InputsModel}{[object of class \emph{InputsModel}] see \code{\link{CreateInputsModel}} for details} + +\item{IndPeriod_Run}{numeric] index of period to be used for the model run [-]} + +\item{TestedValues}{[numeric] vector of tested Imax values} +} + + +\value{ +Choosen Imax value [mm]. +} + + +\description{ +Function which performs a single run for the GR4J daily lumped model over the test period. +} + + +\details{ +For further details on the model, see the references section. +For further details on the argument structures and initialisation options, see \code{\link{CreateRunOptions}}. +\cr +\cr +\if{html}{\figure{diagramGR4J-EN.png}{options: width="60\%" alt="Figure: diagramGR4J-EN.png"}} +\if{latex}{\figure{diagramGR4J-EN.pdf}{options: width=6cm}} +} + + +\examples{ +library(airGR) + +## loading catchment data +data(L0123001) + +## preparation of the InputsModel object +InputsModel <- CreateInputsModel(FUN_MOD = RunModel_GR5H, DatesR = BasinObs$DatesR, + Precip = BasinObs$P, PotEvap = BasinObs$E) + +## run period selection +Ind_Run <- seq(which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1990-01-01"), + which(format(BasinObs$DatesR, format = "\%Y-\%m-\%d")=="1999-12-31")) + +## Imax compuattion +Imax <- Imax(InputsModel = InputsModel, IndPeriod_Run = Ind_Run, + TestedValues = seq(from, 0.1, to 3, by = 1)) + +## preparation of the RunOptions object +RunOptions <- CreateRunOptions(FUN_MOD = RunModel_GR5H, Imax = Imax, + InputsModel = InputsModel, IndPeriod_Run = Ind_Run) + +## simulation +Param <- c(X1 = 680.673, X2 = -0.255, X3 = 197.651, X4 = 2.384, X5 = 0.174) +OutputsModel <- RunModel_GR5H(InputsModel = InputsModel, + RunOptions = RunOptions, Param = Param) + +## results preview +plot(OutputsModel, Qobs = BasinObs$Qmm[Ind_Run]) + +## efficiency criterion: Nash-Sutcliffe Efficiency +InputsCrit <- CreateInputsCrit(FUN_CRIT = ErrorCrit_NSE, InputsModel = InputsModel, + RunOptions = RunOptions, Obs = BasinObs$Qmm[Ind_Run]) +OutputsCrit <- ErrorCrit_NSE(InputsCrit = InputsCrit, OutputsModel = OutputsModel) +} + + +\author{ +Andrea Ficchi, Guillaume Thirel, Olivier Delaigue +} + + +\references{ +Ficchi, A. (2017). + An adaptive hydrological model for multiple time-steps: + Diagnostics and improvements based on fluxes consistency. + PhD thesis, Irstea (Antony), GRNE (Paris), France. +\cr\cr +Ficchi, A., C. Perrin and V. Andréassian (2019). + Hydrological modelling at multiple sub-daily time steps: model improvement via flux-matching. + Journal of Hydrology, 575, 1308-1327. doi: https://doi.org/10.1016/j.jhydrol.2019.05.084. +} + + +\seealso{ +\code{\link{RunModel_GR5H}}, +\code{\link{CreateInputsModel}}, \code{\link{CreateRunOptions}}. +} +