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
c4c5909b
Commit
c4c5909b
authored
Mar 15, 2017
by
unknown
Browse files
v1.0.5.24 when X1 and X3 < 1e-2, new values set to 1e-2
parent
d08e7c14
Changes
9
Hide whitespace changes
Inline
Side-by-side
DESCRIPTION
View file @
c4c5909b
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.0.5.2
2
Date: 2017-0
2-23
Version: 1.0.5.2
4
Date: 2017-0
3-15
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl")),
person("Charles", "Perrin", role = c("aut", "ths")),
...
...
R/RunModel_CemaNeigeGR4J.R
View file @
c4c5909b
...
...
@@ -16,6 +16,16 @@ RunModel_CemaNeigeGR4J <- function(InputsModel,RunOptions,Param){
if
(
sum
(
!
is.na
(
Param
))
!=
NParam
){
stop
(
paste
(
"Param must be a vector of length "
,
NParam
,
" and contain no NA \n"
,
sep
=
""
));
return
(
NULL
);
}
Param
<-
as.double
(
Param
);
Param_X1X3_threshold
<-
1e-2
if
(
Param
[
1L
]
<
Param_X1X3_threshold
)
{
warning
(
sprintf
(
"Param[1] (X1: production store capacity [mm]) < %.2f\n New X1 value: %.2f"
,
Param_X1X3_threshold
,
Param_X1X3_threshold
))
Param
[
1L
]
<-
Param_X1X3_threshold
}
if
(
Param
[
3L
]
<
Param_X1X3_threshold
)
{
warning
(
sprintf
(
"Param[1] (X3: routing store capacity [mm]) < %.2f\n New X3 value: %.2f"
,
Param_X1X3_threshold
,
Param_X1X3_threshold
))
Param
[
3L
]
<-
Param_X1X3_threshold
}
##Input_data_preparation
if
(
identical
(
RunOptions
$
IndPeriod_WarmUp
,
as.integer
(
0
))){
RunOptions
$
IndPeriod_WarmUp
<-
NULL
;
}
IndPeriod1
<-
c
(
RunOptions
$
IndPeriod_WarmUp
,
RunOptions
$
IndPeriod_Run
);
...
...
R/RunModel_CemaNeigeGR5J.R
View file @
c4c5909b
...
...
@@ -15,6 +15,16 @@ RunModel_CemaNeigeGR5J <- function(InputsModel,RunOptions,Param){
if
(
!
is.vector
(
Param
)){
stop
(
"Param must be a vector \n"
);
return
(
NULL
);
}
if
(
sum
(
!
is.na
(
Param
))
!=
NParam
){
stop
(
paste
(
"Param must be a vector of length "
,
NParam
,
" and contain no NA \n"
,
sep
=
""
));
return
(
NULL
);
}
Param
<-
as.double
(
Param
);
Param_X1X3_threshold
<-
1e-2
if
(
Param
[
1L
]
<
Param_X1X3_threshold
)
{
warning
(
sprintf
(
"Param[1] (X1: production store capacity [mm]) < %.2f\n New X1 value: %.2f"
,
Param_X1X3_threshold
,
Param_X1X3_threshold
))
Param
[
1L
]
<-
Param_X1X3_threshold
}
if
(
Param
[
3L
]
<
Param_X1X3_threshold
)
{
warning
(
sprintf
(
"Param[1] (X3: routing store capacity [mm]) < %.2f\n New X3 value: %.2f"
,
Param_X1X3_threshold
,
Param_X1X3_threshold
))
Param
[
3L
]
<-
Param_X1X3_threshold
}
##Input_data_preparation
if
(
identical
(
RunOptions
$
IndPeriod_WarmUp
,
as.integer
(
0
))){
RunOptions
$
IndPeriod_WarmUp
<-
NULL
;
}
...
...
R/RunModel_CemaNeigeGR6J.R
View file @
c4c5909b
...
...
@@ -15,6 +15,16 @@ RunModel_CemaNeigeGR6J <- function(InputsModel,RunOptions,Param){
if
(
!
is.vector
(
Param
)){
stop
(
"Param must be a vector \n"
);
return
(
NULL
);
}
if
(
sum
(
!
is.na
(
Param
))
!=
NParam
){
stop
(
paste
(
"Param must be a vector of length "
,
NParam
,
" and contain no NA \n"
,
sep
=
""
));
return
(
NULL
);
}
Param
<-
as.double
(
Param
);
Param_X1X3_threshold
<-
1e-2
if
(
Param
[
1L
]
<
Param_X1X3_threshold
)
{
warning
(
sprintf
(
"Param[1] (X1: production store capacity [mm]) < %.2f\n New X1 value: %.2f"
,
Param_X1X3_threshold
,
Param_X1X3_threshold
))
Param
[
1L
]
<-
Param_X1X3_threshold
}
if
(
Param
[
3L
]
<
Param_X1X3_threshold
)
{
warning
(
sprintf
(
"Param[1] (X3: routing store capacity [mm]) < %.2f\n New X3 value: %.2f"
,
Param_X1X3_threshold
,
Param_X1X3_threshold
))
Param
[
3L
]
<-
Param_X1X3_threshold
}
##Input_data_preparation
if
(
identical
(
RunOptions
$
IndPeriod_WarmUp
,
as.integer
(
0
))){
RunOptions
$
IndPeriod_WarmUp
<-
NULL
;
}
...
...
R/RunModel_GR2M.R
View file @
c4c5909b
...
...
@@ -12,6 +12,12 @@ RunModel_GR2M <- function(InputsModel,RunOptions,Param){
if
(
!
is.vector
(
Param
)){
stop
(
"Param must be a vector \n"
);
return
(
NULL
);
}
if
(
sum
(
!
is.na
(
Param
))
!=
NParam
){
stop
(
paste
(
"Param must be a vector of length "
,
NParam
,
" and contain no NA \n"
,
sep
=
""
));
return
(
NULL
);
}
Param
<-
as.double
(
Param
);
Param_X1_threshold
<-
1e-2
if
(
Param
[
1L
]
<
Param_X1_threshold
)
{
warning
(
sprintf
(
"Param[1] (X1: production store capacity [mm]) < %.2f\n New X1 value: %.2f"
,
Param_X1_threshold
,
Param_X1_threshold
))
Param
[
1L
]
<-
Param_X1_threshold
}
##Input_data_preparation
if
(
identical
(
RunOptions
$
IndPeriod_WarmUp
,
as.integer
(
0
))){
RunOptions
$
IndPeriod_WarmUp
<-
NULL
;
}
...
...
R/RunModel_GR4H.R
View file @
c4c5909b
...
...
@@ -12,6 +12,16 @@ RunModel_GR4H <- function(InputsModel,RunOptions,Param){
if
(
!
is.vector
(
Param
)){
stop
(
"Param must be a vector \n"
);
return
(
NULL
);
}
if
(
sum
(
!
is.na
(
Param
))
!=
NParam
){
stop
(
paste
(
"Param must be a vector of length "
,
NParam
,
" and contain no NA \n"
,
sep
=
""
));
return
(
NULL
);
}
Param
<-
as.double
(
Param
);
Param_X1X3_threshold
<-
1e-2
if
(
Param
[
1L
]
<
Param_X1X3_threshold
)
{
warning
(
sprintf
(
"Param[1] (X1: production store capacity [mm]) < %.2f\n New X1 value: %.2f"
,
Param_X1X3_threshold
,
Param_X1X3_threshold
))
Param
[
1L
]
<-
Param_X1X3_threshold
}
if
(
Param
[
3L
]
<
Param_X1X3_threshold
)
{
warning
(
sprintf
(
"Param[1] (X3: routing store capacity [mm]) < %.2f\n New X3 value: %.2f"
,
Param_X1X3_threshold
,
Param_X1X3_threshold
))
Param
[
3L
]
<-
Param_X1X3_threshold
}
##Input_data_preparation
if
(
identical
(
RunOptions
$
IndPeriod_WarmUp
,
as.integer
(
0
))){
RunOptions
$
IndPeriod_WarmUp
<-
NULL
;
}
...
...
R/RunModel_GR4J.R
View file @
c4c5909b
...
...
@@ -12,6 +12,16 @@ RunModel_GR4J <- function(InputsModel,RunOptions,Param){
if
(
!
is.vector
(
Param
)){
stop
(
"Param must be a vector \n"
);
return
(
NULL
);
}
if
(
sum
(
!
is.na
(
Param
))
!=
NParam
){
stop
(
paste
(
"Param must be a vector of length "
,
NParam
,
" and contain no NA \n"
,
sep
=
""
));
return
(
NULL
);
}
Param
<-
as.double
(
Param
);
Param_X1X3_threshold
<-
1e-2
if
(
Param
[
1L
]
<
Param_X1X3_threshold
)
{
warning
(
sprintf
(
"Param[1] (X1: production store capacity [mm]) < %.2f\n New X1 value: %.2f"
,
Param_X1X3_threshold
,
Param_X1X3_threshold
))
Param
[
1L
]
<-
Param_X1X3_threshold
}
if
(
Param
[
3L
]
<
Param_X1X3_threshold
)
{
warning
(
sprintf
(
"Param[1] (X3: routing store capacity [mm]) < %.2f\n New X3 value: %.2f"
,
Param_X1X3_threshold
,
Param_X1X3_threshold
))
Param
[
3L
]
<-
Param_X1X3_threshold
}
##Input_data_preparation
if
(
identical
(
RunOptions
$
IndPeriod_WarmUp
,
as.integer
(
0
))){
RunOptions
$
IndPeriod_WarmUp
<-
NULL
;
}
...
...
R/RunModel_GR5J.R
View file @
c4c5909b
...
...
@@ -12,7 +12,17 @@ RunModel_GR5J <- function(InputsModel,RunOptions,Param){
if
(
!
is.vector
(
Param
)){
stop
(
"Param must be a vector \n"
);
return
(
NULL
);
}
if
(
sum
(
!
is.na
(
Param
))
!=
NParam
){
stop
(
paste
(
"Param must be a vector of length "
,
NParam
,
" and contain no NA \n"
,
sep
=
""
));
return
(
NULL
);
}
Param
<-
as.double
(
Param
);
Param_X1X3_threshold
<-
1e-2
if
(
Param
[
1L
]
<
Param_X1X3_threshold
)
{
warning
(
sprintf
(
"Param[1] (X1: production store capacity [mm]) < %.2f\n New X1 value: %.2f"
,
Param_X1X3_threshold
,
Param_X1X3_threshold
))
Param
[
1L
]
<-
Param_X1X3_threshold
}
if
(
Param
[
3L
]
<
Param_X1X3_threshold
)
{
warning
(
sprintf
(
"Param[1] (X3: routing store capacity [mm]) < %.2f\n New X3 value: %.2f"
,
Param_X1X3_threshold
,
Param_X1X3_threshold
))
Param
[
3L
]
<-
Param_X1X3_threshold
}
##Input_data_preparation
if
(
identical
(
RunOptions
$
IndPeriod_WarmUp
,
as.integer
(
0
))){
RunOptions
$
IndPeriod_WarmUp
<-
NULL
;
}
IndPeriod1
<-
c
(
RunOptions
$
IndPeriod_WarmUp
,
RunOptions
$
IndPeriod_Run
);
...
...
R/RunModel_GR6J.R
View file @
c4c5909b
...
...
@@ -12,6 +12,16 @@ RunModel_GR6J <- function(InputsModel,RunOptions,Param){
if
(
!
is.vector
(
Param
)){
stop
(
"Param must be a vector \n"
);
return
(
NULL
);
}
if
(
sum
(
!
is.na
(
Param
))
!=
NParam
){
stop
(
paste
(
"Param must be a vector of length "
,
NParam
,
" and contain no NA \n"
,
sep
=
""
));
return
(
NULL
);
}
Param
<-
as.double
(
Param
);
Param_X1X3_threshold
<-
1e-2
if
(
Param
[
1L
]
<
Param_X1X3_threshold
)
{
warning
(
sprintf
(
"Param[1] (X1: production store capacity [mm]) < %.2f\n New X1 value: %.2f"
,
Param_X1X3_threshold
,
Param_X1X3_threshold
))
Param
[
1L
]
<-
Param_X1X3_threshold
}
if
(
Param
[
3L
]
<
Param_X1X3_threshold
)
{
warning
(
sprintf
(
"Param[1] (X3: routing store capacity [mm]) < %.2f\n New X3 value: %.2f"
,
Param_X1X3_threshold
,
Param_X1X3_threshold
))
Param
[
3L
]
<-
Param_X1X3_threshold
}
##Input_data_preparation
if
(
identical
(
RunOptions
$
IndPeriod_WarmUp
,
as.integer
(
0
))){
RunOptions
$
IndPeriod_WarmUp
<-
NULL
;
}
...
...
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