Loading monthly files of seasonal forecast with StartR
I'm trying to load seasonal forecast at monthly frequency (and monthly saved files) with StartR, in a way to have in a second time the possibility to load reconstruction and/or observations via the attributes of my experimental data to define the selectors for observation as described in examples 1_2 and 1_3.
My experiment is called via:
path <- '/esarchive/exp/ecearth/a35b/diags/DCPP/EC-Earth-Consortium/EC-Earth-HR/dcppA-hindcast/$memb$/Omon/$var$/gn/v*/$var$_Omon_EC-Earth-HR_dcppA-hindcast_s$sdate$-$memb$_gn_$chunk$-$chunk$.nc'
vari <- 'tosmean'
membs <- c('r1i1p1f1','r2i1p1f1','r3i1p1f1')
startdates <- c('1993','1998','2003','2008','2013')
forecast_month <- c(11,12,1,2)
exp <- 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='dat', region='dat'),
retrieve = F)
But when loading like that, I don't have the correct "time" associated with the variable.
dates <- attr(exp_non_retrieve, 'Variables')$dat1$time
dim(dates)
returns 1
I will have the correct list of dates through:
attr(exp_non_retrieve, 'FileSelectors')$dat1$chunk
but then I don't know how to define the
dates <- attr(exp, 'Variables')$common$time
as you described in the examples to load then the observational dataset.
Could you helpd me a bit with the load part of StartR please?
Thanks!
Aude