\section{The ECCO state estimation cost function DRAFT!!! \label{sectioneccocost}} The current ECCO state estimation covers an $nYears = 11$ year model trajectory. A variety of data sets enter a least squares cost function, in addition to penalty terms which constrain deviations of control variables beyound their a priori errors. \subsection{Sea surface height from TOPEX/Poseidon and ERS-1/2 altimetry} Altimetric SSH contributions from T/P and ERS-1/2 are four-fold: % \begin{enumerate} % \item an $nYears$ time mean SSH misfit between model and T/P % \item daily SSH anomaly misfits between T/P and model % \item daily SSH anomaly misfits between ERS-1/2 and model % \item daily absolute SSH misfit between T/P and model, weighted by the full geoid error covariance. % \end{enumerate} \subsubsection{Input fields} ~ \begin{table}[h!] \begin{center} \begin{tabular}{lllc} \hline \hline ~&~&~&~\\ field & file name & deccription & unit \\ ~&~&~&~\\ \hline ~&~&~&~\\ {\it psbar} & {\tt psbarfile} & daily model mean SSH fields & [m] \\ {\it tpmean} & {\tt topexmeanfile} & $nYears$ T/P mean & [cm] \\ {\it tpobs} & {\tt topexfile} & daily T/P SSH anomalies & [cm] \\ {\it erspobs} & {\tt ersfile} & daily ERS-1/2 SSH anomalies & [cm] \\ {\it wp} & {\tt geoid\_errfile} & diagonal of geoid error covariance & [m] \\ {\it wtp, wers} & {\tt ssh\_errfile} & rms of SSH anomalies & [cm] \\ ~&~&~&~\\ \hline \hline \end{tabular} \end{center} \end{table} \subsubsection{\textit{\textbf{nYears}} time mean SSH misfit} \begin{enumerate} % \item Compute 11yr model mean spatial distribution % \begin{equation} psmean(i,j)\, =\, \frac{1}{nDaysRec} \sum_{i=1}^{nDaysRec} psbar(i,j) \end{equation} % \item Compute global offset between 11-yr model and T/P mean: % \begin{equation} \begin{split} offset & = \, \overline{tpmean} \, - \, \overline{psmean} \\ ~ & = \, \frac{1}{normaliz.} \sum_{i,j} \left\{ tpmean(i,j) \, - \, psmean(i,j) \right\} \cdot cosphi(i,j) \cdot tpmeanmask(i,j) \end{split} \end{equation} % \item Misfits are computed w.r.t. global $offset$. \\ First spatial distribution: % \begin{equation} \begin{split} cost\_ssh\_mean(i,j) & = \, \frac{1}{wp^2} \left\{ \, \left[ \, psmean(i,j) - \overline{psmean} \, \right] \, - \, \left[ \, tpmean(i,j) - \overline{tpmean} \, \right] \, \right\}^2 \\ ~ & = \, \frac{1}{wp^2} \left\{ \, psmean(i,j) \, - \, tpmean(i,j) \, + \, offset \, \right\}^2 \end{split} \end{equation} % Finally, sum over all spatial entries: \begin{equation} \overline{cost\_ssh\_mean} \, = \, \sum_{i,j} cost\_ssh\_mean(i,j) \end{equation} \end{enumerate} \subsubsection{Misfit of daily SSH anomalies} Computation is same for T/P and ERS-1/2. Here we write out computation for T/P. \begin{enumerate} % \item Compute difference in anomalies: \begin{equation} \begin{split} cost\_ssh\_anom(i,j,t) & = \, \frac{1}{wtp^2} \left\{ \, \left[ \, psbar(i,j,t) - psmean(i,j) \, \right] \, - \, \left[ \, tpobs(i,j,t) \, \right] \, \right\}^2 \end{split} \end{equation} % where $t$ denotes time (day) index, and where it is assumed that $ nYears$ mean T/P spatial distribution $tpmean(i,j)$ has already been removed from data $tpobs(i,j)$! \item Sum over all spatial points and all times \begin{equation} \begin{split} \overline{cost\_ssh\_anom} & = \, \sum_{t} \sum_{i,j} cost\_ssh\_anom(i,j,t) \end{split} \end{equation} \end{enumerate} \subsubsection{Flow chart} \begin{verbatim} cost_ssh | |- < compute nYears model mean > | |- < read nYears T/P mean > | CALL COST_READTOPEXMEAN | |- < compute global T/P vs. model offset > | |- < compute cost_hmean > | CALL COST_SSH_MEAN | |- < ... > \end{verbatim} \subsubsection{Weights and notes} \begin{itemize} % \item All data are currently masked to zero where less than 13 depth levels, mimicing no contribution for depth less than 1000m. % \item $cosphi$ term in weights is set to 1. % \item bad T/P and ERS-1/2 values are flagged $ \le \, -9990. $ % \item T/P and ERS-1/2 data $ \le \, 1.\exp^{-8}$ cm are flagged as bad values % \item $wp$ is read from {\tt geoid\_errfile} and $1/wp^2$ is pre-computed in {\tt ecco\_cost\_weights} % \end{itemize} \paragraph{$wp$ for SSH mean misfit} ~ $1/wp^2$ is pre-computed in {\tt ecco\_cost\_weights}; \\ $wp$ is read from {\tt geoid\_errfile}; \paragraph{$wtp$ and $wers$ for SSH anomaly misfit} ~ $1/wtp^2$, $1/wers^2$ are pre-computed in {\tt ecco\_cost\_weights}; \\ % \begin{itemize} % \item $wtp$, $wers$ are read from single {\tt ssh\_errfile} % \item both are converted to meters and halved \\ $ wtp \, \longrightarrow \, wtp \cdot 0.01 \cdot 0.5 $ % \item ERS error is set to T/P error + 5cm \\ $ wers \, = \, wtp \, + 0.5cm $ % \end{itemize} \subsubsection{Cost diagnostics} \begin{itemize} % \item Map out $ cost\_ssh\_mean(i,j) $ % \item Map out $ cost\_ssh\_anom(i,j,t) $ averaged over 1 month, i.e. \[ \frac{1}{\text{monthly entries}} \sum_{t}^{monthly} cost\_ssh\_anom(i,j,t) \] % \item sum over daily entries and plot daily average as function of time. i.e. \[ \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 wtheta2} & {\tt temperrfile} & ~ & [$^{\circ}$C] \\ {\it wsalt2} & {\tt salterrfile} & ~ & [ppt] \\ ~&~&~&~\\ \hline \hline \end{tabular} \end{center} \end{table} \subsubsection{XBT data} \begin{equation} \begin{split} cost\_xbt\_t(i,j) & = \, \left[ \, \frac{cosphi \cdot mask}{wtheta2} \sum_{\tau=1}^{nMonsRec} \left\{ Tbar(\tau) \, - \, T2\theta[xbtobs(\tau)] \right\}^2 \, \right](i,j) \\ \end{split} \end{equation} \subsubsection{WOCE CTD data} \begin{equation} \begin{split} cost\_ctd\_t(i,j) & = \, \left[ \, \frac{cosphi \cdot mask}{wtheta2} \sum_{\tau=1}^{nMonsRec} \left\{ Tbar(\tau) \, - \, ctdTobs(\tau) \right\}^2 \, \right](i,j) \\ cost\_ctd\_s(i,j) & = \, \left[ \, \frac{cosphi \cdot mask}{wsalt2} \sum_{\tau=1}^{nMonsRec} \left\{ Sbar(\tau) \, - \, ctdSobs(\tau) \right\}^2 \, \right](i,j) \\ \end{split} \end{equation} \subsubsection{ARGO float data} \begin{equation} \begin{split} cost\_argo\_t(i,j) & = \, \left[ \, \frac{cosphi \cdot mask}{wtheta2} \sum_{\tau=1}^{nMonsRec} \left\{ Tbar(\tau) \, - \, T2\theta[argoTobs(\tau)] \right\}^2 \, \right](i,j) \\ cost\_argo\_s(i,j) & = \, \left[ \, \frac{cosphi \cdot mask}{wsalt2} \sum_{\tau=1}^{nMonsRec} \left\{ Sbar(\tau) \, - \, argoSobs(\tau) \right\}^2 \, \right](i,j) \\ \end{split} \end{equation} \subsubsection{Reynolds sea surface T, S data} \begin{equation} \begin{split} cost\_sst(i,j) & = \, \left[ \, \frac{cosphi \cdot mask}{wsst} \sum_{\tau=1}^{nMonsRec} \left\{ Tbar(\tau) \, - \, sstDat(\tau) \right\}^2 \, \right](i,j) \\ cost\_sss(i,j) & = \, \left[ \, \frac{cosphi \cdot mask}{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} \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 Spatially constant weights: % \begin{enumerate} % \item Read standard deviation fields \\ $ {\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) \cdot wti(k)} \\ wsalt(k) & = \, \frac{ratio}{wsi(k) \cdot wsi(k)} \\ \end{split} \] % \end{enumerate} % \item Spatially varying weights: % \begin{enumerate} % \item Read standard deviation fields \\ $ {\tt temperrfile} \, \longrightarrow \, wtheta2(i,j,k) $ \\ $ {\tt salterrfile} \, \longrightarrow \, wsalt2(i,j,k) $ \\ % \item Weights are combination of spatially constant and varying parts: \[ \begin{split} wtheta2(i,j,k) & = \, \frac{ratio} {wti(k) \cdot wti(k) \, + \,wtheta2(i,j,k) \cdot wtheta2(i,j,k) } \\ wsalt2(i,j,k) & = \, \frac{ratio} {wsi(k) \cdot wsi(k) \, + \,wsalt2(i,j,k) \cdot wsalt2(i,j,k) } \\ \end{split} \] % \end{enumerate} % \item Sea surface $T$, $S$ weights: \begin{itemize} \item SST: $ wsst \, = \, wtheta(1)$: horizontally constant \item SSS: $ wsss \, = \, 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)$, $wsalt2(i,j)$. % \end{itemize}