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


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

--

Legend:

Unmodified
Added
Removed
Modified
  • udg/ecoms/RPackage/biascorrection

    v10 v11  
    4141prd.bc <- biasCorrection(obs, prd, prd,
    4242                  method = "eqm",
    43                   multi.member = TRUE,
    44                   window = 30)
     43                  window = c(30,10))
    4544plotMeanGrid(obs)
    4645plotMeanGrid(prd, multi.member = FALSE)
     
    6261The '''netcdf4 file''' resulting from this example can be downloaded here: http://www.meteo.unican.es/work/datasets/tas_qqmap_System4_WFDEI_2001_2010.nc4
    6362
     63
     64{{{#!comment
    6465In 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}}}
    6567
    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).
     68In 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).
    6769
    6870= Multi-variable bias correction  =
     
    8789# Bias correction parameters
    8890interpolationMethod <- "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)?
     91method <- "eqm" # Empirical quantile mapping
    9192pr.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.
     93window <- 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.
    9394}}}
    9495
     
    119120                    leadMonth = leadMonth)
    120121   
    121    prd <- interpGrid(prd, new.coordinates = getGrid(obs),
     122   prd <- interpGrid(prd,
     123                     new.coordinates = getGrid(obs),
    122124                     method = interpolationMethod)
    123125   
    124126   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,
    127132                               window = window)
    128133   } 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)
    131139   }
    132140   # Exporting to netcdf4