Corr(): wrong output dimensions when dat_dim and memb_dim are NULL
Summary
The outputs except corr
have dimensions "nexp" and "nobs" when dat_dim and memb_dim are NULL. The condition here https://earth.bsc.es/gitlab/es/s2dv/-/blob/master/R/Corr.R#L440 needs to be improved.
Example
exp11 <- array(10 + rnorm(72), dim = c(sdate = 6, lat = 3, lon = 4))
obs11 <- array(10 + rnorm(72), dim = c(sdate = 6, lat = 3, lon = 4))
res <- Corr(exp11, obs11, dat_dim = NULL, memb_dim = NULL)
dim(res$p.val)
nexp nobs lat lon
1 1 3 4