From 21e288988c7839aface1e4b2351f1deef6a39a78 Mon Sep 17 00:00:00 2001 From: Victoria Agudetse Roures Date: Mon, 27 Mar 2023 12:05:37 +0200 Subject: [PATCH] Add 'ensemble' dim to obs --- modules/Loading/GRIB/GrbLoad.R | 3 ++- modules/Loading/Loading_GRIB.R | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/Loading/GRIB/GrbLoad.R b/modules/Loading/GRIB/GrbLoad.R index 5f15f627..29bcc8a3 100644 --- a/modules/Loading/GRIB/GrbLoad.R +++ b/modules/Loading/GRIB/GrbLoad.R @@ -167,7 +167,8 @@ GrbLoad <- function (dat, time_step = 1, has.memb = NULL, syear_time_dim = NULL) if (is.null(has.memb)) { # obs doesn't have memb; reshape syear/time dim result <- s2dv::Reorder(result, c("syear", "time", "latitude", "longitude")) result <- array(result, dim = c(dat = 1, var = 1, - syear_time_dim, dim(result)[3:4])) + syear_time_dim, dim(result)[3:4], + ensemble = 1)) } else { result <- array(result, dim = c(dim(result)[1:2], ensemble = has.memb, time = length(time_step), dim(result)[4])) diff --git a/modules/Loading/Loading_GRIB.R b/modules/Loading/Loading_GRIB.R index 313dc0a8..4ec17056 100644 --- a/modules/Loading/Loading_GRIB.R +++ b/modules/Loading/Loading_GRIB.R @@ -254,7 +254,8 @@ load_datasets <- function(recipe) { syear = hcst.year, time = hcst.ftime, latitude = attr(obs, 'latitude'), - longitude = attr(obs, 'longitude')), + longitude = attr(obs, 'longitude'), + ensemble = 1), varName = attr(obs, 'shortName'), metadata = metadata_list, Dates = attributes(obs)$time, -- GitLab