ARTS  2.2.66
ppath_NotUsed.cc File Reference

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...
 

Function Documentation

◆ cart2poslos()

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).

Parameters
rOut: Radius of observation position.
latOut: Latitude of observation position.
lonOut: Longitude of observation position.
zaOut: LOS zenith angle at observation position.
aaOut: LOS azimuth angle at observation position.
xx-coordinate of observation position.
yy-coordinate of observation position.
zz-coordinate of observation position.
dxx-part of LOS unit vector.
dyy-part of LOS unit vector.
dzz-part of LOS unit vector.
Author
Patrick Eriksson
Date
2002-12-30

Definition at line 26 of file ppath_NotUsed.cc.

References abs, ANGTOL, cart2sph(), DEG2RAD, dx, POLELAT, and RAD2DEG.

Referenced by do_gridcell_3d(), and plevel_crossing_3d().

◆ cart2sph()

void cart2sph ( double &  r,
double &  lat,
double &  lon,
const double &  x,
const double &  y,
const double &  z 
)

cart2sph

The inverse of sph2cart.

Parameters
rOut: Radius of observation position.
latOut: Latitude of observation position.
lonOut: Longitude of observation position.
xx-coordinate of observation position.
yy-coordinate of observation position.
zz-coordinate of observation position.
Author
Patrick Eriksson
Date
2002-12-30

Definition at line 96 of file ppath_NotUsed.cc.

References RAD2DEG.

Referenced by cart2poslos().

◆ do_gridcell_2d()

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.

Parameters
r_vOut: Vector with radius of found path points.
lat_vOut: Vector with latitude of found path points.
za_vOut: Vector with LOS zenith angle at found path points.
lstepOut: Vector with length along the path between points.
endfaceOut: Number coding for exit face. See above.
r_start0Radius of start point.
lat_startLatitude of start point.
za_startLOS zenith angle at start point.
ppcPropagation path constant.
lmaxMaximum allowed length along the path. -1 = no limit.
lat1Latitude of left end face (face 1) of the grid cell.
lat3Latitude of right end face (face 3) of the grid cell.
r1aRadius of lower-left corner of the grid cell.
r3aRadius of lower-right corner of the grid cell.
r3bRadius of upper-right corner of the grid cell (r3b>r3a)
r1bRadius of upper-left corner of the grid cell (r1b>r1a).
rsurface1Radius for the surface at lat1.
rsurface3Radius for the surface at lat3.
Author
Patrick Eriksson
Date
2002-11-28

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(), and plevel_crossing_2d().

◆ do_gridcell_3d()

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.

Parameters
r_vOut: Vector with radius of found path points.
lat_vOut: Vector with latitude of found path points.
lon_vOut: Vector with longitude of found path points.
za_vOut: Vector with LOS zenith angle at found path points.
aa_vOut: Vector with LOS azimuth angle at found path points.
lstepOut: Vector with length along the path between points.
endfaceOut: Number coding for exit face. See above.
r_start0Radius of start point.
lat_start0Latitude of start point.
lon_start0Longitude of start point.
za_startLOS zenith angle at start point.
aa_startLOS azimuth angle at start point.
ppcPropagation path constant.
lmaxMaximum allowed length along the path. -1 = no limit.
lat1Latitude of left end face (face 1) of the grid cell.
lat3Latitude of right end face (face 3) of the grid cell.
lon5Lower longitude limit of the grid cell.
lon6Upper longitude limit of the grid cell.
r15aRadius of corner: lower p-level,lat1 and lon5.
r35aRadius of corner: lower p-level,lat3 and lon5.
r36aRadius of corner: lower p-level,lat3 and lon6.
r16aRadius of corner: lower p-level,lat1 and lon6.
r15bRadius of corner: upper p-level,lat1 and lon5.
r35bRadius of corner: upper p-level,lat3 and lon5.
r36bRadius of corner: upper p-level,lat3 and lon6.
r16bRadius of corner: upper p-level,lat1 and lon6.
rsurface15Radius for the surface at lat1 and lon5.
rsurface35Radius for the surface at lat3 and lon5.
rsurface36Radius for the surface at lat3 and lon6.
rsurface16Radius for the surface at lat1 and lon6.
Author
Patrick Eriksson
Date
2002-11-28

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(), plevel_crossing_3d(), poslos2cart(), Vector::resize(), and resolve_lon().

◆ lat_crossing_3d()

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.

