\levela{The forward model: concepts, definitions and overview}
 \label{sec:fm_defs}


\starthistory
  020330 & Sections on absorption, compulsory sensor variables and sketch 
           of RTE written by Patrick Eriksson.\\
  030306 & Finished the pieces above for present functionality of ARTS. \\
\stophistory




This chapter introduces terms and concepts of ARTS as a forward model,
in contrast to the previous chapter that describes ARTS as a computer
program. While the content of the previous chapter is specific for
ARTS, as the way to use a forward model program normally differs
significantly from one implementation to another, this chapter is of
more general nature. Most of the quantities treated here should be
part of any forward model of the same complexity as ARTS, where only
details regarding the definition should differ. The aim of this
chapter is to give an overview of the forward model and to describe
important terms and concepts, in such a way that the content of this user
guide can be fully appreciated and that you shall understand how to
construct a control file for your simulation problem.




\levelb{The atmosphere}
%==============================================================================
\label{sec:fm_defs:atmosphere}


\levelc{Atmospheric dimensionality}
%===================
\label{sec:fm_defs:atmdim}

The structure of the modeled atmosphere can be selected to have
different degree of complexity, the \textindex{atmospheric
  dimensionality}. There exist three levels for the complexity of the
atmosphere, 1D, 2D and 3D, where 1D and 2D can be seen as special
cases of 3D. The significance of these different atmospheric
dimensionalities and the coordinate systems used are described below
in this section. The atmospheric dimensionality is selected by setting
the workspace variable \wsvindex{atmosphere\_dim} to a value between 1
and 3. Variables for which the size depends on the atmospheric
dimensionality are checked, when used, to have a size consistent with
\artsstyle{atmosphere\_dim}. The atmospheric dimensionality is most
easily set by the functions \wsmindex{AtmosphereSet1D},
\wsmindex{AtmosphereSet2D} and \wsmindex{AtmosphereSet3D}.

\begin{figure}[!t]
 \begin{center}
  \includegraphics*[width=0.98\hsize]{Figs/fm_definitions/atm_dim_1d}
  \caption{Schematic of a 1D atmosphere. The atmosphere is 
    here spherically symmetric. This means that the radius of the
    geoid, the ground and all the pressure surfaces are constant
    around the globe. The fields are specified by a value for each
    pressure surface. The extension of the cloud box is either from
    the ground up to a pressure surface, or between two pressure
    surfaces (which is the case shown in the figure). The figure shows
    further that the ground must be above the lowermost pressure
    surface. }
  \label{fig:fm_defs:1d}  
 \end{center}
\end{figure}
% This figure was produced by the Matlab function mkfigs_atm_dims.

\begin{figure}[!t]
 \begin{center}
  \includegraphics*[width=0.98\hsize]{Figs/fm_definitions/atm_dim_2d}
  \caption{Schematic of a 2D atmosphere. The radii (for the geoid, the ground
    and the pressure surfaces) vary here linear between the latitude
    grid points. The atmospheric fields vary linearly along the
    pressure surfaces and the latitude grid points (that is, along the
    dotted lines). Inside the grid cells, the fields have a bi-linear
    variation. The cloud box is not defined for 2D.  }
  \label{fig:fm_defs:2d}
 \end{center}
\end{figure}
% This figure was produced by the Matlab function mkfigs_atm_dims.

\begin{description}
  
\item[\textindex{3D}\,\,\,] In this, the most general, case, the
  atmospheric fields vary in all three spatial coordinates, as in a
  true atmosphere (Figures~\ref{fig:fm_defs:3d} and
  \ref{fig:fm_defs:3dcross}). A \textindex{spherical coordinate
    system} is used where the dimensions are radius (\Rds), latitude
  (\Lat) and longitude (\Lon), and a position is given as
  $(\Rds,\Lat,\Lon)$. With other words, the standard way to specify a
  geographical position is followed.  However, the way to specify the
  radial position differs depending on the context, which is described
  in Section~\ref{sec:fm_defs:altitudes}. The valid range for
  latitudes is $[-90\degree,+90\degree]$, where +90\degree corresponds
  to the North pole etc. Longitudes are counted from the Greenwich
  meridian with positive values towards the east. Longitudes can have
  values from -360\degree to +360\degree. When the difference between
  the last and first value of the longitude grid is $\geq 360\degree$
  then the whole globe is considered to be covered. The user must
  ensure that the atmospheric fields for \Lon\ and $\Lon+360\degree$
  are equal. If a point of propagation path is found to be outside the
  range of the longitude grid, this will results in an error if not
  the whole globe is covered. When possible, the longitude is shifted with
  360\degree\ in the relevant direction.
  
\item[\textindex{1D}\,\,\,] A 1D atmosphere can be described as being
  spherically symmetric (Figure~\ref{fig:fm_defs:1d}). The term 1D is
  used here for simplicity and historical reasons, not because it is a
  true 1D case (a strictly 1D atmosphere would just extend along a
  line). A spherical symmetry means that atmospheric fields and the
  ground extend in all three dimensions, but they have no latitude and
  longitude variation. This means that, for example, atmospheric
  fields vary only as a function of altitude and the ground
  constitutes the surface of a sphere. The radial coordinate is
  accordingly sufficient when dealing with atmospheric quantities, but
  the angular distance between the sensor and a point along the
  propagation path can be of interest, for example when determining
  the cross-link between two satellites (a fact that shows that this
  is not a true 1D case). A polar coordinate system is for this reason
  used when describing propagation paths, where the coordinate
  additional to the radius gives the angular distance inside the
  viewing plane between the sensor and the point of interest (see also
  Section~\ref{sec:ppath:Ppath}). This latter coordinate system
  coincides with the one used for 2D if the sensor position is set to
  be the zero point for the latitudes. A 1D atmosphere is shown in
  Figure~\ref{fig:fm_defs:1d}.
  
\item[\textindex{2D}\,\,\,] In contrast to the 1D and 3D cases, a 2D
  atmosphere extends only inside a plane
  (Figure~\ref{fig:fm_defs:2d}). A spherical coordinate system is
  accordingly not needed and a polar system\index{polar coordinate
    system}, consisting of a radial and an angular coordinate, is
  used. The 2D case is most likely used for satellite measurements
  where the atmosphere is observed inside the orbit plane. The angular
  coordinate corresponds then to the angular distance along the
  satellite track, but the coordinate is for simplicity denoted as the
  latitude. The zero point for the 2D latitude is arbitrary. No lower
  and upper limit exists for the 2D latitude, and this allows that
  measurements from several subsequent orbits can be simulated as one
  unit. The atmosphere is treated to be undefined outside the
  considered plane. A 2D atmosphere is shown in
  Figure~\ref{fig:fm_defs:2d}.

\end{description}

\begin{figure}[!p]
 \begin{center}
  \includegraphics*[angle=-90,width=0.98\hsize]{Figs/fm_definitions/atm_dim_3d}
  \vspace*{-15mm}
  \caption{Schematic of a 3D atmosphere. Plotting symbols as in 
    Figure~\ref{fig:fm_defs:2d}. Radii and fields are here defined to
    vary linearly along the latitude and longitude grid points. This
    means that surfaces (such as the radius of the ground) have a
    bi-linear variation inside the area limited by two latitude and
    longitude grid values, while the atmospheric fields have a
    tri-linear variation inside the grid cells. }
  \label{fig:fm_defs:3d}
 \end{center}
\end{figure}
% This figure was produced by the Matlab function mkfigs_atm_dims.

\begin{figure}[!p]
 \begin{center}
  \includegraphics*[width=0.98\hsize]{Figs/fm_definitions/atm_dim_3dcross}
  \caption{A latitudinal, or longitudinal, cross section of a 3D atmosphere. 
    Plotting symbols as in Figure~\ref{fig:fm_defs:1d}. Radii and
    fields inside the cross section match the definitions for 2D.
    The vertical extension
    of the cloud box is defined identical for 1D and 3D. The horisontal 
    extension of the cloud box is between two latitude and longitude grid
    positions, where only one of the dimensions are visible in this figure.}
  \label{fig:fm_defs:3dcross}
 \end{center}
\end{figure}
% This figure was produced by the Matlab function mkfigs_atm_dims.



\levelc{Altitude coordinates}
%===================
\label{sec:fm_defs:altitudes}

\begin{description}
  
\item[Pressure\index{pressure}] The main altitude coordinate is
  pressure. This is most clearly manifested by the fact that the
  vertical atmospheric grid consists of surfaces with equal pressure.
  The vertical grid is consistently denoted as the pressure grid and
  the corresponding workspace variable is \wsvindex{p\_grid}. The
  choice of having pressure as main altitude coordinate results in
  that atmospheric quantities are retrieved as a function of pressure,
  not as a function of geometrical altitude.
  
\item[Pressure altitude\index{pressure altitude}] A basic assumption
  in ARTS is that atmospheric quantities (temperature, geometric
  altitude, species VMR etc.) vary linearly with the logarithm of the
  pressure. This corresponds roughly to assuming a linear variation
  with altitude. 
%  To obtain a more intuitive unit for the logarithm of
%  the pressure, the quantity pressure altitude, \PrsAlt, is
%  introduced, and it is defined as
%  \begin{equation}
%   \PrsAlt = \aPrsAlt{s}\left( \log_{10}(\aPrs{0}) - \log_{10}(\Prs) \right)
%   \label{eq:fm_defs:prsalt}
%  \end{equation}
%  where \aPrsAlt{s} and \aPrs{0} are arbitrary parameters (set in
%  \fileindex{arts.h}), but suitably selected in such a way that the pressure
%  altitude corresponds roughly to the geometrical altitude.  This
%  correspondence is achieved if the two parameters are treated as a
%  fixed scale height (for decreases of the pressure by a factor of
%  10) and the surface pressure, respectively. Values around
%  $\aPrsAlt{s}=15.5$~km and $\aPrs{0}=1013$~hPa are suitable for
%  simulations dealing with the Earth's atmosphere.
  
\item[Radius\index{radius}] Geometrical altitudes are
  needed to determine the propagation path through the atmosphere etc.
  The main geometrical altitude coordinate is the distance to the
  center of the coordinate system used, the radius. This is a natural
  consequence of using a spherical or polar coordinate system. The
  radius is used inside ARTS for all geometrical calculations and to
  store the position of the sensor (Section~
  \ref{sec:fm_defs:sensor1}).
  
\item[Geometrical altitude\index{geometrical altitude}] The term
  geometrical altitude signifies here the difference in radius between
  a point and the geoid (Section~\ref{sec:fm_defs:geoid}) along the
  vector to the center of the coordinate system
  (Equation~\ref{eq:fm_defs:zground}). Hence, the geometrical altitude
  is not measured along the local zenith direction (the normal to the
  reference geoid). Geometrical altitudes are mainly used to
  facilitate the input of the ground altitude, the altitude of the
  pressure surfaces etc. This is the case as these quantities are known
  rather with respect to the geoid than with respect to the Earth's
  center.

\end{description}


\levelc{Atmospheric grids and fields}
%===================
\label{sec:fm_defs:grids}

As mentioned above, the vertical grid of the atmosphere consists of a
set of layers with equal pressure, the pressure grid
(\wsvindex{p\_grid}).  This grid must of course always be specified.
It is not allowed that there is an altitude gap between the ground and
the lowermost pressure surface.  That is, the ground pressure must be
smaller than the pressure of the lowermost vertical grid surface. On
the other hand, it is not necessary to match the ground and the first
pressure surface, the pressure grid can extend below the ground level.
The upper end of the pressure grid gives the practical upper limit of
the atmosphere as vacuum is assumed above. With other words, no
absorption and refraction take place above the uppermost pressure
surface.

A \textindex{latitude} grid (\wsvindex{lat\_grid}) must be specified
for 2D and 3D.  For 2D, the latitudes shall be treated as the angular
distance along the orbit track, as described above in
Section~\ref{sec:fm_defs:atmdim}.  The latitude angle is throughout
calculated for the vector going from the center of the coordinate
system to the point of concern. Hence, the latitudes here correspond
to the definition of the geocentric latitude, and not geodetic
latitudes (see Section~\ref{sec:ppath:geoid}). This is in accordance
to the definition of geometric altitudes found above.  For 3D, a
\textindex{longitude} grid (\wsvindex{lon\_grid}) must also be specified.
Valid ranges for latitude and longitude values are given in
Section~\ref{sec:fm_defs:atmdim}.

The atmosphere is treated to be undefined outside the latitude and
longitude ranges covered by the grids, if not the whole globe is
covered. This results in that a propagation path is not allowed to
cross a latitude or longitude end face of the atmosphere, if such
exists, it can only enter or leave the atmosphere through the top of
the atmosphere (the uppermost pressure level). See further
Section~\ref{sec:fm_defs:ppaths}. The volume (or area for 2D) covered
by the grids is denoted as the \textindex{model atmosphere}.

If the longitude and latitude grids are not used for the selected
atmospheric dimensionality, then the longitude grid (for 1D and 2D)
and the latitude grid (for 1D) must be set to be empty, but when
dealing with the size of variables the grid length shall be treated to
be one. For example, the matrix describing the geoid (see
Section~\ref{sec:fm_defs:geoid}) has for 1D the size $[1,1]$.

The basic atmospheric quantities are represented by their values at
each crossing of the involved grids (indicated by thick dots in
Figures~\ref{fig:fm_defs:1d}~-~\ref{fig:fm_defs:3dcross}), or for 1D
at each pressure surface (thick dots in Figure~\ref{fig:fm_defs:1d}).
This representation is denoted as the field\index{atmospheric field}
of the quantity. The field must, at least, be specified for the
geometric altitude of the pressure surfaces (\wsvindex{z\_field}), the
temperature (\wsvindex{t\_field}) and considered atmospheric species
(\artsstyle{vmr\_field}).  The fields are assumed to be piece-wise
linear functions vertically (with pressure altitude as the vertical
coordinate, Section~\ref{sec:fm_defs:altitudes}), and along the
latitude and longitude edges of 2D and 3D grid boxes. For points
inside 2D and 3D grid boxes, multidimensional linear interpolation is
applied (that is, bilinear interpolation for 2D etc.). Note especially
that this is also valid for the field of geometrical altitudes
(\artsstyle{z\_field}). Fields are rank-3 tensors. For example, the
temperature field is $T=T(\Prs,\Lat,\Lon)$. That means each field is
like a book, with one page for each pressure grid point, one row for
each latitude grid point, and one column for each longitude grid
point. In the 1-D case there is just one row and one column on each
page.



\levelc{The geoid and the ground}
%===================
\label{sec:fm_defs:geoid}

The \textindex{geoid} is an imaginary surface used as a
reference when specifying the ground altitude and the altitude
of pressure surfaces. Any shape of the geoid is allowed but a smoothly
varying geoid is the natural choice, with the centers of the geoid and
the coordinate system coinciding. The geoid should normally be set to
the reference ellipsoid for some global geodetic datum, such as
WGS-84. For further reading on geoid ellipsoids and WGS-84, see
Section~\ref{sec:ppath:geoid}.

Inside ARTS, the geoid is represented as a matrix
(\wsvindex{r\_geoid}), holding the geoid radius, \aRds{\odot}, for
each crossing of the latitude and longitude grids,
$\aRds{\odot}=\aRds{\odot}(\Lat,\Lon)$. The geoid is not defined
outside the ranges covered by the latitude and longitude grids, with
the exception for 1D where the geoid by definition is a full sphere.
The ground altitude, \aAlt{g}, is given as the geometrical altitude
above the geoid. The radius for the ground is accordingly
\begin{equation}
  \aRds{g} = \aRds{\odot} + \aAlt{g}
 \label{eq:fm_defs:zground}
\end{equation}
As described in
Section~\ref{sec:fm_defs:grids}, a gap between the ground and the 
lowermost pressure level is not allowed.

The ARTS variable for the \textindex{ground altitude}
(\wsvindex{z\_ground}) is a matrix of the same size as the geoid
matrix. For 1D, the ground is a sphere by definition (as the geoid),
while for 2D and 3D any shape is allowed and a rough model of the
ground topography can be made. The treatment of ground emission
and reflectivity is discussed in Section~\ref{sec:fm_defs:groundrefl}.


\levelc{The cloud box}
%===================
\label{sec:fm_defs:cloudbox}

In order to save computational time, scattering calculations are
limited as far as possible to the part of the atmosphere containing
clouds and other scattering objects. The atmospheric region in which
scattering shall be considered is denoted as the \textindex{cloud
  box}, and it is discussed here as it acts as an additional
atmospheric limit when calculating propagation paths (see
Section~\ref{sec:fm_defs:rte}). Cloud box calculations can be
performed in 1D and 3D mode, but not for 2D.

The cloud box is defined to be rectangular in the used coordinate
system, with limits exactly at points of the involved grids. This
means, for example, that the vertical limits of the cloud box are two
pressure surfaces. For 3D, the horisontal extension of the cloud box
is between two points of the latitude grid and likewise in the
longitude direction (Figure~\ref{fig:fm_defs:3dcross}). The latitude
and longitude limits for the cloud box cannot be placed at the end
points of the corresponding grid as it must be possible to calculate
the incoming intensity field. The cloud box is activated by setting
the variable \wsvindex{cloudbox\_on} to 1.  The limits of the cloud
box are stored in \wsvindex{cloudbox\_limits}.  It is recommnded to
use the method \wsmindex{CloudboxOff} when no scattering calculations
shall be performed. This method assigns dummy values to all workspace
variables not needed when scattering is neglected.

When the radiation entering the cloud box is calculated this is done
with the cloud box turned off. This to avoid to end up in the
situation that the radiation entering the cloud box depends on the
radiation coming out from the cloud box. {\bf It is the task of the
  user to define the cloud box in such way that the link between the
  outgoing and ingoing radiation fields of the cloud box can be
  neglected}. The main point to consider here is radiation reflected
by the ground. To be formally correct there should never be a gap
between the ground and the cloud box. This is the case as radiation
leaving the cloud box can then be reflected back into the cloud box by
the ground. If it is considered that the ground is a scattering object
it is clear that the ground should in general be part of the cloud
box. However, for many cases it can be accepted to have a gap between
the ground and the cloud box, with the gain that the cloud box can be
made smaller. Such a case is when the ground is treated to act as
blackbody, the ground is then not reflecting any radiation.
Reflections from the ground can also be neglected if the zenith
optical thickness of the atmosphere between the ground and cloud box
is sufficiently high.



\levelb{Polarisation and Stokes dimensionality}
%==============================================================================
\label{sec:fm_defs:polarisation}

[* To be written *]



\levelb{Absorption and refractive index}
%==============================================================================
\label{sec:fm_defs:absorption}

[* To be written *]



\levelb{Compulsory sensor and data reduction variables}
%==============================================================================
\label{sec:fm_defs:sensor1}

The instrument that detects the simulated radiation is denoted as the
sensor\index{sensor, the}. The forward model is constructed in such
way that a sensor must exist. For cases when only monochromatic pencil
beam radiation is of interest, the positions and directions for which
the radiation shall be calculated are given by specifying an imaginary
sensor with infinite frequency and angular resolution. The workspace
variables for the sensor that always must be specified are
\artsstyle{sensor\_pos}, \artsstyle{sensor\_los},
\artsstyle{sensor\_pol}, \artsstyle{antenna\_dim},
\artsstyle{mblock\_za\_grid}, \artsstyle{mblock\_aa\_grid} and
\artsstyle{Hb}. These variables are presented separately below. The
discussion of sensor workspace variables is continued in Section~[**].
Section~\ref{sec:fm_defs:rte} gives further insights in how the sensor
is treated in ARTS.


\levelc{Sensor position\index{sensor position}}
%===================
\label{sec:fm_defs:sensorpos}

The observation positions of the sensor are stored in
\wsvindex{sensor\_pos}. This is a matrix where each row corresponds to
a sensor position. The number of columns in the matrix equals the
atmospheric dimensionality (1 column for 1D etc.). The columns of the
matrix (from first to last) are radius, latitude and longitude.
Accordingly, row $i$ of \artsstyle{sensor\_pos} for a 3D case is
$(\aRds{i},\aLat{i},\aLon{i})$. The sensor position can be set to any
value, but the resulting propagation paths (also dependent on
\artsstyle{sensor\_los}) must be valid with respect to the model
atmosphere (see Section~\ref{sec:fm_defs:ppaths}). An obviously
incorrect choice is to place the senor below the ground altitude. If
the sensor is placed inside the model atmosphere, any sensor
line-of-sight is allowed, this including the cases that the sensor is
placed on the ground looking down, and that the sensor is placed
inside the cloud box.

The fact that the sensor position can be given any value implies that
the radius must be used in \artsstyle{sensor\_pos}, in contrast to
\artsstyle{z\_ground} and \artsstyle{z\_field} where the altitude
above the geoid is applied. This is the case as, for 2D and 3D, the
sensor can be placed outside the covered latitude and longitude
ranges, thus outside the defined geoid, and the geometrical altitude is
undefined. 

The sensor is treated to be motionless when calculating the spectrum,
or spectra, for each given observation position. One or several
spectra can be calculated for each position as described in
Section~\ref{sec:fm_defs:seqsandblocks}.


\levelc{Line-of-sight\index{line-of-sight}}
%===================
\label{sec:fm_defs:los}

The viewing direction of the sensor, the line-of-sight, is described
by two angles, the zenith angle (\ZntAng) and the azimuth angle
(\AzmAng). The zenith angle exists for all atmospheric
dimensionalities, while the azimuth angle is defined only for 3D.
The term line-of-sight is not only used in connection with the sensor,
it is also used to describe the local propagation direction along the
path taken by the observed radiation
(Section~\ref{sec:fm_defs:ppaths}).  The zenith and azimuthal angles
are defined in an identical way in both of these contexts (sensor
pointing direction; local propagation direction). This is expected as
the position of the sensor is the end point of the propagation path.
The sensor line-of-sight is the direction the antenna is pointed to
receive the radiation. The line-of-sight for propagation paths is
defined likewise, it is the direction in which a hypothetical sensor
must be placed to receive the radiation along the propagation path at
the point of interest. This means that the line-of-sight and the
photons are going in opposite directions. As a true sensor has a
finite spatial resolution (described by the antenna pattern),
theoretically there is an infinite number of line-of-sights associated
with the sensor, but in the forward model, spectra are only calculated
for a discrete set of directions. If a sensor line-of-sight is
mentioned without any comments, it refers to the direction in which
the center of the antenna pattern is directed.

\begin{figure}[!t]
 \begin{center}
  \begin{minipage}[c]{0.6\textwidth}
   \includegraphics*[width=0.99\hsize]{Figs/fm_definitions/za_and_aa_angles}
  \end{minipage}%
  \begin{minipage}[c]{0.4\textwidth}
   \caption{Definition of zenith angle, \ZntAng, and azimuth angle, 
       \AzmAng, for a line-of-sight. The figure shows a line-of-sight
       with a negative azimuth angle.}
   \label{fig:fm_defs:los}
  \end{minipage}
 \end{center}
\end{figure}           
 
The \textindex{zenith angle}, \ZntAng, is simply the angle between the
line-of-sight and the zenith direction (Figure~\ref{fig:fm_defs:los}).
The valid range for 1D and 3D cases is $[0,180\degree]$. In the case
of 2D, zenith angles down to -180\degree\ are also allowed, where the
distinction is that positive angles mean a viewing direction towards
higher latitudes, and negative angles mean a viewing direction towards
lower latitudes. It should be mentioned that the zenith and nadir
directions are here defined to be along the line passing the center of
the coordinate system and the point of concern
(Section~\ref{sec:ppath:geoid}). A nadir observation,
$\ZntAng=180\degree$, is thus a measurement towards the center of the
coordinate system.

The \textindex{azimuth angle}, \AzmAng, is given with respect to the
\textindex{meridian plane}.  That is, the plane going through the
north and south poles of the coordinate system $(\Lat=\pm90\degree)$
and the sensor. The valid range is $[-180\degree,180\degree]$ where
angles are counted clockwise; 0\degree means that the viewing or
propagation direction is north-wise and +90\degree\ means that the
direction of concern goes eastward. This definition does not work for
position on the poles. To cover these special cases, the definition is
extended to say that for positions on the poles the azimuth angle
equals the longitude along the viewing direction. For example, if
standing on any of the poles and the viewing direction is towards
Greenwich, the azimuth angle is 0\degree.

The sensor line-of-sights are stored in \wsvindex{sensor\_los}. This
workspace variable is a matrix, where the first column holds zenith
angles and the second column is azimuth angles. For 1D and 2D there is
only one column in the matrix, while for 3D a row $i$ of the matrix is
$(\aZntAng{i},\aAzmAng{i})$. The number of rows for
\artsstyle{sensor\_los} must be the same as for
\artsstyle{sensor\_pos}.


\levelc{Sensor polarization\index{sensor polarization}}
%===================
\label{sec:fm_defs:sensorpol}

[* To be written *]



\levelc{Sensor characteristics and data reduction}
%===================
\label{sec:fm_defs:sensorchar}

{\bf Please note:} \emph{The transfer matrix \aSnsMtr{b} is not yet
  implemented, but will be introduced at a later stage. The other
  variables described in this section exist. This means that ARTS so
  far is only capable of performing monochromatic pencil beam
  calculations.}

The term ``sensor characteristics''\index{sensor characteristics} 
is used here as a
comprehensive term for the response of all sensor parts, beside
polarization effects, that affect how the field of monochromatic
pencil beam intensities are translated to the recorded spectrum. For
example, the antenna pattern, the side-band filtering and response of
the spectrometer channels are normally the most important
characteristics for a microwave heterodyne radiometer. Any processing
of the spectral data that takes place before the retrieval is denoted
as \textindex{data reduction}. The most common processing is to represent
the original spectra with a smaller set of values, that is, a
reduction of the data size. The most common data reduction techniques
is binning and Hotelling transformation by an eigenvector expansion.

In ARTS, the influence of sensor characteristics and data reduction is
incorporated by transfer matrices\index{sensor transfer matrix}, as
described in Section~\ref{sec:formalism:sensor} and \ref{sec:sensor}.
The application of these transfer matrices assumes that each step is a
linear operation, which should be the case for the response of the
parts of a well designed instrument. Non-linear data reduction is
handled by special workspace methods.

The sensor and data reduction are described as a series of units, each
having its own transfer matrix.  There is only one compulsory transfer
matrix and it is \aSnsMtr{b} (\wsvindex{Hb}), where the subscript $b$
stands for block (see Section~\ref{sec:fm_defs:seqsandblocks}). There
are several workspace variables associated with this transfer matrix
where \wsvindex{antenna\_dim}, \wsvindex{mblock\_za\_grid} and
\wsvindex{mblock\_aa\_grid} are the compulsory ones.

The variable \artsstyle{antenna\_dim} gives the dimensionality of the
antenna pattern\index{antenna pattern dimensionality}, where the
options are 1 and 2, standing for 1D and 2D, respectively. A 1D
antenna dimensionality means that the azimuth extension of the
antenna pattern is neglected, there is only a zenith angle variation
of the response. A 2D antenna pattern is converted to a 1D pattern by
integrating the azimuth response for each zenith angle. For cases
with 1D antenna patterns, \artsstyle{mblock\_aa\_grid} must be set to
be an empty vector.

For each sensor position, a number of monochromatic pencil beam
spectra are calculated. The monochromatic frequencies are given by
\artsstyle{f\_grid} (Section~\ref{sec:fm_defs:absorption}). The pencil
beam directions are obtained by summing the sensor line-of-sight
angles (\artsstyle{sensor\_los}) for the position and the values of
\artsstyle{mblock\_za\_grid} and \artsstyle{mblock\_aa\_grid}. For
example, pencil beam zenith angle $i$ is calculated as
\begin{equation}
  \aZntAng{i} = \aZntAng{0} + \Delta\aZntAng{i}
  \label{eq:fm_defs:psi_grid}
\end{equation}
where \aZntAng{0} is the sensor line-of-sight for the position of
concern and $\Delta\aZntAng{i}$ is value $i$ of
\artsstyle{mblock\_za\_grid}.  With other words,
\artsstyle{mblock\_za\_grid} and \artsstyle{mblock\_aa\_grid} give
the grid (relative to the sensor line-of-sight) for the calculation of
the intensity field that will be weighted with the antenna response.


\levelc{Measurement sequences and blocks}
%===================
\label{sec:fm_defs:seqsandblocks}

The series of observations modeled by the simulations is denoted as
the \textindex{measurement sequence}. That is, a measurement sequence
covers all spectra recorded at all considered sensor positions. A
measurement sequence consists of one or several \textindex{measurement
  block}s. The observations inside the various blocks differ only with
an off-set of the line-of-sight, all other factors should be common
for all blocks. A block can be treated as a measurement cycle that is
repeated, an integer number of times, to form the measurement
sequence.  The measurement blocks correspond normally to each unique
sensor position of the sequence.

A measurement block covers one or several recorded spectra, depending
on the measurement conditions and the atmospheric dimensionality. A
block can consist of several spectra when there is no effective motion
of the sensor with respect to the atmospheric fields. It should be
noted that for 1D cases, a motion along a constant radius has no
influence on the simulated spectra as the same atmospheric fields are
seen for a given viewing direction. It is favorable, if possible, to
handle all spectra as a single block, instead of using a block for
each sensor position. This is the case as the antenna patterns for the
different line-of-sights are normally overlapping and a pencil beam
spectrum can be used in connection with several measurement spectra to
estimate the intensity field. If a measurement sequence is divided
into several blocks even if a single block would be sufficient, pencil
beam spectra for basically identical propagation paths can be
calculated several times, which of course will increase the
computational time. To summarize, for cases when the sensor is not in
motion, or with a 1D atmosphere and a sensor not moving vertically,
the aim should be to use a single block for the measurement sequence.

If not a single block is used, the standard option should be that the
blocks cover one spectrum each. There could exist reasons to select an
intermediate solution, to let the extent of the blocks be several
spectra (but not the full measurement sequence). This could be the
case when the atmospheric dimensionality is 2D or 3D, and the sensor
is moving but the movement during some subsequent spectra can be
neglected. If this can be done must be judged by comparing the
movement of the sensor during the extent of the considered block
size and the spatial resolution, in the direction of the movement, that
is hoped to be achieved. If this intermediate solution shall be an
option, the difference in zenith and azimuth angles between the
spectra must be the same for all blocks, otherwise \aSnsMtr{b} cannot
be applied for all blocks as done below in Equation~\ref{eq:fm_defs:measseq}.

For each block, pencil beam spectra are calculated for the
line-of-sights obtained when summing \wsvindex{sensor\_los} and
\wsvindex{mblock\_za\_grid} (and possibly
\wsvindex{mblock\_aa\_grid}), as described in
Section~\ref{sec:fm_defs:sensorchar}. The pencil beam spectra for each
line-of-sight are appended vertically to form a common vector,
\aMpiVct{b}. Values are put in following the order in
\artsstyle{f\_grid}. Hence, the frequencies for this vector are
\begin{equation}
  \aMpiVct{b} = 
  \left[ \begin{array}{c} 
     \left[
          \begin{array}{c} \aFrq{1}\\\vdots\\\aFrq{n} \end{array} 
     \right] \\
     \vdots \\
     \left[
          \begin{array}{c} \aFrq{1}\\\vdots\\\aFrq{n} \end{array} 
     \right]
     \end{array} \right]
  \label{eq:fm_defs:freqs_of_ib}
\end{equation}
where \aFrq{i} is element $i$ of \artsstyle{f\_grid} and $n$ the length of
the same vector. The order of the angles inside \artsstyle{mblock\_za\_grid}
and \artsstyle{mblock\_aa\_grid} is followed when looping the pencil beam
directions, where the azimuth angle direction is the innermost loop.
That is, for 2D antenna patterns all azimuth angles are looped for the
first zenith angle etc. 

The transfer matrix \aSnsMtr{b} is applied on each \aMpiVct{b} and the
results are appended vertically, following the order of the positions
in \artsstyle{sensor\_pos}
\begin{equation}
  \MsrVct_{rte} = \left[ \begin{array}{c} \aSnsMtr{b}\aMpiVct{{b,1}} \\ 
                                    \aSnsMtr{b}\aMpiVct{{b,2}} \\
                                    \vdots                     \\
                                    \aSnsMtr{b}\aMpiVct{{b,n}} 
            \end{array} \right]
  \label{eq:fm_defs:measseq}
\end{equation}
where $1$ indicates the first sensor position etc. This equation shows
that \wsvindex{Hb} shall contain at least a description of the antenna
response. The matrix \artsstyle{Hb} can also cover other sensor
characteristics and data reduction if the features of concern are
common for all measurement blocks. If this is not the case, those
features must be handled by the other existing transfer matrices or,
by other means, as described in Section~[**].
%\ref{sec:fm_defs:howtomeasseq}.

The quantities $\aMpiVct{b}$ and $\MsrVct_{rte}$ do not include the
effect of the sensor polarisation, they include all Stokes components.
This means that $\aMpiVct{b}$ and $\MsrVct_{rte}$ are matrices with
number of columns equal to \wsvindex{stokes\_dim}. The matrix
$\MsrVct_{rte}$ (\wsvindex{y\_rte}) is reduced to the measurement
vector, \MsrVct\ (\wsvindex{y}), defined in Equation~\ref{eq:formalism:fm}, by
applying the sensor polarisation as described in
Section~\ref{sec:fm_defs:sensorpol}.

As the sensor line-of-sight and block grid values are just added,
there is an ambiguity of the line-of-sight. It is possible to apply a
constant off-set to the line-of-sights, if the block grids are
corrected accordingly. For example, if the simulations deal with limb
sounding and a 1D atmosphere, where normally a single block should be
used despite a number of spectra are recorded, it could be practical
to set the line-of-sight to the viewing direction of the uppermost or
lowermost spectrum, and the zenith angles in \artsstyle{mblock\_za\_grid}
will not be centered around zero which is the case when the ``true''
line-of-sight is used.

It should be noted that the compulsory sensor variables give no
information about the content of the obtained \MsrVct, as it is not
clear which parts and features the block transfer matrix covers. If
\artsstyle{Hb} only incorporates the antenna pattern, the result is a set
of hypothetical spectra corresponding to a point inside the sensor. On
the other hand, if \artsstyle{Hb} includes the whole of the sensor and an
eigenvector data reduction, the result is not even a spectrum in
traditional way, it is just a column of coefficients with a vague
physical meaning. To handle quantities appearing at a stage between
monochromatic pencil beam intensities and the final representation of
the measurements (where the total transformation can involve more
steps than the multiplication with \artsstyle{Hb}), additional sensor
variables must be introduced, as described in
Section~[**]. %\ref{sec:fm_defs:sensor2}.



\levelb{Clear sky radiative transfer}
%==============================================================================
\label{sec:fm_defs:rte}

The theory of radiative transfer is dealt with in
Section~\ref{sec:rte_theory}. This section describes how the radiative
transfer equations are solved practically in ARTS. The general
presentation assumes that the simulations deal with an emission
measurement. Focus is put on emission measurements as ARTS is intended
primarily for such observations. However, simulations of transmission
measurements are also possible, which is discussed especially in
Section~[**].%\ref{sec:fm_defs:trans_sim}.


\levelc{Calculation procedure}
%===================
\label{sec:fm_defs:calcproc}

The overall structure of the part solving the radiative transfer
equation is fixed. The corresponding workspace method is
\wsmindex{RteCalc}. The calculation procedure of \artsstyle{RteCalc} is
outlined in Algorithm~\ref{alg:fm_defs:RteCalc}. For further details
of each calculation step, see the indicated equation or section.

The primary unit for emission spectra, the unit of \aMpiVct{b} in
Equation~\ref{eq:fm_defs:measseq}, is [W/(Hz$\cdot$m$^2\cdot$sr)].
The emission intensity corresponds directly with the definition of the
Planck function in Equation~\ref{eq:rtetheory:planck}, no scaling
terms are applied.  Conversion to brightness temperature is treated in
Section~[**].

\begin{algorithm}[!t]
 \begin{algorithmic}
  \STATE{allocate memory for the matrix $\MsrVct_{rte}$}
  \COMMENT{Equation \ref{eq:fm_defs:measseq}}
  \STATE{allocate memory for the matrix \aMpiVct{b}}
  \COMMENT{Equation \ref{eq:fm_defs:freqs_of_ib}}
  \FORALL{sensor positions}
   \FORALL[Section \ref{sec:fm_defs:seqsandblocks}]
                                    {pencil beam directions of the block}
    \STATE{determine the propagation path by \artsstyle{ppathCalc}}
    \COMMENT{Section \ref{sec:fm_defs:ppaths}}
    \STATE{determine the radiation at the start of the propagation path}
    \COMMENT{Section \ref{sec:fm_defs:rad_bkgr}}
    \STATE{call \artsstyle{rte\_agenda}}
    \STATE{copy \artsstyle{i\_rte} to correct part of \aMpiVct{b}}
   \ENDFOR
   \STATE{put the product \aSnsMtr{b}\aMpiVct{b} in correct part of 
          $\MsrVct_{rte}$}
  \ENDFOR
 \end{algorithmic}
 \caption{Outline of the overall clear sky radiative transfer calculations,
   performed by \artsstyle{RteCalc}.}
 \label{alg:fm_defs:RteCalc}
\end{algorithm}


\levelc{Propagation paths}
%===================
\label{sec:fm_defs:ppaths}

A pencil beam path through the atmosphere to reach a position along a
specific line-of-sight is denoted as the \textindex{propagation path}.
Propagation paths are described by a set of points on the path, and
the distance along the path between the points. These quantities, and
a number of auxiliary variables, are stored together in a structure
described in Section~\ref{sec:ppath:Ppath}. The path points are
primarily placed at the crossings of the path with the atmospheric
grids (\artsstyle{p\_grid}, \artsstyle{lat\_grid} and
\artsstyle{lon\_grid}). A path point is also placed at the sensor if
it is placed inside the atmosphere.  Points of ground reflections and
tangent points are also included if such exist. More points can also
be added to the propagation path, for example, by setting an upper
limit for the distance along the path between the points (see
Figure~\ref{fig:fm_defs:ppath_ground}).

\begin{figure}[!p]
 \begin{center}
  \includegraphics*[width=0.95\hsize]{Figs/fm_definitions/ppath_cases2}
  \caption{Examples on allowed propagation paths for a 2D atmosphere. 
    The atmosphere is plotted as in Figure~\ref{fig:fm_defs:2d} beside
    that the points for the atmospheric fields are not emphasized.
    The position of the sensor is indicated by an asterix $(\ast)$,
    the points defining the paths are plotted as circles $(\circ)$,
    joined by a solid line. The part of the path outside the
    atmosphere, not included in the path structure, is shown by a
    dashed line. Path points corresponding to a tangent point are
    marked by an extra plus sign $(\oplus)$. The shown paths include
    the minimum set of definition points. There exists also the
    possiblity to add points inside the grid cells, for example, to
    ensure that the distance between the path points does not exceed
    a specified limit.}
  \label{fig:fm_defs:ppath_cases2}
 \end{center}
\end{figure}
% This figure was produced by the Matlab function mkfigs_ppath_cases.

\begin{figure}[!p]
 \begin{center}
  \includegraphics*[width=0.95\hsize]{Figs/fm_definitions/ppath_cases1}
  \caption{Examples on allowed propagation paths for a 1D atmosphere
    with an activated cloud box. Plotting symbols as in
    Figure~\ref{fig:fm_defs:ppath_cases2}. When the sensor is placed 
    inside the cloud box, the path is defined with a single point, 
    to know for which position and line-of-sight the intensity field of
    the cloud box shall be interpolated. }
  \label{fig:fm_defs:ppath_cases1}
 \end{center}
