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
43c54cc0
Commit
43c54cc0
authored
Apr 05, 2017
by
unknown
Browse files
v1.0.6.8 remove the using of the switch function (generate NOTE)
parent
8d55eda0
Changes
2
Hide whitespace changes
Inline
Side-by-side
DESCRIPTION
View file @
43c54cc0
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.0.6.
7
Version: 1.0.6.
8
Date: 2017-04-05
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl")),
...
...
R/plot.OutputsModel.R
View file @
43c54cc0
...
...
@@ -142,11 +142,15 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea =
}
if
(
!
is.null
(
BasinArea
))
{
# function to use switch avoiding a NOTE when the package is check
UNIT_M3S
<-
function
(
x
)
{
return
(
switch
(
x
,
hour
=
60
*
60
,
day
=
24
*
60
*
60
,
month
=
365.25
/
12
*
24
*
60
*
60
,
year
=
365.25
*
24
*
60
*
60
))
}
Factor_UNIT_M3S
<-
BasinArea
/
(
UNIT_M3S
(
NameTS
)
/
1e3
)
Factor_MMH_M3S
<-
60
*
60
Factor_MMD_M3S
<-
60
*
60
*
24
Factor_MMM_M3S
<-
60
*
60
*
24
*
365.25
/
12
Factor_MMY_M3S
<-
60
*
60
*
24
*
365.25
if
(
NameTS
==
"hour"
)
Factor_UNIT_M3S
<-
Factor_MMH_M3S
if
(
NameTS
==
"day"
)
Factor_UNIT_M3S
<-
Factor_MMD_M3S
if
(
NameTS
==
"month"
)
Factor_UNIT_M3S
<-
Factor_MMM_M3S
if
(
NameTS
==
"year"
)
Factor_UNIT_M3S
<-
Factor_MMY_M3S
Factor_UNIT_M3S
<-
BasinArea
/
(
Factor_UNIT_M3S
/
1000
)
}
}
...
...
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