%
% To start the document, use
%  \levela{...}
% For lover level, sections use
%  \levelb{...}
%  \levelc{...}
%
\levela{The forward model: concepts, definitions and overview}
 \label{sec:fm_defs}

%
% Document history, format:
%  \starthistory
%    date1 & text .... \\
%    date2 & text .... \\
%    ....
%  \stophistory
%
\starthistory
  020314 & Layout made by Patrick Eriksson.\\
\stophistory


%
% Symbol table, format:
%  \startsymbols
%    ... & \verb|...| & text ... \\
%    ... & \verb|...| & text ... \\
%    ....
%  \stopsymbols
%
%
\startsymbols
  \Ind           & -                 & vector/matrix/tensor index           \\
  \aInd{\Lat}    & -                 & the \Ind:th latitude                 \\
  \VctLng        & -                 & vector length or size of matrix/tensor for a dimension \\
  \aVctLng{\Lat} & -                 & length of the latitude grid \\
  \Prs           & \verb|p|          & pressure                             \\
  \PrsAlt        & \verb|pz|         & pressure altitude                    \\
  \Rds           & \verb|r|          & radius from the geoid centre         \\
  \Alt           & \verb|z|          & geometrical altitude above the geoid \\
  \Lat           & \verb|alpha|      & latitude                             \\
  \Lon           & \verb|beta|       & longitude                            \\
  \ZntAng        & \verb|psi|        & zenith angle                         \\
  \AzmAng        & \verb|omega|      & azimuthal angle                      \\
 \label{symtable:fm_defs}     
\stopsymbols



This chapter introduces terms and concepts of ARTS as a forward model,
in contrast to the previous chapter that describes ARTS as a computer
programme. While the content of the previous chapter is specific for
ARTS, as the way to use a forward model programme differ normally
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 way that, the content of this user
guide can be fully appreciated and that you shall understand how to
generate a control file for your simulation problem.



\levelb{Mathematics}
%===================
\label{sec:fm_defs:math}

[* A short introduction to the vectors, matrices and tensors should be
found here. It should be described what the terms means, the order in
which dimensions are given, how sizes are specified here in the guide,
how different dimensionalities are handled etc. 

Shall we use round braces for specifying a value, e.g.
\begin{equation}
  \Alt(\aInd{\Lon},\aInd{\Lat},\aInd{\Prs})
\end{equation}
and square braces for giving the size:
\begin{equation}
  \Alt \SzeSmb [\aVctLng{\Lon},\aVctLng{\Lat},\aVctLng{\Prs}]
\end{equation}
(is the \SzeSmb\ the correct symbol to use here?)? To not confuse
ourselves, we should use the same dimension order as inside ARTS, or?  *]



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


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

The structure of the atmosphere can be defined to have different
degree of complexity, the \qindex{atmospheric dimensionality}. There
exist three levels for the complexity of the atmosphere, 1D, 2D and
3D, where 1D and 2D can be treated as special cases of 3D. The
significance of these different atmospheric dimensionalities [* does
this form of the word exist? *], and the coordinate systems used, are
here described.

\leveld{\qindex{3D}} In this, the most general, case, the
atmospheric fields vary in all three spatial coordinates, as in a true
atmosphere. A spherical coordinate system is used where the dimensions
are radius (\Rds), latitude (\Lat) and longitude (\Lon), and a
position is given as $(\Lon,\Lat,\Rds)$. 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 goes from -90\degree to +90\degree,
where +90\degree corresponds to the North pole etc. Longitudes are
counted from th Greenwich meridian with positive values towards the
east. The meridian at the Greenwich antipode has longitude +180\degree
and longitudes smaller or equal to -180\degree are not allowed. The
poles are considered to be placed at longitude 0\degree.

\leveld{\qindex{1D}} A 1D atmosphere can be described as being
spherically symmetric. 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 the 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 observation plane between the sensor and the point of interest
(see further Section~[**]).  This latter coordinate system coincides
with the one used for 2D where the sensor position is set to be the
zero point for latitude. A 1D atmosphere is shown in
Figure~\ref{fig:fm_defs:1d}.

\leveld{\qindex{2D}} In contrast to the 1D and 3D cases, a 2D
atmosphere extends only inside a plane. A spherical coordinate system
is accordingly not needed and a polar 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 [* is this a clear description?
*], 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}.

 \begin{figure}[!t]
  \begin{center}
   \includegraphics*[width=0.95\hsize]{Figs/atm_dim_1d}
   \caption{ A schematic cross-section 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 is constant. The
     cloud box extends from the ground up to the thin solid line. The
     upper limit of the cloud box coincides always with a 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.95\hsize]{Figs/atm_dim_2d}
   \caption{ Schematic of a 2D atmosphere. The radii of the geoid, the ground
     and all the pressure surfaces are for 2D atmospheres allowed to have a
     latitude variation. The limits of
     the cloud box coincide always with grid box boundaries. Plotting
     symbols as in Figure~\ref{fig:fm_defs:1d}. }
   \label{fig:fm_defs:2d}
  \end{center}
 \end{figure}
 % This figure was produced by the Matlab function mkfigs_atm_dims.



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

\leveld{Pressure \index{pressure} and \qindex{pressure altitude}} 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 called
\verb|p_grid|. The choice of having pressure as main altitude
coordinate results in that atmospheric quantities are retrieved as a
function pressure, not as a function of geometrical altitude.

