\name{RatioSDRMS}
\alias{RatioSDRMS}
\alias{.RatioSDRMS}
\title{
Computes the ratio between the ensemble spread and RMSE 
}
\description{
Arrays var_exp & var_obs should have dimensions between\cr
  c(nmod/nexp, nmemb/nparam, nsdates, nltime)\cr
and\cr
  c(nmod/nexp, nmemb/nparam, nsdates, nltime, nlevel, nlat, nlon)\cr
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.\cr
The p-value is provided by a one-sided Fischer test.\cr
.RatioSDRMS provides the same functionality but taking a matrix of ensemble members as input (ens).
}
\usage{
RatioSDRMS(var_exp, var_obs, pval = TRUE)

.RatioSDRMS(ens, obs, pval = TRUE)
}
\arguments{
 \item{var_exp}{
Model data:\cr
  c(nmod/nexp, nmemb/nparam, nsdates, nltime) up to\cr
  c(nmod/nexp, nmemb/nparam, nsdates, nltime, nlevel, nlat, nlon)
  }
  \item{var_obs}{
Observational data:\cr
  c(nobs, nmemb, nsdates, nltime) up to\cr
  c(nobs, nmemb, nsdates, nltime, nlevel, nlat, nlon)
  }
  \item{ens}{
N by M matrix of N forecasts from M ensemble members.
  }
  \item{obs}{
Vector of the corresponding observations of length N.
  }
  \item{pval}{
Whether to compute the p-value of Ho : SD/RMSE = 1 or not.
  }
}
\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 \code{pval = TRUE}) of the one-sided Fisher test with Ho: SD/RMSE = 1.\cr
.RatioSDRMS:
\item{$ratio}{
The ratio of the ensemble spread and RMSE, 
  }
  \item{$p.val}{
Corresponds to the p values of the ratio (only present if \code{pval = TRUE}).
  } 

}
\examples{
# Load sample data as in Load() example:
example(Load)
rsdrms <- RatioSDRMS(sampleData$mod, sampleData$obs)
rsdrms2 <- array(dim = c(dim(rsdrms)[1:2], 4, dim(rsdrms)[4]))
rsdrms2[, , 2, ] <- rsdrms[, , 1, ]
rsdrms2[, , 4, ] <- rsdrms[, , 2, ]
PlotVsLTime(rsdrms2, 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')
}
\author{
History:\cr
0.1  -  2011-12  (V. Guemas, \email{virginie.guemas at ic3.cat})  -  Original code\cr
1.0  -  2013-09  (N. Manubens, \email{nicolau-manubens at ic3.cat})  -  Formatting to CRAN
}
\keyword{datagen}