\end{figure}
% This figure was produced by the Matlab function mkfigs_ppath_cases.

\begin{figure}[!t]
 \begin{center}
  \includegraphics*[width=0.95\hsize]{Figs/fm_definitions/ppath_badcases}
  \caption{Examples on \emph{not} allowed propagation paths for a 2D 
    atmosphere. The constraints for allowed paths are discussed in the
    text.}
  \label{fig:fm_defs:ppath_badcases}
 \end{center}
\end{figure}
% This figure was produced by the Matlab function mkfigs_ppath_cases.


The propagation paths are determined basically by starting at the
sensor and following the path backwards by some \textindex{ray
  tracing} technique. If the sensor is placed above the model
atmosphere, geometrical calculations are used (as there is no
refraction in space) to find the crossing between the path and the top
of the atmosphere where the ray tracing then starts. Paths are tracked
backwards until the top of the atmosphere is reached, or there is an
intersection with the cloud box or the ground. The propagation path
(or paths) before a ground reflection is calculated when determining
the up-welling radiation from the ground
(Section~\ref{sec:fm_defs:groundrefl}). Example on propagation
paths are shown in Figures~\ref{fig:fm_defs:ppath_cases2} and 
\ref{fig:fm_defs:ppath_cases1}.
 
Not all propagation paths are allowed for 2D and 3D. The paths can
only enter and leave the model atmosphere at the top of the
atmosphere, as the atmospheric fields are treated to be undefined
outside the covered latitude and longitude ranges
(Figure~\ref{fig:fm_defs:ppath_badcases}). In addition, if the sensor
is placed outside the model atmosphere, the line-of-sight zenith angle
must be $\geq90\degree$, and the tangent point position of the
propagation paths must be inside the end points of the latitude and
longitude grids, but can be above the top of the atmosphere. Hence, it
is allowed that the propagation path is totally outside the
atmosphere, as long as the viewing direction is downward and the
lowest point of the path, the tangent point, is inside the latitude
and longitude limits of the model atmosphere.

Propagation paths are determined by the function \wsmindex{ppathCalc}.
This function is normally only called from \artsstyle{RteCalc}, but it
can be called separately if needed. The calculation of the path from
one crossing of the grids to next crossing is defined by
\wsvindex{ppath\_step\_agenda}. Depending on which function that is
selected for \artsstyle{ppath\_step\_agenda}, refraction will be
considered or not, a length criterion between the path points will be
applied etc. Functions intended for \artsstyle{ppath\_step\_agenda}
include \wsmindex{ppath\_stepGeometric} and
\wsmindex{ppath\_stepRefractionEuler}.


\levelc{The radiative background}
%===================
\label{sec:fm_defs:rad_bkgr}

The radiative intensity at the starting point of the path, and in the
direction of the line-of-sight at that point, is denoted as the
radiative background. Four possible radiative backgrounds exist:
\begin{description}
\item[Space] When the propagation path starts at the top of the
  atmosphere, space gives the radiative background. The normal case
  should be to set the radiation at the top of the atmosphere to
  cosmic background radiation. An exception is when the sensor is
  directed towards the sun. The radiative background at the top of
  the atmosphere is determined by \wsvindex{i\_space\_agenda}, which
  sets the workspace variable \wsvindex{i\_space}. If a propagation
  path is totally outside the model atmosphere, the observed
  monochromatic pencil beam intensity (\aMpiVct{b}\ in
  Algorithm~\ref{alg:fm_defs:RteCalc}) equals \artsstyle{i\_space}.
\item[The ground] The sum of ground emission and radiation reflected
  by the ground is the radiative background when the propagation path
  intersects with the ground. The calculation of the up-welling
  radiation from the ground is described in
  Section~\ref{sec:fm_defs:groundrefl}.
\item[Surface of cloud box] For cases when the propagation path enters
  the cloud box the radiative background is the intensities leaving
  the cloud box. The outgoing field of the cloud box must be
  pre-calculated. How to perform calculations involving scattering are
  described in Section~\ref{sec:fm_defs:scattering}.
\item[Interior of cloud box] If the sensor is situated inside the
  cloud box, there is basically no propagation path. The radiative
  background, and also the final spectrum, equals the internal
  intensity field of the cloud box at the position of the sensor, in
  the direction of the sensor line-of-sight.  This case requieres
  some special considerations, as described in
  Section~\ref{sec:fm_defs:scattering}.
\end{description}
It should be noted that except for the first case above, the
determination of the radiative background involves further radiative
transfer calculations. For example, the radiation reflected by the
ground can be calculated by a recursive call of \artsstyle{RteCalc}
and the radiative background for that calculation is then space or the
cloud box. The intensity field entering the cloud box is calculated by
calls of \artsstyle{RteCalc} (with cloud box deactivated) and the
radiative background is then space or the ground. This results in that
space is normally the ultimate radiative background for the
calculations. The exception is for propagation paths that intersects
with the ground, and the ground is treated to act as a blackbody. For
such cases, the propagation path effectively starts at the ground.


\levelc{The agenda for clear sky radiative transfer, \artsstyle{rte\_agenda}}
%===================
\label{sec:fm_defs:rte_agenda}

The task of \wsmindex{rte\_agenda} is to perform the clear sky
radiative transfer calculation along the given propagation path. The
determination of the radiative background is not part of the task of
\artsstyle{rte\_agenda}, it is in the standard case done by
\artsstyle{RteCalc} (see Algorithm~\ref{alg:fm_defs:RteCalc}). In
fact, methods for \artsstyle{rte\_agenda} just assumes that
\wsvindex{i\_rte} contains spectral values that make sense and uses
these values as start values for the calculations. This means that it
is possible to use \artsstyle{rte\_agenda} also outside of
\artsstyle{RteCalc}, as long as \wsvindex{i\_rte} and
\artsstyle{ppath} are set correctly.

The radiative transfer equation can be solved in many ways, and with
different level of refinement. The standard approach in ARTS is to
solve the radiative transfer from one point of the propagation path to
next. The simplest expression that can be used in this way is (cf.
Equation~\ref{eq:rtetheory:layer})
\begin{equation}
  \Mpi_{i+1}(\Frq) = \Mpi_i(\Frq)e^{-\aOth{i}} + B(\Frq,\aTmp{i})(1-e^{-\aOth{i}})
  \label{eq:fm_defs:rte_step}
