!BOI

!  !TITLE: The FVSSI System Documentation \\ Version 1.0

!  !AUTHORS:  Carlos Cruz

!  !AFFILIATION: GMAO, NASA/GSFC, Greenbelt, MD 20771

!  !DATE: July 2003

!  !INTRODUCTION: Package Overview 
%\setcounter{secnumdepth}{5}
%\setlength{\parskip}{0.5em}
This document describes the Finite Volume Spectral Statistical Interpolation 
System (FVSSI).  

The FVSSI system consists of the GMAO's FvGCM and NCEP's Spectral Statistical 
Interpolation (SSI) analysis components. It allows the conversion or transformation 
of meteorological fields represented in the FvGCM into the representation used
by NCEP's analysis system. This application will speifically transform restart files
from one system to the other.

The main challenge in building such a system consists in bridging
the scientific incompatibility between the two components. Specifically the FvGCM is an atmospheric model de
fined in physical space  (Lin 1995)  wheres the SSI is defined in spectral  space (Parrish \& Derber 1991).
The task of coupling the two components is performed by couplers which allow the tranformation of states spe
cific to one system to be used by the other. This document describes the steps taken by the FVSSI couplers a
nd some details concerning the execution of the FVSSI system, excluding the execution of the FvGCM.


The FVSSI cycle consists of four steps:

\begin{enumerate}
 \item Transform eta first guess to spectral space
\begin{equation}
    w^f \rightarrow ss^f
\end{equation}

\item Transform first guess in spectral space back to eta

\begin{equation}
    ss^f \rightarrow z^f
\end{equation}

Note that this state defines a new state $z^f$ and a new surface presure $q_s^f$
due to tranformation errors

\item Run the SSI and get analyzed state

\begin{equation}
    ss^f \rightarrow ss^a
\end{equation}

Note that this state defines an analyzed surface presure $q_s^a$

\item Transform analyzed state into eta

\begin{equation}
    ss^a \rightarrow z^a
\end{equation}

Steps 1-4 can be summarized as follows:

\begin{equation}
w\_f \rightarrow ss\_f \rightarrow SSI
\rightarrow ss\_a \rightarrow z\_a
\end{equation}

\item Run FvGCM and repeat step 1.

\end{enumerate}

\noindent Defining the first guess surface pressure as $p_s^f$
 a 'safe' surface pressure ensuring 'no data no harm' can be defined as\\

\begin{equation}
     p_s^a = p_s^f + ( q_s^a - q_s^f )
\end{equation}

\noindent so that now $z^f$, $z^a$ and $w^f$ must be remaped to the grid defined
 by $p_s^a$. The remapped states are denoted by $z_s^f$, $z_s^a$ and $w_s^f$
 and the final state is defined by\\

\begin{equation}
     w_s^a = w_s^f + ( z_s^a - z_s^f )
\end{equation}

%....................................................................

\section{FV2SS}

FV2SS is a program that converts an eta file containing the background
dynamics vector as generated by the FvGCM into a sigma file containing
the background dynamics vector in spectral space. The required input is
an eta file with various options:

\begin{tabbing}
        fv2ss.x etafile [options]
\end{tabbing}

\flushleft FV2SS performs 3 regridding steps:

\begin{enumerate}
\item Vertical regridding:
Regrid the FvGCM vertical grid from model levels to a SSI vertical
grid in sigma levels. This step is often called remapping.\\\item Horizontal regridding:
Regrid from FvGCM horizontal resolution (rlonxrlat) to gaussian
grid resolution (glonxglat)\\
\item Spectral regridding:
Transform the fields from physical space on a gaussian grid to spectral space via
FFT and legendre transforms.\\
\end{enumerate}

\noindent In (1) we need to have available the topographies that define each component.
 More on this later.

\noindent The overall flow of FV2SS is as follows:\\

\begin{itemize}
\item init     :  process command line
\item dyn\_get :  initialize eta dynamics vector
\item ss\_init :  initialize spectral space vector
\item xform    :  regridding transformations
\item ss\_put  :  write out spectral space vector to a file
\item clean    :  free up space
\end{itemize}

\flushleft Now we will enumerate the steps of the algorithm. \\
\newpage
\noindent ss\_init: initialize spectral space vector \\
\begin{itemize}
\item Create variables that make up the metadata of NCEP's SSI analysis file
\item Allocate and initialize spectral space vector
\end{itemize}