Parameters
rOut: Radius of found crossing.
lonOut: Longitude of found crossing.
lOut: Length along the path to the crossing.
lat_hitTarget latitude.
lat_startLatitude of start point.
aa_startAzimuth angle at start point.
xx-coordinate of start position.
yy-coordinate of start position.
zz-coordinate of start position.
dxx-part of LOS unit vector.
dyy-part of LOS unit vector.
dzz-part of LOS unit vector.
Author
Patrick Eriksson
Date
2012-02-29

Definition at line 190 of file ppath_NotUsed.cc.

References abs, DEG2RAD, dx, L_NOT_FOUND, LON_NOT_FOUND, max, min, R_NOT_FOUND, RAD2DEG, and sign().

Referenced by do_gridcell_3d().

◆ lon_crossing_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.

Parameters
rOut: Radius of found crossing.
latOut: Latitude of found crossing.
lOut: Length along the path to the crossing.
lon_hitTarget longitude.
lon_startLongitude of start position.
za_startZenith angle at start position.
aa_startAzimuth angle at start position.
xx-coordinate of start position.
yy-coordinate of start position.
zz-coordinate of start position.
dxx-part of LOS unit vector.
dyy-part of LOS unit vector.
dzz-part of LOS unit vector.
Author
Patrick Eriksson
Date
2012-02-29

Definition at line 311 of file ppath_NotUsed.cc.

References abs, DEG2RAD, dx, L_NOT_FOUND, LAT_NOT_FOUND, R_NOT_FOUND, and RAD2DEG.

Referenced by do_gridcell_3d().

◆ plevel_crossing_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

Parameters
rOut: Radius at crossing.
latOut: Latitude at crossing.
lonOut: Longitude at crossing.
lOut: Distance between start and crossing points.
r_start0In: Radius of start point.
lat_startIn: Latitude of start point.
lon_startIn: Longitude of start point.
za_startIn: LOS zenith angle at start point.
aa_startIn: LOS azimuth angle at start point.
ppcIn: Propagation path constant.
lat1In: Latitude of lower end.
lat3In: Latitude of upper end.
lon5In: Longitude of lower end.
lon6In: Longitude of upper end.
r15In: Radius at lat1/lon5.
r35In: Radius at lat3/lon5.
r36In: Radius at lat3/lon6.
r16In: Radius at lat1/lon6.
xIn: x-coordinate of start position.
yIn: y-coordinate of start position.
zIn: z-coordinate of start position.
dxIn: x-part of LOS unit vector.
dyIn: y-part of LOS unit vector.
dzIn: z-part of LOS unit vector.
aboveIn: True if ppath start point is above level. In: Otherwise false.
Author
Patrick Eriksson
Date
2012-02-19

Definition at line 384 of file ppath_NotUsed.cc.

References abs, ANGTOL, cart2poslos(), distance3D(), dx, L_NOT_FOUND, LAT_NOT_FOUND, latlon_at_aa(), LON_NOT_FOUND, max, min, plevel_slope_3d(), r_crossing_3d(), R_NOT_FOUND, resolve_lon(), rslope_crossing3d(), rsurf_at_latlon(), and RTOL.

Referenced by do_gridcell_3d().

◆ raytrace_1d_linear_basic()

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.

Parameters
wsCurrent Workspace
r_arrayOut: Radius of ray tracing points.
lat_arrayOut: Latitude of ray tracing points.
za_arrayOut: LOS zenith angle at ray tracing points.
l_arrayOut: Distance along the path between ray tracing points.
n_arrayOut: Refractive index at ray tracing points.
ng_arrayOut: Group refractive index at ray tracing points.
endfaceSee do_gridrange_1d.
refellipsoidAs the WSV with the same name.
p_gridPressure grid.
z_fieldGeometrical altitudes (1D).
t_fieldAs the WSV with the same name.
vmr_fieldAs the WSV with the same name.
f_gridAs the WSV with the same name.
lmaxAs the WSV ppath_lmax
refr_index_air_agendaAs the WSV with the same name.
lraytraceMaximum allowed length for ray tracing steps.
ppcPropagation path constant.
r_surfaceRadius of the surface.
r1Radius of lower pressure level.
r3Radius of upper pressure level (r3 > r1).
rStart radius for ray tracing.
latStart latitude for ray tracing.
zaStart zenith angle for ray tracing.
Author
Patrick Eriksson
Date
2002-12-02

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(), and RTOL.

◆ za_geom2other_point()

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.

Returns
Zenith angle.
Parameters
r1Radius for point 1.
lat1Latiytude for point 1.
r2Radius for point 2.
lat2Latitude for point 2.
Author
Patrick Eriksson
Date
2002-07-03

Definition at line 128 of file ppath_NotUsed.cc.

References abs, DEG2RAD, and RAD2DEG.