From 01f5720d417246abeef17e669a0957f3bf9c12e6 Mon Sep 17 00:00:00 2001 From: Delaigue Olivier <olivier.delaigue@irstea.priv> Date: Tue, 22 May 2018 12:18:50 +0200 Subject: [PATCH] v1.0.10.1 GR2M now returns more explicit precipitation outputs names --- DESCRIPTION | 2 +- NEWS.rmd | 2 +- R/CreateRunOptions.R | 2 +- R/RunModel_GR2M.R | 2 +- man/RunModel_GR2M.Rd | 34 +++++++++++++++++++++++++++------- src/frun_GR2M.f | 6 +++--- 6 files changed, 34 insertions(+), 14 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 9bcac62f..6dcf9055 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.0.10.0 +Version: 1.0.10.1 Date: 2018-05-22 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl")), diff --git a/NEWS.rmd b/NEWS.rmd index de0315e2..26be15f8 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -14,7 +14,7 @@ output: -### 1.0.10.0 Release Notes (2018-05-22) +### 1.0.10.1 Release Notes (2018-05-22) ____________________________________________________________________________________ diff --git a/R/CreateRunOptions.R b/R/CreateRunOptions.R index 873921ba..3ca652f5 100644 --- a/R/CreateRunOptions.R +++ b/R/CreateRunOptions.R @@ -206,7 +206,7 @@ CreateRunOptions <- function(FUN_MOD, InputsModel, IndPeriod_WarmUp = NULL, IndP Outputs_all <- c(Outputs_all,"PotEvap", "Precip", "Prod", "Pn", "Ps", "AE", "Perc", "PR", "Q9", "Q1", "Rout", "Exch", "AExch1", "AExch2", "AExch", "QR", "QRExp", "Exp", "QD", "Qsim"); } if(identical(FUN_MOD,RunModel_GR2M)){ - Outputs_all <- c(Outputs_all,"PotEvap","Precip","AE","Perc","P3","Exch","Prod","Rout","Qsim"); } + Outputs_all <- c(Outputs_all,"PotEvap", "Precip", "AE", "Pn", "Perc", "PR", "Exch", "Prod", "Rout", "Qsim"); } if(identical(FUN_MOD,RunModel_GR1A)){ Outputs_all <- c(Outputs_all,"PotEvap","Precip","Qsim"); } if("CemaNeige" %in% ObjectClass){ diff --git a/R/RunModel_GR2M.R b/R/RunModel_GR2M.R index f767bd21..83fc84de 100644 --- a/R/RunModel_GR2M.R +++ b/R/RunModel_GR2M.R @@ -1,7 +1,7 @@ RunModel_GR2M <- function(InputsModel,RunOptions,Param){ NParam <- 2; - FortranOutputs <- c("PotEvap","Precip","AE","Perc","P3","Exch","Prod","Rout","Qsim"); + FortranOutputs <- c("PotEvap", "Precip", "AE", "Pn", "Perc", "PR", "Exch", "Prod", "Rout", "Qsim") ##Arguments_check if(inherits(InputsModel,"InputsModel")==FALSE){ stop("InputsModel must be of class 'InputsModel' \n"); return(NULL); } diff --git a/man/RunModel_GR2M.Rd b/man/RunModel_GR2M.Rd index bb320895..c16a1b87 100644 --- a/man/RunModel_GR2M.Rd +++ b/man/RunModel_GR2M.Rd @@ -20,8 +20,8 @@ RunModel_GR2M(InputsModel, RunOptions, Param) \item{Param}{[numeric] vector of 2 parameters \tabular{ll}{ -GR2M X1 \tab production store capacity [mm] \cr -GR2M X2 \tab groundwater exchange coefficient [-] \cr +GR2M X1 \tab production store capacity [mm] \cr +GR2M X2 \tab groundwater exchange coefficient [-] \cr }} } @@ -29,11 +29,31 @@ GR2M X2 \tab groundwater exchange coefficient [-] \cr \value{ [list] list containing the function outputs organised as follows: \tabular{ll}{ - \emph{$DatesR } \tab [POSIXlt] series of dates \cr - \emph{$PotEvap } \tab [numeric] series of input potential evapotranspiration [mm/month] \cr - \emph{$Precip } \tab [numeric] series of input total precipitation [mm/month] \cr - \emph{$Qsim } \tab [numeric] series of simulated discharge [mm/month] \cr - \emph{$StateEnd} \tab [numeric] states at the end of the run (production store level and routing store level) [mm], \cr\tab see \code{\link{CreateIniStates}} for more details \cr + \emph{$DatesR } \tab [POSIXlt] series of dates \cr + \emph{$PotEvap } \tab [numeric] series of input potential evapotranspiration [mm/month] \cr + \emph{$Precip } \tab [numeric] series of input total precipitation [mm/month] \cr + \emph{$Qsim } \tab [numeric] series of simulated discharge [mm/month] \cr + \emph{$StateEnd} \tab [numeric] states at the end of the run (production store level and routing store level) [mm], \cr\tab see \code{\link{CreateIniStates}} for more details \cr + } + (refer to the provided references or to the package source code for further details on these model outputs) +} + + +\value{ +[list] list containing the function outputs organised as follows: + \tabular{ll}{ + \emph{$DatesR } \tab [POSIXlt] series of dates \cr + \emph{$PotEvap } \tab [numeric] series of input potential evapotranspiration [mm/month] \cr + \emph{$Precip } \tab [numeric] series of input total precipitation [mm/month] \cr + \emph{$AE } \tab [numeric] series of actual evapotranspiration [mm/month] \cr + \emph{$Pn } \tab [numeric] series of net rainfall (P1) [mm/month] \cr + \emph{$Perc } \tab [numeric] series of percolation (P2) [mm/month] \cr + \emph{$PR } \tab [numeric] series of PR=Pn+Perc (P3) [mm/month] \cr + \emph{$Exch } \tab [numeric] series of potential exchange between catchments [mm/month] \cr + \emph{$Prod } \tab [numeric] series of production store level [mm] \cr + \emph{$Rout } \tab [numeric] series of routing store level [mm] \cr + \emph{$Qsim } \tab [numeric] series of simulated discharge [mm/month] \cr + \emph{$StateEnd} \tab [numeric] states at the end of the run (res. levels, UH1 levels, UH2 levels) [mm], \cr\tab see \code{\link{CreateIniStates}} for more details \cr } (refer to the provided references or to the package source code for further details on these model outputs) } diff --git a/src/frun_GR2M.f b/src/frun_GR2M.f index 99dd8920..2cadd865 100644 --- a/src/frun_GR2M.f +++ b/src/frun_GR2M.f @@ -169,9 +169,9 @@ C Variables storage MISC( 1)=E ! PE ! [numeric] observed potential evapotranspiration [mm/month] MISC( 2)=P ! Precip ! [numeric] observed total precipitation [mm/month] MISC( 3)=AE ! AE ! [numeric] actual evapotranspiration [mm/month] - MISC( 4)=P1 ! P1 ! [numeric] net rainfall (P1) [mm/month] - MISC( 5)=P2 ! P2 ! [numeric] percolation (P2) [mm/month] - MISC( 6)=P3 ! P3 ! [numeric] P3=P1+P2 [mm/month] + MISC( 4)=P1 ! Pn ! [numeric] net rainfall (P1) [mm/month] + MISC( 5)=P2 ! Perc ! [numeric] percolation (P2) [mm/month] + MISC( 6)=P3 ! PR ! [numeric] P3=P1+P2 [mm/month] MISC( 7)=EXCH ! EXCH ! [numeric] groundwater exchange (EXCH) [mm/month] MISC( 8)=St(1) ! Prod ! [numeric] production store level (St(1)) [mm] MISC( 9)=St(2) ! Rout ! [numeric] routing store level (St(2)) [mm] -- GitLab