diff --git a/DESCRIPTION b/DESCRIPTION index c61ecc4c521a5ab47a67a59208c1093840e6fad6..58ce560861f645e2c2e4801f042db7d9a077716b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: airGR Type: Package Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling -Version: 1.6.9.7 +Version: 1.6.9.8 Date: 2021-01-08 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), diff --git a/NEWS.md b/NEWS.md index 719fc4d6f0a442afe2884edc3d36ee94adf945aa..0c92f86264eaa133f10887fb0d890a73d15e2d2a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,7 +2,7 @@ -### 1.6.9.7 Release Notes (2021-01-08) +### 1.6.9.8 Release Notes (2021-01-08) #### New features diff --git a/R/Utils.R b/R/Utils.R index 6f149904361a1ffee7076104dfd46f51bfccb982..92a54cc1f6b3185530e8c37ba1e2f3f2efc2f22b 100644 --- a/R/Utils.R +++ b/R/Utils.R @@ -88,7 +88,7 @@ .ExtractInputsModel <- function(x, i) { res <- lapply(x, function(x) { if (is.matrix(x)) { - res0 <- x[i, ] + res0 <- x[i, , drop = FALSE] } if (is.vector(x) | inherits(x, "POSIXt")) { res0 <- x[i] @@ -105,6 +105,10 @@ if (!is.null(x$ZLayers)) { res$ZLayers <- x$ZLayers } + if (inherits(x, "SD")) { + res$LengthHydro <- x$LengthHydro + res$BasinAreas <- x$BasinAreas + } class(res) <- class(x) res }