Commit e81459a4 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.1.3.5 UPDATE: ErrorCrit_RMSE takes into account SCA, SWE and SD observations

Showing with 16 additions and 10 deletions
+16 -10
Package: airGR Package: airGR
Type: Package Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.1.3.4 Version: 1.1.3.5
Date: 2019-02-21 Date: 2019-02-21
Authors@R: c( Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
...@@ -13,7 +13,7 @@ output: ...@@ -13,7 +13,7 @@ output:
### 1.1.3.4 Release Notes (2019-02-21) ### 1.1.3.5 Release Notes (2019-02-21)
......
...@@ -6,6 +6,10 @@ ErrorCrit_RMSE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = ...@@ -6,6 +6,10 @@ ErrorCrit_RMSE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose =
stop("InputsCrit must be of class 'InputsCrit' \n") stop("InputsCrit must be of class 'InputsCrit' \n")
return(NULL) return(NULL)
} }
if (inherits(InputsCrit, "Multi") | inherits(InputsCrit, "Compo")) {
stop("InputsCrit must be of class 'Single'. Use the ErrorCrit function on objects of class 'Multi' with RMSE")
return(NULL)
}
if (!inherits(OutputsModel, "OutputsModel")) { if (!inherits(OutputsModel, "OutputsModel")) {
stop("OutputsModel must be of class 'OutputsModel' \n") stop("OutputsModel must be of class 'OutputsModel' \n")
return(NULL) return(NULL)
...@@ -14,24 +18,26 @@ ErrorCrit_RMSE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = ...@@ -14,24 +18,26 @@ ErrorCrit_RMSE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose =
##Initialisation_________________________________ ##Initialisation_________________________________
CritName <- NA CritName <- NA
CritVar <- InputsCrit$varObs
if (InputsCrit$transfo == "") { if (InputsCrit$transfo == "") {
CritName <- "RMSE[Q]" CritName <- "RMSE[CritVar]"
} }
if (InputsCrit$transfo == "sqrt") { if (InputsCrit$transfo == "sqrt") {
CritName <- "RMSE[sqrt(Q)]" CritName <- "RMSE[sqrt(CritVar)]"
} }
if (InputsCrit$transfo == "log") { if (InputsCrit$transfo == "log") {
CritName <- "RMSE[log(Q)]" CritName <- "RMSE[log(CritVar)]"
} }
if (InputsCrit$transfo == "inv") { if (InputsCrit$transfo == "inv") {
CritName <- "RMSE[1/Q]" CritName <- "RMSE[1/CritVar]"
} }
if (InputsCrit$transfo == "sort") { if (InputsCrit$transfo == "sort") {
CritName <- "RMSE[sort(Q)]" CritName <- "RMSE[sort(CritVar)]"
} }
CritValue <- NA CritName <- gsub(pattern = "CritVar", replacement = CritVar, x = CritName)
CritBestValue <- +1 CritValue <- NA
Multiplier <- +1 CritBestValue <- +1
Multiplier <- +1
### must be equal to -1 or +1 only ### must be equal to -1 or +1 only
......
Supports Markdown
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