m_ppath.cc File Reference

Workspace functions releated to propagation paths variables. More...

#include <cmath>
#include "arts.h"
#include "auto_md.h"
#include "check_input.h"
#include "math_funcs.h"
#include "messages.h"
#include "ppath.h"
#include "special_interp.h"
#include "xml_io.h"
#include "refraction.h"
#include "m_general.h"

Include dependency graph for m_ppath.cc:

Go to the source code of this file.

Functions

void rte_losSet (Vector &rte_los, const Index &atmosphere_dim, const Numeric &za, const Numeric &aa)
 WORKSPACE METHOD: rte_losSet.
void rte_posAddGeoidWGS84 (Vector &rte_pos, const Index &atmosphere_dim, const Numeric &latitude_1d, const Numeric &meridian_angle_1d)
 WORKSPACE METHOD: rte_posAddGeoidWGS84.
void rte_posAddRgeoid (Vector &rte_pos, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Matrix &r_geoid)
 WORKSPACE METHOD: rte_posAddRgeoid.
void rte_posSet (Vector &rte_pos, const Index &atmosphere_dim, const Numeric &r_or_z, const Numeric &lat, const Numeric &lon)
 WORKSPACE METHOD: rte_posSet.
void rte_pos_and_losFromTangentPressure (Workspace &ws, Vector &rte_pos, Vector &rte_los, Ppath &ppath, const Index &atmosphere_dim, const Vector &p_grid, const Tensor3 &z_field, const Vector &lat_grid, const Vector &lon_grid, const Agenda &ppath_step_agenda, const Matrix &r_geoid, const Matrix &z_surface, const Numeric &tan_p)
 WORKSPACE METHOD: rte_pos_and_losFromTangentPressure.
void ppathCalc (Workspace &ws, Ppath &ppath, const Agenda &ppath_step_agenda, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Matrix &r_geoid, const Matrix &z_surface, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Vector &rte_pos, const Vector &rte_los)
 WORKSPACE METHOD: ppathCalc.
void ppath_stepGeometric (Ppath &ppath_step, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Matrix &r_geoid, const Matrix &z_surface, const Numeric &ppath_lmax)
 WORKSPACE METHOD: ppath_stepGeometric.
void ppath_stepRefractionEuler (Workspace &ws, Ppath &ppath_step, Numeric &rte_pressure, Numeric &rte_temperature, Vector &rte_vmr_list, Numeric &refr_index, const Agenda &refr_index_agenda, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Tensor3 &t_field, const Tensor4 &vmr_field, const Matrix &r_geoid, const Matrix &z_surface, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace)
 WORKSPACE METHOD: ppath_stepRefractionEuler.
void sensor_posAddGeoidWGS84 (Matrix &sensor_pos, const Index &atmosphere_dim, const Numeric &latitude_1d, const Numeric &meridian_angle_1d)
 WORKSPACE METHOD: sensor_posAddGeoidWGS84.
void sensor_posAddRgeoid (Matrix &sensor_pos, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Matrix &r_geoid)
 WORKSPACE METHOD: sensor_posAddRgeoid.
void VectorZtanToZa1D (Vector &za_vector, const Matrix &sensor_pos, const Matrix &r_geoid, const Index &atmosphere_dim, const Vector &ztan_vector)
 WORKSPACE METHOD: VectorZtanToZa1D.
void VectorZtanToZaRefr1D (Workspace &ws, Numeric &refr_index, Numeric &rte_pressure, Numeric &rte_temperature, Vector &rte_vmr_list, Vector &za_vector, const Agenda &refr_index_agenda, const Matrix &sensor_pos, const Vector &p_grid, const Tensor3 &t_field, const Tensor3 &z_field, const Tensor4 &vmr_field, const Matrix &r_geoid, const Index &atmosphere_dim, const Vector &ztan_vector)
 WORKSPACE METHOD: VectorZtanToZaRefr1D.