\flushleft xform: regridding transformations  \\
\begin{itemize}
\item put winds on 'A' grid before remapping
\item read NCEP topography
\item fv2ll (step (i))
\item [-] construct Fv pressure fields
\item [-] construct Fv heights
\item [-] compute $p_s$ consistent with NCEP topography
\item [-] compute NCEP pressure variables
\item [-] map Fv eta hybrid levels to NCEP sigma levels
\item [-] construct NCEP moisture and $T_d$
\item [-] check for supersaturation
\item ll2gg (step (ii))
compute gaussian grid lons and lats
\item [-] interpolate topography
\item [-] interpolate surface pressure
\item [-] interpolate delta $p_s$
\item [-] interpolate dry bulb temperature
\item [-] interpolate specific humidity
\item [-] interpolate u-wind
\item [-] interpolate v-wind
\item make\_surf : create SSI's surface first guess
\item [-] read FvGCM surface files containing:
\begin{itemize}
\item 10 meter u wind (m/s)
\item 10 meter V wind (m/s)
\item Surface skin temp (K)
\item Water equiv snow depth (m)
\item Top Soil Layer Wetness (fraction)
\item Temporarily use skin temp for soil temp
\item Vegetation fraction,  soil type and vegetation type read
      from a file (temporary)
\end{itemize}
\item [-] calculate gaussian grid
\item [-] put surface winds on 'A' grid
\item [-] calculate 10m wind factors and regrid
\item [-] regrid all fields
\item [-] write out fields to SSI surface file in correct order
\item gg2ss (step (iii))
\item [-] swap north-south pole of topography field
\item [-] FFT and LT topography field
\item [-] swap north-south pole of $p_s$ field
\item [-] FFT and LT $p_s$ field
\item [-] convert dry bulb T to virtual T
\item [-] swap north-south pole of dry bulb temperature field
\item [-] FFT and LT of dry bulb temperature field
\item [-] swap north-south pole of specific humidity field
\item [-] FFT and LT of specific humidity field
\item [-] swap north-south pole of u-v winds
\item [-] FFT and LT of u-v wind field

\item ss\_put: write out spectral space vector to a file
\item [-] write out metadata
\item [-] write out fields. note fields are written in reverse vertical order,
i.e. the SSI's top is eta's bottom. Furthermore ensure complex spectral
coefficients are zeroed out.
\item [-] when writing out tracers read a temporary file that contains the SSI's
(Note : the ozone field which is not yet available from the model).

\end{itemize}

\section{SS2FV}

SS2FV is a program that converts a sigma file containing the background
dynamics vector as generated by the NCEP SSI analysis into an eta file containing the background dynamics ve
ctor in physical space. The required input is
a sigma file and an eta file with various options:\\

\begin{tabbing}
        ss2fv.x sigmafile etafile [options]\\
\end{tabbing}

In step (2) SS2FV performs the same 3 regridding steps as FV2SS in opposite order. However in step (4) the r
emapping is performed 3 times on 3 different vectors to ensure 'no data no harm' as described in the introdu
ction.\\


\section{SSI}

The basic objective of the SSI is to minimize an objective function defined in terms of deviations of the an
alysis from the background variables. The objective function is given by

\begin{equation}
 J = J_{b} + J_{o}
\end{equation}

where $J_{b}$ is the fit of the background field to the analysis and $J_{o}$ is the fit of the observations
to the analysis. In the SSI J is minimized with respect to the analysis variables. These  latter are the sig
ma spectral coefficients of the amplitudes of empirical orthogonal functions (EOFs) for vorticity ($\zeta$),
 divergence (D), temperature (T), log of surface pressure (ln$p_{s}$) and mixing ratio (q).

For example, let $\zeta^{l}_{n}$ be the spectral coefficients of the vorticity, where l and n are the spheri
cal harmonics indices, so that the longitudinal wavenumber l and the two-dimensional wave number n satisfy

\begin{equation}
 -J \le l \le J,
 \mid n \mid \le l \le J
\end{equation}


where J is the triangular truncation wavenumber for horizontal resolution. Thus the spectral representation
of $\zeta$ at any point ($\lambda$,$\phi$) on the sphere is given by

\begin{equation}
 \zeta(\lambda,\phi) = \sum_{l=-J}^{J}\sum_{n=\mid l \mid}^{J} \zeta^{l}_{n}P^{l}_{n}(\phi)e^{il\lambda}
\end{equation}

where the $P^{l}_{n}(\phi)$ are the associated Legendre polynomials (e.g. Krishnamurti et al, 1998).

Running the ssi from the command line consists of entering: \\

\begin{tabbing}
        mpirun -np NPES ssi.x < ssi.rc
\end{tabbing}

\flushleft where NPES is the number of PEs used and ssi.rc is a namelist file (discussed below).\\

\section{Software}

A copy of this software, including the SSI, can be obtained through CVS at,\\
\begin{tabbing}
cvs -z3 -d:ext:\{userid\}@zeus.gsfc.nasa.gov:/CM/baseline/GEOS\_DAS co -r \{tag\} FVSSI\\
\end{tabbing}
where tag is for example fvssi-1\_0beta5. Also make sure you have set\\
\begin{tabbing}
setenv CVS\_RSH ssh\\
setenv CVSROOT :ext:zeus.gsfc.nasa.gov:/CM/baseline/GEOS\_DAS\\
\end{tabbing}

A set of data (2003061700) to perform a test run (on SGI machines only) can be obtained from tropic (note th
ere are two directories under ssidata):\\
\begin{tabbing}
tropic.gsfc.nasa.gov:/tmp/ccruz/ssidata/\\
tropic.gsfc.nasa.gov:/tmp/ccruz/fvdata/\\
\end{tabbing}
Note that these are quite large directories.\\

