rescaleGrid: Grid rescaling

Description Usage Arguments Details Value Author(s)

View source: R/rescaleGrid.R


Rescale a grid (or compute anomalies)


rescaleGrid(grid, grid.clim = NULL, ref = NULL, by.member = TRUE,
  parallel = FALSE, max.ncores = 16, ncores = NULL)



Input grid to be rescaled


Reference climatology to be subtracted to the input grid. If NULL (the default), the climatology is directly computed from the grid via climatology, either member-by-member or using the ensemble mean climatology, as specified by the by.member flag.


Reference grid. After subtracting to grid its climatology (as defined by grid.clim), the mean climatology of this additional grid is added. Default to NULL, so no reference grid is used.


Logical. In case of multimember grids, should the climatology be computed sepparately for each member (by.member=TRUE), or a single climatology calculated from the ensemble mean (by.member=FALSE)?. Default to TRUE. Argument passed to climatology.


Logical. Should parallel execution be used?


Integer. Upper bound for user-defined number of cores.


Integer number of cores used in parallel computation. Self-selected number of cores is used when ncpus = NULL (the default), or when maxcores exceeds the default ncores value.


The reference grid (ref) is used to correct the input grid, as follows:

grid' = grid - mu_grid + mu_ref

, where mu corresponds to the monthly climatological mean considering the training period, and grid' is the corrected test data. The way mu_ref and mu_grid are computed in case of multimember grids is controlled by the argument by.member.

Note that if both grid.clim and ref are set to NULL, the output grid corresponds to the anomaly field of the input grid w.r.t. its own mean.

The ref usually corresponds to the control run of the GCM in the training period in climate change applications, or the hindcast data for the training period in s2d applications. Note that by default ref = NULL. In this case it will be assumed to be the pred grid. This can be used for instance when train and test correspond to the same model.


A rescaled grid


J. Bedia

SantanderMetGroup/transformeR documentation built on April 1, 2020, 5:42 a.m.