Start() should retrieve data with the largest dimension length
Hello,
when loading Seasonal predictions, sometimes the hindcast has a reduced ensemble (less members) compared to the operational forecasts of the same dataset. When this happens, Start() reads the dimensions from the first file in the sdates and then is not able to load all the members.
I've tried to specify the indices of the members with the option
ensemble=indices(1:51)
but then it fails.
Minimal working example: SEAS5 has 25 members in the hindcast and 51 in the fcst. In this case only 40 members are loaded (the ensemble size of CMCC hindcast).
ltmin <- 20
ltmax <- 80
lnmin <- 270
lnmax <- 60
tmp1 <- Start(
dataset = c( "/esarchive/exp/ecmwf/system5c3s/monthly_mean/g500_f12h/$var$_$sdate$.nc",
"/esarchive/exp/cmcc/system3_m1-c3s/monthly_mean/g500_f12h/$var$_$sdate$.nc"),
var = "g500", sdate = c("19931101","20200901"),
time = 'all',
ensemble = 'all',
latitude = values(list(ltmin, ltmax)),
latitude_reorder = Sort(decreasing = T),
longitude = values(list(lnmin, lnmax)),
longitude_reorder = CircularSort(0, 360),
synonims = list(longitude = c('lon', 'longitude'),
latitude = c('lat', 'latitude')),
transform = CDORemapper,
transform_extra_cells = 2,
transform_params = list(grid = 'r360x181',
method = 'conservative',
crop = c(lnmin, lnmax, ltmin, ltmax)),
transform_vars = c('latitude', 'longitude'),
return_vars = list( time = NULL,
latitude = 'dataset',
longitude = 'dataset'),
retrieve = T)