After check out,\\
\begin{tabbing}
cd FVSSI/src\\
configure\\
make export
\end{tabbing}

This will create executables and place them under FVSSI/bin. To run the test case

\begin{tabbing}
cd FVSSI/src/fvssi
\end{tabbing}

modify the manual settings in fvssiana.j and

\begin{tabbing}
qsub fvssiana.pbs
\end{tabbing}

The SSI data only includes enough observations to run one six hour segment.\\
As given the analysis will run at T62 resolution. To change the analysis settings you must modify the SSI na
melist.\\

\subsection [The namelist file]{ssi.rc}

The SSI requires a namelist file typically called ssiparm.anl but renamed to ssi.rc in the software distribu
tion. There several parameters that must be correctly set to ensure a successful execution of the SSI. Refer
 to the table below to revise and edit the file.\\
\begin{center}
\begin{tabular}{|c|c|c|c|}
\hline
resolution & T62  & T170 & T254 \\
jcap       & 62   & 170  & 254  \\
nlath      & 48   & 96   & 129  \\
nlon       & 192  & 386  & 512  \\
nsig       & 28   & 42   & 64   \\
deltim     & 1200 & 450  & 300  \\
NPES       & 32   & 86   & 130  \\
\hline
\end{tabular}
\end{center}


\flushleft The NPES is actually used at the command line to execute the SSI. The number given is the optimum
 number for a particular combination of triangular truncation (jcap) and number of vertical sigma levels (ns
ig).\\

\flushleft Other important parameters are:\\
\begin{itemize}
\item niter(1) : number of inner iterations in minimization loop
\item niter(2) : number of outer iterations in minimization loop
\item ampdivt : If set to zero (default), it skips the divergence tendency constraint calculation.
\item nsat : number of satellites in SATNAME namelist
\end{itemize}

All the other parameters can be left with their default values.


In addition to the main programs (fv2ss.x ss2fv.x ssi.x) there are a few other utilities that can come in ha
ndy while experimenting with FVSSI and they are (among others) :\\

ssstats.x : Consider a generic spectral coeffiecient $\alpha_{lm}$ where l varies from 0 to J and m varies f
rom -l to l. Then one can define the following spectral statistics:

Mean wave number:

\begin{equation}
   M = exp\biggl[
   \frac{\displaystyle
     \sum_{l=0}^{J}\sum_{m=-l}^{l}\alpha^{*}_{lm}\alpha_{lm}ln(l^{2}+m^{2})^{1/2}}
   {\displaystyle
     \sum_{l=0}^{J}\sum_{m=-l}^{l}\alpha^{*}_{lm}\alpha_{lm}}
   \biggr]
\end{equation}

RMS amplitude difference:

\begin{equation}
   RMSAD = \biggl[
   \frac
   {\displaystyle
     \sum_{l=0}^{J}\sum_{m=-l}^{l} w_{lm} (\mid \alpha_{lm} \mid - \mid \beta_{lm} \mid )^{2}}
   {\displaystyle
      \sum_{l=0}^{J}\sum_{m=-l}^{l} w_{lm} } \biggr]^{1/2}
\end{equation}

RMS phase difference:

\begin{equation}
   RMSPD = \biggl[
   \frac
   {\displaystyle
     \sum_{l=0}^{J}\sum_{m=-l}^{l} w_{lm} (arg(\alpha_{lm}) - arg(\beta_{lm}) )^{2}}
   {\displaystyle
      \sum_{l=0}^{J}\sum_{m=-l}^{l} w_{lm} } \biggr]^{1/2}
\end{equation}

where $w_{lm} = \sqrt{ \alpha^{*}_{lm}\alpha_{lm} } \sqrt{\beta^{*}_{lm}\beta_{lm} }$

ssinfo.x: provides info about a spectral file\\
sfc\_regrid.x: regrids an SSI surface file to a different resolution\\

\begin{thebibliography}{}

  \bibitem[Lin \& Rood (1995)]{fvgcm}
     \textsc{Lin, S. J. \& Rood, R.} 1995
     {TMultidimensional Flux-Form Semi-Lagrangian Transport Schemes.}
     \textit{Mon. Wea. Rev.} \textbf{124}, 2046--2070.

  \bibitem[Parrish \& Derber (1991)]{ncepssi}
     \textsc{Parrish, D. F. \& Derber, J. C.} 1991
     {The National Meterological Center's spectral statistical;
      interpolation analysis syetm.}
     \textit{Mon. Wea. Rev.} \textbf{120}, 1747--1763.

  \bibitem[Krishnamurti \& Bedi \& Hardiker (1991)]{spectral}
     \textsc{Krishnamurti, T.N.. \& Bedi, H. S. \& Hardiker, V. M.}
     {An Introduction to Global Spectral Modeling.}
     \textit{Oxford University Press} \textbf{1998}.

\end{thebibliography}

!EOI
