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
6a23e019
Commit
6a23e019
authored
Jun 26, 2017
by
unknown
Browse files
v1.0.9.3 bug fixed in DataAltiExtrapolation_Valery when PrecipScale = FALSE #4521
parent
0bdc58bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
DESCRIPTION
View file @
6a23e019
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.0.9.
2
Date: 2017-06-2
2
Version: 1.0.9.
3
Date: 2017-06-2
6
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl")),
person("Charles", "Perrin", role = c("aut", "ths")),
...
...
R/DataAltiExtrapolation_Valery.R
View file @
6a23e019
...
...
@@ -433,7 +433,7 @@ DataAltiExtrapolation_Valery <- function(DatesR,
##Extrapolation
##Thresold_of_inputs_median_elevation
Zthreshold
<-
4000
LayerPrecip_
df
<-
sapply
(
1
:
NLayers
,
function
(
iLayer
)
{
LayerPrecip_
mat
<-
sapply
(
1
:
NLayers
,
function
(
iLayer
)
{
##If_layer_elevation_smaller_than_Zthreshold
if
(
ZLayers
[
iLayer
]
<=
Zthreshold
)
{
prcp
<-
as.double
(
Precip
*
exp
(
TabGradP
*
(
ZLayers
[
iLayer
]
-
ZInputs
)))
...
...
@@ -450,7 +450,7 @@ DataAltiExtrapolation_Valery <- function(DatesR,
return
(
prcp
)
})
if
(
PrecipScale
)
{
LayerPrecip_mat
<-
LayerPrecip_
df
/
rowMeans
(
LayerPrecip_
df
)
*
Precip
LayerPrecip_mat
<-
LayerPrecip_
mat
/
rowMeans
(
LayerPrecip_
mat
)
*
Precip
LayerPrecip_mat
[
is.nan
(
LayerPrecip_mat
)]
<-
0
}
LayerPrecip
<-
as.list
(
as.data.frame
(
LayerPrecip_mat
))
...
...
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