RatioSDRMS {s2dv}R Documentation

Compute the ratio between the ensemble spread and RMSE

Description

Compute the ratio between the standard deviation of the members around the ensemble mean in experimental data and the RMSE between the ensemble mean of experimental and observational data. The p-value is provided by a one-sided Fisher's test.

Usage

RatioSDRMS(
  exp,
  obs,
  dat_dim = NULL,
  memb_dim = "member",
  time_dim = "sdate",
  pval = TRUE,
  ncores = NULL
)

Arguments

exp

A named numeric array of experimental data with at least two dimensions 'memb_dim' and 'time_dim'.

obs

A named numeric array of observational data with at least two dimensions 'memb_dim' and 'time_dim'. It should have the same dimensions as parameter 'exp' except along 'dat_dim' and 'memb_dim'.

dat_dim

A character string indicating the name of dataset (nobs/nexp) dimension. The default value is NULL (no dataset).

memb_dim

A character string indicating the name of the member dimension. It must be one dimension in 'exp' and 'obs'. The default value is 'member'.

time_dim

A character string indicating the name of dimension along which the ratio is computed. The default value is 'sdate'.

pval

A logical value indicating whether to compute or not the p-value of the test Ho : SD/RMSE = 1 or not. The default value is TRUE.

ncores

An integer indicating the number of cores to use for parallel computation. The default value is NULL.

Value

A list of two arrays with dimensions c(nexp, nobs, the rest of dimensions of 'exp' and 'obs' except memb_dim and time_dim), which nexp is the length of dat_dim of 'exp' and nobs is the length of dat_dim of 'obs'. If dat_dim is NULL, nexp and nobs are omitted.

$ratio

The ratio of the ensemble spread and RMSE.

$p_val

The p-value of the one-sided Fisher's test with Ho: SD/RMSE = 1. Only present if pval = TRUE.

Examples

# Load sample data as in Load() example:
example(Load)
rsdrms <- RatioSDRMS(sampleData$mod, sampleData$obs, dat_dim = 'dataset')
# Reorder the data in order to plot it with PlotVsLTime
rsdrms_plot <- array(dim = c(dim(rsdrms$ratio)[1:2], 4, dim(rsdrms$ratio)[3]))
rsdrms_plot[, , 2, ] <- rsdrms$ratio
rsdrms_plot[, , 4, ] <- rsdrms$p.val
## Not run: 
PlotVsLTime(rsdrms_plot, toptitle = "Ratio ensemble spread / RMSE", ytitle = "", 
           monini = 11, limits = c(-1, 1.3), listexp = c('CMIP5 IC3'), 
           listobs = c('ERSST'), biglab = FALSE, siglev = TRUE) 

## End(Not run)


[Package s2dv version 2.0.0 Index]