Possible bug in MergeRefToExp
Hi @nperez
I may have found that when you use the function MergeRefToExp with one of the input data to merge with the dimension time equal to 1, it gives you back the next error:
Error in FUN(X[[i]], ...) :
Expected 1st returned element by 'fun' to have 1 dimensions, but 0 found.
I add here some lines of code to explain myself:
> dim(data_obs_tas_added)
sweek sday syear time latitude longitude ensemble
1 1 11 1 28 56 25
> dim(data_tas_hcst)
sweek sday syear time latitude longitude ensemble
1 1 11 2 28 56 25
> test <- MergeRefToExp(data_obs_tas_added, obs_dates, list(1,5), list(31,5),
+ data_tas_hcst, hcst_dates, list(1,6), list(31,7),
+ time_dim = 'time', sdate_dim = 'syear',
+ ncores = NULL)
Error in FUN(X[[i]], ...) :
Expected 1st returned element by 'fun' to have 1 dimensions, but 0 found.
>
when the case is the same but with the time dimension of data_obs_tas_added greater than one, the function merge data_obs_tas_added and data_tas_hcst perfectly.
cheers, Albert M.
FYI @lpalma