Season to work on 1 dim array input
Hi @aho,
I am fixing startR use case ex2_1_timedim.R. Until now it was using a local version of Season, but it is not necessary since it is already in s2dv. Therefore, it now calls s2dv::Season.
Using the same data and function, the old version of the usecase was needing only one time_dim to work:
step1 <- Step(fun = fun_spring,
target_dims = c('time'),
output_dims = c('time'))
With the version of Season in s2dv, one extra variable should be specified:
step1 <- Step(fun = fun_spring,
target_dims = c('var', 'time'),
output_dims = c('var', 'time'))
in order of avoiding this error:
Error in dim(newX) <- c(prod(d.call), d2) :
dims [product 1] do not match the length of object [7]
I think, that adding 'var' or any other variable that is not used in the chunking, is not intuitive for users.
Do you think that Season (and maybe other functions) can be checked to work with 1D?
It is the same error than running this:
test <- array(1:7, c(ftime = 7))
res <- s2dv::Season(test, monini = 1, moninf = 3, monsup = 5)
Error in dim(newX) <- c(prod(d.call), d2) :
dims [product 1] do not match the length of object [7]
Thanks in advance,
Núria