--- manual/s_ecco/text/ecco_costfunction.tex	2004/05/11 21:55:14	1.1
+++ manual/s_ecco/text/ecco_costfunction.tex	2004/07/08 23:18:08	1.3
@@ -54,12 +54,12 @@
 \end{table}
 
 
-\subsubsection{$nYears$ time mean SSH misfit}
+\subsubsection{\textit{\textbf{nYears}} time mean SSH misfit}
 
 \begin{enumerate}
 %
 \item
-Compute 11yr model mean spatial distribution
+Compute $nYears$ model mean spatial distribution
 %
 \begin{equation}
 psmean(i,j)\, =\, 
@@ -68,7 +68,7 @@
 \end{equation}
 %
 \item
-Compute global offset between 11-yr model and T/P mean:
+Compute global offset between $nYears$ model and T/P mean:
 %
 \begin{equation}
 \begin{split}
@@ -161,7 +161,7 @@
 
 \end{verbatim}
 
-\subsubsection{Weights}
+\subsubsection{Weights and notes}
 
 \begin{itemize}
 %
@@ -227,3 +227,243 @@
 \frac{1}{\text{daily entries}} \sum_{i,j} cost\_ssh\_anom(i,j,t)
 \]
 \end{itemize}
+
+\subsection{Hydrographic constraints}
+
+Observation of temperature and salinity from various sources are
+used to constrain the model. These are:
+%
+\begin{enumerate}
+%
+\item
+CTD obs. for $T$, $S$ from various WOCE sections
+%
+\item
+XBT obs. for $T$
+%
+\item
+Sea surface temperature (SST) and salinity (SSS) from
+Reynolds et al. (???)
+%
+\item
+$T$, $S$ from ARGO floats
+%
+\item
+$T$, $S$ from fields from Levitus (???)
+%
+\end{enumerate}
+
+\subsubsection{Input fields}
+~
+
+\begin{table}[h!]
+\begin{center}
+\begin{tabular}{lllc}
+\hline \hline
+~&~&~&~\\
+field & file name & deccription & unit \\
+~&~&~&~\\
+\hline
+~&~&~&~\\
+{\it tbar} & {\tt tbarfile} & monthly model mean pot. temperature & 
+[$^{\circ}$C] \\
+{\it sbar} & {\tt sbarfile} & monthly model mean salinity & 
+[ppt] \\
+{\it tdat} & {\tt tdatfile} & monthly mean Levitus pot. temperature & 
+[$^{\circ}$C] \\
+{\it sdat} & {\tt sdatfile} & monthly mean Levitus salinity & 
+[ppt] \\
+{\it ctdtobs}  & {\tt ctdtfile} & monthly WOCE CTD pot. temperature & 
+[$^{\circ}$C] \\
+{\it ctdsobs}  & {\tt ctdsfile} & monthly WOCE CTD salinity & 
+[ppt] \\
+{\it xbtobs} & {\tt xbtfile} & monthly XBT in-situ(!) temperature & 
+[$^{\circ}$C] \\
+{\it sstdat}  & {\tt sstdatfile} & monthly Reynolds pot. SST & 
+[$^{\circ}$C] \\
+{\it sssdat}  & {\tt sssdatfile} & monthly Reynolds SSS & 
+[ppt] \\
+{\it argotobs}  & {\tt argotfile} & monthly ARGO in-situ(!) temperature & 
+[$^{\circ}$C] \\
+{\it argosobs}  & {\tt argosfile} & monthly ARGO salinity & 
+[ppt] \\
+{\it wti, wsi} & {\tt data\_errfile} & vert. stdev. profile for $T$, $S$ &
+~ \\
+{\it wtvar} & {\tt temperrfile} & spatially varying stdev. & [$^{\circ}$C] \\
+{\it wsvar} & {\tt salterrfile} & spatially varying stdev. & [ppt] \\
+~&~&~&~\\
+\hline \hline
+\end{tabular}
+\end{center}
+\end{table}
+
+\subsubsection{XBT data}
+
+\begin{equation}
+\begin{split}
+cost\_xbt\_t(i,j,k) & = \,
+\left[ \, \frac{fac \cdot ratio}{wti^2 + wtvar^2} \sum_{\tau=1}^{nMonsRec}
+\left\{ Tbar(\tau) \, - \, T2\theta[xbtobs(\tau)] \right\}^2 \, \right](i,j,k)
+ \\
+\end{split}
+\end{equation}
+
+\subsubsection{WOCE CTD data}
+
+\begin{equation}
+\begin{split}
+cost\_ctd\_t(i,j,k) & = \,
+\left[ \, \frac{fac \cdot ratio}{wti^2 + wtvar^2} \sum_{\tau=1}^{nMonsRec}
+\left\{ Tbar(\tau) \, - \, ctdTobs(\tau) \right\}^2 \, \right](i,j,k)
+ \\
+cost\_ctd\_s(i,j,k) & = \,
+\left[ \, \frac{fac \cdot ratio}{wsi^2 + wsvar^2} \sum_{\tau=1}^{nMonsRec}
+\left\{ Sbar(\tau) \, - \, ctdSobs(\tau) \right\}^2 \, \right](i,j,k)
+ \\
+\end{split}
+\end{equation}
+
+\subsubsection{ARGO float data}
+
+\begin{equation}
+\begin{split}
+cost\_argo\_t(i,j,k) & = \,
+\left[ \, \frac{fac \cdot ratio}{wti^2 + wvar^2} \sum_{\tau=1}^{nMonsRec}
+\left\{ Tbar(\tau) \, - \, T2\theta[argoTobs(\tau)] \right\}^2 \, \right](i,j,k)
+ \\
+cost\_argo\_s(i,j,k) & = \,
+\left[ \, \frac{fac \cdot ratio}{wsi^2 + wsvar^2} \sum_{\tau=1}^{nMonsRec}
+\left\{ Sbar(\tau) \, - \, argoSobs(\tau) \right\}^2 \, \right](i,j,k)
+ \\
+\end{split}
+\end{equation}
+
+\subsubsection{Reynolds sea surface T, S data}
+
+\begin{equation}
+\begin{split}
+cost\_sst(i,j) & = \,
+\left[ \, wsst \sum_{\tau=1}^{nMonsRec}
+\left\{ Tbar(\tau) \, - \, sstDat(\tau) \right\}^2 \, \right](i,j)
+ \\
+cost\_sss(i,j) & = \,
+\left[ \, wsss \sum_{\tau=1}^{nMonsRec}
+\left\{ Sbar(\tau) \, - \, sssDat(\tau) \right\}^2 \, \right](i,j)
+ \\
+\end{split}
+\end{equation}
+
+\subsubsection{Levitus montly T, S climatological data}
+
+Model vs. data misfits are taken from $nYears$ monthly model means
+vs. Levitus monthly data.
+The description below is for potential temperature.
+Procedure for salinity is fully analogous.
+Spatial indices $(i,j,k)$ are omitted throughout.
+%
+\begin{enumerate}
+%
+\item
+Compute $nYears$ monthly model means for each month $imon$:
+\[
+\overline{Tbar}(imon) \, = \, \frac{1}{nYears} 
+\sum_{iyear=1}^{nYears} Tbar(iyear,imon)
+\]
+%
+\item
+Compute misfit:
+\[
+cost\_theta(i,j,k) \, = \, \left[ 
+\frac{fac \cdot ratio}{wti^2} \sum_{imon=1}^{12}
+\left\{ \overline{Tbar}(imon) \, - \, Tdat(imon) \right\}^2  \right] (i,j,k)
+\]
+
+\end{enumerate}
+
+
+\subsubsection{Weights and notes}
+
+\begin{itemize}
+%
+\item
+$T2\theta$ is an operator mapping in-situ to potential temperatures
+%
+\item
+Latitudinal weight not used:
+\[
+cosphi(i,j) \, = \, 1
+\]
+%
+\item
+$ fac \, = \, cosphi \cdot mask $
+%
+\item
+Spatially {\it constant} weights:
+%
+\begin{enumerate}
+%
+\item
+Read standard deviation vertical profiles for $T$, $S$ \\
+$ {\tt data\_errfile} \, \longrightarrow \, 
+wti(k), \,\, wsi(k) $ \\
+$ {\tt data\_errfile} \, \longrightarrow \, 
+ratio = 0.25 = \left( \frac{1}{2} \right)^2 $
+%
+\item
+Take inverse squares:
+\[
+\begin{split}
+wtheta(k) & = \, \frac{ratio}{wti(k)^2} \\
+wsalt(k) & = \, \frac{ratio}{wsi(k)^2} \\
+\end{split}
+\]
+%
+\end{enumerate}
+%
+\item
+Spatially {\it varying} weights:
+%
+\begin{enumerate}
+%
+\item
+Read standard deviation fields \\
+$ {\tt temperrfile} \, \longrightarrow \, wtvar(i,j,k) $ \\
+$ {\tt salterrfile} \, \longrightarrow \, wsvar(i,j,k) $ \\
+%
+\item
+Weights are combination of spatially constant and varying parts:
+\[
+\begin{split}
+wtheta2(i,j,k) & = \, \frac{ratio}
+{wti(k)^2 \, + \,wtvar(i,j,k)^2 } \\
+wsalt2(i,j,k) & = \, 
+\frac{ratio}
+{wsi(k)^2 \, + \,wsvar(i,j,k)^2 } \\
+\end{split}
+\]
+%
+\end{enumerate}
+%
+\item
+Sea surface $T$, $S$ weights:
+\begin{itemize}
+\item
+SST: $ wsst \, = \, fac \cdot wtheta(1)$: horizontally constant
+\item
+SSS: $ wsss \, = \, fac \cdot wsalt2(i,j,1)$: horizontally varying
+\end{itemize}
+(Why this difference? I don't know.)
+%
+\end{itemize}
+
+
+\subsubsection{Diagnostics}
+
+\begin{itemize}
+%
+\item
+Map out $wtheta2(i,j,k)$, $wsalt2(i,j,k)$.
+
+%
+\end{itemize}
+
