Hi @lpalma
In this branch I have included a new parameter 'window_dim' in BiasCorrection() function. By default this parameter is NULL, but for the subseasonal case it will allow to include 'sday' dimension while doing the cross-validation in the 'syear' dimension.
Do you mind taking a look and sharing here how far it is to be useful?
Thanks a lot,
Núria
Some code to tests it:
# check atomic
var_obs <- array(1:24, c(syear = 8, sday = 3))
var_exp <- array(1:240, c(member = 10, syear = 8, sday = 3))
res <- .sbc(var_obs, var_exp)
# check original
mod1 <- 1 : (1 * 3 * 4 * 5 * 6 * 7)
dim(mod1) <- c(dataset = 1, member = 3, sdate = 4, ftime = 5, lat = 6, lon = 7)
obs1 <- 1 : (1 * 1 * 4 * 5 * 6 * 7)
dim(obs1) <- c(dataset = 1, member = 1, sdate = 4, ftime = 5, lat = 6, lon = 7)
a <- BiasCorrection(exp = mod1, obs = obs1)
# check window
a <- BiasCorrection(exp = mod1, obs = obs1, window_dim = 'ftime')
FYI @vtorralba