Commit 4f38cc7b authored by Delaigue Olivier's avatar Delaigue Olivier Committed by Dorchies David
Browse files

v1.4.8.7 fix: format returned by SeriesAggreg2.default is now right when the...

v1.4.8.7 fix: format returned by SeriesAggreg2.default is now right when the function run on InputsModel object ith a CemaNeige class #41
parent 8e89eef6
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.4.8.6
Version: 1.4.8.7
Date: 2020-05-04
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -4,7 +4,7 @@
### 1.4.8.6 Release Notes (2020-05-04)
### 1.4.8.7 Release Notes (2020-05-04)
#### New features
......
......@@ -33,6 +33,7 @@ SeriesAggreg2.default <- function(TabSeries,
names(tmp) <- paste(names(CemaNeigeLayers)[iLayer], names(tmp), sep = ".")
tmp
})
names(CemaNeigeLayers) <- grep("^Layer", names(TabSeries), value = TRUE)
}
if (inherits(TabSeries, "OutputsModel") ){
CemaNeigeLayers <- TabSeries$CemaNeigeLayers
......@@ -45,6 +46,7 @@ SeriesAggreg2.default <- function(TabSeries,
YearFirstMonth = YearFirstMonth, TimeLag = TimeLag,
verbose = verbose)
res <- res[, -1L]
colnames(res) <- gsub(".*[.]", "", colnames(res))
res <- as.list(res)
})
}
......@@ -79,7 +81,13 @@ SeriesAggreg2.default <- function(TabSeries,
res <- as.list(NewTabSeries)
if (inherits(TabSeries, "CemaNeige")) {
res$CemaNeigeLayers <- CemaNeigeLayersAggreg
if (inherits(TabSeries, "InputsModel")) {
res <- c(NewTabSeries, CemaNeigeLayersAggreg)
}
if (inherits(TabSeries, "OutputsModel")) {
res$CemaNeigeLayers <- CemaNeigeLayersAggreg
}
# res <- append(res, CemaNeigeLayersAggreg, after = length(res))
}
class(res) <- gsub("hourly|daily|monthly|yearly", ClassFormat, class(TabSeries))
......
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