Changes between Version 10 and Version 11 of udg/ecoms/RPackage/biascorrection
- Timestamp:
- May 11, 2016 4:35:40 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
udg/ecoms/RPackage/biascorrection
v10 v11 41 41 prd.bc <- biasCorrection(obs, prd, prd, 42 42 method = "eqm", 43 multi.member = TRUE, 44 window = 30) 43 window = c(30,10)) 45 44 plotMeanGrid(obs) 46 45 plotMeanGrid(prd, multi.member = FALSE) … … 62 61 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 63 62 63 64 {{{#!comment 64 65 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. 66 }}} 65 67 66 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).68 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). 67 69 68 70 = Multi-variable bias correction = … … 87 89 # Bias correction parameters 88 90 interpolationMethod <- "nearest" # Both observation and forecast should be define on the same grid. Options: "nearest" and "bilinear" 89 method <- "eqm" \ Empirical quantile mapping 90 multi.member <- FALSE # Should members be adjusted sepparately (TRUE, default), or jointly (FALSE)? 91 method <- "eqm" # Empirical quantile mapping 91 92 pr.threshold <- 1 # The minimum value that is considered as a non-zero precipitation. 92 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.93 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. 93 94 }}} 94 95 … … 119 120 leadMonth = leadMonth) 120 121 121 prd <- interpGrid(prd, new.coordinates = getGrid(obs), 122 prd <- interpGrid(prd, 123 new.coordinates = getGrid(obs), 122 124 method = interpolationMethod) 123 125 124 126 prd <- if ("tp" %in% obs$Variable$varName) { 125 biasCorrection(obs, prd, prd, pr.threshold = pr.threshold, 126 method = method, multi.member = multi.member, 127 biasCorrection(obs, 128 prd, 129 prd, 130 pr.threshold = pr.threshold, 131 method = method, 127 132 window = window) 128 133 } else { 129 biasCorrection(obs, prd, prd, method = method, 130 multi.member = multi.member, window = window) 134 biasCorrection(obs, 135 prd, 136 prd, 137 method = method, 138 window = window) 131 139 } 132 140 # Exporting to netcdf4