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
04b3c683
Commit
04b3c683
authored
Feb 21, 2019
by
Delaigue Olivier
Browse files
v1.1.3.3 UPDATE: ErrorCrit_KGE takes into account SCA, SWE and SD observations
parent
91421a80
Changes
3
Hide whitespace changes
Inline
Side-by-side
DESCRIPTION
View file @
04b3c683
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.1.3.
2
Version: 1.1.3.
3
Date: 2019-02-21
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
...
...
NEWS.rmd
View file @
04b3c683
...
...
@@ -13,7 +13,7 @@ output:
### 1.1.3.
2
Release Notes (2019-02-21)
### 1.1.3.
3
Release Notes (2019-02-21)
...
...
R/ErrorCrit_KGE.R
View file @
04b3c683
...
...
@@ -7,7 +7,7 @@ ErrorCrit_KGE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = T
return
(
NULL
)
}
if
(
inherits
(
InputsCrit
,
"Multi"
)
|
inherits
(
InputsCrit
,
"Compo"
))
{
stop
(
"InputsCrit must be of class 'Single'
\n
"
)
stop
(
"InputsCrit must be of class 'Single'
. Use the ErrorCrit function on objects of class 'Multi' or 'Compo' with KGE
"
)
return
(
NULL
)
}
if
(
!
inherits
(
OutputsModel
,
"OutputsModel"
))
{
...
...
@@ -18,24 +18,26 @@ ErrorCrit_KGE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = T
##Initialisation_________________________________
CritName
<-
NA
CritVar
<-
InputsCrit
$
varObs
if
(
InputsCrit
$
transfo
==
""
)
{
CritName
<-
"KGE[
Q
]"
CritName
<-
"KGE[
CritVar
]"
}
if
(
InputsCrit
$
transfo
==
"sqrt"
)
{
CritName
<-
"KGE[sqrt(
Q
)]"
CritName
<-
"KGE[sqrt(
CritVar
)]"
}
if
(
InputsCrit
$
transfo
==
"log"
)
{
CritName
<-
"KGE[log(
Q
)]"
CritName
<-
"KGE[log(
CritVar
)]"
}
if
(
InputsCrit
$
transfo
==
"inv"
)
{
CritName
<-
"KGE[1/
Q
]"
CritName
<-
"KGE[1/
CritVar
]"
}
if
(
InputsCrit
$
transfo
==
"sort"
)
{
CritName
<-
"KGE[sort(
Q
)]"
CritName
<-
"KGE[sort(
CritVar
)]"
}
CritValue
<-
NA
CritBestValue
<-
+1
Multiplier
<-
-1
CritName
<-
gsub
(
pattern
=
"CritVar"
,
replacement
=
CritVar
,
x
=
CritName
)
CritValue
<-
NA
CritBestValue
<-
+1
Multiplier
<-
-1
### must be equal to -1 or +1 only
...
...
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