Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RatioSDRMS.R
\name{RatioSDRMS}
\alias{RatioSDRMS}
\title{Compute the ratio between the ensemble spread and RMSE}
\usage{
RatioSDRMS(
exp,
obs,
dat_dim = "dataset",
memb_dim = "member",
time_dim = "sdate",
pval = TRUE,
ncores = NULL
)
}
\arguments{
\item{exp}{A named numeric array of experimental data with at least two
dimensions 'memb_dim' and 'time_dim'.}
\item{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'.}
\item{dat_dim}{A character string indicating the name of dataset (nobs/nexp)
dimension. If there is no dataset dimension, set as NULL. The default value
is 'dataset'.}
\item{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'.}
\item{time_dim}{A character string indicating the name of dimension along
which the ratio is computed. The default value is 'sdate'.}
\item{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.}
\item{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'.
(only present if \code{pval = TRUE}) of the one-sided Fisher test with
Ho: SD/RMSE = 1.\cr\cr
\item{$ratio}{
The ratio of the ensemble spread and RMSE.
}
\item{$p_val}{
The p-value of the one-sided Fisher test with Ho: SD/RMSE = 1. Only present
if \code{pval = TRUE}.
}
}
\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
Fischer test.
}
\examples{
# Load sample data as in Load() example:
example(Load)
rsdrms <- RatioSDRMS(sampleData$mod, sampleData$obs)
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
\donttest{
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')
}