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
b6f18ce9
Commit
b6f18ce9
authored
Mar 29, 2021
by
Delaigue Olivier
Browse files
fix(Utils): fix monthly and yearly time step management in .GetFeatModel
Refs
#106
parent
91cdf61a
Pipeline
#21791
passed with stages
in 8 minutes
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
R/Utils.R
View file @
b6f18ce9
...
...
@@ -49,17 +49,16 @@
}
res
$
TimeStep
<-
switch
(
res
$
TimeUnit
,
hourly
=
1
,
daily
=
24
,
monthly
=
28
:
31
,
yearly
=
365
:
366
)
daily
=
1
*
24
,
monthly
=
28
:
31
*
24
,
yearly
=
365
:
366
*
24
)
res
$
TimeStep
<-
res
$
TimeStep
*
3600
res
$
Class
<-
c
(
res
$
TimeUnit
,
res
$
Class
)
if
(
grepl
(
"CemaNeige"
,
res
$
NameFunMod
))
{
res
$
Class
<-
unique
(
c
(
res
$
Class
,
"CemaNeige"
))
}
if
(
DiffTimeStep
!=
res
$
TimeStep
)
{
if
(
all
(
DiffTimeStep
!=
res
$
TimeStep
)
)
{
stop
(
"the time step of the model inputs must be "
,
res
$
TimeUnit
,
"\n"
)
}
return
(
res
)
...
...
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