ARTS  2.0.49
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"

Go to the source code of this file.

Functions

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, const Verbosity &verbosity)
 WORKSPACE METHOD: ppathCalc. More...
 
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, const Verbosity &)
 WORKSPACE METHOD: ppath_stepGeometric. More...
 
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, const Verbosity &)
 WORKSPACE METHOD: ppath_stepRefractionEuler. More...
 
void rte_posAddRgeoid (Vector &rte_pos, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Matrix &r_geoid, const Verbosity &verbosity)
 WORKSPACE METHOD: rte_posAddRgeoid. More...
 
void rte_losSet (Vector &rte_los, const Index &atmosphere_dim, const Numeric &za, const Numeric &aa, const Verbosity &)
 WORKSPACE METHOD: rte_losSet. More...
 
void rte_posSet (Vector &rte_pos, const Index &atmosphere_dim, const Numeric &r_or_z, const Numeric &lat, const Numeric &lon, const Verbosity &)
 WORKSPACE METHOD: rte_posSet. More...
 
void sensor_posAddRgeoid (Matrix &sensor_pos, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Matrix &r_geoid, const Verbosity &)
 WORKSPACE METHOD: sensor_posAddRgeoid. More...
 
void VectorZtanToZaRefr1D (Workspace &ws, 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, const Verbosity &)
 WORKSPACE METHOD: VectorZtanToZaRefr1D. More...
 
void VectorZtanToZa1D (Vector &za_vector, const Matrix &sensor_pos, const Matrix &r_geoid, const Index &atmosphere_dim, const Vector &ztan_vector, const Verbosity &)
 WORKSPACE METHOD: VectorZtanToZa1D. More...
 

Variables

const Numeric RAD2DEG
 
const Numeric DEG2RAD
 
const Numeric EARTH_GRAV_CONST
 

Detailed Description

Workspace functions releated to propagation paths variables.

Author
Patrick Eriksson Patri.nosp@m.ck.E.nosp@m.rikss.nosp@m.on@r.nosp@m.ss.ch.nosp@m.alme.nosp@m.rs.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

◆ ppath_stepGeometric()

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,
const Verbosity verbosity 
)

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 intersection points with the surface. 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.

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_stepWS Output
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_fieldWS Input
[in]r_geoidWS Input
[in]z_surfaceWS Input
[in]ppath_lmaxWS Input

Definition at line 92 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().

◆ ppath_stepRefractionEuler()

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,
const Verbosity verbosity 
)

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 yCalc* are included as for ppath_stepGeometric, this including the functionality of ppath_lmax.

Author
Patrick Eriksson
Parameters
[in,out]wsWorkspace
[out]ppath_stepWS Output
[out]rte_pressureWS Output
[out]rte_temperatureWS Output
[out]rte_vmr_listWS Output
[out]refr_indexWS Output
[in]refr_index_agendaWS Input
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_fieldWS Input
[in]t_fieldWS Input
[in]vmr_fieldWS Input
[in]r_geoidWS Input
[in]z_surfaceWS Input
[in]ppath_lmaxWS Input
[in]ppath_lraytraceWS Input

Definition at line 130 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().

◆ ppathCalc()

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,
const Verbosity verbosity 
)

WORKSPACE METHOD: ppathCalc.

Main method 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 yCalc. 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]wsWorkspace
[out]ppathWS Output
[in]ppath_step_agendaWS Input
[in]atmosphere_dimWS Input
[in]p_gridWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]z_fieldWS Input
[in]r_geoidWS Input
[in]z_surfaceWS Input
[in]cloudbox_onWS Input
[in]cloudbox_limitsWS Input
[in]rte_posWS Input
[in]rte_losWS Input

Definition at line 65 of file m_ppath.cc.

References ppath_calc().

Referenced by ppathCalc_g().

◆ rte_losSet()

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

WORKSPACE METHOD: rte_losSet.

Sets rte_los to the given angles.

The azimuth angle is ignored for 1D and 2D.

Author
Patrick Eriksson
Parameters
[out]rte_losWS Output
[in]atmosphere_dimWS Input
[in]zaGeneric Input
[in]aaGeneric Input

Definition at line 210 of file m_ppath.cc.

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

Referenced by rte_losSet_g().

◆ rte_posAddRgeoid()

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

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_posWS Output
[in]atmosphere_dimWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]r_geoidWS Input

Definition at line 187 of file m_ppath.cc.

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

Referenced by rte_posAddRgeoid_g().

◆ rte_posSet()

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

WORKSPACE METHOD: rte_posSet.

Sets rte_pos to the given co-ordinates.

The longitude is ignored for 1D and 2D, and the latitude is also ignored for 1D.

The argument r_or_z 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.

Author
Patrick Eriksson
Parameters
[out]rte_posWS Output
[in]atmosphere_dimWS Input
[in]r_or_zGeneric Input
[in]latGeneric Input
[in]lonGeneric Input

Definition at line 235 of file m_ppath.cc.

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

Referenced by rte_posSet_g().

◆ sensor_posAddRgeoid()

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

WORKSPACE METHOD: sensor_posAddRgeoid.

Adds a geoid radius by interpolating r_geoid.

This function assumes that the first element of sensor_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_posWS Output
[in]atmosphere_dimWS Input
[in]lat_gridWS Input
[in]lon_gridWS Input
[in]r_geoidWS Input

Definition at line 259 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().

◆ VectorZtanToZa1D()

void VectorZtanToZa1D ( Vector v_za,
const Matrix sensor_pos,
const Matrix r_geoid,
const Index atmosphere_dim,
const Vector v_ztan,
const Verbosity verbosity 
)

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.

Author
Patrick Eriksson
Mattias Ekstrom
Parameters
[out]v_zaGeneric output
[in]sensor_posWS Input
[in]r_geoidWS Input
[in]atmosphere_dimWS Input
[in]v_ztanGeneric Input

Definition at line 375 of file m_ppath.cc.

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

Referenced by VectorZtanToZa1D_g().

◆ VectorZtanToZaRefr1D()

void VectorZtanToZaRefr1D ( Workspace ws,
Vector v_za,
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 v_ztan,
const Verbosity verbosity 
)

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.

Author
Patrick Eriksson
Mattias Ekstrom
Parameters
[in,out]wsWorkspace
[out]v_zaGeneric output
[in]refr_index_agendaWS Input
[in]sensor_posWS Input
[in]p_gridWS Input
[in]t_fieldWS Input
[in]z_fieldWS Input
[in]vmr_fieldWS Input
[in]r_geoidWS Input
[in]atmosphere_dimWS Input
[in]v_ztanGeneric Input

Definition at line 325 of file m_ppath.cc.

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

Referenced by VectorZtanToZaRefr1D_g().

Variable Documentation

◆ DEG2RAD

const Numeric DEG2RAD
extern

◆ EARTH_GRAV_CONST

const Numeric EARTH_GRAV_CONST
extern

◆ RAD2DEG

const Numeric RAD2DEG
extern

Referenced by VectorZtanToZaRefr1D().