\name{NAO}
\alias{NAO}
\title{
Compute the North Atlantic Oscillation (NAO) Index
}
\description{
Compute the North Atlantic Oscillation (NAO) index based on
the leading EOF of sea level pressure (SLP) anomalies. The
PCs are obtained by projecting the forecast and observed
anomalies onto the observed EOF pattern (Pobs) or the
forecast anomalies onto the EOF pattern of the other years
of the forecast (Pmod). By default (fcavt=2:4) NAO()
computes the NAO index for 1-month lead seasonal forecasts
that can be plotted with BoxPlot(). Returns cross-validated PCs 
of the NAO index for forecast (ano_exp) and observations (ano_obs) 
based on the leading EOF pattern.
}
\usage{
NAO(ano_exp, ano_obs, lon, lat, fcavt = 2:4, fcsys = 1, obsproj = TRUE)
}
\arguments{
  \item{ano_exp}{
Array of North Atlantic SLP (0-60N, 80W-0) forecast anomalies from 
\code{Ano()} or \code{Ano_CrossValid()} with dimensions (number of forecast 
systems, ensemble members, start years, forecast months, latitudes, 
longitudes).
  }
  \item{ano_obs}{
Array of North Atlantic SLP (0-60N, 80W-0) forecast anomalies from
\code{Ano()} or \code{Ano_CrossValid()} with dimensions (number of 
observation systems, ensemble members, start years, forecast months, 
latitudes, longitudes). CAUTION: For now code is adapted for one obs
dataset and member.
  }
  \item{lon}{
Vector with the longitudes of \code{ano_exp} and \code{ano_obs}.
  }
  \item{lat}{
Vector with the latitudes of \code{ano_exp} and \code{ano_obs}.
  }
  \item{fcavt}{
A vector with the forecast time steps to average across defining the target
period.
  }
  \item{fcsys}{
Number of the forecast system.
  }
  \item{obsproj}{
Whether to project the forecast anomalies on observed EOF pattern (Pobs), 
which is the default (TRUE), or to project on the EOF pattern of other 
years of the forecast (FALSE).
  }
}
\value{
  \item{NAOF.ver}{
Array of forecast NAO index in verification format (number of forecast 
systems, ensemble members, start dates, forecast horizons).
  }
  \item{NAOO.ver}{
Array of observed NAO index in verification format (1, 1, number of start
years, forecast horizons).
  }
  \item{OEOF}{
EOFs of the observational references.
  }
}
\examples{

}
\author{
History:\cr
0.1  -  2013-08  (F. Lienert, \email{flienert at ic3.cat})  -  Original code\cr
0.2  -  2014-03  (V. Guemas, \email{virginie.guemas at bsc.es})  -  Removing the 
rotation\cr
0.3  -  2014-05  (L. Batte, \email{lauriane.batte at ic3.cat})  -  Changes to
simplify function and add Pobs and Pmod options for NAO projection 
calculations\cr
0.4  -  2015-03  (L. Batte, \email{lauriane.batte at ic3.cat})  -  Polarity 
check and correction is wrong. Switched to have a negative NAO index when the
anomaly pattern corresponds to NAO-.
}
\keyword{datagen}
