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
1c48c711
Commit
1c48c711
authored
Jan 11, 2019
by
Delaigue Olivier
Browse files
v1.1.2.20 CLEAN: raw numerical values replaced by variables in CreaIniStats #5438
parent
c55ed973
Changes
3
Hide whitespace changes
Inline
Side-by-side
DESCRIPTION
View file @
1c48c711
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.1.2.
19
Version: 1.1.2.
20
Date: 2019-01-11
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
...
...
NEWS.rmd
View file @
1c48c711
...
...
@@ -13,7 +13,7 @@ output:
### 1.1.2.
19
Release Notes (2019-01-11)
### 1.1.2.
20
Release Notes (2019-01-11)
...
...
R/CreateIniStates.R
View file @
1c48c711
...
...
@@ -165,7 +165,7 @@ CreateIniStates <- function(FUN_MOD, InputsModel,
}
else
{
k
<-
1
}
UH1
<-
rep
(
Inf
,
20
*
k
)
UH1
<-
rep
(
Inf
,
UH1n
*
k
)
}
if
(
is.null
(
UH2
))
{
if
(
"hourly"
%in%
ObjectClass
)
{
...
...
@@ -173,7 +173,7 @@ CreateIniStates <- function(FUN_MOD, InputsModel,
}
else
{
k
<-
1
}
UH2
<-
rep
(
Inf
,
40
*
k
)
UH2
<-
rep
(
Inf
,
UH2n
*
k
)
}
if
(
is.null
(
GCemaNeigeLayers
))
{
GCemaNeigeLayers
<-
rep
(
Inf
,
NLayers
)
...
...
@@ -202,16 +202,16 @@ CreateIniStates <- function(FUN_MOD, InputsModel,
if
(
!
is.numeric
(
ExpStore
)
||
length
(
ExpStore
)
!=
1L
)
{
stop
(
"'ExpStore' must be numeric of length one"
)
}
if
(
"hourly"
%in%
ObjectClass
&
(
!
is.numeric
(
UH1
)
||
length
(
UH1
)
!=
480L
))
{
if
(
"hourly"
%in%
ObjectClass
&
(
!
is.numeric
(
UH1
)
||
length
(
UH1
)
!=
UH1n
*
24
))
{
stop
(
sprintf
(
"'UH1' must be numeric of length 480 (%i * 24)"
,
UH1n
))
}
if
(
!
"hourly"
%in%
ObjectClass
&
(
!
is.numeric
(
UH1
)
||
length
(
UH1
)
!=
20L
))
{
if
(
!
"hourly"
%in%
ObjectClass
&
(
!
is.numeric
(
UH1
)
||
length
(
UH1
)
!=
UH1n
))
{
stop
(
sprintf
(
"'UH1' must be numeric of length %i"
,
UH1n
))
}
if
(
"hourly"
%in%
ObjectClass
&
(
!
is.numeric
(
UH2
)
||
length
(
UH2
)
!=
960L
))
{
if
(
"hourly"
%in%
ObjectClass
&
(
!
is.numeric
(
UH2
)
||
length
(
UH2
)
!=
UH2n
*
24
))
{
stop
(
sprintf
(
"'UH2' must be numeric of length 960 (%i * 24)"
,
UH2n
))
}
if
(
!
"hourly"
%in%
ObjectClass
&
(
!
is.numeric
(
UH2
)
||
length
(
UH2
)
!=
40L
))
{
if
(
!
"hourly"
%in%
ObjectClass
&
(
!
is.numeric
(
UH2
)
||
length
(
UH2
)
!=
UH2n
))
{
stop
(
sprintf
(
"'UH2' must be numeric of length %i (2 * %i)"
,
UH2n
,
UH1n
))
}
if
(
!
is.numeric
(
GCemaNeigeLayers
)
||
length
(
GCemaNeigeLayers
)
!=
NLayers
)
{
...
...
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