\end{equation}
where $\Mpi(\Frq)$ is the monochromatic (and unpolarised) intensity,
$i$ is path step index, \Oth\ is the optical thickness along the path
of the step, $B$ the Planck function, and $\aTmp{i}$ is the mean of
the temperature at the end points of the step. This expression, and
the corresponding ones for polarised cases, are implemented in the
method \wsmindex{RteEmissionStd}. All methods for
\artsstyle{rte\_agenda} adapt automatically to the value of
\wsvindex{stokes\_dim} (see also Section~\ref{sec:fm_defs:polarisation}). 
Other methods to solve the radiative transfer problem are discussed in
Section~[**].



\levelc{Surface effects}
%===================
\label{sec:fm_defs:groundrefl}

The radiative properties of the surface are handled by
\wsaindex{ground\_refl\_agenda}. This agenda sets the workspace
variables \wsvindex{ground\_emission}, \wsvindex{ground\_los} and
\wsvindex{ground\_refl\_coeffs}. These three variables defines
together the properties of the surface. The general
expression used to model surface emission and reflections is
(Figure~\ref{fig:fm_defs:ground_refl})
\begin{equation}
  \MpiVct_g^u = \MpiVct_e + \sum_l^{} \mathbf{R}_l \MpiVct_l^d
  \label{eq:fm_defs:groundrefl}
\end{equation}
where \MpiVct\ is the Stokes vector for one frequency, $\MpiVct_g^u$
is the total upward travelling intensity from the surface along the
propagation path, $\MpiVct_e$ is the emission from the surface,
$\MpiVct_l^d$ is the downward travelling intensity reaching the surface
along direction $l$, and $\mathbf{R}_l$ is the reflection coefficient
matrix from direction $l$ to the present propagation path. The
emission from the surface $(\MpiVct_e)$ is stored in
\artsstyle{ground\_emission}, the directions $l$ for which downward
travelling intensities are given by \artsstyle{ground\_los}, and the
reflection coefficients $(\mathbf{R})$ are stored in
\artsstyle{ground\_refl\_coeffs}. The slope of the surface is
considered when calculating the specular direction of surface
reflections, as shown in Figure~\ref{fig:fm_defs:ppath_ground}.
Surface reflections and emission are discussed further
in Section~\ref{sec:surface}.

\begin{figure}[!p]
 \begin{center}
  \includegraphics*[width=0.95\hsize]{Figs/fm_definitions/ground_refl}
  \caption{Schematic of Equation \ref{eq:fm_defs:groundrefl}.}
  \label{fig:fm_defs:ground_refl}
 \end{center}
\end{figure}

\begin{figure}[!p]
 \begin{center}
  \includegraphics*[width=0.95\hsize]{Figs/fm_definitions/ppath_ground}
  \caption{The influence of a surface slope on the propagation path. The zenith
    angle of the sensor line-of-sight is the same for the two paths (but with
    different sign, which matters here as this is a 2D case), and the paths
    would have been symmetric around the latitude of the sensor without a 
    ground slope. The maximum path step length is here set to be a value
    equaling half the vertical distance between the two shown pressure
    surfaces.}
  \label{fig:fm_defs:ppath_ground}
 \end{center}
\end{figure}
% This figure was produced by the Matlab function mkfigs_ppath_cases.



\levelc{Calculation accuracy}
%===================
\label{sec:fm_defs:accuracy}

The accuracy of the calculations depends on many factors. For many
factors, such as spectroscopic parameters, there is nothing else to do
than using best avaliable data. On the other hand, for other factors
there is a trade-off between accuracy and speed. More accurate
calculations requires normally also more computer memory. All
different grids and the propagation path step length fall into this
category of accuracy factors. It could be worth discussing the
selection of atmospheric grids and the path step length as there can
be some confusion about how that affects the accuracy.

The main purpose of the atmospheric grids (\artsstyle{p\_grid},
\artsstyle{lat\_grid} and \artsstyle{lon\_grid}) is to build up the
mesh on which the atmospheric fields are defined. This means that the
spacing of these grids shall be selected having the representation of
the atmospheric fields in mind. That is, the spacing shall be fine
enough that the atmospheric field is sufficiently well approximated by
the piecewise (multi-)linear representation between the grid
crossings. The result is that a finer spacing must be used to
represent correctly atmospheric fields with a lot of structure, while
the grids can have fewer points when the atmsopheric fields are
smooth. 

The accuracy when performing the actual radiative transfer
calculations depends on the refinement of the expressions used and the
discretization of the propagation path. If
Equation~\ref{eq:fm_defs:rte_step} is used, the underlaying
assumptions are that the temperature is constant, and that the
absorption varies linearly, along the propagation path step. These
assumptions are of course less violated if the path step length is
made small. An upper limit of the path step length is set by the
keyword argument \artsstyle{lmax}. In many cases it should suffice to
just include path points at the crossings of the atmsopheric grids
(\artsstyle{lmax}$\leq0$). An exception can be limb sounding where the
path step length can be very long around the tangent point, but a
limit of about 25~km should suffice normally. 

As points are always included in the propagation paths at the
crossings of the atmospheric grids, finer grids will give shorter path
steps. However, it is neither good practice or effecient to use the
atmsopheric grids to control the accuracy of the radiative transfer
calculations. An upper limit on the path step length shall be applied
for this purpose.\footnote{Further discussion can be found in message
  399 and 410 of the ARTS developers mailing list.}






%\levelc{Simulation of transmission measurements}
%%===================
%\label{sec:fm_defs:trans_sim}

%[* It is not yet clear exactly how this will be done. *]



%\levelb{Additional sensor and data reduction variables} 
%%===================
%\label{sec:fm_defs:sensor2}

%[* Will be written when these variables are introduced into ARTS. *]

%%\artsstyle{antenna\_psi\_grid}, \aSnsMtr{b}, \aSnsMtr{c}

%\levelc{How to model different measurement sequences in best way?}
%%===================
%\label{sec:fm_defs:howtomeasseq}
%%
%%[* Discuss e.g. the relationship between \artsstyle{sensor\_los} and the block LOS grids. *]


\levelb{Scattering}
%==============================================================================
\label{sec:fm_defs:scattering}

[ To be written. *]

%[* Special quantities and considerations for scattering ... *]



%\levelb{Weighting functions}
%==============================================================================
%\label{sec:fm_defs:wfs}

%[* This part is still quite unclear. However, the analytical
%atmospheric WFs will be calculated on the same time as spectra. We
%need to find a good way to specify the WFs which is a complex thing to
%do. *]


%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "uguide"
%%% End: 
% LocalWords:  RTE Eriksson pz mpi SetAtmosphere mkfigs atm VMR WGS WGS pos los
% LocalWords:  SetBlackbodyGround cloudbox mblock mblock binning Hotelling lat
% LocalWords:  mishchenko RteCalc rteCalc lon ppath ppathCalc vmr za aa Hb defs
% LocalWords:  AUG scatt nonsp partic sr WFs
