Calibration() strict dimension check
Hi @tkariyat
I am using Calibration() and I got the error
Error in CSTools::Calibration(exp = hcst_tr, obs = obs_tr, exp_cor = hcst_ev, :
Parameter 'exp' and 'exp_cor' must have the same length of all common dimensions except 'dat_dim', 'sdate_dim' and 'memb_dim'.
The check in line 451 becomes true but I was not expecting it. At that line, the dimension names in exp and exp_cor are:
Browse[3]> name_exp
[1] "dat" "latitude" "longitude" "sweek" "var"
Browse[3]> name_exp_cor
[1] "dat" "latitude" "longitude" "sweek" "time" "var"
However, 'time' is not a common dimension, it only appears in the exp_cor object, so I expect multiApply to loop on that dimension.
I think the problem is due to the lines just above that consider the only different dimension possible are the target dimensions.
name_exp <- name_exp[-which(name_exp %in% target_dims_exp)]
name_exp_cor <- name_exp_cor[-which(name_exp_cor %in% target_dims_cor)]
For now, I will disable this check but I think that would be good if this check is reviewed.
Thanks,
Núria