Commit 4447886d authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

Version 0.8.1.2

parent 284f572d
......@@ -2,15 +2,17 @@ Package: airGR
Type: Package
Title: Modelling tools used at Irstea-HBAN (France), including GR4J and
CemaNeige
Version: 0.8.1.0
Date: 2015-10-27
Version: 0.8.1.2
Date: 2015-21-08
Author: Laurent CORON
Maintainer: Laurent CORON, Olivier DELAIGUE
<olivier.delaigue@irstea.fr>
Maintainer: Laurent CORON, Olivier DELAIGUE <airGR@irstea.fr>
Depends: R (>= 3.0.1)
Description: This package brings into R the hydrological modelling tools used at Irstea-HBAN (France).
The package includes several conceptual rainfall-runoff models and the associated functions
for their calibration and evaluation (GR4H, GR4J, GR5J, GR6J, GR2M, GR1A and CemaNeige).
Use help(airGR) for package description.
Description: This package brings into R the hydrological modelling tools used
at Irstea-HBAN (France). The package includes several conceptual
rainfall-runoff models and the associated functions for their calibration
and evaluation (GR4H, GR4J, GR5J, GR6J, GR2M, GR1A and CemaNeige). Use
help(airGR) for package description.
License: GPL-2
Packaged: 2015-10-27 18:41:47 UTC; H61970
RoxygenNote: 5.0.1
NeedsCompilation: yes
Packaged: 2015-12-08 18:06:18 UTC; H61970
# Generated by roxygen2 (4.1.1): do not edit by hand
# Generated by roxygen2: do not edit by hand
export(Calibration)
export(Calibration_HBAN)
......
......@@ -141,6 +141,7 @@ CreateInputsModel <- function(FUN_MOD,DatesR,Precip,PotEvap=NULL,TempMean=NULL,T
Precip <- Precip[Select]; PotEvap <- PotEvap[Select]; }
if("CemaNeige" %in% ObjectClass){
Precip <- Precip[Select]; TempMean <- TempMean[Select]; if(!is.null(TempMin) & !is.null(TempMax)){ TempMin <- TempMin[Select]; TempMax <- TempMax[Select]; } }
DatesR <- DatesR[Select];
WTxt <- paste(WTxt,"\t -> data were trunced to keep the most recent available time-steps \n",sep="");
WTxt <- paste(WTxt,"\t -> ",length(Select)," time-steps were kept \n",sep="");
if(!is.null(WTxt) & !quiet){ warning(WTxt); }
......
......@@ -5,7 +5,7 @@
#' @author Laurent Coron (June 2014)
#' @seealso \code{\link{ErrorCrit_RMSE}}, \code{\link{ErrorCrit_NSE}}, \code{\link{ErrorCrit_KGE}}
#' @example tests/example_ErrorCrit.R
#' @useDynLib airgr
#' @useDynLib airGR
#' @encoding UTF-8
#' @export
#_FunctionInputs__________________________________________________________________________________________________
......
......@@ -5,7 +5,7 @@
#' @author Laurent Coron (June 2014)
#' @seealso \code{\link{RunModel_GR4J}}, \code{\link{RunModel_CemaNeigeGR4J}}, \code{\link{CreateInputsModel}}, \code{\link{CreateRunOptions}}.
#' @example tests/example_RunModel.R
#' @useDynLib airgr
#' @useDynLib airGR
#' @encoding UTF-8
#' @export
#_FunctionInputs__________________________________________________________________________________________________
......
......@@ -15,7 +15,7 @@
#' Part 2 - Sensitivity analysis of the Cemaneige snow accounting routine on 380 catchments, Journal of Hydrology, doi:10.1016/j.jhydrol.2014.04.058.
#' @seealso \code{\link{RunModel_CemaNeigeGR4J}}, \code{\link{CreateInputsModel}}, \code{\link{CreateRunOptions}}.
#' @example tests/example_RunModel_CemaNeige.R
#' @useDynLib airgr
#' @useDynLib airGR
#' @encoding UTF-8
#' @export
#_FunctionInputs__________________________________________________________________________________________________
......@@ -78,7 +78,7 @@ RunModel_CemaNeige <- function(InputsModel,RunOptions,Param){
##Call_DLL_CemaNeige_________________________
for(iLayer in 1:NLayers){
StateStartCemaNeige <- RunOptions$IniStates[ (2*(iLayer-1)+1):(2*(iLayer-1)+2) ];
RESULTS <- .Fortran("frun_cemaneige",PACKAGE="airgr",
RESULTS <- .Fortran("frun_cemaneige",PACKAGE="airGR",
##inputs
LInputs=as.integer(length(IndPeriod1)), ### length of input and output series
InputsPrecip=InputsModel$LayerPrecip[[iLayer]][IndPeriod1], ### input series of total precipitation [mm/d]
......
......@@ -19,7 +19,7 @@
#' @seealso \code{\link{RunModel_CemaNeigeGR5J}}, \code{\link{RunModel_CemaNeigeGR6J}}, \code{\link{RunModel_GR4J}},
#' \code{\link{CreateInputsModel}}, \code{\link{CreateRunOptions}}.
#' @example tests/example_RunModel_CemaNeigeGR4J.R
#' @useDynLib airgr
#' @useDynLib airGR
#' @encoding UTF-8
#' @export
#_FunctionInputs__________________________________________________________________________________________________
......@@ -107,7 +107,7 @@ RunModel_CemaNeigeGR4J <- function(InputsModel,RunOptions,Param){
##Call_DLL_CemaNeige_________________________
for(iLayer in 1:NLayers){
StateStartCemaNeige <- RunOptions$IniStates[ (NStatesMod+2*(iLayer-1)+1):(NStatesMod+2*(iLayer-1)+2) ];
RESULTS <- .Fortran("frun_cemaneige",PACKAGE="airgr",
RESULTS <- .Fortran("frun_cemaneige",PACKAGE="airGR",
##inputs
LInputs=LInputSeries, ### length of input and output series
InputsPrecip=InputsModel$LayerPrecip[[iLayer]][IndPeriod1], ### input series of total precipitation [mm/d]
......@@ -155,7 +155,7 @@ RunModel_CemaNeigeGR4J <- function(InputsModel,RunOptions,Param){
}
##Call_fortan
RESULTS <- .Fortran("frun_gr4j",PACKAGE="airgr",
RESULTS <- .Fortran("frun_gr4j",PACKAGE="airGR",
##inputs
LInputs=LInputSeries, ### length of input and output series
InputsPrecip=CatchMeltAndPliq, ### input series of total precipitation [mm/d]
......
......@@ -21,7 +21,7 @@
#' @seealso \code{\link{RunModel_CemaNeigeGR4J}}, \code{\link{RunModel_CemaNeigeGR6J}}, \code{\link{RunModel_GR5J}},
#' \code{\link{CreateInputsModel}}, \code{\link{CreateRunOptions}}.
#' @example tests/example_RunModel_CemaNeigeGR5J.R
#' @useDynLib airgr
#' @useDynLib airGR
#' @encoding UTF-8
#' @export
#_FunctionInputs__________________________________________________________________________________________________
......@@ -109,7 +109,7 @@ RunModel_CemaNeigeGR5J <- function(InputsModel,RunOptions,Param){
##Call_DLL_CemaNeige_________________________
for(iLayer in 1:NLayers){
StateStartCemaNeige <- RunOptions$IniStates[ (NStatesMod+2*(iLayer-1)+1):(NStatesMod+2*(iLayer-1)+2) ];
RESULTS <- .Fortran("frun_cemaneige",PACKAGE="airgr",
RESULTS <- .Fortran("frun_cemaneige",PACKAGE="airGR",
##inputs
LInputs=LInputSeries, ### length of input and output series
InputsPrecip=InputsModel$LayerPrecip[[iLayer]][IndPeriod1], ### input series of total precipitation [mm/d]
......@@ -157,7 +157,7 @@ RunModel_CemaNeigeGR5J <- function(InputsModel,RunOptions,Param){
}
##Call_fortan
RESULTS <- .Fortran("frun_gr5j",PACKAGE="airgr",
RESULTS <- .Fortran("frun_gr5j",PACKAGE="airGR",
##inputs
LInputs=LInputSeries, ### length of input and output series
InputsPrecip=CatchMeltAndPliq, ### input series of total precipitation [mm/d]
......
......@@ -19,7 +19,7 @@
#' @seealso \code{\link{RunModel_CemaNeigeGR4J}}, \code{\link{RunModel_CemaNeigeGR5J}}, \code{\link{RunModel_GR6J}},
#' \code{\link{CreateInputsModel}}, \code{\link{CreateRunOptions}}.
#' @example tests/example_RunModel_CemaNeigeGR6J.R
#' @useDynLib airgr
#' @useDynLib airGR
#' @encoding UTF-8
#' @export
#_FunctionInputs__________________________________________________________________________________________________
......@@ -111,7 +111,7 @@ RunModel_CemaNeigeGR6J <- function(InputsModel,RunOptions,Param){
##Call_DLL_CemaNeige_________________________
for(iLayer in 1:NLayers){
StateStartCemaNeige <- RunOptions$IniStates[ (NStatesMod+2*(iLayer-1)+1):(NStatesMod+2*(iLayer-1)+2) ];
RESULTS <- .Fortran("frun_cemaneige",PACKAGE="airgr",
RESULTS <- .Fortran("frun_cemaneige",PACKAGE="airGR",
##inputs
LInputs=LInputSeries, ### length of input and output series
InputsPrecip=InputsModel$LayerPrecip[[iLayer]][IndPeriod1], ### input series of total precipitation [mm/d]
......@@ -159,7 +159,7 @@ RunModel_CemaNeigeGR6J <- function(InputsModel,RunOptions,Param){
}
##Call_fortan
RESULTS <- .Fortran("frun_gr6j",PACKAGE="airgr",
RESULTS <- .Fortran("frun_gr6j",PACKAGE="airGR",
##inputs
LInputs=LInputSeries, ### length of input and output series
InputsPrecip=CatchMeltAndPliq, ### input series of total precipitation [mm/d]
......
......@@ -11,7 +11,7 @@
#' Mouelhi S. (2003),
#' Vers une chaîne cohérente de modèles pluie-débit conceptuels globaux aux pas de temps pluriannuel, annuel, mensuel et journalier,
#' PhD thesis (in French), ENGREF, Cemagref Antony, France. \cr
#' @useDynLib airgr
#' @useDynLib airGR
#' @encoding UTF-8
#' @export
#_FunctionInputs__________________________________________________________________________________________________
......@@ -56,7 +56,7 @@ RunModel_GR1A <- function(InputsModel,RunOptions,Param){
BOOL_Fortran <- FALSE; if(BOOL_Fortran){
##Call_fortan
RESULTS <- .Fortran("frun_gr1a",PACKAGE="airgr",
RESULTS <- .Fortran("frun_gr1a",PACKAGE="airGR",
##inputs
LInputs=LInputSeries, ### length of input and output series
InputsPrecip=InputsModel$Precip[IndPeriod1], ### input series of total precipitation [mm/y]
......
......@@ -14,7 +14,7 @@
#' Mouelhi, S., C. Michel, C. Perrin and V. Andréassian (2006),
#' Stepwise development of a two-parameter monthly water balance model,
#' Journal of Hydrology, 318(1-4), 200-214, doi:10.1016/j.jhydrol.2005.06.014.
#' @useDynLib airgr
#' @useDynLib airGR
#' @encoding UTF-8
#' @export
#_FunctionInputs__________________________________________________________________________________________________
......@@ -76,7 +76,7 @@ RunModel_GR2M <- function(InputsModel,RunOptions,Param){
}
##Call_fortan
RESULTS <- .Fortran("frun_gr2m",PACKAGE="airgr",
RESULTS <- .Fortran("frun_gr2m",PACKAGE="airGR",
##inputs
LInputs=LInputSeries, ### length of input and output series
InputsPrecip=InputsModel$Precip[IndPeriod1], ### input series of total precipitation [mm/month]
......
......@@ -13,7 +13,7 @@
#' Mathevet, T. (2005),
#' Quels modèles pluie-débit globaux pour le pas de temps horaire ? Développement empirique et comparaison de modèles sur un large échantillon de bassins versants,
#' PhD thesis (in French), ENGREF - Cemagref (Antony), Paris, France.
#' @useDynLib airgr
#' @useDynLib airGR
#' @encoding UTF-8
#' @export
#_FunctionInputs__________________________________________________________________________________________________
......@@ -77,7 +77,7 @@ RunModel_GR4H <- function(InputsModel,RunOptions,Param){
}
##Call_fortan
RESULTS <- .Fortran("frun_gr4h",PACKAGE="airgr",
RESULTS <- .Fortran("frun_gr4h",PACKAGE="airGR",
##inputs
LInputs=LInputSeries, ### length of input and output series
InputsPrecip=InputsModel$Precip[IndPeriod1], ### input series of total precipitation [mm/h]
......
......@@ -13,7 +13,7 @@
#' @seealso \code{\link{RunModel_GR5J}}, \code{\link{RunModel_GR6J}}, \code{\link{RunModel_CemaNeigeGR4J}},
#' \code{\link{CreateInputsModel}}, \code{\link{CreateRunOptions}}.
#' @example tests/example_RunModel_GR4J.R
#' @useDynLib airgr
#' @useDynLib airGR
#' @encoding UTF-8
#' @export
#_FunctionInputs__________________________________________________________________________________________________
......@@ -77,7 +77,7 @@ RunModel_GR4J <- function(InputsModel,RunOptions,Param){
}
##Call_fortan
RESULTS <- .Fortran("frun_gr4j",PACKAGE="airgr",
RESULTS <- .Fortran("frun_gr4j",PACKAGE="airGR",
##inputs
LInputs=LInputSeries, ### length of input and output series
InputsPrecip=InputsModel$Precip[IndPeriod1], ### input series of total precipitation [mm/d]
......
......@@ -15,7 +15,7 @@
#' @seealso \code{\link{RunModel_GR4J}}, \code{\link{RunModel_GR6J}}, \code{\link{RunModel_CemaNeigeGR5J}},
#' \code{\link{CreateInputsModel}}, \code{\link{CreateRunOptions}}.
#' @example tests/example_RunModel_GR5J.R
#' @useDynLib airgr
#' @useDynLib airGR
#' @encoding UTF-8
#' @export
#_FunctionInputs__________________________________________________________________________________________________
......@@ -80,7 +80,7 @@ RunModel_GR5J <- function(InputsModel,RunOptions,Param){
}
##Call_fortan
RESULTS <- .Fortran("frun_gr5j",PACKAGE="airgr",
RESULTS <- .Fortran("frun_gr5j",PACKAGE="airGR",
##inputs
LInputs=LInputSeries, ### length of input and output series
InputsPrecip=InputsModel$Precip[IndPeriod1], ### input series of total precipitation [mm/d]
......
......@@ -13,7 +13,7 @@
#' @seealso \code{\link{RunModel_GR4J}}, \code{\link{RunModel_GR5J}}, \code{\link{RunModel_CemaNeigeGR6J}},
#' \code{\link{CreateInputsModel}}, \code{\link{CreateRunOptions}}.
#' @example tests/example_RunModel_GR6J.R
#' @useDynLib airgr
#' @useDynLib airGR
#' @encoding UTF-8
#' @export
#_FunctionInputs__________________________________________________________________________________________________
......@@ -81,7 +81,7 @@ RunModel_GR6J <- function(InputsModel,RunOptions,Param){
}
##Call_fortan
RESULTS <- .Fortran("frun_gr6j",PACKAGE="airgr",
RESULTS <- .Fortran("frun_gr6j",PACKAGE="airGR",
##inputs
LInputs=LInputSeries, ### length of input and output series
InputsPrecip=InputsModel$Precip[IndPeriod1], ### input series of total precipitation [mm/d]
......
% Generated by roxygen2 (4.1.1): do not edit by hand
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BasinData.R
\docType{data}
\encoding{UTF-8}
......@@ -15,7 +15,7 @@
R-object containing the code, station's name, area and hypsometric curve of the catchment.
}
\examples{
require(airGR)
require(airGR)
data(L0123001)
str(BasinInfo)
}
......
% Generated by roxygen2 (4.1.1): do not edit by hand
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BasinData.R
\docType{data}
\encoding{UTF-8}
......@@ -16,7 +16,7 @@ Times series for L0123001 or L0123002 are at the daily time-step for use with da
Times series for L0123003 are at the hourly time-step for use with hourly models such as GR4H.
}
\examples{
require(airGR)
require(airGR)
data(L0123001)
str(BasinObs)
}
......
% Generated by roxygen2 (4.1.1): do not edit by hand
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Calibration.R
\encoding{UTF-8}
\name{Calibration}
......
% Generated by roxygen2 (4.1.1): do not edit by hand
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Calibration_HBAN.R
\encoding{UTF-8}
\name{Calibration_HBAN}
......
% Generated by roxygen2 (4.1.1): do not edit by hand
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Calibration_optim.R
\encoding{UTF-8}
\name{Calibration_optim}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment