Bug in Calibration when having a grid point with no observations
I am getting an error with the new CSTools::Calibration version when there are NAs for all time steps in some grid points (for example, when using ERA5land that only provides data over land).
I think it is because how the function .data.set.sufficiently.large() is used with dat_dim, but I'm not totally sure. I say it because, before having dat_dim, the uncorrected exp or NA (depending on na.fill) were directly returned without going througth the rest of .cal. But the whole function is now run even if all obs are NAs.
I could fix it by replacing "complete.obs" with "na.or.complete" in cor.obs.fc <- cor(fc.ens.av, obs, use = "complete.obs") (lines 796 and 817), but I don't know if it can affect other cases.
Could you please have a look?
Thanks a lot,
Carlos