CST_AdamontAnalog {CSTools}R Documentation

CST_AdamontAnalog finds analogous data in the reference dataset to experiment data based on weather types

Description

This function searches for analogs in a reference dataset for experiment data, based on corresponding weather types. The experiment data is typically a hindcast, observations are typically provided by reanalysis data.

Usage

CST_AdamontAnalog(
  exp,
  obs,
  wt_exp,
  wt_obs,
  nanalogs,
  method = "pattcorr",
  thres = NULL,
  search_obsdims = c("member", "sdate", "ftime"),
  londim = "lon",
  latdim = "lat"
)

AdamontAnalog(
  exp,
  obs,
  wt_exp,
  wt_obs,
  nanalogs = 5,
  method = "pattcorr",
  thres = NULL,
  search_obsdims = c("member", "sdate", "ftime"),
  londim = "lon",
  latdim = "lat"
)

Arguments

exp
  • CST_AdamontAnalogexperiment data an object of class s2dv_cube, can be output from quantile correction using CST_AdamontQQCorr

  • AdamontAnalogexperiment data array with named dimension

obs
  • CST_AdamontAnalogreference data, also of class s2dv_cube.

  • AdamontAnalogreference data array with named dimension.

Note that lat/lon dimensions need to be the same as exp

wt_exp

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

wt_obs

corresponding weather types (same dimensions as obs$data but lat/lon)

nanalogs

integer defining the number of analog values to return (default: 5)

method

a character string indicating the method used for analog definition Coded are 'pattcorr': pattern correlation 'rain1' (for precip patterns): rain occurrence consistency 'rain01' (for precip patterns): rain occurrence/non occurrence consistency

thres

real number indicating the threshold to define rain occurrence/non occurrence in rain(0)1

search_obsdims

list of dimensions in obs along which analogs are searched for

londim

name of longitude dimension

latdim

name of latitude dimension

Value

analog_vals

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)

## End(Not run)
## 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)
  obs=lonlat_data$obs$data, wt_exp=wt_exp, wt_obs=wt_obs, nanalogs=2)

## End(Not run)

[Package CSTools version 4.0.1 Index]