ARTS
2.2.66
|
Propagation path structure and functions. More...
#include "agenda_class.h"
#include "array.h"
#include "arts.h"
#include "interpolation.h"
#include "matpackI.h"
#include "mystring.h"
Go to the source code of this file.
Classes | |
struct | Ppath |
The structure to describe a propagation path and releated quantities. More... | |
Typedefs | |
typedef Array< Ppath > | ArrayOfPpath |
An array of propagation paths. More... | |
Functions | |
Numeric | geometrical_ppc (const Numeric &r, const Numeric &za) |
geometrical_ppc More... | |
Numeric | geompath_za_at_r (const Numeric &ppc, const Numeric &a_za, const Numeric &r) |
geompath_za_at_r More... | |
Numeric | geompath_lat_at_za (const Numeric &za0, const Numeric &lat0, const Numeric &za) |
geompath_lat_at_za More... | |
void | cart2zaaa (Numeric &za, Numeric &aa, const Numeric &dx, const Numeric &dy, const Numeric &dz) |
cart2zaaa More... | |
void | zaaa2cart (Numeric &dx, Numeric &dy, Numeric &dz, const Numeric &za, const Numeric &aa) |
zaaa2cart More... | |
void | map_daa (Numeric &za, Numeric &aa, const Numeric &za0, const Numeric &aa0, const Numeric &aa_grid) |
void | find_tanpoint (Index &it, const Ppath ppath) |
find_tanpoint More... | |
void | plevel_slope_2d (Numeric &c1, ConstVectorView lat_grid, ConstVectorView refellipsoid, ConstVectorView z_surf, const GridPos &gp, const Numeric &za) |
plevel_slope_2d More... | |
void | plevel_slope_3d (Numeric &c1, Numeric &c2, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstVectorView refellipsoid, ConstMatrixView z_surf, const GridPos &gp_lat, const GridPos &gp_lon, const Numeric &aa) |
plevel_slope_3d More... | |
bool | is_los_downwards (const Numeric &za, const Numeric &tilt) |
is_los_downwards More... | |
Numeric | plevel_angletilt (const Numeric &r, const Numeric &c) |
plevel_angletilt More... | |
void | ppath_init_structure (Ppath &ppath, const Index &atmosphere_dim, const Index &np) |
ppath_init_structure More... | |
void | ppath_set_background (Ppath &ppath, const Index &case_nr) |
ppath_set_background More... | |
Index | ppath_what_background (const Ppath &ppath) |
ppath_what_background More... | |
void | ppath_copy (Ppath &ppath1, const Ppath &ppath2, const Index &ncopy) |
ppath_copy More... | |
void | ppath_step_geom_1d (Ppath &ppath, ConstVectorView z_field, ConstVectorView refellipsoid, const Numeric &z_surface, const Numeric &lmax) |
ppath_step_geom_1d More... | |
void | ppath_geom_updown_1d (Ppath &ppath, ConstVectorView z_field, ConstVectorView refellipsoid, const Numeric &z_surface, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits) |
void | ppath_step_geom_2d (Ppath &ppath, ConstVectorView lat_grid, ConstMatrixView z_field, ConstVectorView refellipsoid, ConstVectorView z_surface, const Numeric &lmax) |
ppath_step_geom_2d More... | |
void | ppath_step_geom_3d (Ppath &ppath, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstTensor3View z_field, ConstVectorView refellipsoid, ConstMatrixView z_surface, const Numeric &lmax) |
ppath_step_geom_3d More... | |
void | ppath_step_refr_1d (Workspace &ws, Ppath &ppath, ConstVectorView p_grid, ConstTensor3View z_field, ConstTensor3View t_field, ConstTensor4View vmr_field, ConstVectorView f_grid, ConstVectorView refellipsoid, const Numeric &z_surface, const Numeric &lmax, const Agenda &refr_index_agenda, const String &rtrace_method, const Numeric &lraytrace) |
ppath_step_refr_1d More... | |
void | ppath_step_refr_2d (Workspace &ws, Ppath &ppath, ConstVectorView p_grid, ConstVectorView lat_grid, ConstTensor3View z_field, ConstTensor3View t_field, ConstTensor4View vmr_field, ConstVectorView f_grid, ConstVectorView refellipsoid, ConstVectorView z_surface, const Numeric &lmax, const Agenda &refr_index_agenda, const String &rtrace_method, const Numeric &lraytrace) |
ppath_step_refr_2d More... | |
void | ppath_step_refr_3d (Workspace &ws, Ppath &ppath, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstTensor3View z_field, ConstTensor3View t_field, ConstTensor4View vmr_field, ConstVectorView f_grid, ConstVectorView refellipsoid, ConstMatrixView z_surface, const Numeric &lmax, const Agenda &refr_index_agenda, const String &rtrace_method, const Numeric &lraytrace) |
ppath_step_refr_3d More... | |
void | ppath_start_stepping (Ppath &ppath, const Index &atmosphere_dim, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstTensor3View z_field, ConstVectorView refellipsoid, ConstMatrixView z_surface, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const bool &outside_cloudbox, ConstVectorView rte_pos, ConstVectorView rte_los, const Verbosity &verbosity) |
ppath_start_stepping More... | |
void | ppath_calc (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 &t_field, const Tensor3 &z_field, const Tensor4 &vmr_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_lraytrace, const bool &ppath_inside_cloudbox_do, const Verbosity &verbosity) |
ppath_calc More... | |
Variables | |
const Numeric | POLELAT = 90-1e-8 |
const Numeric | ANGTOL = 1e-6 |
Propagation path structure and functions.
This file contains the definition of the Ppath structure and the functions in ppath.cc that are of interest elsewhere.
Definition in file ppath.h.
typedef Array<Ppath> ArrayOfPpath |
void cart2zaaa | ( | Numeric & | za, |
Numeric & | aa, | ||
const Numeric & | dx, | ||
const Numeric & | dy, | ||
const Numeric & | dz | ||
) |
cart2zaaa
Converts a cartesian directional vector to zenith and azimuth
This function and the sister function cart2zaaa handles transformation of line-of-sights. This in contrast to the sph/poslos functions that handles positions, or combinations of positions and line-of-sight.
The cartesian coordinate system used for these two functions can be defined as z : za = 0 x : za=90, aa=0 y : za=90, aa=90
za | Out: LOS zenith angle at observation position. |
aa | Out: LOS azimuth angle at observation position. |
dx | x-part of LOS unit vector. |
dy | y-part of LOS unit vector. |
dz | z-part of LOS unit vector. |
Definition at line 443 of file ppath.cc.
Referenced by adjust_los(), map_daa(), and specular_losCalc().
find_tanpoint
Identifies the tangent point of a propagation path
The tangent points is defined as the point with the lowest altitude.
The index of the tangent point is determined. If no tangent point is found, the index is set to -1.
it | Out: Index of tangent point |
ppath | Propagation path structure. |
Definition at line 705 of file ppath.cc.
References Ppath::np, and Ppath::pos.
Referenced by defocusing_sat2sat(), TangentPointExtract(), and TangentPointPrint().
geometrical_ppc
Calculates the propagation path constant for pure geometrical calculations.
Both positive and negative zenith angles are handled.
r | Radius of the sensor position. |
za | Zenith angle of the sensor line-of-sight. |
Definition at line 118 of file ppath.cc.
Referenced by ppath_start_stepping(), ppath_step_geom_1d(), ppath_step_geom_2d(), ppath_step_geom_3d(), raytrace_1d_linear_basic(), raytrace_2d_linear_basic(), and raytrace_3d_linear_basic().
geompath_lat_at_za
Calculates the latitude for a given zenith angle along a geometrical propagation path.
Positive and negative zenith angles are handled. A positive zenith angle means a movement towards higher latitudes.
za0 | The zenith angle of the starting point. |
lat0 | The latitude of the starting point. |
za | The zenith angle of the second point. |
Definition at line 218 of file ppath.cc.
References abs.
Referenced by geompath_from_r1_to_r2(), ppath_start_stepping(), r_crossing_2d(), raytrace_1d_linear_basic(), and raytrace_2d_linear_basic().
geompath_za_at_r
Calculates the zenith angle for a given radius along a geometrical propagation path.
For downlooking cases, the two points must be on the same side of the tangent point.
Both positive and negative zenith angles are handled.
ppc | Propagation path constant. |
a_za | A zenith angle along the path on the same side of the tangent point as the point of interest. |
r | Radius of the point of interest. |
Definition at line 147 of file ppath.cc.
References abs, RAD2DEG, and RTOL.
Referenced by do_gridcell_3d(), geompath_from_r1_to_r2(), ppath_start_stepping(), r_crossing_2d(), raytrace_1d_linear_basic(), raytrace_2d_linear_basic(), and VectorZtanToZa1D().
is_los_downwards
Determines if a line-of-sight is downwards compared to the angular tilt of the surface or a pressure level.
For example, this function can be used to determine if the line-of-sight goes into the surface for a starting point exactly on the surface radius.
As the radius of the surface and pressure levels varies as a function of latitude, it is not clear if a zenith angle of 90 is above or below e.g. the surface.
za | Zenith angle of line-of-sight. |
tilt | Angular tilt of the surface or the pressure level (as returned by plevel_angletilt) |
Definition at line 875 of file ppath.cc.
References abs.
Referenced by ppath_start_2d(), ppath_start_3d(), and ppath_start_stepping().
void map_daa | ( | Numeric & | za, |
Numeric & | aa, | ||
const Numeric & | za0, | ||
const Numeric & | aa0, | ||
const Numeric & | aa_grid | ||
) |
Maps MBLOCK_AA_GRID values to correct ZA and AA
Sensor LOS azimuth angles and mblock_aa_grid values can not be added in a straightforward way due to properties of the polar coordinate system used to define line-of-sights. This function performs a "mapping" ensuring that the pencil beam directions specified by mblock_za_grid and mblock_aa_grid form a rectangular grid (on the unit sphere) for any za.
za0 and aa0 match the angles of the ARTS WSV sensor_los. aa_grid shall hold values "close" to 0. The limit is here set to 5 degrees.
za | Out: Zenith angle matching aa0+aa_grid |
aa | Out: Azimuth angles matching aa0+aa_grid |
za0 | Zenith angle |
aa0 | Centre azimuth angle |
aa_grid | MBLOCK_AA_GRID values |
Definition at line 576 of file ppath.cc.
References abs, cart2zaaa(), mult(), rotationmat3D(), and zaaa2cart().
Referenced by iyb_calc_za_loop_body().
plevel_angletilt
Calculates the angular tilt of the surface or a pressure level.
Note that the tilt value is a local value. The tilt for a constant slope value, is different for different radii.
r | The radius for the level at the point of interest. |
c1 | The radial slope, as returned by e.g. plevel_slope_2d. |
Definition at line 844 of file ppath.cc.
References RAD2DEG.
Referenced by ppath_start_2d(), ppath_start_3d(), ppath_start_stepping(), and specular_losCalc().
void plevel_slope_2d | ( | Numeric & | c1, |
ConstVectorView | lat_grid, | ||
ConstVectorView | refellipsoid, | ||
ConstVectorView | z_surf, | ||
const GridPos & | gp, | ||
const Numeric & | za | ||
) |
plevel_slope_2d
Calculates the radial slope of the surface or a pressure level for 2D.
The radial slope is here the derivative of the radius with respect to the latitude. The unit is accordingly m/degree.
Note that the radius is defined to change linearly between grid points, and the slope is constant between to points of the latitude grid. The radius can inside the grid range be expressed as r = r0(lat0) + c1*(lat-lat0) .
Note also that the slope is always calculated with respect to increasing latitudes, independently of the zenith angle. The zenith angle is only used to determine which grid range that is of interest when the position is exactly on top of a grid point.
c1 | Out: The radial slope [m/degree] |
lat_grid | The latitude grid. |
refellipsoid | As the WSV with the same name. |
z_surf | Geometrical altitude of the surface, or the pressure level of interest, for the latitide dimension |
gp | Latitude grid position for the position of interest |
za | LOS zenith angle. |
Definition at line 782 of file ppath.cc.
References gridpos2gridrange(), and refell2r().
Referenced by plevel_crossing_2d(), ppath_start_2d(), ppath_start_stepping(), and specular_losCalc().
void plevel_slope_3d | ( | Numeric & | c1, |
Numeric & | c2, | ||
ConstVectorView | lat_grid, | ||
ConstVectorView | lon_grid, | ||
ConstVectorView | refellipsoid, | ||
ConstMatrixView | z_surf, | ||
const GridPos & | gp_lat, | ||
const GridPos & | gp_lon, | ||
const Numeric & | aa | ||
) |
plevel_slope_3d
Calculates the radial slope of the surface or a pressure level for 3D.
For 2D where the radius can be expressed as r = r0 + c1*dalpha, where alpha is the latitude. The radius is here for 3D expressed as a second order polynomial: r = r0 + c1*dalpha + c2*dalpha^2, where alpha is the angular change (in degrees) along the great circle along the given azimuth angle.
For a point exactly on a grid value it is not clear if it is the range below or above that is of interest. The azimuth angle is used to resolve such cases.
c1 | Out: See above. Unit is m/degree. |
c2 | Out: See above. Unit is m/degree^2. |
lat_grid | The latitude grid. |
lon_grid | The longitude grid. |
refellipsoid | As the WSV with the same name. |
z_surf | Geometrical altitude of the surface, or the pressure level of interest. |
gp_lat | Latitude grid position for the position of interest. |
gp_lon | Longitude grid position for the position of interest. |
aa | Azimuth angle. |
Definition at line 1435 of file ppath.cc.
References abs, gridpos2gridrange(), interp(), interpweights(), is_lon_cyclic(), ConstVectorView::nelem(), plevel_slope_3d(), POLELAT, and refell2r().
void ppath_calc | ( | 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 & | t_field, | ||
const Tensor3 & | z_field, | ||
const Tensor4 & | vmr_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_lraytrace, | ||
const bool & | ppath_inside_cloudbox_do, | ||
const Verbosity & | verbosity | ||
) |
ppath_calc
This is the core for the WSM ppathStepByStep.
This function takes mainly the same input as ppathStepByStep (that is, those input arguments are the WSV with the same name).
ws | Current Workspace |
ppath | Output: A Ppath structure |
ppath_step_agenda | As the WSM with the same name. |
atmosphere_dim | The atmospheric dimensionality. |
p_grid | The pressure grid. |
lat_grid | The latitude grid. |
lon_grid | The longitude grid. |
t_field | As the WSM with the same name. |
z_field | As the WSM with the same name. |
vmr_field | As the WSM with the same name. |
f_grid | As the WSM with the same name. |
refellipsoid | As the WSM with the same name. |
z_surface | Surface altitude. |
cloudbox_on | Flag to activate the cloud box. |
cloudbox_limits | Index limits of the cloud box. |
rte_pos | The position of the sensor. |
rte_los | The line-of-sight of the sensor. |
ppath_lraytrace | As the WSM with the same name. |
ppath_inside_cloudbox_do | As the WSM with the same name. |
Definition at line 5344 of file ppath.cc.
References abs, Ppath::background, chk_rte_los(), chk_rte_pos(), Ppath::constant, Ppath::end_los, Ppath::end_lstep, Ppath::end_pos, fractional_gp(), Ppath::gp_lat, Ppath::gp_lon, Ppath::gp_p, gridpos(), is_gridpos_at_index_i(), joker, Ppath::los, Ppath::lstep, Array< base >::nelem(), ConstVectorView::nelem(), Ppath::ngroup, Ppath::np, Ppath::nreal, Ppath::pos, ppath_copy(), ppath_init_structure(), ppath_set_background(), ppath_start_stepping(), ppath_step_agendaExecute(), ppath_what_background(), Ppath::r, Ppath::start_los, Ppath::start_lstep, and Ppath::start_pos.
Referenced by defocusing_general_sub(), defocusing_sat2sat(), iwp_cloud_opt_pathCalc(), MCIPA(), ppathFromRtePos2(), and ppathStepByStep().
ppath_copy
Copy the content in ppath2 to ppath1.
The ppath1 structure must be allocated before calling the function. The structure can be allocated to hold more points than found in ppath2. The data of ppath2 is placed in the first positions of ppath1.
ppath1 | Output: Ppath structure. |
ppath2 | The ppath structure to be copied. |
ncopy | Number of points in ppath2 to copy. If set to negative, the number is set to ppath2.np. |
Definition at line 1876 of file ppath.cc.
References Ppath::background, Ppath::constant, Ppath::dim, Ppath::end_los, Ppath::end_lstep, Ppath::end_pos, Ppath::gp_lat, Ppath::gp_lon, Ppath::gp_p, gridpos_copy(), joker, Ppath::los, Ppath::lstep, Ppath::ngroup, Ppath::np, Ppath::nreal, Ppath::pos, Ppath::r, Ppath::start_los, Ppath::start_lstep, and Ppath::start_pos.
Referenced by ppath_append(), ppath_calc(), and ppathFromRtePos2().
void ppath_geom_updown_1d | ( | Ppath & | ppath, |
ConstVectorView | z_field, | ||
ConstVectorView | refellipsoid, | ||
const Numeric & | z_surface, | ||
const Index & | cloudbox_on, | ||
const ArrayOfIndex & | cloudbox_limits | ||
) |
ppath_init_structure
Initiates a Ppath structure to hold the given number of points.
All fields releated with the surface, symmetry and tangent point are set to 0 or empty. The background field is set to background case 0. The constant field is set to -1. The refraction field is set to 0.
The length of the lstep field is set to np-1.
ppath | Output: A Ppath structure. |
atmosphere_dim | The atmospheric dimensionality. |
np | Number of points of the path. |
Definition at line 1726 of file ppath.cc.
References Ppath::constant, Ppath::dim, Ppath::end_los, Ppath::end_lstep, Ppath::end_pos, Ppath::gp_lat, Ppath::gp_lon, Ppath::gp_p, Ppath::los, Ppath::lstep, max, Ppath::ngroup, Ppath::np, Ppath::nreal, Ppath::pos, ppath_set_background(), Ppath::r, Vector::resize(), Matrix::resize(), Ppath::start_los, Ppath::start_lstep, and Ppath::start_pos.
Referenced by cloud_ppath_update1D(), cloud_ppath_update1D_noseq(), cloud_ppath_update3D(), ppath_append(), ppath_calc(), ppath_end_1d(), ppath_end_2d(), ppath_end_3d(), ppath_start_stepping(), and ppathFromRtePos2().
ppath_set_background
Sets the background field of a Ppath structure.
The different background cases have a number coding to simplify a possible change of the strings and checking of the what case that is valid.
The case numbers are:
0. Unvalid.
ppath | Output: A Ppath structure. |
case_nr | Case number (see above) |
Definition at line 1790 of file ppath.cc.
References Ppath::background.
Referenced by ppath_calc(), ppath_end_1d(), ppath_end_2d(), ppath_end_3d(), ppath_init_structure(), ppath_start_stepping(), and ppathFromRtePos2().
void ppath_start_stepping | ( | Ppath & | ppath, |
const Index & | atmosphere_dim, | ||
ConstVectorView | p_grid, | ||
ConstVectorView | lat_grid, | ||
ConstVectorView | lon_grid, | ||
ConstTensor3View | z_field, | ||
ConstVectorView | refellipsoid, | ||
ConstMatrixView | z_surface, | ||
const Index & | cloudbox_on, | ||
const ArrayOfIndex & | cloudbox_limits, | ||
const bool & | ppath_inside_cloudbox_do, | ||
ConstVectorView | rte_pos, | ||
ConstVectorView | rte_los, | ||
const Verbosity & | verbosity | ||
) |
ppath_start_stepping
Initiates a Ppath structure for calculation of a path with ppath_step.
The function performs two main tasks. As mentioned above, it initiates a Ppath structure (a), but it also checks that the end point of the path is at an allowed location (b).
(a): The Ppath structure is set to hold the position and LOS of the last point of the path inside the atmosphere. This point is either the sensor position, or the point where the path leaves the model atmosphere. If the path is totally outside the atmosphere, no point is put into the structure. If the (practical) end and start points are identical, such as when the sensor is inside the cloud box, the background field is set.
(b): If it is found that the end point of the path is at an illegal position a detailed error message is given. Not allowed cases are:
All input variables are identical with the WSV with the same name. The output variable is here called ppath for simplicity, but is in fact ppath_step.
ppath | Output: A Ppath structure. |
atmosphere_dim | The atmospheric dimensionality. |
p_grid | The pressure grid. |
lat_grid | The latitude grid. |
lon_grid | The longitude grid. |
z_field | The field of geometrical altitudes. |
refellipsoid | As the WSV with the same name. |
z_surface | Surface altitude. |
cloudbox_on | Flag to activate the cloud box. |
cloudbox_limits | Index limits of the cloud box. |
ppath_inside_cloudbox_do | As the WSV with the same name. |
rte_pos | The position of the sensor. |
rte_los | The line-of-sight of the sensor. |
Definition at line 4606 of file ppath.cc.
References abs, cart2poslos(), Ppath::constant, CREATE_OUT1, DEBUG_ONLY, dx, Ppath::end_los, Ppath::end_lstep, Ppath::end_pos, fractional_gp(), geometrical_ppc(), geompath_l_at_r(), geompath_lat_at_za(), geompath_za_at_r(), Ppath::gp_lat, Ppath::gp_lon, Ppath::gp_p, gridpos(), gridpos_check_fd(), gridpos_copy(), interp(), interpweights(), is_los_downwards(), joker, L_NOT_FOUND, LACC, Ppath::los, ConstVectorView::nelem(), Ppath::ngroup, Ppath::nreal, plevel_angletilt(), plevel_slope_2d(), plevel_slope_3d(), Ppath::pos, poslos2cart(), ppath_init_structure(), ppath_set_background(), Ppath::r, r_crossing_2d(), r_crossing_3d(), refell2d(), refell2r(), resolve_lon(), rte_pos2gridpos(), and RTOL.
Referenced by mcPathTraceGeneral(), mcPathTraceIPA(), and ppath_calc().
void ppath_step_geom_1d | ( | Ppath & | ppath, |
ConstVectorView | z_field, | ||
ConstVectorView | refellipsoid, | ||
const Numeric & | z_surface, | ||
const Numeric & | lmax | ||
) |
ppath_step_geom_1d
Calculates 1D geometrical propagation path steps.
This is the core function to determine 1D propagation path steps by pure geometrical calculations. Path points are included for crossings with the grids, tangent points and points of intersection with the surface. In addition, points are included in the propgation path to ensure that the distance along the path between the points does not exceed the selected maximum length (lmax). If lmax is <= 0, this means that no length criterion shall be applied.
Note that the input variables are here compressed to only hold data for a 1D atmosphere. For example, z_field is z_field(:,0,0).
For more information read the chapter on propagation paths in AUG.
ppath | Output: A Ppath structure. |
z_field | Geometrical altitudes corresponding to p_grid. |
refellipsoid | As the WSV with the same name. |
z_surface | Surface altitude. |
lmax | Maximum allowed length between the path points. |
Definition at line 2783 of file ppath.cc.
References Ppath::constant, do_gridrange_1d(), geometrical_ppc(), ConstVectorView::nelem(), ppath_end_1d(), and ppath_start_1d().
Referenced by ppath_stepGeometric().
void ppath_step_geom_2d | ( | Ppath & | ppath, |
ConstVectorView | lat_grid, | ||
ConstMatrixView | z_field, | ||
ConstVectorView | refellipsoid, | ||
ConstVectorView | z_surface, | ||
const Numeric & | lmax | ||
) |
ppath_step_geom_2d
Calculates 2D geometrical propagation path steps.
Works as the same function for 1D, despite that some input arguments are of different type.
ppath | Output: A Ppath structure. |
lat_grid | Latitude grid. |
z_field | Geometrical altitudes |
refellipsoid | As the WSV with the same name. |
z_surface | Surface altitudes. |
lmax | Maximum allowed length between the path points. |
Definition at line 3136 of file ppath.cc.
References Ppath::constant, do_gridcell_2d_byltest(), geometrical_ppc(), ConstVectorView::nelem(), ppath_end_2d(), and ppath_start_2d().
Referenced by ppath_stepGeometric().
void ppath_step_geom_3d | ( | Ppath & | ppath, |
ConstVectorView | lat_grid, | ||
ConstVectorView | lon_grid, | ||
ConstTensor3View | z_field, | ||
ConstVectorView | refellipsoid, | ||
ConstMatrixView | z_surface, | ||
const Numeric & | lmax | ||
) |
ppath_step_geom_3d
Calculates 3D geometrical propagation path steps.
Works as the same function for 1D despite that some input arguments are of different type.
ppath | Output: A Ppath structure. |
lat_grid | Latitude grid. |
lon_grid | Longitude grid. |
z_field | Geometrical altitudes |
refellipsoid | As the WSV with the same name. |
z_surface | Surface altitudes. |
lmax | Maximum allowed length between the path points. |
Definition at line 3553 of file ppath.cc.
References Ppath::constant, do_gridcell_3d_byltest(), geometrical_ppc(), ConstVectorView::nelem(), ppath_end_3d(), and ppath_start_3d().
Referenced by mcPathTraceGeneral(), and ppath_stepGeometric().
void ppath_step_refr_1d | ( | Workspace & | ws, |
Ppath & | ppath, | ||
ConstVectorView | p_grid, | ||
ConstTensor3View | z_field, | ||
ConstTensor3View | t_field, | ||
ConstTensor4View | vmr_field, | ||
ConstVectorView | f_grid, | ||
ConstVectorView | refellipsoid, | ||
const Numeric & | z_surface, | ||
const Numeric & | lmax, | ||
const Agenda & | refr_index_air_agenda, | ||
const String & | rtrace_method, | ||
const Numeric & | lraytrace | ||
) |
ppath_step_refr_1d
Calculates 1D propagation path steps including effects of refraction.
This function works as the function ppath_step_geom_1d but considers also refraction. The upper length of the ray tracing steps is set by the argument lraytrace. This argument controls only the internal calculations. The maximum distance between the path points is still determined by lmax.
ws | Current Workspace |
ppath | Out: A Ppath structure. |
p_grid | Pressure grid. |
z_field | As the WSV with the same name. |
t_field | As the WSV with the same name. |
vmr_field | As the WSV with the same name. |
f_grid | As the WSV with the same name. |
refellipsoid | As the WSV with the same name. |
z_surface | Surface altitude (1D). |
lmax | Maximum allowed length between the path points. |
refr_index_air_agenda | The WSV with the same name. |
rtrace_method | String giving which ray tracing method to use. See the function for options. |
lraytrace | Maximum allowed length for ray tracing steps. |
Definition at line 3809 of file ppath.cc.
References Ppath::constant, get_refr_index_1d(), joker, Array< base >::nelem(), ppath_end_1d(), ppath_start_1d(), raytrace_1d_linear_basic(), and refraction_ppc().
Referenced by ppath_stepRefractionBasic().
void ppath_step_refr_2d | ( | Workspace & | ws, |
Ppath & | ppath, | ||
ConstVectorView | p_grid, | ||
ConstVectorView | lat_grid, | ||
ConstTensor3View | z_field, | ||
ConstTensor3View | t_field, | ||
ConstTensor4View | vmr_field, | ||
ConstVectorView | f_grid, | ||
ConstVectorView | refellipsoid, | ||
ConstVectorView | z_surface, | ||
const Numeric & | lmax, | ||
const Agenda & | refr_index_air_agenda, | ||
const String & | rtrace_method, | ||
const Numeric & | lraytrace | ||
) |
ppath_step_refr_2d
Calculates 2D propagation path steps, with refraction, using a simple and fast ray tracing scheme.
Works as the same function for 1D despite that some input arguments are of different type.
ws | Current Workspace |
ppath | Out: A Ppath structure. |
p_grid | Pressure grid. |
lat_grid | Latitude grid. |
z_field | As the WSV with the same name. |
t_field | As the WSV with the same name. |
vmr_field | As the WSV with the same name. |
f_grid | As the WSV with the same name. |
refellipsoid | As the WSV with the same name. |
z_surface | Surface altitudes. |
lmax | Maximum allowed length between the path points. |
refr_index_air_agenda | The WSV with the same name. |
rtrace_method | String giving which ray tracing method to use. See the function for options. |
lraytrace | Maximum allowed length for ray tracing steps. |
Definition at line 4121 of file ppath.cc.
References joker, Array< base >::nelem(), ppath_end_2d(), ppath_start_2d(), and raytrace_2d_linear_basic().
Referenced by ppath_stepRefractionBasic().
void ppath_step_refr_3d | ( | Workspace & | ws, |
Ppath & | ppath, | ||
ConstVectorView | p_grid, | ||
ConstVectorView | lat_grid, | ||
ConstVectorView | lon_grid, | ||
ConstTensor3View | z_field, | ||
ConstTensor3View | t_field, | ||
ConstTensor4View | vmr_field, | ||
ConstVectorView | f_grid, | ||
ConstVectorView | refellipsoid, | ||
ConstMatrixView | z_surface, | ||
const Numeric & | lmax, | ||
const Agenda & | refr_index_air_agenda, | ||
const String & | rtrace_method, | ||
const Numeric & | lraytrace | ||
) |
ppath_step_refr_3d
Calculates 3D propagation path steps, with refraction, using a simple and fast ray tracing scheme.
Works as the same function for 1D despite that some input arguments are of different type.
ws | Current Workspace |
ppath | Out: A Ppath structure. |
p_grid | Pressure grid. |
lat_grid | Latitude grid. |
lon_grid | Longitude grid. |
z_field | Geometrical altitudes. |
t_field | Atmospheric temperatures. |
vmr_field | VMR values. |
f_grid | As the WSV with the same name. |
refellipsoid | As the WSV with the same name. |
z_surface | Surface altitudes. |
lmax | Maximum allowed length between the path points. |
refr_index_air_agenda | The WSV with the same name. |
rtrace_method | String giving which ray tracing method to use. See the function for options. |
lraytrace | Maximum allowed length for ray tracing steps. |
Definition at line 4466 of file ppath.cc.
References Array< base >::nelem(), ppath_end_3d(), ppath_start_3d(), and raytrace_3d_linear_basic().
Referenced by ppath_stepRefractionBasic().
ppath_what_background
Returns the case number for the radiative background.
See further the function ppath_set_background.
ppath | A Ppath structure. |
Definition at line 1835 of file ppath.cc.
References Ppath::background.
Referenced by cloud_ppath_update1D(), cloud_ppath_update1D_noseq(), defocusing_general_sub(), defocusing_sat2sat(), fos(), get_iy_of_background(), iwp_cloud_opt_pathCalc(), iyEmissionStandard(), iyRadioLink(), mcPathTraceGeneral(), ppath_append(), ppath_calc(), ppath_stepGeometric(), ppath_stepRefractionBasic(), and ppathFromRtePos2().
zaaa2cart
Converts zenith and azimuth angles to a cartesian unit vector.
This function and the sister function cart2zaaa handles transformation of line-of-sights. This in contrast to the sph/poslos functions that handles positions, or combinations of positions and line-of-sight.
The cartesian coordinate system used for these two functions can be defined as z : za = 0 x : za=90, aa=0 y : za=90, aa=90
dx | Out: x-part of LOS unit vector. |
dy | Out: y-part of LOS unit vector. |
dz | Out: z-part of LOS unit vector. |
za | LOS zenith angle at observation position. |
aa | LOS azimuth angle at observation position. |
Definition at line 484 of file ppath.cc.
Referenced by adjust_los(), map_daa(), propmat_clearskyAddZeeman(), and specular_losCalc().
const Numeric ANGTOL = 1e-6 |
Definition at line 103 of file ppath.h.
Referenced by cart2pol(), cart2poslos(), cart2sph(), do_gridcell_2d_byltest(), do_gridcell_3d_byltest(), geompath_from_r1_to_r2(), pha_mat_labCalc(), plevel_crossing_2d(), plevel_crossing_3d(), r_crossing_3d(), and raytrace_3d_linear_basic().
const Numeric POLELAT = 90-1e-8 |
Definition at line 94 of file ppath.h.
Referenced by cart2poslos(), cart2sph(), do_gridcell_3d_byltest(), plevel_slope_3d(), poslos2cart(), and ppath_end_3d().