diff --git a/R/CreateRunOptions.R b/R/CreateRunOptions.R index dfdedfc73beea590cee2889b4c8449fdfa5476c6..4edbdd7184f0b489ebde8c6628bae9eb5a6ab998 100644 --- a/R/CreateRunOptions.R +++ b/R/CreateRunOptions.R @@ -387,10 +387,10 @@ CreateRunOptions <- function(FUN_MOD, InputsModel, } Factor <- NULL if (inherits(InputsModel, "hourly")) { - Factor <- 365.2425 * 24 + Factor <- 365.25 * 24 } if (inherits(InputsModel, "daily")) { - Factor <- 365.2425 + Factor <- 365.25 } if (inherits(InputsModel, "monthly")) { Factor <- 12 diff --git a/R/Utils.R b/R/Utils.R index 7dd28d773238b83ff2389f4f3077b18581a17a49..dadf299f108a0fc502665519638403e38ecdbda5 100644 --- a/R/Utils.R +++ b/R/Utils.R @@ -55,10 +55,10 @@ monthly = 28:31 * 24, yearly = 365:366 * 24) res$TimeStepMean <- switch(res$TimeUnit, - hourly = 1, - daily = 1 * 24, - monthly = 365.2425 / 12 * 24, - yearly = 365.2425 * 24) + hourly = 1, + daily = 1 * 24, + monthly = 365.25 / 12 * 24, + yearly = 365.25 * 24) res$TimeStep <- res$TimeStep * 3600 res$TimeStepMean <- as.integer(res$TimeStepMean * 3600) res$Class <- c(res$TimeUnit, res$Class) @@ -68,7 +68,7 @@ res$Class <- res$Class[!is.na(res$Class)] if (!is.null(DatesR)) { if (all(DiffTimeStep != res$TimeStep)) { - stop("the time step of the model inputs must be ", res$TimeUnit, "\n") + stop("the time step of the model inputs must be ", res$TimeUnit) } } return(res)