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
db8393d0
Commit
db8393d0
authored
Mar 06, 2019
by
Delaigue Olivier
Browse files
v1.2.8.1 CLEAN: typo revision in TransfoParam_CemaNeige* fun
parent
020ae847
Changes
4
Hide whitespace changes
Inline
Side-by-side
DESCRIPTION
View file @
db8393d0
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.2.8.
0
Version: 1.2.8.
1
Date: 2019-03-06
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
...
...
NEWS.rmd
View file @
db8393d0
...
...
@@ -13,7 +13,7 @@ output:
### 1.2.8.
0
Release Notes (2019-03-06)
### 1.2.8.
1
Release Notes (2019-03-06)
...
...
R/TransfoParam_CemaNeige.R
View file @
db8393d0
TransfoParam_CemaNeige
<-
function
(
ParamIn
,
Direction
)
{
## number of model parameters
NParam
<-
2L
## check_arguments
Bool
<-
is.vector
(
ParamIn
)
if
(
Bool
)
{
isVecParamIn
<-
is.vector
(
ParamIn
)
if
(
isVecParamIn
)
{
ParamIn
<-
matrix
(
ParamIn
,
nrow
=
1
)
}
if
(
!
inherits
(
ParamIn
,
"matrix"
))
{
...
...
@@ -20,6 +20,7 @@ TransfoParam_CemaNeige <- function(ParamIn, Direction) {
}
## transformation
if
(
Direction
==
"TR"
)
{
ParamOut
<-
ParamIn
ParamOut
[,
1
]
<-
(
ParamIn
[,
1
]
+
9.99
)
/
19.98
### CemaNeige X1 (weighting coefficient for snow pack thermal state)
...
...
@@ -31,7 +32,7 @@ TransfoParam_CemaNeige <- function(ParamIn, Direction) {
ParamOut
[,
2
]
<-
log
(
ParamIn
[,
2
]
*
200
)
### CemaNeige X2 (degree-day melt coefficient)
}
if
(
Bool
)
{
if
(
isVecParamIn
)
{
ParamOut
<-
as.vector
(
ParamOut
)
}
...
...
R/TransfoParam_CemaNeigeHyst.R
View file @
db8393d0
TransfoParam_CemaNeigeHyst
<-
function
(
ParamIn
,
Direction
)
{
## number of model parameters
NParam
<-
4L
## check_arguments
Bool
<-
is.vector
(
ParamIn
)
if
(
Bool
)
{
isVecParamIn
<-
is.vector
(
ParamIn
)
if
(
isVecParamIn
)
{
ParamIn
<-
matrix
(
ParamIn
,
nrow
=
1
)
}
if
(
!
inherits
(
ParamIn
,
"matrix"
))
{
...
...
@@ -20,6 +20,7 @@ TransfoParam_CemaNeigeHyst <- function(ParamIn, Direction) {
}
## transformation
if
(
Direction
==
"TR"
)
{
ParamOut
<-
ParamIn
ParamOut
[,
1
]
<-
(
ParamIn
[,
1
]
+
9.99
)
/
19.98
### CemaNeige X1 (weighting coefficient for snow pack thermal state)
...
...
@@ -35,7 +36,7 @@ TransfoParam_CemaNeigeHyst <- function(ParamIn, Direction) {
ParamOut
[,
4
]
<-
(
ParamIn
[,
4
]
-
0.5
)
*
19.98
### Hyst CV
}
if
(
Bool
)
{
if
(
isVecParamIn
)
{
ParamOut
<-
as.vector
(
ParamOut
)
}
...
...
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