%
% To start the document, use
%  \levela{...}
% For lover level, sections use
%  \levelb{...}
%  \levelc{...}
%
\levela{Theoretical formalism}
 \label{sec:formalism}

%
% Document history, format:
%  \starthistory
%    date1 & text .... \\
%    date2 & text .... \\
%    ....
%  \stophistory
%
\starthistory
  000306 & Written by Patrick Eriksson, partly 
           based on \citet{eriksson:99} and \\ & \citet{eriksson:00a}. \\
\stophistory



%
% Introduction
%
In this section a theoretical framework the forward model is
presented. The presentation follows \citet{rodgers:90}, but some
extensions are made, for example, the distinction between the
atmospheric and sensor parts of the forward model is also discussed.
After this chapter was written, C.D. Rodgers published a textbook
\citep{rodgers:00} presenting the formalism in more detail than
\citet{rodgers:90}. Modelling of sensor characteristics is not yet
included in ARTS (this part is so far covered by AMI), but treatment
of the sensor is here included for completness.



\levelb{The forward model}
 \label{sec:formalism:fm}
 
 The radiative intensity, \Mpi, at a point in the atmosphere, \Rds, for
 frequency \Frq\ and traversing in the direction, \ZntAng, is dependent
 on a variety of physical processes and continuous variables such as
 the temperature profile, \Tmp:
 \begin{equation}
   \Mpi = \trueFrwMdl(\Frq,\Rds,\ZntAng,\Tmp,\dots)
 \end{equation} 
 To detect the spectral radiation some kind of sensor, having a finite
 spatial and frequency resolution, is needed, and the observed
 spectrum becomes a vector, \MsrVct, instead of a continuous function.
 The atmospheric radiative transfer is simulated by a computer model
 using a limited number of parameters as input (that is, a discrete
 model), and the \textindex{forward model}, \FrwMdl, used in practice can
 be expressed as
 \begin{equation}
   \MsrVct = \FrwMdl(\aSttVct{\FrwMdl},\aFrwMdlVct{\FrwMdl}) + 
                      \MsrErrVct(\aSttVct{\MsrErrVct},\FrwMdlVct{\MsrErrVct})
  \label{eq:formalism:fm}
 \end{equation}
 where \aSttVct{\FrwMdl}, \aFrwMdlVct{\FrwMdl}, \aSttVct{\MsrErrVct}\ 
 and \aFrwMdlVct{\MsrErrVct} together give a total description of both
 the atmospheric and sensor states, and \MsrErrVct\ is the
 \textindex{measurement errors}. The parameters are divided in such way
 that \SttVct, the \textindex{state vector}, contains the parameters to
 be retrieved, and the remainder is given by \FrwMdlVct, the
 \textindex{model parameter vector}. The total state vector is
 \begin{equation}
   \SttVct = \left[ \begin{array}{c} \aSttVct{\FrwMdl} \\ 
                                     \aSttVct{\MsrErrVct} \end{array} \right]
 \end{equation}
 and the total model parameter vector is
 \begin{equation}
   \FrwMdlVct = \left[ \begin{array}{c} \aFrwMdlVct{\FrwMdl} \\ 
                                    \aFrwMdlVct{\MsrErrVct} \end{array} \right]
 \end{equation}
 The actual forward model consists of either empirically determined
 relationships, or numerical counterparts of the physical
 relationships needed to describe the radiative transfer and sensor
 effects. The forward model described here is mainly of the latter
 type, but some parts are more based on empirical investigations, such
 as the parameterisations of continuum absorption. 
  
 Both for the theoretical formalism and the practical implementation,
 it is suitable to make a separation of the forward model into two
 main sections, a first part describing the atmospheric radiative
 transfer for \textindex{pencil beam} (infinite spatial resolution)
 \textindex{monochromatic} (infinite frequency resolution) signals
 \citep{eriksson:99},
 \begin{equation}
   \MpiVct = \FrwMdl_r(\aSttVct{r},\aFrwMdlVct{r})
  \label{eq:formalism:fma}
 \end{equation}
 and a second part modelling sensor characteristics,
 \begin{equation}
   \MsrVct = \FrwMdl_s(\MpiVct,\aSttVct{s},\aFrwMdlVct{s}) + 
                       \MsrErrVct(\aSttVct{\MsrErrVct},\aFrwMdlVct{\MsrErrVct})
  \label{eq:formalism:fms}
 \end{equation}
 where \MpiVct\ is the vector holding the spectral values for the
 considered set of frequencies and viewing angles
 ($\MpiVct^i=\Mpi(\Frq^i,\ZntAng^i,\dots)$, where $i$ is the vector
 index), and \aSttVct{\FrwMdl} and \aFrwMdlVct{\FrwMdl} are separated
 correspondingly, that is, $\aSttVctTrp{\FrwMdl}=
 [\aSttVctTrp{r},\aSttVctTrp{s}]$ and $\aFrwMdlVctTrp{\FrwMdl}=
 [\aFrwMdlVctTrp{r},\aFrwMdlVctTrp{s}]$.  The vectors \SttVct\ and
 \FrwMdlVct\ can now be expressed as
 \begin{equation}
   \SttVct = \left[ \begin{array}{c} \aSttVct{r} \\ \aSttVct{s} \\ 
                                       \aSttVct{\MsrErrVct} \end{array} \right]
 \end{equation}
 and
 \begin{equation}
   \FrwMdlVct = \left[ \begin{array}{c} \aFrwMdlVct{r}\\ \aFrwMdlVct{s} \\ 
                                    \aFrwMdlVct{\MsrErrVct} \end{array}\right],
 \end{equation}
 respectively. The subscripts of \SttVct\ and \FrwMdlVct\ are below
 omitted as the distinction should be clear by the context.



