%
% To start the document, use
%  \chapter{...}
% For lover level, sections use
%  \section{...}
%  \subsection{...}
%
\chapter{Atmospheric weighting functions}
 \label{sec:wfuns}


%
% Document history, format:
%  \starthistory
%    date1 & text .... \\
%    date2 & text .... \\
%    ....
%  \stophistory
%
\starthistory
  000310 & Started by Patrick Eriksson.\\
  000911 & First version finished by Patrick Eriksson.\\
\stophistory


%
% Symbol table, format:
%  \startsymbols
%    ... & \verb|...| & text ... \\
%    ... & \verb|...| & text ... \\
%    ....
%  \stopsymbols
%
%
%\startsymbols
%  -- & -- & -- \\
% \label{symtable:wfuns}     
%\stopsymbols



%
% Introduction
%
This section describes how the calculation of the atmospheric weighting
functions (WFs) matrices is performed in the forward model. For
several types of variables (such as species profiles and fit of
absorption continuum) WFs are obtained by semi-analytical expressions,
while for other quantities the WFs are obtained by straightforward
perturbation calculations.



\section{Calculation approaches}
 \label{sec:wfuns:approaches}

  \subsection{Pure numerical calculation} 
  The most straightforward method to determine WFs is by perturbing
  one parameter at a time. For example, the WF for the state variable
  $p$ can always be calculated as
  \begin{equation}
    \K_{\xt}^p = \frac{\fm(\xt+\Delta\xt^p\mat{e}^p,\bt)-\fm(\xt,\bt)}
                                     {\Delta\xt^p}
   \label{eq:wfuns:perturb}
  \end{equation}
  where $\K_{\xt}^p$ is column $p$ of \Kx, $(\xt,\bt)$ is the
  linearization state, $\mat{e}^p$ is a vector of zeros except for the
  component $p$ that is unity, and $\Delta\xt^p$ is a small disturbance
  (but sufficiently large to avoid numerical instabilities).
  
  However, it is normally not needed to make a recalculation using the
  total forward model as the variables are in general either part of the
  atmospheric or the sensor state, but not both. If $\xt^p$ is an atmospheric
  variable, the calculation can be performed as (Eq. \ref{eq:formalism:kx2})
  \begin{equation}
    \K_{\xt}^p = \Hm \bigg[
    \frac{\fm_r(\xt_r+\Delta\xt^p\mat{e}^p,\bt_r)-
           \fm_r(\xt_r,\bt_r)}  {\Delta\xt^p} \bigg]
   \label{eq:wfuns:Hpert}
  \end{equation}
  where $\xt_r$ is the atmospheric part of the state vector etc (see
  further Sec. \ref{sec:formalism}).
 

  \subsection{Analytical expressions} 
  \label{sec:wfuns:approaches:anal}
  For some atmospheric variables, such as species abundance, it is
  possible to derive a semi-analytical expression for the WFs. This is
  advantageous because it results in faster and more accurate
  calculations. By Equation \ref{eq:formalism:kx2},
  \begin{eqnarray*}
    \Kx = \Hm\frac{\partial\iv}{\partial \xt},
  \end{eqnarray*}
  it can be seen that the core problem of finding these analytical
  expressions is to determine $\partial\iv / \partial \xt$. 
  If $\xt^p$ influences only the conditions at one altitude, the
  problem can be simplified as \citep[][Eq. 43]{eriksson:00a}
  \begin{equation}
    \K_{\xt}^p = \Hm \frac{\partial\iv}{\partial \xt^p} = 
      \Hm \Bigg[ \frac{\partial\iv}{\partial \mat{S}^p}
                 \frac{\partial \mat{S}^p}{\partial \xt^p} +
                 \frac{\partial\iv}{\partial \mat{k}^p}
                 \frac{\partial \mat{k}^p}{\partial \xt^p} \Bigg]
   \label{eq:wfuns:taylor}
  \end{equation}
  where $\mat{S}^p$ and $\mat{k}^p$ are the source function and the
  absorption at the (vertical) altitude $p$, respectively.
  
  It is very important to note that the analytical expressions are
  derived with the assumption that $\xt^p$ influences only the local
  conditions. For species it is further assumed that the absorption
  can be expressed as (see Section \ref{sec:wfuns:species} for
  definitions and details)
  \begin{equation}
   \mat{k}^p = \mat{\bar{k}}^p_s \xt^p + \sum_{i\ne s} \mat{k}^p_i
  \end{equation}
  These assumption should be of general validity
  for species above the tropopause. Two examples on when the
  analytical expressions will be approximative are
  \begin{itemize}
  \item The variable of interest can change the line-of-sight (by the
    refractive index). This is an example of a non-local effect. This
    is always valid for temperature.
  \item The amount of different species must be considered when
    calculating the pressure broadening, and not only the total
    absorption.
  \end{itemize}
  If the analytical expressions can be used for such cases must be
  tested numerically. When it is found that the analytical approach
  cannot be used, the WFs must be calculated by perturbations to
  include the neglected effects (such a function for species is not
  yet implemented in ARTS). An important example when these questions
  must be considered is limb sounding of water vapor in the
  troposphere where both points above are true. The abundance of water
  in the troposphere is sufficient high to have a significant
  influence on both the refractive index and the pressure broadening.
  These questions are discussed somewhat further in \citet{eriksson:01d}.

  The absorption and source function in Equation \ref{eq:wfuns:taylor}
  are defined in vertical coordinates (as we retrieve atmospheric
  variables as functions of altitude). For different reasons it is
  more practical to work with these quantities defined along the LOS.
  For example, the source function and transmission along the LOS are
  already determined when calculating the spectra. To solve this
  problem, Equation \ref{eq:wfuns:taylor} is expanded one step further
  \begin{equation}
    \K_{\xt}^p = \Hm \Bigg[ \frac{\partial\iv}{\partial \sigma}
                 \frac{\partial \sigma}{\partial \mat{S}^p} 
                 \frac{\partial \mat{S}^p}{\partial \xt^p} +
                 \frac{\partial\iv}{\partial \kappa}
                 \frac{\partial \kappa}{\partial \mat{k}^p}
                 \frac{\partial \mat{k}^p}{\partial \xt^p} \Bigg]
   \label{eq:wfuns:taylor2}
  \end{equation}
  where $\sigma$ and $\kappa$ are the source function and the absorption 
  along the LOS, respectively.
  
  The term $\partial\iv / \partial \sigma$ is here denoted as source
  line of sight weighting functions (source LOS WFs) and is discussed
  in Section \ref{sec:wfuns:sourceloswfs}. The term $\partial\iv/
  \partial \kappa$ is denoted as absorption LOS WFs and is discussed
  in Sections \ref{sec:wfuns:absloswfs} and
  \ref{sec:wfuns:absloswfs2}. These terms are treated separately as
  they are common for all variables influencing the source function or
  the absorption.

  The term $\partial \mat{S}^p/\partial \xt^p$ can often be neglected.
  When scattering is neglected and local thermodynamic equilibrium is
  assumed, the only variable of interest affecting the source function
  is the temperature.  See further Section \ref{sec:wfuns:temp}. For
  other variables, such as species abundance, $\partial
  \mat{S}^p/\partial \xt^p=0$.
  
  It was decided to allow that the retrieval grids differ between
  species, temperature etc. This results in that the terms $\partial
  \sigma/ \partial \mat{S}^p$ and $\partial \kappa/ \partial
  \mat{k}^p$ are not constant, they change according to the selected
  retrieval grid. Accordingly, it is not suitable to include these terms
  in the corresponding LOS WFs, they must be treated separately.
  
  

