CST_AdamontQQCorr {CSTools}R Documentation

CST_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

CST_AdamontQQCorr(
  exp,
  wt_exp,
  obs,
  wt_obs,
  corrdims = c("member", "sdate", "ftime"),
  londim = "lon",
  latdim = "lat"
)

Arguments

exp

Experiment data an object of class s2dv_cube.

wt_exp

Corresponding weather types (same dimensions as exp$data but lat/lon).

obs

Reference data, also of class s2dv_cube. lat/lon dimensions can differ from exp if non rectilinear latlon grids are used, in which case regrid should be set to TRUE and .NearestNeighbors NN output should be provided.

wt_obs

Corresponding weather types (same dimensions as obs but lat/lon).

corrdims

List of dimensions in exp for which quantile mapping correction is applied.

londim

Character name of longitude dimension in exp and obs.

latdim

Character name of latitude dimension in exp and obs.

Value

An object of class s2dv_cube containing experiment data on the lat/lon grid of obs input data, corrected by quantile mapping depending on the weather types wt_exp.

Author(s)

Lauriane Batté, lauriane.batte@meteo.fr

Paola Marson, paola.marson@meteo.fr

Gildas Dayon, gildas.dayon@meteo.fr

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 <- NULL
exp$data <-  1 : c(1 * 1 * 4 * 3 * 4 * 4)
dim(exp$data) <- c(dataset = 1, member = 1, sdate = 4, ftime = 3,
                  lat = 4, lon = 4)
class(exp) <- 's2dv_cube'
obs <- NULL
obs$data <-  101 : c(100 + 1 * 1 * 4 * 3 * 4 * 4)
dim(obs$data) <- c(dataset = 1, member = 1, sdate = 4, ftime = 3,
                  lat = 4, lon = 4)
class(obs) <- 's2dv_cube'
exp_corr <- CST_AdamontQQCorr(exp = exp, wt_exp = wt_exp, 
                             obs = obs, wt_obs = wt_obs, 
                             corrdims = c('dataset','member','sdate','ftime'))

[Package CSTools version 5.2.0 Index]