"Kharin" option in Clim() function
@bsolaraj and I found a couple of issues in the Clim()
function when the "kharin" option is set to TRUE:
(1) in the computation of the climatology, out_clim_obs
is used when we think it should be out_clim_exp
(the latter needs to be previously defined):
out_clim_exp <- trend_exp - trend_obs + InsertDim(InsertDim(InsertDim(MeanListDim(out_clim_obs,
c(2, 1)), 1, dimexp[1]), 2, dimexp[2]), 3, dimexp[3])
should probably be:
out_clim_exp <- trend_exp - trend_obs + InsertDim(InsertDim(InsertDim(MeanListDim(out_clim_exp,
c(2, 1)), 1, dimexp[1]), 2, dimexp[2]), 3, dimexp[3])
with out_clim_exp
defined previously as: out_clim_exp <- Mean1Dim(var_exp, posdim = 3, narm = TRUE)
Note that the same issue might also apply to the "Fuckar" method, even though we haven't checked if this is really the case.
(2) for the moment, the clim_exp
output of Clim() using this option has a startdate dimension (because it keeps the same dimensions as the experiment). This is not specified in the documentation, which states that clim_exp
is an "Array with same dimensions as var_exp except the third (starting dates) and, depending on the parameters, the second (members), which disappear." The documentation for the Kharin (and maybe also the Fuckar) method should be updated.
Thanks!
Deborah