ARTS
2.3.1285(git:92a29ea9-dirty)
|
Workspace functions releated to propagation paths variables. More...
#include <cmath>
#include "arts.h"
#include "auto_md.h"
#include "check_input.h"
#include "geodetic.h"
#include "lin_alg.h"
#include "m_general.h"
#include "m_xml.h"
#include "math_funcs.h"
#include "messages.h"
#include "ppath.h"
#include "refraction.h"
#include "special_interp.h"
#include "xml_io.h"
Go to the source code of this file.
Functions | |
void | AddZaAa (Matrix &new_los, const Vector &ref_los, const Matrix &dlos, const Verbosity &) |
WORKSPACE METHOD: AddZaAa. More... | |
void | DiffZaAa (Matrix &dlos, const Vector &ref_los, const Matrix &other_los, const Verbosity &) |
WORKSPACE METHOD: DiffZaAa. More... | |
void | geo_posEndOfPpath (Vector &geo_pos, const Ppath &ppath, const Verbosity &verbosity) |
WORKSPACE METHOD: geo_posEndOfPpath. More... | |
void | geo_posLowestAltitudeOfPpath (Vector &geo_pos, const Ppath &ppath, const Verbosity &verbosity) |
WORKSPACE METHOD: geo_posLowestAltitudeOfPpath. More... | |
void | geo_posWherePpathPassesZref (Vector &geo_pos, const Ppath &ppath, const Numeric &z_ref, const Verbosity &verbosity) |
WORKSPACE METHOD: geo_posWherePpathPassesZref. More... | |
void | ppathCalc (Workspace &ws, Ppath &ppath, const Agenda &ppath_agenda, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace, const Index &atmgeom_checked, const Vector &f_grid, const Index &cloudbox_on, const Index &cloudbox_checked, const Index &ppath_inside_cloudbox_do, const Vector &rte_pos, const Vector &rte_los, const Vector &rte_pos2, const Verbosity &) |
WORKSPACE METHOD: ppathCalc. More... | |
void | ppathCalcFromAltitude (Workspace &ws, Ppath &ppath, const Agenda &ppath_agenda, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace, const Index &atmgeom_checked, const Vector &f_grid, const Index &cloudbox_on, const Index &cloudbox_checked, const Index &ppath_inside_cloudbox_do, const Vector &rte_pos, const Vector &rte_los, const Vector &rte_pos2, const Numeric &altitude, const Numeric &accuracy, const Verbosity &verbosity) |
WORKSPACE METHOD: ppathCalcFromAltitude. More... | |
void | ppathFromRtePos2 (Workspace &ws, Ppath &ppath, Vector &rte_los, Numeric &ppath_lraytrace, 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 Vector &f_grid, const Vector &refellipsoid, const Matrix &z_surface, const Vector &rte_pos, const Vector &rte_pos2, const Numeric &ppath_lmax, const Numeric &za_accuracy, const Numeric &pplrt_factor, const Numeric &pplrt_lowest, const Verbosity &verbosity) |
WORKSPACE METHOD: ppathFromRtePos2. More... | |
void | ppathPlaneParallel (Ppath &ppath, const Index &atmosphere_dim, const Tensor3 &z_field, const Matrix &z_surface, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Index &ppath_inside_cloudbox_do, const Vector &rte_pos, const Vector &rte_los, const Numeric &ppath_lmax, const Verbosity &) |
WORKSPACE METHOD: ppathPlaneParallel. More... | |
void | ppathStepByStep (Workspace &ws, Ppath &ppath, const Agenda &ppath_step_agenda, const Index &ppath_inside_cloudbox_do, const Index &atmosphere_dim, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Vector &f_grid, const Vector &refellipsoid, const Matrix &z_surface, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Vector &rte_pos, const Vector &rte_los, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace, const Verbosity &verbosity) |
WORKSPACE METHOD: ppathStepByStep. More... | |
void | ppathWriteXMLPartial (const String &file_format, const Ppath &ppath, const String &f, const Index &file_index, const Verbosity &verbosity) |
WORKSPACE METHOD: ppathWriteXMLPartial. More... | |
void | ppath_fieldFromDownUpLimbGeoms (Workspace &ws, ArrayOfPpath &ppath_field, const Agenda &ppath_agenda, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace, const Index &atmgeom_checked, const Tensor3 &z_field, const Vector &f_grid, const Index &cloudbox_on, const Index &cloudbox_checked, const Index &ppath_inside_cloudbox_do, const Vector &rte_pos, const Vector &rte_los, const Vector &rte_pos2, const Vector &refellipsoid, const Index &atmosphere_dim, const Index &zenith_angles_per_position, const Verbosity &verbosity) |
WORKSPACE METHOD: ppath_fieldFromDownUpLimbGeoms. More... | |
void | ppath_fieldCalc (Workspace &ws, ArrayOfPpath &ppath_field, const Agenda &ppath_agenda, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace, const Index &atmgeom_checked, const Vector &f_grid, const Index &cloudbox_on, const Index &cloudbox_checked, const Index &ppath_inside_cloudbox_do, const Matrix &sensor_pos, const Matrix &sensor_los, const Vector &rte_pos2, const Verbosity &verbosity) |
WORKSPACE METHOD: ppath_fieldCalc. More... | |
void | ppath_stepGeometric (Ppath &ppath_step, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Vector &refellipsoid, const Matrix &z_surface, const Numeric &ppath_lmax, const Verbosity &) |
WORKSPACE METHOD: ppath_stepGeometric. More... | |
void | ppath_stepRefractionBasic (Workspace &ws, Ppath &ppath_step, const Agenda &refr_index_air_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 Vector &refellipsoid, const Matrix &z_surface, const Vector &f_grid, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace, const Verbosity &) |
WORKSPACE METHOD: ppath_stepRefractionBasic. 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_losGeometricFromRtePosToRtePos2 (Vector &rte_los, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Vector &refellipsoid, const Vector &rte_pos, const Vector &rte_pos2, const Verbosity &) |
WORKSPACE METHOD: rte_losGeometricFromRtePosToRtePos2. More... | |
void | rte_posSet (Vector &rte_pos, const Index &atmosphere_dim, const Numeric &z, const Numeric &lat, const Numeric &lon, const Verbosity &) |
WORKSPACE METHOD: rte_posSet. More... | |
void | rte_pos_losMoveToStartOfPpath (Vector &rte_pos, Vector &rte_los, const Index &atmosphere_dim, const Ppath &ppath, const Verbosity &) |
WORKSPACE METHOD: rte_pos_losMoveToStartOfPpath. More... | |
void | sensor_losGeometricFromSensorPosToOtherPositions (Matrix &sensor_los, const Index &atmosphere_dim, const Vector &lat_grid, const Vector &lon_grid, const Vector &refellipsoid, const Matrix &sensor_pos, const Matrix &target_pos, const Verbosity &verbosity) |
WORKSPACE METHOD: sensor_losGeometricFromSensorPosToOtherPositions. More... | |
void | TangentPointExtract (Vector &tan_pos, const Ppath &ppath, const Verbosity &) |
WORKSPACE METHOD: TangentPointExtract. More... | |
void | TangentPointPrint (const Ppath &ppath, const Index &level, const Verbosity &verbosity) |
WORKSPACE METHOD: TangentPointPrint. More... | |
void | VectorZtanToZaRefr1D (Workspace &ws, Vector &za_vector, const Agenda &refr_index_air_agenda, const Matrix &sensor_pos, const Vector &p_grid, const Tensor3 &t_field, const Tensor3 &z_field, const Tensor4 &vmr_field, const Vector &refellipsoid, const Index &atmosphere_dim, const Vector &f_grid, const Vector &ztan_vector, const Verbosity &) |
WORKSPACE METHOD: VectorZtanToZaRefr1D. More... | |
void | VectorZtanToZa1D (Vector &za_vector, const Matrix &sensor_pos, const Vector &refellipsoid, const Index &atmosphere_dim, const Vector &ztan_vector, const Verbosity &) |
WORKSPACE METHOD: VectorZtanToZa1D. More... | |
Variables | |
const Numeric | RAD2DEG |
const Numeric | DEG2RAD |
Workspace functions releated to propagation paths variables.
The file includes special functions to set the sensor position and LOS, and functions for calculation of propagation paths.
Definition in file m_ppath.cc.
void AddZaAa | ( | Matrix & | new_los, |
const Vector & | ref_los, | ||
const Matrix & | dlos, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: AddZaAa.
Adds zenith and azimuth angles.
Adds up line-of-sights (LOS). In short, dlos is added to ref_los, assuming that a unit changes in zenith and azimuth are equal where dlos=(0,0).
[out] | new_los | Generic output |
[in] | ref_los | Generic Input |
[in] | dlos | Generic Input |
Definition at line 56 of file m_ppath.cc.
References add_za_aa(), i, ConstMatrixView::ncols(), ConstVectorView::nelem(), ConstMatrixView::nrows(), and Matrix::resize().
Referenced by AddZaAa_g().
void DiffZaAa | ( | Matrix & | dlos, |
const Vector & | ref_los, | ||
const Matrix & | other_los, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: DiffZaAa.
Derives the difference betwenn zenith and azimuth angles.
Determines the difference between a set of angles (other_los) and a reference direction (ref_los). This method reverses the addition made by AddZaAa.
[out] | dlos | Generic output |
[in] | ref_los | Generic Input |
[in] | other_los | Generic Input |
Definition at line 79 of file m_ppath.cc.
References diff_za_aa(), i, ConstMatrixView::ncols(), ConstVectorView::nelem(), ConstMatrixView::nrows(), and Matrix::resize().
Referenced by DiffZaAa_g().
WORKSPACE METHOD: geo_posEndOfPpath.
Sets geo-position based on ppath.
The geo-position is set to the position of the last point of the present propagation path. This will be the surface, top-of-the atmosphere or cloudbox position, depending of observation geometry and if the cloudbox is active.
[out] | geo_pos | WS Output |
[in] | ppath | WS Input |
Definition at line 103 of file m_ppath.cc.
References CREATE_OUT2, Ppath::los, ConstMatrixView::ncols(), Ppath::np, Ppath::pos, and Vector::resize().
Referenced by geo_posEndOfPpath_g().
void geo_posLowestAltitudeOfPpath | ( | Vector & | geo_pos, |
const Ppath & | ppath, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: geo_posLowestAltitudeOfPpath.
Sets geo-position based on ppath.
The geo-position is set to the position of the last point of the present propagation path having the lowest altitude.
[out] | geo_pos | WS Output |
[in] | ppath | WS Input |
Definition at line 119 of file m_ppath.cc.
References CREATE_OUT2, i, Ppath::los, ConstMatrixView::ncols(), Ppath::np, Ppath::pos, and Vector::resize().
Referenced by geo_posLowestAltitudeOfPpath_g().
void geo_posWherePpathPassesZref | ( | Vector & | geo_pos, |
const Ppath & | ppath, | ||
const Numeric & | z_ref, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: geo_posWherePpathPassesZref.
Sets geo-position based on ppath.
The geo-position is set to the position where the propagation path passes the reference altitude. If this altitude is passes more than once, the passing closest to the sensor is selected. If the reference altitude is not passed at all, geo_pos is set to NaN.
[out] | geo_pos | WS Output |
[in] | ppath | WS Input |
[in] | z_ref | Generic Input |
Definition at line 145 of file m_ppath.cc.
References CREATE_OUT2, Ppath::los, ConstMatrixView::ncols(), Ppath::np, Ppath::pos, Vector::resize(), and w().
Referenced by geo_posWherePpathPassesZref_g().
void ppath_fieldCalc | ( | Workspace & | ws, |
ArrayOfPpath & | ppath_field, | ||
const Agenda & | ppath_agenda, | ||
const Numeric & | ppath_lmax, | ||
const Numeric & | ppath_lraytrace, | ||
const Index & | atmgeom_checked, | ||
const Vector & | f_grid, | ||
const Index & | cloudbox_on, | ||
const Index & | cloudbox_checked, | ||
const Index & | ppath_inside_cloudbox_do, | ||
const Matrix & | sensor_pos, | ||
const Matrix & | sensor_los, | ||
const Vector & | rte_pos2, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: ppath_fieldCalc.
Stand-alone calculation of propagation path field from sensors.
Uses ppathCalc internally.
[in,out] | ws | Workspace |
[out] | ppath_field | WS Output |
[in] | ppath_agenda | WS Input |
[in] | ppath_lmax | WS Input |
[in] | ppath_lraytrace | WS Input |
[in] | atmgeom_checked | WS Input |
[in] | f_grid | WS Input |
[in] | cloudbox_on | WS Input |
[in] | cloudbox_checked | WS Input |
[in] | ppath_inside_cloudbox_do | WS Input |
[in] | sensor_pos | WS Input |
[in] | sensor_los | WS Input |
[in] | rte_pos2 | WS Input |
Definition at line 1239 of file m_ppath.cc.
References i, joker, n, ConstMatrixView::nrows(), and ppathCalc().
Referenced by ppath_fieldCalc_g().
void ppath_fieldFromDownUpLimbGeoms | ( | Workspace & | ws, |
ArrayOfPpath & | ppath_field, | ||
const Agenda & | ppath_agenda, | ||
const Numeric & | ppath_lmax, | ||
const Numeric & | ppath_lraytrace, | ||
const Index & | atmgeom_checked, | ||
const Tensor3 & | z_field, | ||
const Vector & | f_grid, | ||
const Index & | cloudbox_on, | ||
const Index & | cloudbox_checked, | ||
const Index & | ppath_inside_cloudbox_do, | ||
const Vector & | rte_pos, | ||
const Vector & | rte_los, | ||
const Vector & | rte_pos2, | ||
const Vector & | refellipsoid, | ||
const Index & | atmosphere_dim, | ||
const Index & | nz, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: ppath_fieldFromDownUpLimbGeoms.
Computes ppath_field from "standalone" sensors looking upwards from 0 m altitude with zenith angles range [0, 90], downwards from the top of the atmosphere covering the zenith angle range from 180 degrees to the surface tangent minus 1e-4 degrees, and through the limb covering at the same position as the downwards looking sensor covering the zenith angle range from the surface tangent plus 1e-4 degrees to 90 degrees minus 1e-4 degrees.
The top of the atmosphere is from z_field(-1, 0, 0) [python range notation].
The field will consist of 3*nz arrays structured as [up, limb, down]
The intent of this function is to generate a field so that calculations of ppvar_iy of all the fields will cover the zenith angle space of all positions in z_field.
Only works for atmosphere_dim 1, spherical planets, and ppath_lmax<0
[in,out] | ws | Workspace |
[out] | ppath_field | WS Output |
[in] | ppath_agenda | WS Input |
[in] | ppath_lmax | WS Input |
[in] | ppath_lraytrace | WS Input |
[in] | atmgeom_checked | WS Input |
[in] | z_field | WS Input |
[in] | f_grid | WS Input |
[in] | cloudbox_on | WS Input |
[in] | cloudbox_checked | WS Input |
[in] | ppath_inside_cloudbox_do | WS Input |
[in] | rte_pos | WS Input |
[in] | rte_los | WS Input |
[in] | rte_pos2 | WS Input |
[in] | refellipsoid | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | nz | Generic Input (Default: "3") |
Definition at line 1120 of file m_ppath.cc.
References ConstTensor3View::npages(), r, and RAD2DEG.
Referenced by ppath_fieldFromDownUpLimbGeoms_g().
void ppath_stepGeometric | ( | Ppath & | ppath_step, |
const Index & | atmosphere_dim, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const Tensor3 & | z_field, | ||
const Vector & | refellipsoid, | ||
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*.
[in,out] | ppath_step | WS Input/Output |
[in] | atmosphere_dim | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | z_field | WS Input |
[in] | refellipsoid | WS Input |
[in] | z_surface | WS Input |
[in] | ppath_lmax | WS Input |
Definition at line 1278 of file m_ppath.cc.
References joker, Ppath::ngroup, Ppath::np, Ppath::nreal, ppath_step_geom_1d(), ppath_step_geom_2d(), ppath_step_geom_3d(), and ppath_what_background().
Referenced by ARTS::Agenda::ppath_step_agenda_geometric_path(), and ppath_stepGeometric_g().
void ppath_stepRefractionBasic | ( | Workspace & | ws, |
Ppath & | ppath_step, | ||
const Agenda & | refr_index_air_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 Vector & | refellipsoid, | ||
const Matrix & | z_surface, | ||
const Vector & | f_grid, | ||
const Numeric & | ppath_lmax, | ||
const Numeric & | ppath_lraytrace, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: ppath_stepRefractionBasic.
Calculates a propagation path step, considering refraction by a basic 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. Snell's law for spherical symmetry is used for 1D to determine the zenith angle at the new point. For 2D and 3D, the zenith angle is calculated using the average gradient of the refractive index between the two points. For 3D, the azimuth angle is treated in the same way as the zenith one.
The maximum length of each ray tracing step is given by the WSV ppath_lraytrace*. The length will never exceed the given maximum, but it can be smaller. The ray tracing steps are only used to determine the path. Points to describe the path are included as for ppath_stepGeometric, this including the functionality of ppath_lmax*.
[in,out] | ws | Workspace |
[in,out] | ppath_step | WS Input/Output |
[in] | refr_index_air_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] | refellipsoid | WS Input |
[in] | z_surface | WS Input |
[in] | f_grid | WS Input |
[in] | ppath_lmax | WS Input |
[in] | ppath_lraytrace | WS Input |
Definition at line 1336 of file m_ppath.cc.
References get_refr_index_1d(), get_refr_index_2d(), get_refr_index_3d(), joker, Ppath::ngroup, Ppath::np, Ppath::nreal, Ppath::pos, ppath_step_refr_1d(), ppath_step_refr_2d(), ppath_step_refr_3d(), ppath_what_background(), and Ppath::r.
Referenced by ARTS::Agenda::ppath_step_agenda_refracted_path(), and ppath_stepRefractionBasic_g().
void ppathCalc | ( | Workspace & | ws, |
Ppath & | ppath, | ||
const Agenda & | ppath_agenda, | ||
const Numeric & | ppath_lmax, | ||
const Numeric & | ppath_lraytrace, | ||
const Index & | atmgeom_checked, | ||
const Vector & | f_grid, | ||
const Index & | cloudbox_on, | ||
const Index & | cloudbox_checked, | ||
const Index & | ppath_inside_cloudbox_do, | ||
const Vector & | rte_pos, | ||
const Vector & | rte_los, | ||
const Vector & | rte_pos2, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: ppathCalc.
Stand-alone calculation of propagation paths.
Beside a few checks of input data, the only operation of this method is to execute ppath_agenda.
Propagation paths are normally calculated as part of the radiative transfer calculations, and this method is not part of the control file. A reason to call this function directly would be to obtain a propagation path for plotting. Anyhow, use this method instead of calling e.g.*ppathStepByStep directly.
[in,out] | ws | Workspace |
[out] | ppath | WS Output |
[in] | ppath_agenda | WS Input |
[in] | ppath_lmax | WS Input |
[in] | ppath_lraytrace | WS Input |
[in] | atmgeom_checked | WS Input |
[in] | f_grid | WS Input |
[in] | cloudbox_on | WS Input |
[in] | cloudbox_checked | WS Input |
[in] | ppath_inside_cloudbox_do | WS Input |
[in] | rte_pos | WS Input |
[in] | rte_los | WS Input |
[in] | rte_pos2 | WS Input |
Definition at line 193 of file m_ppath.cc.
References ppath_agendaExecute().
Referenced by ARTS::Agenda::iy_main_agenda_emission(), ARTS::Agenda::iy_main_agenda_transmission(), ppath_fieldCalc(), ppathCalc_g(), and ppathCalcFromAltitude().
void ppathCalcFromAltitude | ( | Workspace & | ws, |
Ppath & | ppath, | ||
const Agenda & | ppath_agenda, | ||
const Numeric & | ppath_lmax, | ||
const Numeric & | ppath_lraytrace, | ||
const Index & | atmgeom_checked, | ||
const Vector & | f_grid, | ||
const Index & | cloudbox_on, | ||
const Index & | cloudbox_checked, | ||
const Index & | ppath_inside_cloudbox_do, | ||
const Vector & | rte_pos, | ||
const Vector & | rte_los, | ||
const Vector & | rte_pos2, | ||
const Numeric & | altitude, | ||
const Numeric & | accuracy, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: ppathCalcFromAltitude.
Moves rte_pos forwards to near altitude before calling ppathCalc to compute a different ppath. The accuracy-variable gives minimum distance before the input altitude.
The forward-moving algorithm calls ppathCalc several times at reduced maximum distances. The intention is to maintain the correct rte_los for a given rte_pos at all altitudes. The method is thus relatively slow, and VERY memory intense at low accuracy.
Intended to be used with "tropospheric corrections" from ground geometry. Not well-tested
Throws error if no altitude is in line of sight.
[in,out] | ws | Workspace |
[out] | ppath | WS Output |
[in] | ppath_agenda | WS Input |
[in] | ppath_lmax | WS Input |
[in] | ppath_lraytrace | WS Input |
[in] | atmgeom_checked | WS Input |
[in] | f_grid | WS Input |
[in] | cloudbox_on | WS Input |
[in] | cloudbox_checked | WS Input |
[in] | ppath_inside_cloudbox_do | WS Input |
[in] | rte_pos | WS Input |
[in] | rte_los | WS Input |
[in] | rte_pos2 | WS Input |
[in] | altitude | Generic Input |
[in] | accuracy | Generic Input (Default: "0.5") |
Definition at line 232 of file m_ppath.cc.
References abs, Ppath::dim, first_pos_before_altitude(), joker, Ppath::los, Ppath::pos, and ppathCalc().
Referenced by ppathCalcFromAltitude_g().
void ppathFromRtePos2 | ( | Workspace & | ws, |
Ppath & | ppath, | ||
Vector & | rte_los, | ||
Numeric & | ppath_lraytrace, | ||
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 Vector & | f_grid, | ||
const Vector & | refellipsoid, | ||
const Matrix & | z_surface, | ||
const Vector & | rte_pos, | ||
const Vector & | rte_pos2, | ||
const Numeric & | ppath_lmax, | ||
const Numeric & | za_accuracy, | ||
const Numeric & | pplrt_factor, | ||
const Numeric & | pplrt_lowest, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: ppathFromRtePos2.
Determines the propagation path from rte_pos2 to rte_pos.
The propagation path linking rte_pos and rte_pos2 is calculated and returned. The method determines the path in a pure numerical manner, where a simple algorithm is applied. The task is to find the value of rte_los (at rte_pos) linking the two positions.
See the user guide for a description of the search algorithm, including a more detailed definition of za_accuracy, pplrt_factor* and pplrt_lowest.
The standard application of this method should be to radio link calculations, where rte_pos2 corresponds to a transmitter, and rte_pos* to the receiver/sensor.
The details of the ray tracing is controlled by ppath_step_agenda as usual.
[in,out] | ws | Workspace |
[out] | ppath | WS Output |
[in,out] | rte_los | WS Input/Output |
[in,out] | ppath_lraytrace | WS Input/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] | f_grid | WS Input |
[in] | refellipsoid | WS Input |
[in] | z_surface | WS Input |
[in] | rte_pos | WS Input |
[in] | rte_pos2 | WS Input |
[in] | ppath_lmax | WS Input |
[in] | za_accuracy | Generic Input (Default: "2e-5") |
[in] | pplrt_factor | Generic Input (Default: "5") |
[in] | pplrt_lowest | Generic Input (Default: "0.5") |
Definition at line 306 of file m_ppath.cc.
References abs, cart2pol(), cart2poslos(), cart2sph(), CREATE_OUT2, CREATE_OUT3, DEG2RAD, distance2D(), distance3D(), Ppath::gp_lat, Ppath::gp_lon, Ppath::gp_p, gridpos_copy(), i, joker, l12, line_circle_intersect(), line_sphere_intersect(), linreg(), ll, Ppath::los, Ppath::lstep, max, min, Ppath::ngroup, Ppath::np, Ppath::nreal, pol2cart(), Ppath::pos, pos2refell_r(), poslos2cart(), ppath_calc(), ppath_copy(), ppath_init_structure(), ppath_set_background(), ppath_what_background(), ppathFromRtePos2(), Ppath::r, rte_losGeometricFromRtePosToRtePos2(), rte_pos2gridpos(), sph2cart(), Ppath::start_los, Ppath::start_lstep, Ppath::start_pos, w(), and x1.
Referenced by ppathFromRtePos2(), and ppathFromRtePos2_g().
void ppathPlaneParallel | ( | Ppath & | ppath, |
const Index & | atmosphere_dim, | ||
const Tensor3 & | z_field, | ||
const Matrix & | z_surface, | ||
const Index & | cloudbox_on, | ||
const ArrayOfIndex & | cloudbox_limits, | ||
const Index & | ppath_inside_cloudbox_do, | ||
const Vector & | rte_pos, | ||
const Vector & | rte_los, | ||
const Numeric & | ppath_lmax, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: ppathPlaneParallel.
Propagation path calculations for a plane parallel atmosphere.
This method basically assumes that the planet's radius is infinite, i.e. the planet surface has no curvature. Some consequences of this assumption: <br> - the mathod can only be used for 1D <br> - zenith angles between 89.9 and 90.1 deg are not allowed <br> - refraction is always neglected <br> - radii in ppath are set to Inf
Notice that the method provides full propagation paths. This means that ppath_step_agenda is ignored (and thus also refraction). On the other hand, the method considers the cloudbox exactly as the standard path calculations.
[out] | ppath | WS Output |
[in] | atmosphere_dim | WS Input |
[in] | z_field | WS Input |
[in] | z_surface | WS Input |
[in] | cloudbox_on | WS Input |
[in] | cloudbox_limits | WS Input |
[in] | ppath_inside_cloudbox_do | WS Input |
[in] | rte_pos | WS Input |
[in] | rte_los | WS Input |
[in] | ppath_lmax | WS Input |
Definition at line 761 of file m_ppath.cc.
References abs, chk_rte_los(), chk_rte_pos(), Ppath::constant, DEG2RAD, Ppath::end_los, Ppath::end_lstep, Ppath::end_pos, Ppath::gp_p, i, GridPos::idx, joker, Ppath::los, Ppath::lstep, Array< base >::nelem(), Ppath::ngroup, Ppath::np, ConstTensor3View::npages(), Ppath::nreal, Ppath::pos, ppath_init_structure(), ppath_set_background(), Ppath::r, Ppath::start_los, Ppath::start_pos, and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().
Referenced by ARTS::Agenda::ppath_agenda_plane_parallel(), ppathPlaneParallel_g(), spectral_radiance_fieldClearskyPlaneParallel(), and spectral_radiance_fieldExpandCloudboxField().
void ppathStepByStep | ( | Workspace & | ws, |
Ppath & | ppath, | ||
const Agenda & | ppath_step_agenda, | ||
const Index & | ppath_inside_cloudbox_do, | ||
const Index & | atmosphere_dim, | ||
const Vector & | p_grid, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const Tensor3 & | z_field, | ||
const Vector & | f_grid, | ||
const Vector & | refellipsoid, | ||
const Matrix & | z_surface, | ||
const Index & | cloudbox_on, | ||
const ArrayOfIndex & | cloudbox_limits, | ||
const Vector & | rte_pos, | ||
const Vector & | rte_los, | ||
const Numeric & | ppath_lmax, | ||
const Numeric & | ppath_lraytrace, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: ppathStepByStep.
Standard method for calculation of propagation paths.
This method calculates complete propagation paths in a stepwise manner. Each step is denoted as a "ppath_step" and is the path through/inside a single grid box.
The definition of a propgation path cannot be accommodated here. For more information read the chapter on propagation paths in the ARTS user guide.
This method should never be called directly. Use ppathCalc instead if you want to extract propagation paths.
[in,out] | ws | Workspace |
[out] | ppath | WS Output |
[in] | ppath_step_agenda | WS Input |
[in] | ppath_inside_cloudbox_do | 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] | f_grid | WS Input |
[in] | refellipsoid | 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 |
[in] | ppath_lmax | WS Input |
[in] | ppath_lraytrace | WS Input |
Definition at line 1050 of file m_ppath.cc.
References ppath_calc().
Referenced by ARTS::Agenda::ppath_agenda_follow_sensor_los(), and ppathStepByStep_g().
void ppathWriteXMLPartial | ( | const String & | output_file_format, |
const Ppath & | ppath, | ||
const String & | filename, | ||
const Index & | file_index, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: ppathWriteXMLPartial.
WSM to only write a reduced Ppath, omitting grid positions.
The following fields are set to be empty: gp_p, gp_lat and gp_lon. This cam drastically decrease the time for reading the structure by some external software.
If file_index is >= 0, the variable is written to a file with name: <br> <filename>.<file_index>.xml. where <file_index> is the value of *file_index.
This means that filename shall here not include the .xml extension. Omitting filename works as for WriteXML.
[in] | output_file_format | WS Input |
[in] | ppath | WS Input |
[in] | filename | Generic Input (Default: "") |
[in] | file_index | Generic Input (Default: "-1") |
Definition at line 1091 of file m_ppath.cc.
References filename_xml_with_index(), Ppath::gp_lat, Ppath::gp_lon, Ppath::gp_p, and WriteXML().
Referenced by ppathWriteXMLPartial_g().
void rte_losGeometricFromRtePosToRtePos2 | ( | Vector & | rte_los, |
const Index & | atmosphere_dim, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const Vector & | refellipsoid, | ||
const Vector & | rte_pos, | ||
const Vector & | rte_pos2, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: rte_losGeometricFromRtePosToRtePos2.
The geometric line-of-sight between two points.
The method sets rte_los to the line-of-sight, at rte_pos, that matches the geometrical propagation path between rte_pos and rte_pos2.
The standard case should be that rte_pos2 corresponds to a transmitter, and rte_pos to the receiver/sensor.
[out] | rte_los | WS Output |
[in] | atmosphere_dim | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | refellipsoid | WS Input |
[in] | rte_pos | WS Input |
[in] | rte_pos2 | WS Input |
Definition at line 1476 of file m_ppath.cc.
References chk_rte_pos(), los2xyz(), pol2cart(), pos2refell_r(), Vector::resize(), sph2cart(), x1, and x2.
Referenced by MCRadar(), ppathFromRtePos2(), rte_losGeometricFromRtePosToRtePos2_g(), and sensor_losGeometricFromSensorPosToOtherPositions().
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.
[out] | rte_los | WS Output |
[in] | atmosphere_dim | WS Input |
[in] | za | Generic Input |
[in] | aa | Generic Input |
Definition at line 1458 of file m_ppath.cc.
References chk_if_in_range(), and Vector::resize().
Referenced by rte_losSet_g().
void rte_pos_losMoveToStartOfPpath | ( | Vector & | rte_pos, |
Vector & | rte_los, | ||
const Index & | atmosphere_dim, | ||
const Ppath & | ppath, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: rte_pos_losMoveToStartOfPpath.
Sets rte_pos and rte_los to values for last point in ppath.
For example, if the propagation path intersects with the surface, this method gives you the position and angle of ppath at the surface.
[out] | rte_pos | WS Output |
[out] | rte_los | WS Output |
[in] | atmosphere_dim | WS Input |
[in] | ppath | WS Input |
Definition at line 1557 of file m_ppath.cc.
References chk_if_in_range(), Ppath::los, Ppath::np, ConstMatrixView::nrows(), and Ppath::pos.
Referenced by rte_pos_losMoveToStartOfPpath_g().
void rte_posSet | ( | Vector & | rte_pos, |
const Index & | atmosphere_dim, | ||
const Numeric & | 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.
[out] | rte_pos | WS Output |
[in] | atmosphere_dim | WS Input |
[in] | z | Generic Input |
[in] | lat | Generic Input |
[in] | lon | Generic Input |
Definition at line 1537 of file m_ppath.cc.
References chk_if_in_range(), and Vector::resize().
Referenced by rte_posSet_g().
void sensor_losGeometricFromSensorPosToOtherPositions | ( | Matrix & | sensor_los, |
const Index & | atmosphere_dim, | ||
const Vector & | lat_grid, | ||
const Vector & | lon_grid, | ||
const Vector & | refellipsoid, | ||
const Matrix & | sensor_pos, | ||
const Matrix & | target_pos, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: sensor_losGeometricFromSensorPosToOtherPositions.
The geometric line-of-sight between pair of points.
The method sets sensor_los to the line-of-sights, that matches the geometrical propagation path from sensor_pos to target_pos. This is done for pair of positions, i.e. the two matrices shall have the same number of rows. The number of columns in target_pos shall be two for 1D and 2D and two for 3D, exactly as for rte_pos2.
See also rte_losGeometricFromRtePosToRtePos2. This method calls that method for each pair of positions, where values in sensor_pos matches rte_pos and values in target_pos matches rte_pos2.
[out] | sensor_los | WS Output |
[in] | atmosphere_dim | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | refellipsoid | WS Input |
[in] | sensor_pos | WS Input |
[in] | target_pos | Generic Input |
Definition at line 1581 of file m_ppath.cc.
References i, joker, n, ConstMatrixView::ncols(), ConstMatrixView::nrows(), Matrix::resize(), and rte_losGeometricFromRtePosToRtePos2().
Referenced by sensor_losGeometricFromSensorPosToOtherPositions_g().
WORKSPACE METHOD: TangentPointExtract.
Finds the tangent point of a propagation path.
The tangent point is here defined as the point with the lowest altitude (which differes from the definition used in the code where it is the point with the lowest radius, or equally the point with a zenith angle of 90 deg.)
The tangent point is returned as a vector, with columns matching e.g. rte_pos. If the propagation path has no tangent point, the vector is set to NaN.
[out] | tan_pos | Generic output |
[in] | ppath | WS Input |
Definition at line 1623 of file m_ppath.cc.
References find_tanpoint(), ConstMatrixView::ncols(), Ppath::pos, and Vector::resize().
Referenced by TangentPointExtract_g().
WORKSPACE METHOD: TangentPointPrint.
Prints information about the tangent point of a propagation path.
The tangent point is here defined as the point with the lowest altitude (which differes from the definition used in the code where it is the point with the lowest radius, or equally the point with a zenith angle of 90 deg.)
[in] | ppath | WS Input |
[in] | level | Generic Input (Default: "1") |
Definition at line 1643 of file m_ppath.cc.
References CREATE_OUTS, find_tanpoint(), ConstMatrixView::ncols(), Ppath::pos, _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), and SWITCH_OUTPUT.
Referenced by TangentPointPrint_g().
void VectorZtanToZa1D | ( | Vector & | v_za, |
const Matrix & | sensor_pos, | ||
const Vector & | refellipsoid, | ||
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. The zenith angles are always set to be positive.
[out] | v_za | Generic output |
[in] | sensor_pos | WS Input |
[in] | refellipsoid | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | v_ztan | Generic Input |
Definition at line 1728 of file m_ppath.cc.
References geompath_za_at_r(), i, ConstVectorView::nelem(), ConstMatrixView::nrows(), Vector::resize(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().
Referenced by VectorZtanToZa1D_g().
void VectorZtanToZaRefr1D | ( | Workspace & | ws, |
Vector & | v_za, | ||
const Agenda & | refr_index_air_agenda, | ||
const Matrix & | sensor_pos, | ||
const Vector & | p_grid, | ||
const Tensor3 & | t_field, | ||
const Tensor3 & | z_field, | ||
const Tensor4 & | vmr_field, | ||
const Vector & | refellipsoid, | ||
const Index & | atmosphere_dim, | ||
const Vector & | f_grid, | ||
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.
[in,out] | ws | Workspace |
[out] | v_za | Generic output |
[in] | refr_index_air_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] | refellipsoid | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | f_grid | WS Input |
[in] | v_ztan | Generic Input |
Definition at line 1668 of file m_ppath.cc.
References get_refr_index_1d(), i, ConstVectorView::nelem(), ConstMatrixView::nrows(), RAD2DEG, Vector::resize(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().
Referenced by VectorZtanToZaRefr1D_g().
const Numeric DEG2RAD |
Referenced by ppathFromRtePos2(), and ppathPlaneParallel().
const Numeric RAD2DEG |
Referenced by ppath_fieldFromDownUpLimbGeoms(), and VectorZtanToZaRefr1D().