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 $data array of experiment data from an object of class s2dv_cube)

wt_exp

corresponding weather types (same dimensions as exp but lat/lon)

obs

array with named dimensions with reference data (can also be $data array 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

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

## Not run: 
wt_exp <- sample(1:3, 15*6*3, replace=T)
dim(wt_exp) <- c(dataset=1, member=15, sdate=6, ftime=3)
wt_obs <- sample(1:3, 6*3, replace=T)
dim(wt_obs) <- c(dataset=1, member=1, sdate=6, ftime=3)
exp_corr <- AdamontQQCorr(exp=lonlat_data$exp$data, wt_exp=wt_exp, 
   obs=lonlat_data$obs$data, wt_obs=wt_obs, 
   corrdims = c('dataset','member','sdate','ftime'))

## End(Not run)

[Package CSTools version 4.0.1 Index]