Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
HYCAR-Hydro
airGR
Commits
4447886d
Commit
4447886d
authored
Dec 09, 2015
by
Delaigue Olivier
Browse files
Version 0.8.1.2
parent
284f572d
Changes
53
Show whitespace changes
Inline
Side-by-side
DESCRIPTION
View file @
4447886d
...
...
@@ -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
NAMESPACE
View file @
4447886d
# Generated by roxygen2
(4.1.1)
: do not edit by hand
# Generated by roxygen2: do not edit by hand
export(Calibration)
export(Calibration_HBAN)
...
...
R/CreateInputsModel.R
View file @
4447886d
...
...
@@ -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
);
}
...
...
R/ErrorCrit.R
View file @
4447886d
...
...
@@ -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 air
gr
#' @useDynLib air
GR
#' @encoding UTF-8
#' @export
#_FunctionInputs__________________________________________________________________________________________________
...
...
R/RunModel.R
View file @
4447886d
...
...
@@ -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 air
gr
#' @useDynLib air
GR
#' @encoding UTF-8
#' @export
#_FunctionInputs__________________________________________________________________________________________________
...
...
R/RunModel_CemaNeige.R
View file @
4447886d
...
...
@@ -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 air
gr
#' @useDynLib air
GR
#' @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
=
"air
gr
"
,
RESULTS
<-
.Fortran
(
"frun_cemaneige"
,
PACKAGE
=
"air
GR
"
,
##inputs
LInputs
=
as.integer
(
length
(
IndPeriod1
)),
### length of input and output series
InputsPrecip
=
InputsModel
$
LayerPrecip
[[
iLayer
]][
IndPeriod1
],
### input series of total precipitation [mm/d]
...
...
R/RunModel_CemaNeigeGR4J.R
View file @
4447886d
...
...
@@ -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 air
gr
#' @useDynLib air
GR
#' @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
=
"air
gr
"
,
RESULTS
<-
.Fortran
(
"frun_cemaneige"
,
PACKAGE
=
"air
GR
"
,
##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
=
"air
gr
"
,
RESULTS
<-
.Fortran
(
"frun_gr4j"
,
PACKAGE
=
"air
GR
"
,
##inputs
LInputs
=
LInputSeries
,
### length of input and output series
InputsPrecip
=
CatchMeltAndPliq
,
### input series of total precipitation [mm/d]
...
...
R/RunModel_CemaNeigeGR5J.R
View file @
4447886d
...
...
@@ -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 air
gr
#' @useDynLib air
GR
#' @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
=
"air
gr
"
,
RESULTS
<-
.Fortran
(
"frun_cemaneige"
,
PACKAGE
=
"air
GR
"
,
##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
=
"air
gr
"
,
RESULTS
<-
.Fortran
(
"frun_gr5j"
,
PACKAGE
=
"air
GR
"
,
##inputs
LInputs
=
LInputSeries
,
### length of input and output series
InputsPrecip
=
CatchMeltAndPliq
,
### input series of total precipitation [mm/d]
...
...
R/RunModel_CemaNeigeGR6J.R
View file @
4447886d
...
...
@@ -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 air
gr
#' @useDynLib air
GR
#' @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
=
"air
gr
"
,
RESULTS
<-
.Fortran
(
"frun_cemaneige"
,
PACKAGE
=
"air
GR
"
,
##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
=
"air
gr
"
,
RESULTS
<-
.Fortran
(
"frun_gr6j"
,
PACKAGE
=
"air
GR
"
,
##inputs
LInputs
=
LInputSeries
,
### length of input and output series
InputsPrecip
=
CatchMeltAndPliq
,
### input series of total precipitation [mm/d]
...
...
R/RunModel_GR1A.R
View file @
4447886d
...
...
@@ -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 air
gr
#' @useDynLib air
GR
#' @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
=
"air
gr
"
,
RESULTS
<-
.Fortran
(
"frun_gr1a"
,
PACKAGE
=
"air
GR
"
,
##inputs
LInputs
=
LInputSeries
,
### length of input and output series
InputsPrecip
=
InputsModel
$
Precip
[
IndPeriod1
],
### input series of total precipitation [mm/y]
...
...
R/RunModel_GR2M.R
View file @
4447886d
...
...
@@ -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 air
gr
#' @useDynLib air
GR
#' @encoding UTF-8
#' @export
#_FunctionInputs__________________________________________________________________________________________________
...
...
@@ -76,7 +76,7 @@ RunModel_GR2M <- function(InputsModel,RunOptions,Param){
}
##Call_fortan
RESULTS
<-
.Fortran
(
"frun_gr2m"
,
PACKAGE
=
"air
gr
"
,
RESULTS
<-
.Fortran
(
"frun_gr2m"
,
PACKAGE
=
"air
GR
"
,
##inputs
LInputs
=
LInputSeries
,
### length of input and output series
InputsPrecip
=
InputsModel
$
Precip
[
IndPeriod1
],
### input series of total precipitation [mm/month]
...
...
R/RunModel_GR4H.R
View file @
4447886d
...
...
@@ -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 air
gr
#' @useDynLib air
GR
#' @encoding UTF-8
#' @export
#_FunctionInputs__________________________________________________________________________________________________
...
...
@@ -77,7 +77,7 @@ RunModel_GR4H <- function(InputsModel,RunOptions,Param){
}
##Call_fortan
RESULTS
<-
.Fortran
(
"frun_gr4h"
,
PACKAGE
=
"air
gr
"
,
RESULTS
<-
.Fortran
(
"frun_gr4h"
,
PACKAGE
=
"air
GR
"
,
##inputs
LInputs
=
LInputSeries
,
### length of input and output series
InputsPrecip
=
InputsModel
$
Precip
[
IndPeriod1
],
### input series of total precipitation [mm/h]
...
...
R/RunModel_GR4J.R
View file @
4447886d
...
...
@@ -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 air
gr
#' @useDynLib air
GR
#' @encoding UTF-8
#' @export
#_FunctionInputs__________________________________________________________________________________________________
...
...
@@ -77,7 +77,7 @@ RunModel_GR4J <- function(InputsModel,RunOptions,Param){
}
##Call_fortan
RESULTS
<-
.Fortran
(
"frun_gr4j"
,
PACKAGE
=
"air
gr
"
,
RESULTS
<-
.Fortran
(
"frun_gr4j"
,
PACKAGE
=
"air
GR
"
,
##inputs
LInputs
=
LInputSeries
,
### length of input and output series
InputsPrecip
=
InputsModel
$
Precip
[
IndPeriod1
],
### input series of total precipitation [mm/d]
...
...
R/RunModel_GR5J.R
View file @
4447886d
...
...
@@ -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 air
gr
#' @useDynLib air
GR
#' @encoding UTF-8
#' @export
#_FunctionInputs__________________________________________________________________________________________________
...
...
@@ -80,7 +80,7 @@ RunModel_GR5J <- function(InputsModel,RunOptions,Param){
}
##Call_fortan
RESULTS
<-
.Fortran
(
"frun_gr5j"
,
PACKAGE
=
"air
gr
"
,
RESULTS
<-
.Fortran
(
"frun_gr5j"
,
PACKAGE
=
"air
GR
"
,
##inputs
LInputs
=
LInputSeries
,
### length of input and output series
InputsPrecip
=
InputsModel
$
Precip
[
IndPeriod1
],
### input series of total precipitation [mm/d]
...
...
R/RunModel_GR6J.R
View file @
4447886d
...
...
@@ -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 air
gr
#' @useDynLib air
GR
#' @encoding UTF-8
#' @export
#_FunctionInputs__________________________________________________________________________________________________
...
...
@@ -81,7 +81,7 @@ RunModel_GR6J <- function(InputsModel,RunOptions,Param){
}
##Call_fortan
RESULTS
<-
.Fortran
(
"frun_gr6j"
,
PACKAGE
=
"air
gr
"
,
RESULTS
<-
.Fortran
(
"frun_gr6j"
,
PACKAGE
=
"air
GR
"
,
##inputs
LInputs
=
LInputSeries
,
### length of input and output series
InputsPrecip
=
InputsModel
$
Precip
[
IndPeriod1
],
### input series of total precipitation [mm/d]
...
...
man/BasinInfo.Rd
View file @
4447886d
% 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)
}
...
...
man/BasinObs.Rd
View file @
4447886d
% 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)
}
...
...
man/Calibration.Rd
View file @
4447886d
% 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}
...
...
man/Calibration_HBAN.Rd
View file @
4447886d
% 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}
...
...
man/Calibration_optim.Rd
View file @
4447886d
% 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}
...
...
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment