Commit 91421a80 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.1.3.2 UPDATE: ErrorCrit_NSE takes into account SCA, SWE and SD observations

parent 8b0f8707
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.1.3.1
Version: 1.1.3.2
Date: 2019-02-21
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -13,7 +13,7 @@ output:
### 1.1.3.1 Release Notes (2019-02-21)
### 1.1.3.2 Release Notes (2019-02-21)
......
......@@ -7,7 +7,7 @@ ErrorCrit_NSE <- 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'")
return(NULL)
}
if (!inherits(OutputsModel, "OutputsModel")) {
......@@ -18,21 +18,23 @@ ErrorCrit_NSE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = T
##Initialisation_________________________________
CritName <- NA
CritVar <- InputsCrit$varObs
if (InputsCrit$transfo == "") {
CritName <- "NSE[Q]"
CritName <- "NSE[CritVar]"
}
if (InputsCrit$transfo == "sqrt") {
CritName <- "NSE[sqrt(Q)]"
CritName <- "NSE[sqrt(CritVar)]"
}
if (InputsCrit$transfo == "log") {
CritName <- "NSE[log(Q)]"
CritName <- "NSE[log(CritVar)]"
}
if (InputsCrit$transfo == "inv") {
CritName <- "NSE[1/Q]"
CritName <- "NSE[1/CritVar]"
}
if (InputsCrit$transfo == "sort") {
CritName <- "NSE[sort(Q)]"
CritName <- "NSE[sort(CritVar)]"
}
CritName <- gsub(pattern = "CritVar", replacement = CritVar, x = CritName)
CritValue <- NA
CritBestValue <- +1
Multiplier <- -1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment