Learn R Programming

s2dverification (version 2.10.3)

RatioSDRMS: Computes the ratio between the ensemble spread and RMSE

Description

Arrays var_exp & var_obs should have dimensions between c(nmod/nexp, nmemb/nparam, nsdates, nltime) and c(nmod/nexp, nmemb/nparam, nsdates, nltime, nlevel, nlat, nlon) The ratio between the standard deviation of the members around the ensemble mean in var_exp and the RMSE between var_exp and var_obs is output for each experiment and each observational dataset. The p-value is provided by a one-sided Fischer test. .RatioSDRMS provides the same functionality but taking a matrix of ensemble members as input (exp).

Usage

RatioSDRMS(var_exp, var_obs, pval = TRUE)

.RatioSDRMS(exp, obs, pval = TRUE)

Arguments

var_exp

Model data: c(nmod/nexp, nmemb/nparam, nsdates, nltime) up to c(nmod/nexp, nmemb/nparam, nsdates, nltime, nlevel, nlat, nlon)

var_obs

Observational data: c(nobs, nmemb, nsdates, nltime) up to c(nobs, nmemb, nsdates, nltime, nlevel, nlat, nlon)

pval

Whether to compute the p-value of Ho : SD/RMSE = 1 or not.

exp

N by M matrix of N forecasts from M ensemble members.

obs

Vector of the corresponding observations of length N.

Value

RatioSDRMS: Array with dimensions c(nexp/nmod, nobs, 1 or 2, nltime) up to c(nexp/nmod, nobs, 1 or 2, nltime, nlevel, nlat, nlon). The 3rd dimension corresponds to the ratio (SD/RMSE) and the p.value (only present if pval = TRUE) of the one-sided Fisher test with Ho: SD/RMSE = 1. .RatioSDRMS:

  • $ratio The ratio of the ensemble spread and RMSE,

  • $p_val Corresponds to the p values of the ratio (only present if pval = TRUE).

Examples

Run this code
# NOT RUN {
# Load sample data as in Load() example:
example(Load)
rsdrms <- RatioSDRMS(sampleData$mod, sampleData$obs)
# Reorder the data in order to plot it with PlotVsLTime
rsdrms_plot <- array(dim = c(dim(rsdrms)[1:2], 4, dim(rsdrms)[4]))
rsdrms_plot[, , 2, ] <- rsdrms[, , 1, ]
rsdrms_plot[, , 4, ] <- rsdrms[, , 2, ]
 
# }
# 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, 
           fileout = 'tos_rsdrms.eps')
 
# }
# NOT RUN {
# The following example uses veriApply combined with .RatioSDRMS instead of RatioSDRMS
 
# }
# NOT RUN {
require(easyVerification)  
RatioSDRMS2 <- s2dverification:::.RatioSDRMS
rsdrms2 <- veriApply("RatioSDRMS2",
                    sampleData$mod,
                    # see ?veriApply for how to use the 'parallel' option
                    Mean1Dim(sampleData$obs, 2),
                    tdim = 3, ensdim = 2)
 
# }

Run the code above in your browser using DataLab