\levelb{The sensor transfer matrix} 
 \label{sec:formalism:sensor}
  
 The modelling of the different sensor parts can be described by a
 number of of analytical expressions (see \citet{eriksson:97a}) that
 together makes the basis for the sensor model. These expressions are
 throughout linear operations and it possible, as suggested in
 \citet{eriksson:00a}, to implement the sensor model as a
 straightforward matrix multiplication:
 \begin{equation}
   \MsrVct = \SnsMtr \MpiVct + \MsrErrVct
  \label{eq:formalism:H}
 \end{equation}
 where \SnsMtr\ is here denoted as the \textindex{sensor transfer
   matrix}.  The matrix \SnsMtr\ can further incorporate effects of a
 \textindex{data reduction} and the total transfer matrix is then
 \begin{equation}
   \SnsMtr = \aSnsMtr{d} \aSnsMtr{s}
  \label{eq:formalism:Hs}
 \end{equation}
 as
 \begin{equation}
   \MsrVct = \aSnsMtr{d} \MsrVct' = \aSnsMtr{d} (\aSnsMtr{s} \MpiVct + 
                                    \MsrErrVct') = \SnsMtr \MpiVct + \MsrErrVct
  \label{eq:formalism:datared}
 \end{equation}
 where \aSnsMtr{d}\ is the \textindex{data reduction matrix},
 \aSnsMtr{s}\ the sensor matrix, and $\MsrVct'$ and $\MsrErrVct'$ are
 the measurement vector and the measurement errors, respectively,
 before data reduction.



\levelb{Weighting functions} 
 \label{sec:formalism:wfuns}
 
 \levelc{Basics} 
 
 A \textindex{weighting function} is the partial derivative of the
 spectrum vector \MsrVct\ with respect to some variable used by the
 forward model. As the input of the forward model is divided between
 \SttVct\ or \FrwMdlVct, the weighting functions are divided
 correspondingly between two matrices, the state weighting function
 matrix
 \begin{equation}
   \aWfnMtr{\SttVct} = \frac{\partial \MsrVct}{\partial \SttVct}
  \label{eq:formalism:kx}
 \end{equation}
 and the model parameter weighting function matrix
 \begin{equation}
   \aWfnMtr{\FrwMdlVct} = \frac{\partial \MsrVct}{\partial \FrwMdlVct}
  \label{eq:formalism:kb}
 \end{equation}
 For the practical calculations of the weighting functions, it is
 important to note that the atmospheric and sensor parts can be
 seperated. For example, if \SttVct\ only hold atmospheric and
 spectroscopic variables, \aWfnMtr{\SttVct}\ can be expressed as
 \begin{equation}
   \aWfnMtr{\SttVct} = \frac{\partial \MsrVct}{\partial \MpiVct}
                 \frac{\partial \MpiVct}{\partial \SttVct} =
         \SnsMtr \frac{\partial \MpiVct}{\partial \SttVct}
  \label{eq:formalism:kx2}
 \end{equation}
 This equation shows that the new parts needed to calculate
 atmospheric weighting functions, are functions giving $\partial\MpiVct /
 \partial \SttVct$ where \SttVct\ can represent the vertical profile of a
 species, atmospheric temperatures, spectroscopic data etc.
