Multivariate bias correction that matches the multivariate
distribution using QDM
and the R2D2
algorithm following Vrac (2018).
R2D2(o.c, m.c, m.p, ref.column=1, ratio.seq=rep(FALSE, ncol(o.c)),
trace=0.05, trace.calc=0.5*trace, jitter.factor=0,
n.tau=NULL, ratio.max=2, ratio.max.trace=10*trace,
ties='first', qmap.precalc=FALSE, subsample=NULL, pp.type=7)
a list of with elements consisting of:
matrix of bias corrected m.c
values for the calibration period.
matrix of bias corrected m.p
values for the projection period.
matrix of observed samples during the calibration period.
matrix of model outputs during the calibration period.
matrix of model outputs during the projected period.
index of the reference column used for the 1D nearest neighbour matching
vector of logical values indicating if samples are of a ratio quantity (e.g., precipitation).
numeric values indicating thresholds below which values of a ratio quantity (e.g., ratio=TRUE
) should be considered exact zeros.
numeric values of thresholds used internally when handling of exact zeros; defaults to one half of trace
.
optional strength of jittering to be applied when quantities are quantized.
number of quantiles used in the quantile mapping; NULL
equals the length of the m.p
series.
numeric values indicating the maximum proportional changes allowed for ratio quantities below the ratio.max.trace
threshold.
numeric values of trace thresholds used to constrain the proportional change in ratio quantities to ratio.max
; defaults to ten times trace
.
method used to handle ties when calculating ordinal ranks.
logical value indicating if m.c
and m.p
are outputs from QDM
.
use subsample
draws of size n.tau
to calculate initial
empirical quantiles; if NULL
, calculate normally.
type of plotting position used in quantile
.
Cannon, A.J., S.R. Sobie, and T.Q. Murdock, 2015. Bias correction of simulated precipitation by quantile mapping: How well do methods preserve relative changes in quantiles and extremes? Journal of Climate, 28:6938-6959. doi:10.1175/JCLI-D-14-00754.1
Vrac, M., 2018. Multivariate bias adjustment of high-dimensional climate simulations: the Rank Resampling for Distributions and Dependences (R2D2) bias correction. Hydrology and Earth System Sciences, 22:3175-3196. doi:10.5194/hess-22-3175-2018
QDM, MBCp, MBCr, MRS, MBCn