diff --git a/DESCRIPTION b/DESCRIPTION index 66d5146b9ce437c4d17f36362cd6872b9e6c9629..84f1b2f2c66cb83e5300f3da41195056ec853192 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: airGR Type: Package Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling -Version: 1.6.1.13 -Date: 2020-05-22 +Version: 1.6.1.14 +Date: 2020-05-27 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), person("Olivier", "Delaigue", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7668-8468"), email = "airGR@inrae.fr"), diff --git a/R/RunModel.R b/R/RunModel.R index 496a3d533d870e5b609facbbf3dd3502e6fb31fd..3fc49636e6fc373538884a4345b42b6bf38c1df7 100644 --- a/R/RunModel.R +++ b/R/RunModel.R @@ -18,7 +18,7 @@ RunModel <- function (InputsModel, RunOptions, Param, FUN_MOD) { AreaTot <- sum(InputsModel$BasinAreas) # propagation time from upstream meshes to outlet - PT <- InputsModel$LengthHydro[1, ] * 1000 / Param[length(Param)] / TimeStep + PT <- InputsModel$LengthHydro[1, ] / Param[length(Param)] / TimeStep HUTRANS <- rbind(1 - (PT - floor(PT)), PT - floor(PT)) NbUpBasins <- length(InputsModel$LengthHydro) diff --git a/tests/testthat/test-RunModel_LAG.R b/tests/testthat/test-RunModel_LAG.R index 0cb38307d3dce15e2ede74cb04326785370d8374..3876ba9b8694e3d5becfa80ddb3f107a343f766c 100644 --- a/tests/testthat/test-RunModel_LAG.R +++ b/tests/testthat/test-RunModel_LAG.R @@ -42,7 +42,7 @@ InputsModel <- CreateInputsModel( Precip = BasinObs$P, PotEvap = BasinObs$E, QobsUpstr = matrix(QobsUpstr, ncol = 1), - LengthHydro = matrix(c(1), nrow = 1), + LengthHydro = matrix(c(1000), nrow = 1), BasinAreas = matrix(c( BasinInfo$BasinArea * 2, BasinInfo$BasinArea ), nrow = 1) @@ -96,7 +96,7 @@ test_that( } ) -ParamSD = c(Param, InputsModel$LengthHydro * 1000 / (24 * 60 * 60)) +ParamSD = c(Param, InputsModel$LengthHydro / (24 * 60 * 60)) # Speed corresponding to one time step delay OutputsSD <- RunModel(InputsModel, RunOptions, Param = ParamSD, FUN_MOD = RunModel_GR4J)