% The practical calculation of weighting functions is discussed in
% detail in Sections \ref{sec:wfuns} and \ref{sec:wfuns_sens}.


 \levelc{Transformation between \textindex{vector space}s}
 
 It could be of interest to transform a weighting function matrix from
 one vector space to another\footnote{This subject is also discussed
   in \citet{rodgers:00}, published after writing this.}. The new
 vector, $\SttVct'$, is here assumed to be of length $n$ $(\SttVct' \SzeSmb
 \MtrSpc{n}{1})$, while the original vector, \SttVct\ is of length $p$
 $(\SttVct \SzeSmb \MtrSpc{p}{1})$. The relationship between the two vector
 spaces is described by a transformation matrix \VctTrfMtr:
  \begin{equation}
    \SttVct = \VctTrfMtr \SttVct'
  \end{equation}
  where \VctTrfMtr \SzeSmb \MtrSpc{p}{n}. For example, if $\SttVct'$
  is assumed to be piecewise linear, then the columns of \VctTrfMtr\ contain
  tenth functions, that is, a function that are 1 at the point of
  interest and decreases linearly down to zero at the neighbouring
  points.  The matrix can also hold a reduced set of eigenvectors.
    
  The weighting function matrix corresponding to $\SttVct'$ is
  \begin{equation}
    \aWfnMtr{\SttVct'} = \frac{\partial \MsrVct}{\partial \SttVct'}
  \end{equation}
  This matrix is related to the weighting function matrix of \SttVct\ (Eq.
  \ref{eq:formalism:kx}) as
  \begin{equation}
    \aWfnMtr{\SttVct'} = \frac{\partial \MsrVct}{\partial \SttVct} 
                         \frac{\partial \SttVct}{\partial \SttVct'}
                       = \frac{\partial \MsrVct}{\partial \SttVct} \VctTrfMtr
                       = \aWfnMtr{\SttVct} \VctTrfMtr
  \end{equation}
  Note that
  \begin{equation}
    \aWfnMtr{\SttVct'}\SttVct' = \aWfnMtr{\SttVct}\VctTrfMtr\SttVct' 
                                                    =  \aWfnMtr{\SttVct}\SttVct
  \end{equation}
  However, it should be noted that this relationship only holds for
  those \SttVct\ that can be represented perfectly by some $\SttVct'$
  (or vice versa), that is, $\SttVct=\VctTrfMtr\SttVct'$, and not for
  all combinations of \SttVct\ and $\SttVct'$.

  If $\SttVct'$ is the vector to be retrieved, we have that \citep{rodgers:90}
  \begin{equation}
    \RtrVct' = \InvMdl(\MsrVct,\InvMdlVct) = 
                                         \TrfMdl(\SttVct,\FrwMdlVct,\InvMdlVct)
  \end{equation}
  where \InvMdl\ and \TrfMdl\ are the inverse and transfer model, respectively.

  The contribution function matrix is accordingly
  \begin{equation}
    \CtrFncMtr =  \frac{\partial \RtrVct'}{\partial \MsrVct}
  \end{equation}
  that is, \CtrFncMtr\ corresponds to $\aWfnMtr{\SttVct'}$, not 
  \aWfnMtr{\SttVct}.
  
  We have now two possible averaging kernel matrices
  \begin{equation}
    \aAvrKrnMtr{\SttVct} = \frac{\partial \RtrVct'}{\partial \SttVct} 
                         = \frac{\partial \RtrVct'}{\partial \MsrVct} 
                           \frac{\partial \MsrVct}{\partial \SttVct}
                         = \CtrFncMtr \aWfnMtr{\SttVct}
  \end{equation}
  \begin{equation}
    \aAvrKrnMtr{\SttVct'} = \frac{\partial \RtrVct'}{\partial \SttVct'} 
                          = \frac{\partial\RtrVct'} 
                       {\partial\MsrVct}\frac{\partial\MsrVct}{\partial\SttVct}
                            \frac{\partial\SttVct}{\partial\SttVct'}
                          = \CtrFncMtr \aWfnMtr{\SttVct'}
                          = \aAvrKrnMtr{\SttVct} \VctTrfMtr
  \end{equation}
  where $\aAvrKrnMtr{\SttVct} \SzeSmb \MtrSpc{p}{n}$ and
  $\aAvrKrnMtr{\SttVct'} \SzeSmb \MtrSpc{p}{p}$, that is, only
  \aAvrKrnMtr{\SttVct'} is square. If $p>n$, \aAvrKrnMtr{\SttVct}
  gives more detailed information about the shape of the averaging
  kernels than the standard matrix (\aAvrKrnMtr{\SttVct'}). If the
  retrieval grid used is coarse, it could be the case that
  \aAvrKrnMtr{\SttVct'} will not resolve all the oscillations of the
  averaging kernels, as shown in \citet[][Figure 11]{eriksson:99}.

  
  

    




%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "uguide"
%%% End: 
