ARTS
2.3.1285(git:92a29ea9-dirty)
|
Go to the source code of this file.
Functions | |
void | cart2poslos (double &r, double &lat, double &lon, double &za, double &aa, const double &x, const double &y, const double &z, const double &dx, const double &dy, const double &dz) |
cart2poslos More... | |
void | cart2sph (double &r, double &lat, double &lon, const double &x, const double &y, const double &z) |
cart2sph More... | |
Numeric | za_geom2other_point (const Numeric &r1, const Numeric &lat1, const Numeric &r2, const Numeric &lat2) |
za_geom2other_point More... | |
void | lat_crossing_3d (Numeric &r, Numeric &lon, Numeric &l, const Numeric &lat_hit, const Numeric &lat_start, const Numeric &za_start, const Numeric &x, const Numeric &y, const Numeric &z, const Numeric &dx, const Numeric &dy, const Numeric &dz) |
lat_crossing_3d More... | |
void | lon_crossing_3d (Numeric &r, Numeric &lat, Numeric &l, const Numeric &lon_hit, const Numeric &lon_start, const Numeric &za_start, const Numeric &aa_start, const Numeric &x, const Numeric &y, const Numeric &z, const Numeric &dx, const Numeric &dy, const Numeric &dz) |
lon_crossing_3d More... | |
void | plevel_crossing_3d (Numeric &r, Numeric &lat, Numeric &lon, Numeric &l, const Numeric &r_start0, const Numeric &lat_start, const Numeric &lon_start, const Numeric &za_start, const Numeric &aa_start, const Numeric &x, const Numeric &y, const Numeric &z, const Numeric &dx, const Numeric &dy, const Numeric &dz, const Numeric &ppc, const Numeric &lat1, const Numeric &lat3, const Numeric &lon5, const Numeric &lon6, const Numeric &r15, const Numeric &r35, const Numeric &r36, const Numeric &r16, const bool &above) |
plevel_crossing_3d More... | |
void | do_gridcell_3d (Vector &r_v, Vector &lat_v, Vector &lon_v, Vector &za_v, Vector &aa_v, Numeric &lstep, Index &endface, const Numeric &r_start, const Numeric &lat_start, const Numeric &lon_start, const Numeric &za_start, const Numeric &aa_start, const Numeric &ppc, const Numeric &lmax, const Numeric &lat1, const Numeric &lat3, const Numeric &lon5, const Numeric &lon6, const Numeric &r15a, const Numeric &r35a, const Numeric &r36a, const Numeric &r16a, const Numeric &r15b, const Numeric &r35b, const Numeric &r36b, const Numeric &r16b, const Numeric &rsurface15, const Numeric &rsurface35, const Numeric &rsurface36, const Numeric &rsurface16) |
do_gridcell_3d More... | |
void | do_gridcell_2d (Vector &r_v, Vector &lat_v, Vector &za_v, Numeric &lstep, Index &endface, const Numeric &r_start, const Numeric &lat_start, const Numeric &za_start, const Numeric &ppc, const Numeric &lmax, const Numeric &lat1, const Numeric &lat3, const Numeric &r1a, const Numeric &r3a, const Numeric &r3b, const Numeric &r1b, const Numeric &rsurface1, const Numeric &rsurface3) |
do_gridcell_2d More... | |
void | raytrace_1d_linear_basic (Workspace &ws, Array< Numeric > &r_array, Array< Numeric > &lat_array, Array< Numeric > &za_array, Array< Numeric > &l_array, Array< Numeric > &n_array, Array< Numeric > &ng_array, Index &endface, ConstVectorView refellipsoid, ConstVectorView p_grid, ConstVectorView z_field, ConstTensor3View t_field, ConstTensor4View vmr_field, ConstVectorView f_grid, const Numeric &lmax, const Agenda &refr_index_air_agenda, const Numeric &lraytrace, const Numeric &ppc, const Numeric &r_surface, const Numeric &r1, const Numeric &r3, Numeric &r, Numeric &lat, Numeric &za) |
raytrace_1d_linear_basic More... | |
void cart2poslos | ( | double & | r, |
double & | lat, | ||
double & | lon, | ||
double & | za, | ||
double & | aa, | ||
const double & | x, | ||
const double & | y, | ||
const double & | z, | ||
const double & | dx, | ||
const double & | dy, | ||
const double & | dz | ||
) |
cart2poslos
The inverse of poslos2cart.
The azimuth angle is set to:
0 when the zenith angle is 0 or 180. atan2(dy,dx) at the poles (lat = +- 90).
The longitude is set to 0 at the poles (lat = +- 90).
r | Out: Radius of observation position. |
lat | Out: Latitude of observation position. |
lon | Out: Longitude of observation position. |
za | Out: LOS zenith angle at observation position. |
aa | Out: LOS azimuth angle at observation position. |
x | x-coordinate of observation position. |
y | y-coordinate of observation position. |
z | z-coordinate of 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 26 of file ppath_NotUsed.cc.
Referenced by do_gridcell_3d().
void cart2sph | ( | double & | r, |
double & | lat, | ||
double & | lon, | ||
const double & | x, | ||
const double & | y, | ||
const double & | z | ||
) |
cart2sph
The inverse of sph2cart.
r | Out: Radius of observation position. |
lat | Out: Latitude of observation position. |
lon | Out: Longitude of observation position. |
x | x-coordinate of observation position. |
y | y-coordinate of observation position. |
z | z-coordinate of observation position. |
Definition at line 96 of file ppath_NotUsed.cc.
void do_gridcell_2d | ( | Vector & | r_v, |
Vector & | lat_v, | ||
Vector & | za_v, | ||
Numeric & | lstep, | ||
Index & | endface, | ||
const Numeric & | r_start, | ||
const Numeric & | lat_start, | ||
const Numeric & | za_start, | ||
const Numeric & | ppc, | ||
const Numeric & | lmax, | ||
const Numeric & | lat1, | ||
const Numeric & | lat3, | ||
const Numeric & | r1a, | ||
const Numeric & | r3a, | ||
const Numeric & | r3b, | ||
const Numeric & | r1b, | ||
const Numeric & | rsurface1, | ||
const Numeric & | rsurface3 | ||
) |
do_gridcell_2d
Calculates the geometrical path through a 2D grid cell.
The function determines the geometrical path from the given start point to the boundary of the grid cell. The face where the path exits the grid cell is denoted as the end face. The following number coding is used for the variable endface:
1: The face at the lower latitude point.
2: The face at the lower (geometrically) pressure level.
3: The face at the upper latitude point.
4: The face at the upper (geometrically) pressure level.
7: The end point is an intersection with the surface.
The corner points are names r[lat][a,b]. For example: r3b. The latitudes are numbered to match the end faces. This means that the lower latitude has number 1, and the upper number 3. The pressure levels are named as a and b:
a: Lower pressure level (highest pressure).
b: Upper pressure level (lowest pressure).
Path points are included if lmax>0 and the distance to the end point is > than lmax.
The return vectors (r_v etc.) can have any length when handed to the function.
r_v | Out: Vector with radius of found path points. |
lat_v | Out: Vector with latitude of found path points. |
za_v | Out: Vector with LOS zenith angle at found path points. |
lstep | Out: Vector with length along the path between points. |
endface | Out: Number coding for exit face. See above. |
r_start0 | Radius of start point. |
lat_start | Latitude of start point. |
za_start | LOS zenith angle at start point. |
ppc | Propagation path constant. |
lmax | Maximum allowed length along the path. -1 = no limit. |
lat1 | Latitude of left end face (face 1) of the grid cell. |
lat3 | Latitude of right end face (face 3) of the grid cell. |
r1a | Radius of lower-left corner of the grid cell. |
r3a | Radius of lower-right corner of the grid cell. |
r3b | Radius of upper-right corner of the grid cell (r3b>r3a) |
r1b | Radius of upper-left corner of the grid cell (r1b>r1a). |
rsurface1 | Radius for the surface at lat1. |
rsurface3 | Radius for the surface at lat3. |
Definition at line 842 of file ppath_NotUsed.cc.
References abs, geompath_from_r1_to_r2(), geompath_r_at_lat(), L_NOT_FOUND, ConstVectorView::nelem(), plevel_crossing_2d(), and r.
void do_gridcell_3d | ( | Vector & | r_v, |
Vector & | lat_v, | ||
Vector & | lon_v, | ||
Vector & | za_v, | ||
Vector & | aa_v, | ||
Numeric & | lstep, | ||
Index & | endface, | ||
const Numeric & | r_start, | ||
const Numeric & | lat_start, | ||
const Numeric & | lon_start, | ||
const Numeric & | za_start, | ||
const Numeric & | aa_start, | ||
const Numeric & | ppc, | ||
const Numeric & | lmax, | ||
const Numeric & | lat1, | ||
const Numeric & | lat3, | ||
const Numeric & | lon5, | ||
const Numeric & | lon6, | ||
const Numeric & | r15a, | ||
const Numeric & | r35a, | ||
const Numeric & | r36a, | ||
const Numeric & | r16a, | ||
const Numeric & | r15b, | ||
const Numeric & | r35b, | ||
const Numeric & | r36b, | ||
const Numeric & | r16b, | ||
const Numeric & | rsurface15, | ||
const Numeric & | rsurface35, | ||
const Numeric & | rsurface36, | ||
const Numeric & | rsurface16 | ||
) |
do_gridcell_3d
Calculates the geometrical path through a 3D grid cell.
The function determines the geometrical path from the given start point to the boundary of the grid cell. The face where the path exits the grid cell is denoted as the end face. The same number coding as in do_gridcell_2d is used, where the additional longitude end faces are numbered as:
5: The face at the lower longitude point.
6: The face at the upper longitude point.
The corner points are numbered as do_gridcell_2d, but 5 or 6 is added after the latitude number to indicate the longitude. This means that r16a, is the corner at lat1, lon6 and pressure level a.
See further do_gridcell_2d.
r_v | Out: Vector with radius of found path points. |
lat_v | Out: Vector with latitude of found path points. |
lon_v | Out: Vector with longitude of found path points. |
za_v | Out: Vector with LOS zenith angle at found path points. |
aa_v | Out: Vector with LOS azimuth angle at found path points. |
lstep | Out: Vector with length along the path between points. |
endface | Out: Number coding for exit face. See above. |
r_start0 | Radius of start point. |
lat_start0 | Latitude of start point. |
lon_start0 | Longitude of start point. |
za_start | LOS zenith angle at start point. |
aa_start | LOS azimuth angle at start point. |
ppc | Propagation path constant. |
lmax | Maximum allowed length along the path. -1 = no limit. |
lat1 | Latitude of left end face (face 1) of the grid cell. |
lat3 | Latitude of right end face (face 3) of the grid cell. |
lon5 | Lower longitude limit of the grid cell. |
lon6 | Upper longitude limit of the grid cell. |
r15a | Radius of corner: lower p-level,lat1 and lon5. |
r35a | Radius of corner: lower p-level,lat3 and lon5. |
r36a | Radius of corner: lower p-level,lat3 and lon6. |
r16a | Radius of corner: lower p-level,lat1 and lon6. |
r15b | Radius of corner: upper p-level,lat1 and lon5. |
r35b | Radius of corner: upper p-level,lat3 and lon5. |
r36b | Radius of corner: upper p-level,lat3 and lon6. |
r16b | Radius of corner: upper p-level,lat1 and lon6. |
rsurface15 | Radius for the surface at lat1 and lon5. |
rsurface35 | Radius for the surface at lat3 and lon5. |
rsurface36 | Radius for the surface at lat3 and lon6. |
rsurface16 | Radius for the surface at lat1 and lon6. |
Definition at line 613 of file ppath_NotUsed.cc.
References abs, cart2poslos(), dx, geompath_l_at_r(), geompath_tanpos_3d(), geompath_za_at_r(), L_NOT_FOUND, LACC, lat_crossing_3d(), lon_crossing_3d(), n, plevel_crossing_3d(), poslos2cart(), r, Vector::resize(), and resolve_lon().
void lat_crossing_3d | ( | Numeric & | r, |
Numeric & | lon, | ||
Numeric & | l, | ||
const Numeric & | lat_hit, | ||
const Numeric & | lat_start, | ||
const Numeric & | za_start, | ||
const Numeric & | x, | ||
const Numeric & | y, | ||
const Numeric & | z, | ||
const Numeric & | dx, | ||
const Numeric & | dy, | ||
const Numeric & | dz | ||
) |
lat_crossing_3d
Calculates where a 3D LOS crosses the specified latitude
The solution algorithm is described in ATD. See the chapter on propagation paths.
The function only looks for crossings in the forward direction of the given zenith angle (neglecting all solutions giving l <= 0). Note that the tangent point can be passed.
R_NOT_FOUND, LON_NOT_FOUND and L_NOT_FOUND are returned if no solution is found.
r | Out: Radius of found crossing. |
lon | Out: Longitude of found crossing. |
l | Out: Length along the path to the crossing. |
lat_hit | Target latitude. |
lat_start | Latitude of start point. |
aa_start | Azimuth angle at start point. |
x | x-coordinate of start position. |
y | y-coordinate of start position. |
z | z-coordinate of start 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 190 of file ppath_NotUsed.cc.
References abs.
Referenced by do_gridcell_3d().
void lon_crossing_3d | ( | Numeric & | r, |
Numeric & | lat, | ||
Numeric & | l, | ||
const Numeric & | lon_hit, | ||
const Numeric & | lon_start, | ||
const Numeric & | za_start, | ||
const Numeric & | aa_start, | ||
const Numeric & | x, | ||
const Numeric & | y, | ||
const Numeric & | z, | ||
const Numeric & | dx, | ||
const Numeric & | dy, | ||
const Numeric & | dz | ||
) |
lon_crossing_3d
Calculates where a 3D LOS crosses the specified longitude.
The solution algorithm is described in ATD. See the chapter on propagation paths.
The function only looks for crossings in the forward direction of the given zenith angle (neglecting all solutions giving l <= 0). Note that the tangent point can be passed.
R_NOT_FOUND, LAT_NOT_FOUND and L_NOT_FOUND are returned if no solution is found.
r | Out: Radius of found crossing. |
lat | Out: Latitude of found crossing. |
l | Out: Length along the path to the crossing. |
lon_hit | Target longitude. |
lon_start | Longitude of start position. |
za_start | Zenith angle at start position. |
aa_start | Azimuth angle at start position. |
x | x-coordinate of start position. |
y | y-coordinate of start position. |
z | z-coordinate of start 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 311 of file ppath_NotUsed.cc.
References abs, DEG2RAD, L_NOT_FOUND, LAT_NOT_FOUND, pow(), R_NOT_FOUND, RAD2DEG, and sqrt().
Referenced by do_gridcell_3d().
void plevel_crossing_3d | ( | Numeric & | r, |
Numeric & | lat, | ||
Numeric & | lon, | ||
Numeric & | l, | ||
const Numeric & | r_start0, | ||
const Numeric & | lat_start, | ||
const Numeric & | lon_start, | ||
const Numeric & | za_start, | ||
const Numeric & | aa_start, | ||
const Numeric & | x, | ||
const Numeric & | y, | ||
const Numeric & | z, | ||
const Numeric & | dx, | ||
const Numeric & | dy, | ||
const Numeric & | dz, | ||
const Numeric & | ppc, | ||
const Numeric & | lat1, | ||
const Numeric & | lat3, | ||
const Numeric & | lon5, | ||
const Numeric & | lon6, | ||
const Numeric & | r15, | ||
const Numeric & | r35, | ||
const Numeric & | r36, | ||
const Numeric & | r16, | ||
const bool & | above | ||
) |
plevel_crossing_3d
As plevel_crossing_2d but for 3D
r | Out: Radius at crossing. |
lat | Out: Latitude at crossing. |
lon | Out: Longitude at crossing. |
l | Out: Distance between start and crossing points. |
r_start0 | In: Radius of start point. |
lat_start | In: Latitude of start point. |
lon_start | In: Longitude of start point. |
za_start | In: LOS zenith angle at start point. |
aa_start | In: LOS azimuth angle at start point. |
ppc | In: Propagation path constant. |
lat1 | In: Latitude of lower end. |
lat3 | In: Latitude of upper end. |
lon5 | In: Longitude of lower end. |
lon6 | In: Longitude of upper end. |
r15 | In: Radius at lat1/lon5. |
r35 | In: Radius at lat3/lon5. |
r36 | In: Radius at lat3/lon6. |
r16 | In: Radius at lat1/lon6. |
x | In: x-coordinate of start position. |
y | In: y-coordinate of start position. |
z | In: z-coordinate of start position. |
dx | In: x-part of LOS unit vector. |
dy | In: y-part of LOS unit vector. |
dz | In: z-part of LOS unit vector. |
above | In: True if ppath start point is above level. In: Otherwise false. |
Definition at line 384 of file ppath_NotUsed.cc.
References ANGTOL, L_NOT_FOUND, LAT_NOT_FOUND, LON_NOT_FOUND, max, R_NOT_FOUND, and rsurf_at_latlon().
Referenced by do_gridcell_3d().
void raytrace_1d_linear_basic | ( | Workspace & | ws, |
Array< Numeric > & | r_array, | ||
Array< Numeric > & | lat_array, | ||
Array< Numeric > & | za_array, | ||
Array< Numeric > & | l_array, | ||
Array< Numeric > & | n_array, | ||
Array< Numeric > & | ng_array, | ||
Index & | endface, | ||
ConstVectorView | refellipsoid, | ||
ConstVectorView | p_grid, | ||
ConstVectorView | z_field, | ||
ConstTensor3View | t_field, | ||
ConstTensor4View | vmr_field, | ||
ConstVectorView | f_grid, | ||
const Numeric & | lmax, | ||
const Agenda & | refr_index_air_agenda, | ||
const Numeric & | lraytrace, | ||
const Numeric & | ppc, | ||
const Numeric & | r_surface, | ||
const Numeric & | r1, | ||
const Numeric & | r3, | ||
Numeric & | r, | ||
Numeric & | lat, | ||
Numeric & | za | ||
) |
raytrace_1d_linear_basic
Performs ray tracing for 1D with linear steps.
A geometrical step with length of lraytrace is taken from each point. The zenith angle for the end point of that step is calculated exactly by the expression c = r*n*sin(theta), and a new step is taken. The length of the last ray tracing step to reach the end radius is adopted to the distance to the end radius.
The refractive index is assumed to vary linearly between the pressure levels.
As the ray tracing is performed from the last end point, the found path will not be symmetric around the tangent point.
For more information read the chapter on propagation paths in AUG. The algorithm used is described in that part of ATD.
ws | Current Workspace |
r_array | Out: Radius of ray tracing points. |
lat_array | Out: Latitude of ray tracing points. |
za_array | Out: LOS zenith angle at ray tracing points. |
l_array | Out: Distance along the path between ray tracing points. |
n_array | Out: Refractive index at ray tracing points. |
ng_array | Out: Group refractive index at ray tracing points. |
endface | See do_gridrange_1d. |
refellipsoid | As the WSV with the same name. |
p_grid | Pressure grid. |
z_field | Geometrical altitudes (1D). |
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. |
lmax | As the WSV ppath_lmax |
refr_index_air_agenda | As the WSV with the same name. |
lraytrace | Maximum allowed length for ray tracing steps. |
ppc | Propagation path constant. |
r_surface | Radius of the surface. |
r1 | Radius of lower pressure level. |
r3 | Radius of upper pressure level (r3 > r1). |
r | Start radius for ray tracing. |
lat | Start latitude for ray tracing. |
za | Start zenith angle for ray tracing. |
Definition at line 971 of file ppath_NotUsed.cc.
References abs, DEG2RAD, do_gridrange_1d(), geometrical_ppc(), geompath_l_at_r(), geompath_lat_at_za(), geompath_r_at_l(), geompath_za_at_r(), get_refr_index_1d(), ConstVectorView::nelem(), RTOL, and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().
Numeric za_geom2other_point | ( | const Numeric & | r1, |
const Numeric & | lat1, | ||
const Numeric & | r2, | ||
const Numeric & | lat2 | ||
) |
za_geom2other_point
Calculates the zenith angle for the geometrical propagation path between two specified points.
The returned zenith angle is valid for point 1. That is, the propagation path goes from point 1 to point 2.
r1 | Radius for point 1. |
lat1 | Latiytude for point 1. |
r2 | Radius for point 2. |
lat2 | Latitude for point 2. |
Definition at line 128 of file ppath_NotUsed.cc.