% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AnoMultiOptions.R
\name{AnoMultiOptions}
\alias{AnoMultiOptions}
\title{Anomalies relative to a climatology along selected dimension with or without cross-validation}
\usage{
AnoMultiOptions(var_exp = NULL, var_obs = NULL, cross = FALSE,
  memb = TRUE, dim_ano = 3)
}
\arguments{
\item{var_exp}{A multidimensional array related to experimental simulations with the specific 
dimensions required by Clim(): i.e. \code{dim(var_exp)} goes from c(nmod/nexp, nmemb/nparam, nsdates, nltime) 
up to c(nmod/nexp, nmemb/nparam, nsdates, nltime, nlevel, nlat, nlon).}

\item{var_obs}{A multidimensional array related to observations with the specific dimensions required 
by Clim(): i.e. \code{dim(var_exp)} goes from c(nmod/nexp, nmemb/nparam, nsdates, nltime) up to 
c(nmod/nexp, nmemb/nparam, nsdates, nltime, nlevel, nlat, nlon)}

\item{cross}{A logical value indicating whether cross-validation should be applied or not. Default = FALSE.}

\item{memb}{A logical value indicating whether Clim() computes one climatology for each experimental data 
product member(TRUE) or it computes one sole climatology for all members (FALSE). Default = TRUE.}

\item{dim_ano}{An integer indicating the dimension along which the climatology will be computed. It 
usually corresponds to 3 (sdates) or 4 (ftime). Default = 3.}
}
\value{
A list of length 2:
\itemize{
\item\code{$var_exp}{ Array of anomalies for \code{var_exp} with same dimensions input.}
\item\code{$var_obs}{ Array of anomalies for \code{var_obs} with same dimensions input.}}
}
\description{
This function computes the anomalies relative to a climatology computed along the 
selected dimension (usually starting dates or forecast time) allowing the application or not of
crossvalidated climatologies. The computation is carried out independently for experimental and 
observational data products.
}
\examples{

# Example 1:

dim_exp=c(mod = 1, member = 3, sdates = 2, ftime = 100)
dim_obs=c(mod = 1, member = 1, sdates = 2, ftime = 100)

var_exp = array(rnorm(prod(dim_exp)), dim=dim_exp)
var_obs = array(rnorm(prod(dim_obs)), dim=dim_obs)

Computation of anomalies without cross-validation
anoM <- AnoMultiOptions(var_exp = var_exp, var_obs = var_obs, 
                       cross = FALSE, memb = TRUE)
str(anoM)


# Example 2:

dim_exp=c(mod = 1, member = 3, sdates = 2, ftime = 100, nlon = 100, nlat = 50)
dim_obs=c(mod = 1, member = 1, sdates = 2, ftime = 100, nlon = 100, nlat = 50)

var_exp = array(rnorm(prod(dim_exp)), dim=dim_exp)
var_obs = array(rnorm(prod(dim_obs)), dim=dim_obs)

Computation of anomalies with cross-validation using kharin and NDV methods
anoM <- AnoMultiOptions(var_exp = var_exp, var_obs = var_obs, 
                       cross = TRUE, memb = TRUE)
str(anoM)
anoM <- AnoMultiOptions2(var_exp = var_exp)

}
\seealso{
\code{\link{Ano_CrossValid, }} 
\code{\link{Clim.}}
}

