In order to fix the pipeline, some modifications:
- Update some unit tests due to last changes in the package
- Correct error in CST_Subset. Due to the changes for a previous error there was a modification in CST_Subset here: !185 (merged). Here below I leave an example for the error. The modification is in this line where the argument 'indices' is now a list and must be subset correctly. (FYI @vagudets)
library(CSTools)
library(startR)
repos1 <- "/esarchive/exp/ecmwf/system5_m1/monthly_mean/$var$_f6h/$var$_$sdate$.nc"
repos2 <- "/esarchive/exp/ecmwf/system4_m1/monthly_mean/$var$_f6h/$var$_$sdate$.nc"
suppressWarnings(
data <- Start(dat = list(list(name = 'system4_m1', path = repos2),
list(name = 'system5_m1', path = repos1)),
var = c('tas', 'sfcWind'),
sdate = c('20170101'),
ensemble = indices(1),
time = indices(1:3),
lat = indices(1:2),
lon = indices(1:2),
synonims = list(lat = c('lat', 'latitude'),
lon = c('lon', 'longitude')),
return_vars = list(time = 'sdate',
longitude = 'dat',
latitude = 'dat'),
metadata_dims = c('dat', 'var'),
retrieve = T)
)
suppressWarnings(
exp_start <- as.s2dv_cube(data)
)
source("https://earth.bsc.es/gitlab/external/cstools/-/raw/master/R/CST_Subset.R")
res8 <- CST_Subset(exp_start, along = c('lon', 'sdate', 'ensemble', 'var', 'dat'),
indices = list(1:2, 1, 1, 1, 1),
drop = 'none')