However, a basic assumption in ARTS is that atmospheric quantities
(temperature, geometric altitude, species VMR etc.) vary linear 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}(\log_{10}\aPrs{0} - \log_{10}\Prs)
 \label{eq:fm_defs:prsalt}
\end{equation}
where \aPrsAlt{s} and \aPrs{0} are arbitrary parameters (set in
\verb|arts.h|), but suitably selected in such way that the pressure
altitude corresponds roughly with the geometrical altitude. Values
around $\aPrsAlt{s}=1013$~hPa and $\aPrs{0}=15.5$~km are suitable for
simulations dealing with the Earth's atmosphere. 

[* According to what I have written, \verb|p_grid| is in pressure.
The question is if we shall have a parallel variable for the pressure
altitude, or if we shall make a repeated conversion of \verb|p_grid|
when needed? My guess is that it is not necessary to make this
conversion many times, partly as the interpolation weights are
pre-calculated by my index positions. What do you say? *]

\leveld{Radius \index{radius}} Beside pressure, geometrical altitudes
are needed to determine the propagation path through the atmosphere
etc. The main geometrical altitude coordinate is the distance to the
centre 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~[**]).

\leveld{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 geoid centre (see for example
Equation~\ref{eq:fm_defs:zground}). Hence, the geometrical altitude is
not measured along the local zenith direction (the normal to the
reference geoid), but the difference to an altitude obtained in this
way should be negligible. Geometrical altitudes are mainly used to
facilitate the input of the ground altitude, the sensor position and
the altitude of the pressure surfaces. This is the case as these
quantities are known rather with respect to the geoid than with
respect to the Earth's centre.



\levelc{Atmospheric grids and fields} \index{grid} \index{field}
%===================
\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 (\verb|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 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 latitude grid (\verb|alpha_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 geoid centre to the point of
concern. Hence, the latitudes here correspond to the definition of the
geocentric latitude, and not geodetic latitudes (see Section~[**]).
This is an accordance to the definition of geometric altitudes found
above. For 3D, a longitude grid (\verb|beta_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. This results in that a propagation path are not allowed to
cross a latitude or longitude end face of the atmosphere, it can only
enter or leave the atmosphere through the top of the atmosphere (the
uppermost pressure level). See further Section~[**]. The volume (or
area for 2D) covered by the grids is denoted as the \qindex{model
  atmsopshere}.

If the latitude and longitude grids are not used for the selected
atmospheric dimensionality, the latitude grid (for 1D) and the
longitude grid (for 1D and 2D) are set to be empty, but the when
dealing with the size of variables the grid length shall be treated to
be one ($\aVctLng{\Lat}=1$ and/or $\aVctLng{\Lon}=1$). 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
Figure~\ref{fig:fm_defs:2d}), or for 1D at each pressure surface
(thick dots in Figure~\ref{fig:fm_defs:1d}). This representation is
denoted as the field of the quantity. The field must, at least, be
specified for the geometric altitude of the pressure surfaces
(\verb|z_field|), the temperature (\verb|t_field|) and considered
atmospheric species (\verb|????|).

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 (\verb|z_field|).



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

The geoid, \aRds{\odot}, is an imagery surface used as a reference
surface 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. 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~[**].

Inside ARTS, the geoid is represented as a matrix (\verb|r_geoid|),
holding the geoid radius for each crossing of the latitude and
longitude grids. The size of the matrix is accordingly $\aRds{\odot}
\SzeSmb [\aVctLng{\Lon},\aVctLng{\Lat}]$ and the geoid radius for a
specific position is $\aRds{\odot}(\aInd{\Lon},\aInd{\Lat})$. 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}, it is not allowed that there is a gap
between the ground and the lowermost pressure level.

The ARTS variable for the ground altitude (\verb|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. For
example, for limb sounding into the troposphere, it could be of
importance to capture the intersection of the antenna beam by the
Himalayas, and maybe other mountain ridges.  However, it should be
noted that ground reflections are treated in a simplified manner and
accurate results cannot be expected beside when some conditions are
fulfilled (see Section~[**]).



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

In order to save computational time, scattering calculations are
limited to the part of the atmosphere containing clouds and other
scattering objects (beside the ground). The atmospheric region in
which scattering shall be considered is denoted as the 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}). 

The cloud box is defined in such way that a propagation path that
leaves the cloud box has no opportunity to cross the cloud box
boundary at any other location (remember that there is no scattering
outside the cloud box). This requires that the lower limit of the
cloud box is throughout the ground. This is the case as if there would
be a gap between the ground and the cloud box, paths leaving the cloud
box in the nadir direction would re-enter the cloud box after a
reflection in the ground. [* I just realized that with a tilted ground
surface it is possible that a path bounces back into the cloud box.
What shall we do with this? *]

Beside the lower vertical limit, the cloud box is defined to be
rectangular in the used coordinate system, with limits exactly at
points of the involved grids. This means that the upper limit of the
cloud box equals a pressure surface. For 2D, the angular extension of
the cloud box is between two points of the latitude grid
(Figure~\ref{fig:fm_defs:2d}), and likewise for 3D but then also with
a longitude extension between two grid points.



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

[* How the sensor position and characteristics are defined. *]



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

[* Considerations for the calculation of absorption and refractive index ...
Tags, line-by-line, absorption models etc. *]



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

[* Approach for solving the radiative transfer problem without scattering. *]

\levelb{Ground reflections}
%===================
\label{sec:fm_defs:groundrefl}

[* Discuss limitations for the used scheme and when OK results can be
expected. The slope of the ground is considered! Can we include
diffuse ground reflections in a simple way? *]


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

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


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