void ZaSatOccultation (Workspace &ws, Vector &za_out, const Agenda &ppath_step_agenda, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Matrix &r_geoid, const Matrix &z_surface, const Numeric &z_recieve, const Numeric &z_send, const Numeric &t_sample, const Numeric &z_scan_low, const Numeric &z_scan_high)
 WORKSPACE METHOD: ZaSatOccultation.

Variables

const Numeric RAD2DEG
const Numeric DEG2RAD
const Numeric EARTH_GRAV_CONST


Detailed Description

Workspace functions releated to propagation paths variables.

Author:
Patrick Eriksson <Patrick.Eriksson@rss.chalmers.se>
Date:
2002-05-08
The file includes special functions to set the sensor position and LOS, and functions for calculation of propagation paths.

These functions are listed in the doxygen documentation as entries of the file auto_md.h.

Definition in file m_ppath.cc.


Function Documentation

void ppath_stepGeometric ( Ppath ppath_step,
const Index atmosphere_dim,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 z_field,
const Matrix r_geoid,
const Matrix z_surface,
const Numeric ppath_lmax 
)

WORKSPACE METHOD: ppath_stepGeometric.

Calculates a geometrical propagation path step.

This function determines a propagation path step by pure geometrical calculations. That is, refraction is neglected. Path points are always included for crossings with the grids, tangent points and points of surface intersections. The WSV *ppath_lmax* gives the option to include additional points to ensure that the distance along the path between the points does not exceed the selected maximum length. No additional points are included if ppath_lmax* is set to <= 0.

As functions of this kind should very seldom be called directly, and that the functions can be called a high number of times, these functions do not perform any checks of the input that give detailed error messages, but asserts are performed (if turned on).

For further information, type see the on-line information for ppath_step_agenda* (type "arts -d ppath_step_agenda").

Author:
Patrick Eriksson
Parameters:
[out] ppath_step WS Output
[in] atmosphere_dim WS Input
[in] p_grid WS Input
[in] lat_grid WS Input
[in] lon_grid WS Input
[in] z_field WS Input
[in] r_geoid WS Input
[in] z_surface WS Input
[in] ppath_lmax WS Input

Definition at line 239 of file m_ppath.cc.

References joker, ppath_step_geom_1d(), ppath_step_geom_2d(), and ppath_step_geom_3d().

Referenced by ppath_stepGeometric_g().

void ppath_stepRefractionEuler ( Workspace ws,
Ppath ppath_step,
Numeric rte_pressure,
Numeric rte_temperature,
Vector rte_vmr_list,
Numeric refr_index,
const Agenda refr_index_agenda,
const Index atmosphere_dim,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 z_field,
const Tensor3 t_field,
const Tensor4 vmr_field,
const Matrix r_geoid,
const Matrix z_surface,
const Numeric ppath_lmax,
const Numeric ppath_lraytrace 
)

WORKSPACE METHOD: ppath_stepRefractionEuler.

Calculates a propagation path step, considering refraction by a straightforward Euler approach.

Refraction is taken into account by probably the simplest approach possible. The path is treated to consist of piece-wise geometric steps. A geometric path step is calculated from each point by using the local line-of-sight. Except for 1D zenith angles, the path quantities are propagated by solving the differential equations by the Euler method. Snell's law for spherical symmetry is used for 1D to update the zenith angles.

See further the on-line information for *ppath_stepGeometric* (type "arts -d ppath_stepGeometric") and the user guide for more details on the algorithms used.

The maximum length of each ray tracing step is given by the WSV ppath_lraytrace*. The length will never exceed the given maximum value, but can be smaller. The ray tracing steps are only used to determine the path. Points to describe the path for RteCalc* are included as for *ppath_stepGeometric*, this including the functionality of *ppath_lmax*.

Author:
Patrick Eriksson
Parameters:
[in,out] ws Workspace
[out] ppath_step WS Output
[out] rte_pressure WS Output
[out] rte_temperature WS Output
[out] rte_vmr_list WS Output
[out] refr_index WS Output
[in] refr_index_agenda WS Input
[in] atmosphere_dim WS Input
[in] p_grid WS Input
[in] lat_grid WS Input
[in] lon_grid WS Input
[in] z_field WS Input
[in] t_field WS Input
[in] vmr_field WS Input
[in] r_geoid WS Input
[in] z_surface WS Input
[in] ppath_lmax WS Input
[in] ppath_lraytrace WS Input

Definition at line 276 of file m_ppath.cc.

References joker, ppath_step_refr_1d(), ppath_step_refr_2d(), and ppath_step_refr_3d().

Referenced by ppath_stepRefractionEuler_g().

void ppathCalc ( Workspace ws,
Ppath ppath,
const Agenda ppath_step_agenda,
const Index atmosphere_dim,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 z_field,
const Matrix r_geoid,
const Matrix z_surface,
const Index cloudbox_on,
const ArrayOfIndex cloudbox_limits,
const Vector rte_pos,
const Vector rte_los 
)

WORKSPACE METHOD: ppathCalc.

Main function for calculation of propagation paths.

There exists only one function to calculate total propagation paths and this is that function. The function is normally not visible in the control file, it is called from inside *RteCalc*. A reason to call this function directly would be to plot a propgation path.

The definition of a propgation path cannot be accomodated here. For more information read the chapter on propagation paths in the ARTS user guide and read the on-line information for ppath_step_agenda* (type "arts -d ppath_step_agenda").

Author:
Patrick Eriksson
Parameters:
[in,out] ws Workspace
[out] ppath WS Output
[in] ppath_step_agenda WS Input
[in] atmosphere_dim WS Input
[in] p_grid WS Input
[in] lat_grid WS Input
[in] lon_grid WS Input
[in] z_field WS Input
[in] r_geoid WS Input
[in] z_surface WS Input
[in] cloudbox_on WS Input
[in] cloudbox_limits WS Input
[in] rte_pos WS Input
[in] rte_los WS Input

Definition at line 214 of file m_ppath.cc.

References ppath_calc().

Referenced by ppathCalc_g().

void rte_losSet ( Vector rte_los,
const Index atmosphere_dim,
const Numeric za,
const Numeric aa 
)

WORKSPACE METHOD: rte_losSet.

Sets *rte_los* to the given angles.

The keyword argument *za* is put in as first element of *rte_los* and *aa* as the second element. However, when *atmosphere_dim* is set to 1D or 2D, the length of *rte_los* is set to 1 and only the given zenith angle is considered.

Keywords: <br> za : Zenith angle of sensor line-of-sight. <br> aa : Azimuth angle of sensor line-of-sight.

Author:
Patrick Eriksson
Parameters:
[out] rte_los WS Output
[in] atmosphere_dim WS Input
[in] za Generic Input
[in] aa Generic Input

Definition at line 65 of file m_ppath.cc.

References chk_if_in_range(), and Vector::resize().

Referenced by rte_losSet_g().

void rte_pos_and_losFromTangentPressure ( Workspace ws,
Vector rte_pos,
Vector rte_los,
Ppath ppath,
const Index atmosphere_dim,
const Vector p_grid,
const Tensor3 z_field,
const Vector lat_grid,
const Vector lon_grid,
const Agenda ppath_step_agenda,
const Matrix r_geoid,
const Matrix z_surface,
const Numeric tan_p 
)

WORKSPACE METHOD: rte_pos_and_losFromTangentPressure.

If you are doing limb calculations it can be useful to specify viewing direction and sensor position by the tangent pressure. This function takes tan_p as a keyword argument and sets rte_los and rte_pos to the apropriate position on the edge of the modelled atmosphere

This function is a work in progress. Only 1D is currently supported

Author:
Cory Davis
Parameters:
[in,out] ws Workspace
[out] rte_pos WS Output
[out] rte_los WS Output
[out] ppath WS Output
[in] atmosphere_dim WS Input
[in] p_grid WS Input
[in] z_field WS Input
[in] lat_grid WS Input
[in] lon_grid WS Input
[in] ppath_step_agenda WS Input
[in] r_geoid WS Input
[in] z_surface WS Input
[in] tan_p Generic Input

Definition at line 154 of file m_ppath.cc.

References gridpos(), GridPos::idx, interp(), interpweights(), joker, Ppath::los, ConstVectorView::nelem(), Ppath::np, out1, Ppath::pos, ppath_calc(), and Vector::resize().

Referenced by rte_pos_and_losFromTangentPressure_g().

void rte_posAddGeoidWGS84 ( Vector rte_pos,
const Index atmosphere_dim,
const Numeric lat_1d,
const Numeric meridian_angle_1d 
)

WORKSPACE METHOD: rte_posAddGeoidWGS84.

Adds a geoid radius according to WGS-84 to a geometric altitude.

This function assumes that the first element of *rte_pos* is set to the geometric altitude for the position of the sensor. The variable *rte_pos* shall contain the radius instead of the altitude and that can be achieved by this function. The function adds a geoid radius to the given altitude. The geoid radius is taken from the WGS-84 reference ellipsoid.

For 1D, the geoid radius is set to the radius of curvature of the WGS-84 ellipsoid for the position and observation direction described with *lat_1d* and *meridian_angle_1d*. For 2D and 3D, the geoid radius is set to the radius of the WGS-84 ellipsoid for the latitude value in *rte_pos*.

Author:
Patrick Eriksson
Parameters:
[out] rte_pos WS Output
[in] atmosphere_dim WS Input
[in] lat_1d WS Input
[in] meridian_angle_1d WS Input

Definition at line 89 of file m_ppath.cc.

References chk_if_in_range(), chk_vector_length(), joker, ConstVectorView::nelem(), and sensor_posAddGeoidWGS84().

Referenced by rte_posAddGeoidWGS84_g().

void rte_posAddRgeoid ( Vector rte_pos,
const Index atmosphere_dim,
const Vector lat_grid,
const Vector lon_grid,
const Matrix r_geoid 
)

WORKSPACE METHOD: rte_posAddRgeoid.

Adds a geoid radius by interpolating *r_geoid*.

This function assumes that the first element of *rte_pos* is set to the geometric altitude for the position of the sensor. The variable *rte_pos* shall contain the radius instead of the altitude and that can be achieved by this function. The function adds a geoid radius to the given altitude. The geoid radius is obtained by interpolation of *r_geoid*. There is an error if the given position is outside the latitude and longitude grids.

Author:
Patrick Eriksson
Parameters:
[out] rte_pos WS Output
[in] atmosphere_dim WS Input
[in] lat_grid WS Input
[in] lon_grid WS Input
[in] r_geoid WS Input

Definition at line 110 of file m_ppath.cc.

References chk_if_in_range(), chk_vector_length(), joker, ConstVectorView::nelem(), and sensor_posAddRgeoid().

Referenced by rte_posAddRgeoid_g().

void rte_posSet ( Vector rte_pos,
const Index atmosphere_dim,
const Numeric r_or_z,
const Numeric lat,
const Numeric lon 
)

WORKSPACE METHOD: rte_posSet.

Sets *rte_pos* to the given co-ordinates.

The keyword argument *r_or_z* is put in as first element of rte_pos*, *lat* as the second element and *lon* as third element. However, the length of *rte_pos* is set to *atmosphere_dim* and keyword arguments for dimensions not used are ignored.

The first keyword argument can either be a radius, or an altitude above the geoid. In the latter case, a function such as rte_posAddGeoidWGS84* could be called to obtain a radius as first element of *rte_pos*.

Keywords: <br> r_or_z : Radius or geometrical altitude of sensor position. <br> lat : Latitude of sensor position. <br> lon : Longitude of sensor position.

Author:
Patrick Eriksson
Parameters:
[out] rte_pos WS Output
[in] atmosphere_dim WS Input
[in] r_or_z Generic Input
[in] lat Generic Input
[in] lon Generic Input

Definition at line 131 of file m_ppath.cc.

References chk_if_in_range(), and Vector::resize().

Referenced by rte_posSet_g().

void sensor_posAddGeoidWGS84 ( Matrix sensor_pos,
const Index atmosphere_dim,
const Numeric lat_1d,
const Numeric meridian_angle_1d 
)

WORKSPACE METHOD: sensor_posAddGeoidWGS84.

Adds a geoid radius according to WGS-84 to a geometric altitude.

This function assumes that the first element of *sensor_pos* is set to the geometric altitude for the positions of the sensor. The variable *sensor_pos* shall contain the radius instead of the altitude and that can be achieved by this function. The function adds a geoid radius to the given altitude. The geoid radius is taken from the WGS-84 reference ellipsoid.

For 1D, the geoid radius is set to the radius of curvature of the WGS-84 ellipsoid for the position and observation direction described with *lat_1d* and *meridian_angle_1d*. For 2D and 3D, the geoid radius is set to the radius of the WGS-84 ellipsoid for the latitude values in *sensor_pos*.

Author:
Patrick Eriksson
Parameters:
[out] sensor_pos WS Output
[in] atmosphere_dim WS Input
[in] lat_1d WS Input
[in] meridian_angle_1d WS Input

Definition at line 332 of file m_ppath.cc.

References chk_if_in_range(), chk_matrix_ncols(), joker, ConstMatrixView::nrows(), and r_geoidWGS84().

Referenced by rte_posAddGeoidWGS84(), and sensor_posAddGeoidWGS84_g().

void sensor_posAddRgeoid ( Matrix sensor_pos,
const Index atmosphere_dim,
const Vector lat_grid,
const Vector lon_grid,
const Matrix r_geoid 
)

WORKSPACE METHOD: sensor_posAddRgeoid.

Adds a geoid radius by interpolating *r_geoid*.

This function assumes that the first element of *rte_pos* is set to the geometric altitude for the position of the sensor. The variable *rte_pos* shall contain the radius instead of the altitude and that can be achieved by this function. The function adds a geoid radius to the given altitude. The geoid radius is obtained by interpolation of *r_geoid*. There is an error if the given position is outside the latitude and longitude grids.

Author:
Patrick Eriksson
Parameters:
[out] sensor_pos WS Output
[in] atmosphere_dim WS Input
[in] lat_grid WS Input
[in] lon_grid WS Input
[in] r_geoid WS Input

Definition at line 400 of file m_ppath.cc.

References chk_atm_surface(), chk_if_in_range(), chk_matrix_ncols(), gridpos(), interp(), interpweights(), joker, last(), max, min, and ConstMatrixView::nrows().

Referenced by rte_posAddRgeoid(), and sensor_posAddRgeoid_g().

void VectorZtanToZa1D ( Vector gout1,
const Matrix sensor_pos,
const Matrix r_geoid,
const Index atmosphere_dim,
const Vector gin1 
)

WORKSPACE METHOD: VectorZtanToZa1D.

Converts a set of geometrical tangent altitudes to zenith angles.

The tangent altitudes are given to the function as a vector, which are converted to a generic vector of zenith angles. The position of the sensor is given by the WSV *sensor_pos*. The function works only for 1D, where the geoid radius is taken from *r_geoid*. The zenith angles are always set to be positive. The tangent altitudes are given as the altitude above the geoid.

Generic output: <br> Vector : A vector with zenith angles.

Generic input: <br> Vector : A vector with geometric tangent altitudes

Author:
Patrick Eriksson

Mattias Ekstrom

Parameters:
[out] gout1 Generic output
[in] sensor_pos WS Input
[in] r_geoid WS Input
[in] atmosphere_dim WS Input
[in] gin1 Generic Input

Definition at line 466 of file m_ppath.cc.

References geompath_za_at_r(), ConstVectorView::nelem(), ConstMatrixView::nrows(), and Vector::resize().

Referenced by VectorZtanToZa1D_g().

void VectorZtanToZaRefr1D ( Workspace ws,
Numeric refr_index,
Numeric rte_pressure,
Numeric rte_temperature,
Vector rte_vmr_list,
Vector gout1,
const Agenda refr_index_agenda,
const Matrix sensor_pos,
const Vector p_grid,
const Tensor3 t_field,
const Tensor3 z_field,
const Tensor4 vmr_field,
const Matrix r_geoid,
const Index atmosphere_dim,
const Vector gin1 
)

WORKSPACE METHOD: VectorZtanToZaRefr1D.

Converts a set of true tangent altitudes to zenith angles.

The tangent altitudes are given to the function as a vector, which are converted to a generic vector of zenith angles. The position of the sensor is given by the WSV *sensor_pos*. The function works only for 1D. The zenith angles are always set to be positive. The tangent altitudes are given as the altitude above the geoid.

Generic output: <br> Vector : A vector with zenith angles.

Generic input: <br> Vector : A vector with true tangent altitudes

Author:
Patrick Eriksson

Mattias Ekstrom

Parameters:
[in,out] ws Workspace
[out] refr_index WS Output
[out] rte_pressure WS Output
[out] rte_temperature WS Output
[out] rte_vmr_list WS Output
[out] gout1 Generic output
[in] refr_index_agenda WS Input
[in] sensor_pos WS Input
[in] p_grid WS Input
[in] t_field WS Input
[in] z_field WS Input
[in] vmr_field WS Input
[in] r_geoid WS Input
[in] atmosphere_dim WS Input
[in] gin1 Generic Input

Definition at line 499 of file m_ppath.cc.

References get_refr_index_1d(), joker, ConstVectorView::nelem(), ConstMatrixView::nrows(), RAD2DEG, and Vector::resize().

Referenced by VectorZtanToZaRefr1D_g().

void ZaSatOccultation ( Workspace ws,
Vector gout1,
const Agenda ppath_step_agenda,
const Index atmosphere_dim,
const Vector p_grid,
const Vector lat_grid,
const Vector lon_grid,
const Tensor3 z_field,
const Matrix r_geoid,
const Matrix z_surface,
const Numeric z_recieve,
const Numeric z_send,
const Numeric t_sample,
const Numeric z_scan_low,
const Numeric z_scan_high 
)

WORKSPACE METHOD: ZaSatOccultation.

Calculates zenith angles for satellite occultations.

The zenith angles are calculated with an interval of *t_sample with the recieving satellite at height *z_recieve* above the geoid and the transmitting satellite at height *z_send*. The zenith angles are restricted by the two tangent altitudes z_scan_low* and *z_scan_high*.

Author:
Mattias Ekstrom
Parameters:
[in,out] ws Workspace
[out] gout1 Generic output
[in] ppath_step_agenda WS Input
[in] atmosphere_dim WS Input
[in] p_grid WS Input
[in] lat_grid WS Input
[in] lon_grid WS Input
[in] z_field WS Input
[in] r_geoid WS Input
[in] z_surface WS Input
[in] z_recieve Generic Input
[in] z_send Generic Input
[in] t_sample Generic Input
[in] z_scan_low Generic Input
[in] z_scan_high Generic Input

Definition at line 551 of file m_ppath.cc.

References chk_atm_field(), chk_atm_grids(), chk_atm_surface(), DEG2RAD, EARTH_GRAV_CONST, geompath_lat_at_za(), geompath_za_at_r(), gridpos(), interp(), interpweights(), linspace(), Ppath::los, ConstVectorView::nelem(), Ppath::np, Ppath::pos, ppath_calc(), RAD2DEG, Vector::resize(), and Ppath::tan_pos.

Referenced by ZaSatOccultation_g().


Variable Documentation


Generated on Mon Mar 23 14:06:41 2009 for ARTS by  doxygen 1.5.6