# Changes between Version 10 and Version 11 of udg/ecoms/RPackage/biascorrection

Ignore:
Timestamp:
May 11, 2016 4:35:40 PM (6 years ago)
Comment:

--

### Legend:

Unmodified
 v10 prd.bc <- biasCorrection(obs, prd, prd, method = "eqm", multi.member = TRUE, window = 30) window = c(30,10)) plotMeanGrid(obs) plotMeanGrid(prd, multi.member = FALSE) The '''netcdf4 file''' resulting from this example can be downloaded here: http://www.meteo.unican.es/work/datasets/tas_qqmap_System4_WFDEI_2001_2010.nc4 {{{#!comment In order to preserve the inter member variability of seasonal forecasts, the bias correction methods should be jointly calibrated using the different ensemble members (considering the CDF of the joined series for the correction). This is the procedure followed by the biasCorrection function when using the option '''multi.member=TRUE'''. Note that multi.member=FALSE will independently calibrate each member and, therefore, inter-member variability will be destroyed. }}} Moreover, in order to take into account the model drift (the change of the model bias as a function of the lead time), the bias correction methods are applied considering the lead month of the predictions as an extra dimension. This is implemented in the biasCorrection function by considering a moving time window (one month in the above example: '''window = 30''', in days). The default recommended value is one-month (window=30), although some tests are being conducted in order to determine the optimum window to correct the available seasonal forecasts (further information will follow). In order to take into account the model drift (the change of the model bias as a function of the lead time), the bias correction methods are applied considering the lead month of the predictions as an extra dimension. This is implemented in the biasCorrection function by considering a moving time window and a time step for (one month in the above example and a time step of 10 days: window = c(30,10), in days). The default recommended value for window is one month, although some tests are being conducted in order to determine the optimum window to correct the available seasonal forecasts (further information will follow). = Multi-variable bias correction  = # Bias correction parameters interpolationMethod <- "nearest" # Both observation and forecast should be define on the same grid. Options: "nearest" and "bilinear" method <- "eqm" \ Empirical quantile mapping multi.member <- FALSE # Should members be adjusted sepparately (TRUE, default), or jointly (FALSE)? method <- "eqm" # Empirical quantile mapping pr.threshold <- 1 # The minimum value that is considered as a non-zero precipitation. window <- 30 # Numeric value specifying the time window width used to calibrate. The window is centered on the target day. Default to \code{NULL}, which considers the whole period available. window <- c(30,7) # Integer vector specifying the time window width and the time step used to calibrate. The window is centered on the target time frame. Default to \code{NULL}, which considers the whole period available. }}} leadMonth = leadMonth) prd <- interpGrid(prd, new.coordinates = getGrid(obs), prd <- interpGrid(prd, new.coordinates = getGrid(obs), method = interpolationMethod) prd <- if ("tp" %in% obs$Variable$varName) { biasCorrection(obs, prd, prd, pr.threshold = pr.threshold, method = method, multi.member = multi.member, biasCorrection(obs, prd, prd, pr.threshold = pr.threshold, method = method, window = window) } else { biasCorrection(obs, prd, prd, method = method, multi.member = multi.member, window = window) biasCorrection(obs, prd, prd, method = method, window = window) } # Exporting to netcdf4