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
761254d5
Commit
761254d5
authored
Jan 30, 2018
by
unknown
Browse files
v1.0.9.72 new error message when the time step is wrong in data gave to CreateInputsModel
parent
c6bab666
Changes
2
Hide whitespace changes
Inline
Side-by-side
DESCRIPTION
View file @
761254d5
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.0.9.7
1
Version: 1.0.9.7
2
Date: 2018-01-30
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl")),
...
...
R/CreateInputsModel.R
View file @
761254d5
...
...
@@ -76,7 +76,8 @@ CreateInputsModel <- function(FUN_MOD,
DatesR
<-
as.POSIXlt
(
DatesR
)
}
if
(
difftime
(
tail
(
DatesR
,
1
),
tail
(
DatesR
,
2
),
units
=
"secs"
)[[
1
]]
%in%
TimeStep
==
FALSE
)
{
stop
(
paste
(
"the time step of the model inputs must be "
,
TimeStep
,
" seconds \n"
,
sep
=
""
))
TimeStepName
<-
grep
(
"hourly|daily|monthly|yearly"
,
ObjectClass
,
value
=
TRUE
)
stop
(
paste0
(
"The time step of the model inputs must be "
,
TimeStepName
,
"\n"
))
return
(
NULL
)
}
if
(
any
(
duplicated
(
DatesR
)))
{
...
...
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