This function computes per-pair climatologies for the experimental and observational data using one of the following methods:
per-pair method (Garcia-Serrano and Doblas-Reyes, CD, 2012)
Kharin method (Karin et al, GRL, 2012)
Fuckar method (Fuckar et al, GRL, 2014)
Per-pair climatology means that only the startdates covered by the whole experiments/observational dataset will be used. In other words, the startdates which are not all available along 'dat_dim' dimension of both the 'exp' and 'obs' are excluded when computing the climatologies.
Clim(exp, obs, time_dim = "sdate", dat_dim = c("dataset", "member"),
method = "clim", ftime_dim = "ftime", memb_dim = "member",
memb = TRUE, na.rm = TRUE, ncores = NULL)
A named numeric array of experimental data, with at least two dimensions 'time_dim' and 'dat_dim'.
A named numeric array of observational data, same dimensions as parameter 'exp' except along 'dat_dim'.
A character string indicating the name of dimension along which the climatologies are computed. The default value is 'sdate'.
A character vector indicating the name of the dataset and member dimensions. If data at one startdate (i.e., 'time_dim') are not complete along 'dat_dim', this startdate along 'dat_dim' will be discarded. The default value is "c('dataset', 'member')".
A character string indicating the method to be used. The options include 'clim', 'kharin', and 'NDV'. The default value is 'clim'.
A character string indicating the name of forecast time dimension. Only used when method = 'NDV'. The default value is 'ftime'.
A character string indicating the name of the member dimension. Only used when parameter 'memb' is FALSE. It must be one element in 'dat_dim'. The default value is 'member'.
A logical value indicating whether to remain 'memb_dim' dimension (TRUE) or do ensemble mean over 'memb_dim' (FALSE). The default value is TRUE.
A logical value indicating whether to remove NA values along 'time_dim' when calculating climatology (TRUE) or return NA if there is NA along 'time_dim' (FALSE). The default value is TRUE.
An integer indicating the number of cores to use for parallel computation. The default value is NULL.
A list of 2:
A numeric array with the same dimensions as parameter 'exp' but dimension 'time_dim' is moved to the first position. If parameter 'method' is 'clim', dimension 'time_dim' is removed. If parameter 'memb' is FALSE, dimension 'memb_dim' is also removed.
A numeric array with the same dimensions as parameter 'exp' except dimension 'time_dim' is removed. If parameter 'memb' is FALSE, dimension 'memb_dim' is also removed.
# NOT RUN {
# Load sample data as in Load() example:
example(Load)
clim <- Clim(sampleData$mod, sampleData$obs)
clim2 <- Clim(sampleData$mod, sampleData$obs, method = 'kharin', memb = FALSE)
# }
Run the code above in your browser using DataLab