Commit e1699d90 authored by unknown's avatar unknown
Browse files

v0.1.11.2 bug fixed in warm-up, calibration and simulation periods checks in...

v0.1.11.2 bug fixed in warm-up, calibration and simulation periods checks in CalGR and SimGR functions
parent 2d51884f
Package: airGRteaching
Type: Package
Title: Tools to Simplify the Use of the airGR Hydrological Package for Education (Including a Shiny Interface)
Version: 0.1.11.1
Version: 0.1.11.2
Date: 2018-01-29
Authors@R: c(person("Olivier", "Delaigue", role = c("aut", "cre"), email = "airGR@irstea.fr"), person("Laurent", "Coron", role = c("aut")), person("Pierre", "Brigode", role = c("aut")), person("Guillaume", "Thirel", role = c("ctb")))
Depends: airGR (>= 1.0.9.43)
......
......@@ -11,7 +11,7 @@ CalGR <- function(PrepGR, CalCrit = c("NSE", "KGE", "KGE2", "RMSE"),
if (any(is.na(WupPer))) {
stop("Non convenient date format for the warm-up period \"WupPer\"")
} else {
if (! (any(PrepGR$InputsModel$DatesR == WupPer[1]) & any(PrepGR$InputsModel$DatesR == WupPer[2]))) {
if (!any(PrepGR$InputsModel$DatesR == WupPer[1]) | !any(PrepGR$InputsModel$DatesR == WupPer[2])) {
stop("Non convenient date for the warm-up period \"WupPer\"")
} else {
WupInd <- which(PrepGR$InputsModel$DatesR == WupPer[1]):which(PrepGR$InputsModel$DatesR == WupPer[2])
......@@ -23,7 +23,7 @@ CalGR <- function(PrepGR, CalCrit = c("NSE", "KGE", "KGE2", "RMSE"),
if (any(is.na(CalPer))) {
stop("Non convenient date format for the calibration period \"CalPer\"")
} else {
if (! (any(PrepGR$InputsModel$DatesR == CalPer[1]) & any(PrepGR$InputsModel$DatesR == CalPer[2]))) {
if (!any(PrepGR$InputsModel$DatesR == CalPer[1]) | !any(PrepGR$InputsModel$DatesR == CalPer[2])) {
stop("Non convenient date for the calibration period \"CalPer\"")
} else {
CalInd <- which(PrepGR$InputsModel$DatesR == CalPer[1]):which(PrepGR$InputsModel$DatesR == CalPer[2])
......
......@@ -22,7 +22,7 @@ SimGR <- function(PrepGR, CalGR = NULL, Param = NULL, EffCrit = c("NSE", "KGE",
if (any(is.na(WupPer))) {
stop("Non convenient date format for the warm-up period \"WupPer\"")
} else {
if (! (any(PrepGR$InputsModel$DatesR == WupPer[1]) & any(PrepGR$InputsModel$DatesR == WupPer[1]))) {
if (!any(PrepGR$InputsModel$DatesR == WupPer[1]) | !any(PrepGR$InputsModel$DatesR == WupPer[2])) {
stop("Non convenient date for the warm-up period \"WupPer\"")
} else {
WupInd <- which(PrepGR$InputsModel$DatesR == WupPer[1]):which(PrepGR$InputsModel$DatesR == WupPer[2])
......@@ -34,7 +34,7 @@ SimGR <- function(PrepGR, CalGR = NULL, Param = NULL, EffCrit = c("NSE", "KGE",
if (any(is.na(SimPer))) {
stop("Non convenient date format for the simulation period \"SimPer\"")
} else {
if (! (any(PrepGR$InputsModel$DatesR == SimPer[1]) & any(PrepGR$InputsModel$DatesR == SimPer[2]))) {
if (!any(PrepGR$InputsModel$DatesR == SimPer[1]) | !any(PrepGR$InputsModel$DatesR == SimPer[2])) {
stop("Non convenient date for the simulation period \"SimPer\"")
} else {
SimInd <- which(PrepGR$InputsModel$DatesR == SimPer[1]):which(PrepGR$InputsModel$DatesR == SimPer[2])
......
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