\section{Absorption LOS WFs with emission}
 \label{sec:wfuns:absloswfs}

 The absorption line of sight weighting functions are defined as
 \begin{equation}
   \K_{\kappa}^q =  \frac{\partial\iv}{\partial \kappa^q}
  \label{eq:wfuns:loswfs}
 \end{equation}
 These weighting functions express how the intensity is
 affected by changes of the absorption at the points of the line of
 sight. Note that $\kappa$ is the total absorption, not the
 absorption of a single species. 
 
 For simplicity, the absorption LOS WFs are below derived without
 using vector notation. The notation used here is identical to the one
 used in Section \ref{sec:rte}. The calculation approach used for the
 LOS WFs is ``inspired'' by the corresponding work in
 \citet{master00}.


 \subsection{Single pass}
 \label{sec:wfuns:single}
 
 This section derives the absorption LOS WFs for cases when each
 individual part of the atmosphere is passed only once, as for upward
 looking measurements, or when each point in the atmosphere is treated
 separately (2D simulations). With other words, the conditions are not
 assumed to be symmetrical around some point. Accordingly, 1D limb
 sounding and 1D downward observations are not treated here, and are
 instead discussed in Section \ref{sec:wfuns:limb} and
 \ref{sec:wfuns:down}, respectively.

 \begin{figure}[t]
  \begin{center}
   \includegraphics*[width=0.95\hsize]{Figs/wf1}
   \caption{The terms used for the derivation of line of sight weighting
            functions when the individual atmospheric parts are passed a
            single time. The variables are defined in Figure 
            \ref{fig:rte:los}.}
   \label{fig:wfuns:single}  
  \end{center}
 \end{figure}

 By rewriting Equation \ref{eq:rte:rteprod}, the monochromatic pencil beam
 intensity can be expressed in the following ways (see Fig. 
 \ref{fig:wfuns:single})\footnote{The indexing used here is 1-based 
  (starts at 1), while inside ARTS 0-based indexing is used.}
 \begin{eqnarray}
   I &=& I_2\zeta_1+\psi_1(1-\zeta_1) \quad (q=1) 
     \nonumber \\
   I &=&\Big[I_{q+1}\zeta_q\zeta_{q-1}+\psi_q(1-\zeta_q)\zeta_{q-1} +
            \psi_{q-1}(1-\zeta_{q-1}) \Big] \Theta^{q-1}_1, \quad 1<q<n 
    \label{eq:wfuns:mpbi} \\
   I &=& \Big[I_n\zeta_{n-1}+\psi_{n-1}(1-\zeta_{n-1})\Big]\Theta^{n-1}_{1}
     \quad (q=n)
     \nonumber
 \end{eqnarray}
 where it assumed that the LOS has $n$ points, index 1 is the point
 closest to the sensor,
 \begin{equation}
   I_q = I_n \Theta^{n}_{q} + \sum_{i=q}^{n-1}\psi_i(1-\zeta_i) 
             \Theta_{q}^{i}, \quad 1 \leq q < n
  \label{eq:wfuns:iq}
 \end{equation}
 is the intensity reaching point $q$ along the LOS, $I_n$ is the radiation at
 point n (the radiation entering the atmosphere), and
 \begin{equation}
   \Theta_q^p = \prod_{i=q}^{p-1}\zeta_i\quad \mathrm{for} \quad p>q, 
     \quad \mathrm{and} \quad \Theta_p^p = 1
  \label{eq:wfuns:Theta}
 \end{equation}
 the transmission from point $q$ and $p$. It should be noted that
 $I_q$ and $\Theta_q^p$ not are calculated as indicated by the
 equations above. These quantities are instead updated when going from
 one step of the LOS to the next, as described below. It should also be
 noted that ground reflections are here neglected and are discussed 
 separately below.

 The transmissions $\zeta_{q-1}$ and $\zeta_q$ are separated in Equation
 \ref{eq:wfuns:mpbi} as they are the only terms including the absorption
 at point $q$. For example
 \begin{equation}
   \zeta_{q-1} = e^{-\Delta l(\kappa_{q-1}+\kappa_q)/2}
 \end{equation}
 and we have that
 \begin{equation}
   \frac{\partial \zeta_q}{\partial \kappa_q} = -\frac{\Delta l}{2}\zeta_q
  \label{eq:wfuns:dzeta1}
 \end{equation}
 \begin{equation}
   \frac{\partial\zeta_{q-1}}{\partial \kappa_q}=-\frac{\Delta l}{2}\zeta_{q-1}
 \end{equation}
 \begin{equation}
   \frac{\partial \zeta_{q-1}\zeta_q}{\partial \kappa_q} = 
          -\Delta l \zeta_{q-1}\zeta_q
  \label{eq:wfuns:dzeta2}
 \end{equation}
 The derivate of transmission values beside $\zeta_q$ and
 $\zeta_{q-1}$ with respect to $\kappa_q$ is zero.

 The LOS WFs are now easily determined, using the case $1<q<n$ as example
 \begin{equation}
   \K_{\kappa}^q = -\frac{\Delta l}{2} \Big[ 2I_{q+1}\zeta_q\zeta_{q-1}+
     \psi_q(1-2\zeta_q)\zeta_{q-1} - \psi_{q-1}\zeta_{q-1} \Big] 
     \Theta^{q-1}_1, \, 1<q<n
 \end{equation}
 which can be rewritten as
 \begin{eqnarray}
   \K_{\kappa}^1 &=& -\frac{\Delta l}{2} \big[ I_2-\psi_1 \big] \Theta^2_1 \nonumber \\
   \K_{\kappa}^q &=& -\frac{\Delta l}{2} \big[ 2(I_{q+1}-\psi_q)\zeta_q+
           \psi_q-\psi_{q-1} \big] \Theta^q_1, \quad 1<q<n 
  \label{eq:wfuns:loswfsxx} \\
   \K_{\kappa}^n &=& -\frac{\Delta l}{2} \big[ I_n-\psi_{n-1} \big] \Theta^n_1 \nonumber
 \end{eqnarray}
 Note that one $\zeta_q$ is incorporated in $\Theta^q_q$, and that 
 $\Theta^2_1=\zeta_1$.
 
 These equations are used for the practical calculations, but it could
 be of interest to note that Equation \ref{eq:wfuns:loswfsxx} can be
 written
 \begin{equation}
   \K_{\kappa}^q = -\frac{\Delta l}{2} \big[ (I_{q+1}-\psi_q)\zeta_q+
           I_q-\psi_{q-1} \big] \Theta^q_1, \quad 1<q<n ,
 \end{equation}
 showing that the expressions for $q=1$ and $q=n$ are special cases of
 the general expression where the terms connected to $q-1$ and $q$,
 are neglected, respectively.
 
 The iteration starts here at the end closest to the
 sensor, that is, at index 1 (reversed order to the RTE part).  The
 iteration is started by setting $I_1$ to the already calculated
 spectrum and $\Theta^1_1$ to 1.  These two variables are updated as
 \begin{eqnarray}
   I_{q+1} = \frac{I_q - \psi_q(1-\zeta_q)}{\zeta_q} 
 \end{eqnarray}
 \begin{eqnarray}
   \Theta_1^{q+1} =  \Theta_1^q \zeta_q
 \end{eqnarray}
 For 2D calculations possible ground reflections inside the LOS must
 be handled. The ground cannot be found at any of the end points of
 the LOS, and the correspondence to Equation \ref{eq:wfuns:mpbi} for a
 ground point is (c.f. Equations \ref{eq:rte:ground} and
 \ref{eq:rte:tground})
 \begin{eqnarray}
   I &=&\Big[I_{q+1}\zeta_q(1-e)\zeta_{q-1}+\psi_q(1-\zeta_q)(1-e)\zeta_{q-1}
          +eB\zeta_{q-1}+ \nonumber \\
     & & + \psi_{q-1}(1-\zeta_{q-1}) \Big] \Theta^{q-1}_1, \quad 1<q<n 
    \label{eq:wfuns:mpbi_ground}
 \end{eqnarray}
 and the corresponding absorption LOS WF for this point is (cf. Eq.
 \ref{eq:wfuns:loswfsxx})
 \begin{eqnarray}
   \K_{\kappa}^q &=& -\frac{\Delta l}{2} \big[ 2(I_{q+1}-\psi_q)\zeta_q(1-e)+
           \psi_q(1-e)+eB-\psi_{q-1} \big] \Theta^q_1 
 \end{eqnarray}
 The intensity and the transmission are here updated as
 \begin{eqnarray}
   I_{q+1} &=& \frac{I_q-\psi_q(1-\zeta_q)(1-e)-eB}{\zeta_q(1-e)}  \nonumber \\
   \Theta_1^{q+1} &=& \Theta_1^{q}\zeta_q(1-e) \nonumber
 \end{eqnarray}
 It is noteworthy that the effect of a ground intersection is included
 in $I_1$ when the iteration starts.  


 
 \subsection{1D limb sounding}
 \label{sec:wfuns:limb}
    
 For limb sounding and when the atmosphere is assumed to be consist of
 homogenous layers (horizontally stratified), there is a perfect
 symmetry around the tangent point. This covers also the case with a
 ground reflection. For these cases the distance from the sensor is
 neglected, the important factor is the vertical altitude.  All
 altitudes above the tangent point are passed twice (Fig.
 \ref{fig:wfuns:limb}) and both crossings of an atmospheric layer are
 treated to be identical for the retrievals, and this fact must also
 be reflected by the WFs.

 Using a nomenclature similar to the one used for Equation
 \ref{eq:wfuns:mpbi}, the intensity of a limb sounding
 observations can be expressed as (Fig. \ref{fig:wfuns:limb})
 \begin{eqnarray}
   I & = & \Big(I_2 \Big( \zeta_1\Theta^1_1 \Big)^2 + \psi_1(1-\zeta_1)
            \Big( \Theta^1_1 \Big)^2 \zeta_1+
            I_1^1\zeta_1+\psi_1(1-\zeta_1) \Big)\Theta^n_{2} \quad (q=1) 
        \nonumber \\
   I & = & \Big[\Big(I_{q+1}\zeta_q\zeta_{q-1} +\psi_q(1-\zeta_q)\zeta_{q-1} + 
           \psi_{q-1}(1-\zeta_{q-1})\Big)\Big(\Theta^{q-1}_{1}\Big)^2
           \zeta_{q-1}\zeta_q + \nonumber \\
      & & + I_{q-1}^{q-1}\zeta_{q-1}\zeta_q + \psi_{q-1}(1-\zeta_{q-1})
           \zeta_q + \psi_q(1-\zeta_q) \Big] \Theta^n_{q+1}, \, 1<q<n
  \label{eq:wfuns:limb1}  \\
   I & = & \Big(I_n\zeta_{n-1}+\psi_{n-1}(1-\zeta_{n-1})\Big)\Big
           (\Theta^{n-1}_{1}\Big)^2\zeta_{n-1} + I_{n-1}^{n-1}\zeta_{n-1} +
             \nonumber \\
      & &  +   \psi_{n-1}(1-\zeta_{n-1}) \quad (q=n) \nonumber
 \end{eqnarray}
 where the expression for $q=1$ is commented below, index 1 of the LOS
 is the tangent (or the ground) point, index $n$ corresponds to the
 highest altitude,
 \begin{equation}
   I_q = I_n \Theta^{n}_{q} + \sum_{i=q}^{n-1}\psi_i(1-\zeta_i) 
             \Theta_{q}^{i-1}
  \label{eq:wfuns:iqq}
 \end{equation}
 is the intensity reaching point $q$ from the part of the
 atmosphere furthest away from the sensor, $I_n$ the intensity at point $n$,
 \begin{equation}
   I_q^q = \Big[ \sum_{i=1}^{q-1}(\psi_i(1-\zeta_i)\Theta_{1}^{i-1}\Big]
             \Theta_{1}^{q} + \sum_{i=1}^{q-1}\psi_i(1-\zeta_i)
            \Theta_{i+1}^{q}, \qquad q>1
 \end{equation}
 is the intensity generated along the LOS (towards the sensor) between
 the two crossing with altitude $q$, $I_1^1=0$, $\Theta$ is defined by
 Equation \ref{eq:wfuns:Theta}. The equations defining $I_q$, $I_q^q$
 and $\Theta$ neglect ground reflections, but could easily be extended
 to cover also such cases. However, $I_1^1$ and $\Theta_1^1$ are
 included for $q=1$ to make Equation \ref{eq:wfuns:limb1} valid for
 cases with ground reflections. The treatment of ground reflections
 are discussed separately last in the section.

 \begin{figure}[tb]
  \begin{center}
   \includegraphics*[width=0.95\hsize]{Figs/wf2}
   \caption{The terms used for the derivation of line of sight weighting
            functions for 1D limb sounding.}
   \label{fig:wfuns:limb}  
  \end{center}
 \end{figure}
 
 If the different combinations of $\zeta_{q-1}$ and $\zeta_q$ are 
 grouped, for example, Equation \ref{eq:wfuns:limb1} becomes
 \begin{eqnarray}
   I & = & \Big[\Big((I_{q+1}-\psi_q)\zeta_{q-1}^2\zeta_q^2+(\psi_q-\psi_{q-1})
            \zeta_{q-1}^2\zeta_q + \psi_{q-1}\zeta_{q-1}\zeta_q
            \Big)\Big(\Theta^{q-1}_{1}\Big)^2 + \nonumber \\
    &  &     + (I_{q-1}^{q-1}-\psi_{q-1})\zeta_{q-1}\zeta_q + 
            (\psi_{q-1}-\psi_q)\zeta_q + \psi_q \Big] \Theta^n_{q+1} 
 \end{eqnarray}
 This equation has some higher products between
 $\zeta_{q-1}$ and $\zeta_q$ than Equation \ref{eq:wfuns:mpbi}, and
 the derivatives, with respect to $\kappa_q$, of these product are
 \begin{equation}
   \frac{\partial \zeta_{q-1}^2\zeta_q}{\partial \kappa_q} = 
         -\frac{3\Delta l}{2} \zeta_{q-1}^2\zeta_q
  \label{eq:wfuns:dzeta3}
 \end{equation}
 \begin{equation}
   \frac{\partial \zeta_{q-1}^2\zeta_q^2}{\partial \kappa_q} = 
          -2\Delta l \zeta_{q-1}^2\zeta_q^2
  \label{eq:wfuns:dzeta4}
 \end{equation}
 Using Equations \ref{eq:wfuns:dzeta1}, \ref{eq:wfuns:dzeta2},
 \ref{eq:wfuns:dzeta3} and \ref{eq:wfuns:dzeta4}, the LOS WFs for 1D
 limb sounding can be determined to be
 \begin{eqnarray}
   \K_{\kappa}^1& = & -\frac{\Delta l}{2}\Big[ \Big( 2I_2\zeta_1+\psi_1(1-
       2\zeta_1)\Big) \Big(\Theta^1_1\Big)^2 +I_1^1-\psi_1 \Big]\Theta^n_1
          \nonumber \\
   \K_{\kappa}^q& = & -\frac{\Delta l}{2}\Big[\Big(4(I_{q+1}-\psi_q)
           \zeta_{q-1}\zeta_q+
            3(\psi_q-\psi_{q-1})\zeta_{q-1} + 2 \psi_{q-1}
            \Big) \Big(\Theta^{q-1}_{1}\Big)^2\zeta_{q-1}  \nonumber \\
       &  & + 2(I_{q-1}^{q-1}-\psi_{q-1})\zeta_{q-1} + 
            \psi_{q-1}-\psi_q \Big] \Theta^n_{q}, \quad 1<q<n
  \label{eq:wfuns:loswfs2} \\
   \K_{\kappa}^n& = & -\frac{\Delta l}{2}\Big[\Big( 2I_n\zeta_{n-1}+
         \psi_{n-1}(1-2\zeta_{n-1}) \Big)\Big(\Theta^{n-1}_{1}\Big)^2\zeta_{n-1}+ 
             \nonumber \\   
       & &  + I_{n-1}^{n-1}-\psi_{n-1}\Big] \zeta_{n-1} \nonumber
 \end{eqnarray}
 The function calculating these LOS WFs takes the total spectrum as
 input (that is, $I_n^n$) and it is then most suitable to iterate
 downwards, starting with point $n$. For each iteration, the
 quantities are updated as
 \begin{eqnarray}
   I_q = I_{q+1}\zeta_q + \psi_q(1-\zeta_q) \nonumber
 \end{eqnarray}
 \begin{eqnarray}
   \Theta_{1}^{q-1} =  \frac{\Theta_{1}^{q}}{\zeta_{q-1}} \nonumber
 \end{eqnarray}
 \begin{eqnarray}
   I_{q-1}^{q-1} = \frac{I_q - \psi_{q-1}(1-\zeta_{q-1})
       (1+\big(\Theta^{q-1}_{1}\big)^2\zeta_{q-1})}{\zeta_{q-1}} \nonumber
 \end{eqnarray}
 The iteration is started by setting $I_n$ to cosmic
 background radiation, or correspondingly, and setting
 $\Theta^n_1$ to the square root of the total transmission. As
 mentioned above, $I_n^n$ is an input to the function.
 
 No special attention needs to be given here to possible ground
 reflections.  This as the effects of a ground reflection are already
 included in $I_n^n$ and $\Theta^n_1$ when starting the iteration. The
 procedure of setting $\Theta^n_1$ to the square root of the total
 transmission maintains the symmetry and makes it possible to treat
 the ground as an imaginary altitude ``below'' point 1. If there is a
 ground reflection, $\Theta^1_1$ and $I_1^1$ equal $\sqrt{1-e}$ and
 $eB$, respectively, at the end of the iteration.


 

 \subsection{1D downward looking observations}
  \label{sec:wfuns:down}
  Downward observation from an aircraft or a balloon can mainly be
  treated as a combination of limb sounding and upward looking
  observations.  The altitudes below the platform altitude are covered
  by the limb sounding expressions with a suitable choice of $I_q$ for
  the highest point. The altitudes above the platform altitude are
  treated by the upward looking equations, but also considering the
  transmission through the lower altitudes. 
  
  If $q$ is the index for platform altitude, the intensity can be
  expressed as
  \begin{eqnarray}
   I &=& \Big(I_{q+1}\zeta_q\zeta_{q-1} +\psi_q(1-\zeta_q)\zeta_{q-1} + 
           \psi_{q-1}(1-\zeta_{q-1})\Big)\Big(\Theta^{q-1}_{1}\Big)^2
           \zeta_{q-1} + \nonumber \\
      & & + I_{q-1}^{q-1}\zeta_{q-1} + \psi_{q-1}(1-\zeta_{q-1})
    \label{eq:wfuns:idown}
  \end{eqnarray}
  and the corresponding WF is
  \begin{eqnarray}
   \K_{\kappa}^q& = & -\frac{\Delta l}{2}\Big[\Big(3(I_{q+1}-\psi_q)
           \zeta_{q-1}\zeta_q+ 2(\psi_q-\psi_{q-1})\zeta_{q-1} + \psi_{q-1} \Big)
           \Big(\Theta^{q-1}_{1}\Big)^2 + \nonumber \\
      & &  + I_{q-1}^{q-1}-\psi_{q-1}\Big]\zeta_{q-1}
  \end{eqnarray}



\section{Absorption LOS WFs for optical thicknesses}
 \label{sec:wfuns:absloswfs2}

 This section treats the absorption LOS WFs for cases when emission
 can neglected. For such pure absorption calculations the output
 of ARTS is optical thicknesses (instead of e.g. transmissions) and
 for these conditions the absorption LOS WFs get very simple.

 \subsection{Single pass}
 The optical thickness $(\tau)$ is for single pass cases (cf. Eq. 
 \ref{eq:rte:tau})
 \begin{equation}
   \tau = \Delta l \left( \frac{\kappa_1+\kappa_2}{2} +
                          \frac{\kappa_2+\kappa_3}{2} + \dots +
                          \frac{\kappa_{n-2}+\kappa_{n-1}}{2} +
                          \frac{\kappa_{n-1}+\kappa_n}{2} \right)
 \end{equation}
 and we have that
 \begin{eqnarray}
   \K_{\kappa}^1& = & \Delta l / 2 \nonumber \\
   \K_{\kappa}^q& = & \Delta l, \quad 1<q<n  \\
   \K_{\kappa}^n& = & \Delta l / 2 \nonumber
 \end{eqnarray}


 \subsection{1D limb sounding}
 For limb sounding each altitude is passed twice and the total optical 
 thickness is double the optical thickness from the tangent point to the
 atmospheric limit. This fact results in that the absorption LOS WFs
 for 1D limb sounding are just the single pass ones multiplicated by two:
 \begin{eqnarray}
   \K_{\kappa}^1& = & \Delta l  \nonumber \\
   \K_{\kappa}^q& = & 2 \Delta l, \quad 1<q<n  \\
   \K_{\kappa}^n& = & \Delta l  \nonumber
 \end{eqnarray}
 

 \subsection{1D downward looking observations}
 If $q$ is the point where the sensor is placed, the optical thickness
 is
 \begin{equation}
   \tau = \Delta l \left( \frac{\kappa_q+\kappa_{q-1}}{2} + \dots+
                          \frac{\kappa_2+\kappa_1}{2} + \dots +
                          \frac{\kappa_{q-1}+\kappa_q}{2} +
                          \frac{\kappa_q+\kappa_{q+1}}{2} \dots \right)
 \end{equation}
 and the absorption LOS WF for this altitude is accordingly
 \begin{equation}
   \K_{\kappa}^q =  \frac{3}{2} \Delta l
 \end{equation}





\section{Source line of sight weighting functions}
 \label{sec:wfuns:sourceloswfs}

 The source line of sight weighting functions are defined as
 \begin{equation}
   \K_{\sigma}^q =  \frac{\partial\iv}{\partial \sigma^q}
  \label{eq:wfuns:sloswfs}
 \end{equation}
 These weighting functions express how the intensity is affected by
 changes of the source function at the points of the line of sight.
 The source and absorption LOS WFs are tightly related and this
 section follows closely Section \ref{sec:wfuns:absloswfs}.


 \subsection{Single pass}
  \label{sec:wfuns:single2}
  As, for example,
  \begin{equation}
    \psi_{q} = \frac{\sigma_q+\sigma_{q+1}}{2}
  \end{equation}
  the derivate of the mean source function values with respect to 
  $\sigma_q$ is
  \begin{equation}
    \frac{\partial \psi_{q-1}}{\partial \sigma_q} = 
    \frac{\partial \psi_q}{\partial \sigma_q} = \frac{1}{2}
   \label{eq:wfuns:dpsi}
  \end{equation}
  This derivate for other $\psi$ terms is zero.
 
  Using \ref{eq:wfuns:mpbi}, the source LOS WFs for upward looking
  observations can be determined to be
  \begin{eqnarray}
    \K_{\sigma}^q &=& \frac{1-\zeta_1}{2}, \quad q=1 
     \nonumber \\
    \K_{\sigma}^q &=& \frac{1-\zeta_{q-1}\zeta_q}{2} 
                                            \Theta^{q-1}_1, \quad 1<q<n \\
    \K_{\sigma}^q &=& \frac{1-\zeta_{n-1}}{2}\Theta^{n-1}_{1}, \quad q=n
     \nonumber
  \end{eqnarray}
  For ground points in 2D calculations, the WFs are (cf. Eq. 
  \ref{eq:wfuns:mpbi_ground})
  \begin{equation}
    \K_{\sigma}^q = \frac{(1-\zeta_q)(1-e)\zeta_{q-1}+1-\zeta_{q-1}}{2} 
                                            \Theta^{q-1}_1, \quad 1<q<n \\
  \end{equation}
  The practical calculations, such as the updating of $\Theta$, follow the
  absorption LOS WFs (Sec. \ref{sec:wfuns:single}).


 \subsection{1D limb sounding}
  \label{sec:wfuns:limb2}
  The 1D limb sounding source LOS WFs are (derived using Eq.
  \ref{eq:wfuns:limb1})
  \begin{eqnarray}
    \K_{\sigma}^q & = & \frac{1}{2} \Big(1-\zeta_1\Big) \Big(1+
        \Big( \Theta^1_1 \Big)^2\zeta_1 \Big) \Theta^n_2, 
                                                    \quad q=1  \nonumber \\
    \K_{\sigma}^q & = & \frac{1}{2} \Big[ (1-\zeta_{q-1}\zeta_q)
           \Big(\Theta^{q-1}_{1}\Big)^2\zeta_{q-1}\zeta_q + 
           (1-\zeta_{q-1})\zeta_q + \nonumber \\
      & & + 1-\zeta_q \Big] \Theta^n_{q+1}, \quad 1<q<n \\
    \K_{\sigma}^q & = & \frac{1}{2} \Big( (1-\zeta_{n-1}) \Big(
           \Theta^{n-1}_{1}\Big)^2\zeta_{n-1} + 1-\zeta_{n-1} \Big), \quad q=n \nonumber
  \end{eqnarray}
  The practical calculations follow the absorption LOS WFs (Sec.
  \ref{sec:wfuns:limb}).


 \subsection{1D downward looking observations}
  \label{sec:wfuns:down2}
  The source LOS WFs for downward looking observations are determined
  by the upward and the limb sounding expressions in the same manner
  as for the absorption LOS WFs (Sec. \ref{sec:wfuns:down}).

  The LOS WF for the index corresponding to the platform altitude is
  (cf. Eq. \ref{eq:wfuns:idown})
  observations can be determined to be
  \begin{equation}
   \K_{\sigma}^q = \frac{1}{2}\Big[ (1-\zeta_{q-1}\zeta_q) 
           \Big(\Theta^{q-1}_{1}\Big)^2
           \zeta_{q-1} + 1-\zeta_{q-1} \Big]\
  \end{equation}



\section{Transformation from vertical altitudes to distances along LOS}
 \label{sec:wfuns:bases}
 
 \subsection{Basis functions} 
 The source function and the absorption, both
 as a function of vertical altitude $(\mat{k})$ and along the LOS
 $(\kappa)$, are assumed to vary linear between the points of the grid
 of concern. The functions to express the quantities between grid
 points are denoted as basis functions. For piecewise linear functions,
 the basis functions decline, from the point of interest, linearly
 down to zero at neighboring points. Such functions are here denoted
 as tenth functions (Fig. \ref{fig:wfuns:zbasis}).
 
 
 \subsection{Transformation from $z$ to $l$} 
 The forward model uses
 internally a grid along the line of sight (Sec. \ref{sec:los}), while
 the atmospheric WF matrices are calculated for some user specified
 vertical grid, and a transformation between these two grids must be
 performed. This transformation is achieved by the terms,
 $\partial\kappa/ \partial \mat{k}^p$ and $\partial \sigma / \partial
 S^\mat{p}$. As the source function and the absorption are assumed to
 have the same functional behaviour (piecewise linear), these two
 terms are identical if the retrieval grid is the same for both quantities:
 \begin{equation}
   \frac{\partial \kappa}{\partial \mat{k}^p} =
   \frac{\partial \sigma}{\partial S^\mat{p}}
  \label{eq:wfuns:sandk}
 \end{equation}
 \begin{figure}[t]
  \begin{center}
   \includegraphics*[width=0.7\hsize]{Figs/fig_absbasis_z}
   \caption{Examples on basis functions for a vertical grid with a 1 km
            spacing: \lsolid~30~km, \ldashed~31~km and \ldashdot~32~km.}
   \label{fig:wfuns:zbasis}  
  \end{center}
 \end{figure}
 \begin{figure}[t]
  \begin{center}
   \includegraphics*[width=0.7\hsize]{Figs/fig_absbasis_l}
   \caption{The basis functions of Figure \ref{fig:wfuns:zbasis} shown
            as a function of the distance from the tangent point, where
            $z_{tan}=30$ km.}
   \label{fig:wfuns:lbasis}  
  \end{center}
 \end{figure}
 For example, the term $\partial\kappa/ \partial \mat{k}^p$ gives the
 relationship between the absorption along the LOS and a change of the
 absorption at one altitude.  Figure \ref{fig:wfuns:lbasis}
 exemplifies $\partial\kappa/ \partial \mat{k}^p$ for three altitudes.
 Ideally, the following relationship should be fulfilled for all $z$
 \begin{equation}
   \sum_i\mat{k}^i\phi^i_\mat{k}(z(l)) = \sum_j \kappa^j\phi^j_{\kappa}(l)
  \label{eq:wfuns:bases}
 \end{equation}
 where $\phi_\mat{k}$ and $\phi_{\kappa}$ are the basis functions for
 $\mat{k}$ and $\kappa$, respectively. However, as can be seen in
 Figure \ref{fig:wfuns:lbasis}, $\phi^i_\mat{k}$ expressed along the
 LOS is not a piecewise linear function and cannot be fitted perfectly
 by the basis $\phi_{\kappa}$. Hence, some approximation is needed,
 and the most natural choice for this approximation is to fulfill
 Equation \ref{eq:wfuns:bases} only for the grid points along the LOS:
 \begin{equation}
   \kappa^q = \sum_i\mat{k}^i\phi^i_\mat{k}(z(\mat{l}^q))
 \end{equation}
 where $\mat{l}^q$ is the distance along the LOS for the corresponding to
 $\kappa^q$. Note that at $\mat{l}^q$ all $\phi_{\kappa}^j$ are zero except
 for $\phi_{\kappa}^q$, that is unity.

 We have now that
 \begin{equation}
   \frac{\partial \kappa^q}{\partial \mat{k}^p} = \phi^p_\mat{k}(z(\mat{l}^q))
  \label{eq:wfuns:kappak}
 \end{equation}
 Hence, term $\partial\kappa/ \partial \mat{k}^p$ is determined by the
 values of $\phi^p_\mat{k}$ at the altitudes corresponding to the grid
 points of the LOS.
 
 Assuming that the LOS altitude $q$, $z_{\kappa^q}$, is found between
 retrieval points $p-1$ and $p$, at the altitudes $z_{\mat{k}^{p-1}}$ and 
 $z_{\mat{k}^p}$, respectively, we have that
 \begin{equation}
   \frac{\partial \kappa^q}{\partial \mat{k}^p} =
   \frac{z_{\kappa^q}-z_{\mat{k}^{p-1}}}{z_{\mat{k}^{p}}-z_{\mat{k}^{p-1}}}
  \label{eq:wfuns:zz}
 \end{equation}
 If $z_{\kappa^q}$ is further away from $z_{\mat{k}^p}$ than the neighboring
 retrieval points, the derivative is zero. The derivative is also treated to 
 be zero if $z_{\kappa^q}$ is outside the retrieval grid (that is, below
 or above all retrieval altitudes).

 The basis functions for $\mat{k}$ change if the retrieval grid is
 changed, and as the retrieval grid is individual for the species, 
 temperature etc., the term $\partial\kappa/ \partial \mat{k}^p$ 
 must be determined for each calculation of a WF matrix.


\section{Species WFs}
 \label{sec:wfuns:species}
 
 As it is assumed here that the species have no influence on
 the source function, species WFs are calculated as (cf. Eq.
 \ref{eq:wfuns:taylor2})
 \begin{equation}
    \K_{\xt}^p = \Hm
                 \frac{\partial\iv}{\partial \kappa}
                 \frac{\partial \kappa}{\partial \mat{k}^p}
                 \frac{\partial \mat{k}^p}{\partial \xt^p}
  \label{eq:wfuns:species}
 \end{equation}
 The term $\partial\iv / \partial \kappa$ is described in Section
 \ref{sec:wfuns:absloswfs}, while the term $\partial \kappa /\partial
 \mat{k}^p$ is treated in Section \ref{sec:wfuns:bases}, and it
 remains to determine $\partial \mat{k}^p / \partial \xt^p$. It is
 assumed below in this section that \xt\ only represents a single 
 species and that the species absorption can be written as
 \begin{equation}
   \mat{k}^p = \mat{\bar{k}}^p_s \xt^p + \sum_{i\ne s} \mat{k}^p_i
  \label{eq:wfuns:kspecies}
 \end{equation}
 where $p$ is the altitude of concern, $\mat{\bar{k}}_s$ is the
 absorption of the species of interest, normalized to the units of the
 corresponding values of \xt\ (or \bt) and $\mat{k}_i$ the total
 absorption for other species. Equation \ref{eq:wfuns:kspecies}
 assumes that a change for one species does not influence the
 absorption of other species, and that the shape of the absorption for
 one species does not change with the abundance of that species.  This
 assumption is not valid, for example, when the amount of different
 species must be considered when calculating the pressure broadening,
 and not only the total absorption. The validity of the analytical
 expressions for the WFs is discussed in Section
 \ref{sec:wfuns:approaches:anal}.

 If Equation \ref{eq:wfuns:kspecies} is valid, we have then that
 \begin{equation}
   \frac{\partial \mat{k}^p}{\partial \xt^p} = \mat{\bar{k}}^p_s
  \label{eq:wfuns:dkspecies}
 \end{equation}
 Different units for species retrievals are allowed. The possible units are
 \begin{enumerate}
    \item Fractions of linearization state [-], i.e. $\xt/\xt_0$ where
          $\xt_0$ is the linearization state 
    \item Volume mixing ratio [-] (no dimension)
    \item Number density [molecules/m$^3$)
 \end{enumerate}
 Accordingly, for the practical calculations, the absorption of the
 species of interest is needed, and a possibility to scale to the
 absorption from the unit used by the forward model to the other two
 units considered.
 
 It is advantageous for the retrieval that the values of \xt\ are of
 similar magnitudes \citep{schimpf:97,eriksson:99} as the numerical
 precision is limited. This fact makes WFs
 in fractions of the linearization state (or rather, the a priori
 state) interesting as the values of \xt\ are then all around 1. In 
 addition, Equation \ref{eq:wfuns:dkspecies} is especially simple
 for this case:
 \begin{equation}
   \frac{\partial \mat{k}^p}{\partial \xt^p} = \mat{k}^p_s
 \end{equation}
 as $\xt^p=1$.


\section{Continuum absorption WFs}
 \label{sec:wfuns:cont}

 These WFs are used to fit unknown absorption that varies smoothly inside
 the frequency range covered. This absorption
 is added to the species absorption:
 \begin{equation}
   \mat{k}^p = \mat{k}^p_s + \mat{k}^p_c
 \end{equation}
 where $\mat{k}^p_s$ is the summed species absorption and $\mat{k}^p_s$
 the continuum absorption.
 
 The continuum absorption is represented by a polynomial for each
 altitude. The polynomials are characterized by the magnitude of the
 absorption at a number of points inside the frequency range covered
 (Fig. \ref{fig:wfuns:cont}). This approach was selected as it gives
 the possibility to impose positive constraints in a straightforward
 manner. A direct polynomial representation ($k=k_0+k_1\f+k_2\f^2...$) 
 is less favorable regarding this aspect.
 
 \begin{figure}[t]
  \begin{center}
   \includegraphics*[width=0.95\hsize]{Figs/contfit}
   \caption{Fit of continuum absorption with off-sets at three 
            positions ($n_{cont}=2$). The outermost frequencies, here 
            $\f_1$ and $\f_3$, are placed at the end points of the 
            range covered ($\f_{min}$ and $\f_{max}$, respectively).}
   \label{fig:wfuns:cont}  
  \end{center}
 \end{figure}

 
 The number of points is $n_{cont}+1$ where $n_{cont}$ is the
 polynomial order selected.  The points are equally spaced between the
 lowest and highest frequency, $\f_{min}$ and $\f_{max}$, considered.
 Figure \ref{fig:wfuns:cont} exemplifies this for $n_{cont}=2$.  The
 points are accordingly placed at the following frequencies
 \begin{equation}
   \f_i = \f_{min} + \frac{(\f_{max}-\f_{min})(i-1)}{n_{cont}}, \
          \quad 1 \leq i \leq (n_{cont}+1)
  \label{eq:wfuns:cont:f}
 \end{equation}
 This equation results in that the single point for $n_{cont}=0$ is
 placed at $\f_{min}$, but the position of the frequency point is
 for this case of no importance as the corresponding WF is constant
 (as a function of frequency). With other words, 
 if $n_{cont}=0$, the WFs are simply 
 \begin{equation}
   \frac{\partial \mat{k}^p}{\partial \xt^p_1} = 1
 \end{equation}
 To determine the frequency dependency of the WFs for higher values of
 $n_{cont}$, the Lagrange's formula can be used. This formula gives
 the polynomial of order $N-1$ that passes through $N$ fixed points
 \citep[][Eq. 3.1.1]{press:92}:
 \begin{eqnarray}
   k(\f) &=& \frac{(\f-\f_2)(\f-\f_3)\dots(\f-\f_N)}
                  {(\f_1-\f_2)(\f_1-\f_3)\dots(\f_1-\f_N)}
           x_1 + \nonumber \\ 
       & & +\frac{(\f-\f_1)(\f-\f_3)\dots(\f-\f_N)}
                 {(\f_2-\f_1)(\f_2-\f_3)\dots(\f_2-\f_N)}
           x_2 + \cdots + \nonumber \\
       & & +\frac{(\f-\f_1)(\f-\f_2)\dots(\f-\f_{N-1})}
                 {(\f_N-\f_1)(\f_N-\f_2)\dots(\f_N-\f_{N-1})} x_N
  \label{eq:wfuns:lagrange}
 \end{eqnarray}
 where $x_i$ is the absorption at the selected frequency points, $\f_i$,
 that are given by Equation \ref{eq:wfuns:cont:f}, and $N=n_{cont}+1$.
 
 The frequency dependency of the continuum WFs can be obtained by
 differentiating Equation \ref{eq:wfuns:lagrange}:
 \begin{equation}
   \frac{\partial \mat{k}^p(\f)}{\partial \xt^p_i} =
   \frac{(\f-\f_1)\dots(\f-\f_{i-1})(\f-\f_{i+1})\dots(\f-\f_N)}{(\f_i-\f_1)\dots(\f_i-\f_{i-1})(\f_i-\f_{i+1})\dots(\f_i-\f_N)}
 \end{equation}
 This equation gives, for example, for $n_{cont}=1$
 \begin{eqnarray}
   \frac{\partial \mat{k}^p(\f)}{\partial \xt^p_1} &=& \frac{\f_{max}-\f}
          {\f_{max}-\f_{min}}, \quad \f_{min}\leq \f \leq \f_{max} \\
   \frac{\partial \mat{k}^p(\f)}{\partial \xt^p_2} &=& \frac{\f-\f_{min}}
          {\f_{max}-\f_{min}}, \quad \f_{min}\leq \f \leq \f_{max}
 \end{eqnarray}
 Note that these WFs have no altitude variation. Or with
 other words, they are identical for all $p$.


\section{Temperature profile WFs}
 \label{sec:wfuns:temp}
 
 A critical factor for the calculation of temperature WFs is if
 hydrostatic equilibrium is assumed or not. If hydrostatic equilibrium
 is neglected, the WFs can be calculated by semi-analytical
 expressions, while if hydrostatic equilibrium is assumed, the WFs are
 obtained by perturbations. The analytical version is so far only
 implemented for emission measurements (and not for transmission
 measurements).


 \subsection{Without hydrostatic equilibrium}
 
 For some measurement situations it can be questionable to assume that
 the pressure, temperature and geometrical altitude, valid for the
 measurement, fulfill the law of hydrostatic equilibrium. One example
 is 1D limb sounding when there is a large horizontal distance between
 the nadir point of the tangent point for the start and end points of
 the scan. This is, for example, the case for the Odin observations
 where the tangent point will move in the latitude direction with a
 speed of about 9 km/s and a scan takes 1 -- 2 minutes.
 
 If the constrain of hydrostatic equilibrium is neglected, WFs for the
 temperature profile can be calculated following Equation
 \ref{eq:wfuns:taylor2}, that is:
 \begin{eqnarray}
    \K_{\xt}^p = \Hm \Bigg[ \frac{\partial\iv}{\partial \sigma}
                 \frac{\partial \sigma}{\partial \mat{S}^p} 
                 \frac{\partial \mat{S}^p}{\partial \mat{t}^p} +
                 \frac{\partial\iv}{\partial \kappa}
                 \frac{\partial \kappa}{\partial \mat{k}^p}
                 \frac{\partial \mat{k}^p}{\partial \mat{t}^p} \Bigg]
 \end{eqnarray}  
 where $\mat{t}$ is the vector describing the vertical temperature profile. 
 
 The term $\partial \iv/\partial \sigma$, the source LOS WFs, are
 derived in Section \ref{sec:wfuns:sourceloswfs}, while the absorption
 LOS WFs ($\partial \iv/\partial \kappa$) are found in Section
 \ref{sec:wfuns:absloswfs}. As a single grid is here of concern,
 Equation \ref{eq:wfuns:sandk} is valid, that is, $\partial\kappa/
 \partial \mat{k}^p$ equals $\partial \sigma / \partial S^\mat{p}$.
 These two terms are discussed in Section \ref{sec:wfuns:bases}.
 
 It is noteworthy that a change of the temperature inside an
 atmospheric layer will change the line-of-sights for beams passing
 this altitude, but this is here neglected. See further Section
 \ref{sec:wfuns:approaches:anal}.

 Here it is assumed that $S$ equals the Planck function, $B$
 (Equation \ref{eq:rte:planck}), and the derivative of the source
 function with respect to the temperature is (see also Equation 44 of
 \citet{eriksson:00a})
 \begin{equation}
   \frac{\partial S}{\partial T} = \frac{h\f}{k_BT^2}
        \Big( e^{h\f/k_BT} - 1  \Big)^{-1}B(\f,T)
   \label{eq:wfuns:dsdt}
 \end{equation}
 The term $\partial \mat{S}^p / \partial \mat{t}^p$ is calculated
 using Equation \ref{eq:wfuns:dsdt} where $T$ is replaced by $\mat{t}^p$.

 The term $\partial \mat{k}^p/\partial \mat{t}^p$ cannot easily be
 determined analytically. Instead, the total absorption is calculated
 for a temperature profile that is 1~K higher at all altitudes than
 the assumed profile. The difference between the two absorption
 matrices are then interpolated to the temperature profile retrieval
 grid, giving an estimation of the derivative of the absorption
 with respect to the temperature at the grid altitudes. Schematically
 \begin{eqnarray}
   \frac{\partial \mat{k}^p}{\partial \mat{t}^p} = \Upsilon(k(T_0+1)-k(T_0))
     \nonumber
 \end{eqnarray}
 where $\Upsilon$ is the interpolating function from the vertical
 absorption grid to the retrieval grid, $k$ the total absorption, and
 $T_0$ the assumed temperature profile.
 

 \subsection{With hydrostatic equilibrium}
 
 The gases in the atmosphere behave like an ideal gas, and the pressure,
 the temperature and the vertical altitudes above one point are
 linked by the fact that hydrostatic equilibrium must be fulfilled
 (see Section \ref{sec:los:hse}). 

 The temperature WFs with hydrostatic equilibrium are calculated by
 perturbations (Eq. \ref{eq:wfuns:perturb}). See further the on-line
 information (type \verb|arts -d kTemp|).


%\section{WF for ground emission factor}
% \label{sec:wfuns:eground}
% 
% This WF is not yet implemented but this can easily be done.

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

