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
6a20b554
Commit
6a20b554
authored
Oct 22, 2018
by
Delaigue Olivier
Browse files
v1.1.2.3 UPDATE: ErrorCrit_KGE compatible with new InputsCrit objects
parent
1f7169aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
DESCRIPTION
View file @
6a20b554
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.1.2.
2
Version: 1.1.2.
3
Date: 2018-10-22
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
...
...
R/ErrorCrit_NSE.R
View file @
6a20b554
...
...
@@ -5,6 +5,10 @@ ErrorCrit_NSE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = T
if
(
!
inherits
(
InputsCrit
,
"InputsCrit"
))
{
stop
(
"InputsCrit must be of class 'InputsCrit' \n"
)
return
(
NULL
)
}
if
(
inherits
(
InputsCrit
,
"Multi"
)
|
inherits
(
InputsCrit
,
"Compo"
))
{
stop
(
"InputsCrit must be of class 'Single' \n"
)
return
(
NULL
)
}
if
(
!
inherits
(
OutputsModel
,
"OutputsModel"
))
{
stop
(
"OutputsModel must be of class 'OutputsModel' \n"
)
...
...
@@ -36,7 +40,7 @@ ErrorCrit_NSE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = T
##Data_preparation_______________________________
VarObs
<-
InputsCrit
$
Q
obs
VarObs
<-
InputsCrit
$
obs
VarObs
[
!
InputsCrit
$
BoolCrit
]
<-
NA
VarSim
<-
OutputsModel
$
Qsim
VarSim
[
!
InputsCrit
$
BoolCrit
]
<-
NA
...
...
@@ -124,7 +128,7 @@ ErrorCrit_NSE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = T
##Verbose______________________________________
if
(
verbose
)
{
message
(
"Crit. "
,
CritName
,
" = "
,
sprintf
(
"%.4f"
,
CritValue
))
message
(
"Crit. "
,
CritName
,
" = "
,
sprintf
(
"%.4f"
,
CritValue
)
,
"\n"
)
}
...
...
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