From 6100334f5a50e4d253e518292b8940dcdb9f30e1 Mon Sep 17 00:00:00 2001 From: CeresBarros Date: Wed, 20 Dec 2023 18:04:23 -0800 Subject: [PATCH] name gcm_input raster list --- R/gcm.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/gcm.R b/R/gcm.R index 6cc1e945..3c5247e5 100644 --- a/R/gcm.R +++ b/R/gcm.R @@ -19,9 +19,9 @@ #' @export gcm_input <- function(dbCon, bbox = NULL, gcm = list_gcm(), ssp = list_ssp(), period = list_gcm_period(), max_run = 0L, cache = TRUE) { # Load each file individually + select layers - res <- lapply(gcm, process_one_gcm2, ssp = ssp, period = period, + res <- sapply(gcm, process_one_gcm2, ssp = ssp, period = period, bbox = bbox, dbnames = dbnames, dbCon = dbCon, - max_run = max_run, cache = cache) + max_run = max_run, cache = cache, USE.NAMES = TRUE, simplify = FALSE) attr(res, "builder") <- "climr" # Return a list of SpatRaster, one element for each model