Troubles when loading files in StartR
I'd like to open several files for a seasonal forecast with StartR and I'm not sure why but it gives me the error:
Error in R_nc4_open: No such file or directory
when I ask for all members. It works well though when I asked for only few members (for all of them).
My script is this one:
expid <- 'a3vg'
init_month <- 5
vari <- 'tosmean'
membs_num <-c(1:14)
reg <- 'Nino3'
startdates <- as.character(c(seq(1990,2015)))
length_forecast <- 4
######################
model <- 'EC-Earth3-HR'
membs <- paste0('r', membs_num, 'i1p1f1', sep="")
nmemb <- length(membs)
month_init = 'May'
forecast_month <- c(seq(init_month,(init_month+length_forecast-1)))
nstartdates <- length(startdates)
compo <- 'Omon'
grid = 'gn'
####################
# Load EC-Earth seasonal forecast
####################
path <- paste0('/esarchive/exp/ecearth/', expid, '/diags/DCPP/EC-Earth-Consortium/', model, '/dcppA-hindcast/$memb$/', compo, '/$var$/', grid, '/v*/$var$_', compo, '_', model, '_dcppA-hindcast_s$sdate$-$memb$_', grid, '_$chunk$.nc')
print(paste0('path of the exp: ', path))
data_exp_retrieved <- startR::Start(dat = path,
var = vari,
memb = membs,
region = reg,
region_var = 'region',
sdate = startdates,
time = c(1:length(forecast_month)),
chunk = 'all',
chunk_depends = 'sdate',
time_across = 'chunk',
merge_across_dims = TRUE,
return_vars = list(time=c('sdate','chunk'), region=NULL),
retrieve = T)
Note that all files don't have the same chunk
: it could be until August or until October, i.e. the name of the files can finish either with 08.nc or 10.nc
Could you help me to understand what's happening here?
Thanks