AdamontQQCorr {CSTools} | R Documentation |
AdamontQQCorr computes quantile-quantile correction of seasonal or decadal forecast data using weather types
Description
This function computes a quantile mapping based on weather types
for experiment data (typically a hindcast) onto reference obs
,
typically provided by reanalysis data.
Usage
AdamontQQCorr(
exp,
wt_exp,
obs,
wt_obs,
corrdims = c("member", "sdate", "ftime"),
londim = "lon",
latdim = "lat",
regrid = FALSE,
NN = NULL
)
Arguments
exp |
Array with named dimensions (such as |
wt_exp |
Corresponding weather types (same dimensions as |
obs |
Array with named dimensions with reference data (can also be
|
wt_obs |
Corresponding weather types (same dimensions as |
corrdims |
List of dimensions in |
londim |
Character name of longitude dimension in |
latdim |
Character name of latitude dimension in |
regrid |
(optional) Boolean indicating whether .NearestNeighbors regridding is needed. |
NN |
(optional, if regrid = TRUE) List (output from .NearestNeighbors) maps (nlat, nlon) onto (nlat_o, nlon_o). |
Value
An array (such as $data
array from an object of class
s2dv_cube
) with named dimensions, containing experiment data on the
lat/lon grid of obs
array, corrected by quantile mapping depending on
the weather types wt_exp
Author(s)
Paola Marson, paola.marson@meteo.fr for PROSNOW version
Lauriane Batté, lauriane.batte@meteo.fr for CSTools adaptation
Examples
wt_exp <- c(1,1,2,3,3,2,2,1,1,2,2,3)
dim(wt_exp) <- c(dataset = 1, member = 1, sdate = 4, ftime = 3)
wt_obs <- c(3,3,1,2,2,2,2,1,3,1,1,2)
dim(wt_obs) <- c(dataset = 1, member = 1, sdate = 4, ftime = 3)
exp <- 1 : c(1 * 1 * 4 * 3 * 4 * 4)
dim(exp) <- c(dataset = 1, member = 1, sdate = 4, ftime = 3,
lat = 4, lon = 4)
obs <- 101 : c(100 + 1 * 1 * 4 * 3 * 4 * 4)
dim(obs) <- c(dataset = 1, member = 1, sdate = 4, ftime = 3,
lat = 4, lon = 4)
exp_corr <- AdamontQQCorr(exp = exp, wt_exp = wt_exp,
obs = obs, wt_obs = wt_obs,
corrdims = c('dataset', 'member', 'sdate', 'ftime'))