Go to the documentation of this file.
60 if (ref_los.
nelem() != 2)
61 throw runtime_error(
"*ref_los* must have two columns.");
62 if (dlos.
ncols() != 2)
throw runtime_error(
"*dlos* must have two columns.");
68 for (
Index i = 0; i < nlos; i++) {
83 if (ref_los.
nelem() != 2)
84 throw runtime_error(
"*ref_los* must have two columns.");
85 if (other_los.
ncols() != 2)
86 throw runtime_error(
"*other_los* must have two columns.");
92 for (
Index i = 0; i < nlos; i++) {
115 out2 <<
" Sets geo-position to:\n" <<
geo_pos;
141 out2 <<
" Sets geo-position to:\n" <<
geo_pos;
160 while (!found && ihit <
ppath.np - 1) {
162 if (above &&
ppath.
pos(ihit, 0) < z_ref) {
164 }
else if (!above &&
ppath.
pos(ihit, 0) >= z_ref) {
189 out2 <<
" Sets geo-position to:\n" <<
geo_pos;
211 "The atmospheric geometry must be flagged to have "
212 "passed a consistency check (atmgeom_checked=1).");
215 "The cloudbox must be flagged to have "
216 "passed a consistency check (cloudbox_checked=1).");
329 "2D atmospheres not yet handled. Support for negative"
330 " zenith angles needed. Remind me (Patrick) to fix this.");
386 const Index maxiter = 99;
387 Vector t_za(maxiter, -999), t_dza(maxiter, -999);
424 while (lip >= l12 && ip > 0) {
460 xip, zip, dxip, dzip, ppt.
r[ip], ppt.
pos(ip, 1), ppt.
los(ip, 0));
487 xc, yc, zc, xip, yip, zip, dxip, dyip, dzip,
x1, y1, z1, l12);
514 dza = los[0] - rte_los_geom[0];
521 if (dza > 0 &&
rte_los[0] < za_upp_limit) {
523 }
else if (dza < 0 &&
rte_los[0] > za_low_limit) {
528 if (
abs(dza) <= za_accuracy) {
530 }
else if (za_upp_limit - za_low_limit <= za_accuracy / 10) {
531 if (
max(t_dza) < -10 * za_accuracy) {
533 out3 <<
" Ground intersection determined !!!\n";
537 out3 <<
" Zenith angle search range closed !!!\n";
544 if (ntries >= maxiter) {
546 out3 <<
" Too many iterations !!!\n";
557 const Index i0 = it - nfit + 1;
560 za_new = -p[0] / p[1];
564 daa = los[1] - rte_los_geom[1];
571 if (std::isinf(za_new) || std::isnan(za_new) ||
572 abs(za_new -
rte_los[0]) < 0.99 * za_accuracy ||
573 za_new <= za_low_limit || za_new >= za_upp_limit) {
574 rte_los[0] = (za_low_limit + za_upp_limit) / 2;
640 ll, rc, posc[1], posc[2], ppt.
r[ip], ppt.
pos(ip, 1), ppt.
pos(ip, 2));
645 if (ip == ppt.
np - 1) {
690 const Index i = ip + 1;
781 const bool above_toa = z_sensor > z_toa ? true :
false;
782 const Numeric z_end = above_toa ? z_toa : z_sensor;
784 Index background = -99;
788 throw runtime_error(
"The function can only be used for 1D atmospheres.");
793 "The WSV *ppath_inside_cloudbox_do* can only be set "
794 "to 1 if also *cloudbox_on* is 1.");
797 os <<
"The sensor is below the surface."
798 <<
" altitude of sensor : " << z_sensor << endl
799 <<
" altitude of surface : " <<
z_surface(0, 0);
800 throw runtime_error(os.str());
802 if (
abs(za_sensor - 90) < 0.1) {
804 os <<
"The zenith angle is " << za_sensor << endl
805 <<
"The method does not allow this. The zenith angle must deviate\n"
806 <<
"from 90 deg with at least 1 deg. That is, to be outside [89.9,90.1].";
807 throw runtime_error(os.str());
817 for (
Index i = 0; i < nz - 1; i++) {
818 if (z_sensor <
z_field(i + 1, 0, 0)) {
820 gp_end.
fd[0] = (z_sensor -
z_field(i, 0, 0)) /
822 gp_end.
fd[1] = 1 - gp_end.
fd[0];
829 bool path_to_follow =
true;
830 if (above_toa && za_sensor < 90) {
834 path_to_follow =
false;
835 }
else if (z_sensor ==
z_surface(0, 0) && za_sensor > 90) {
839 path_to_follow =
false;
847 path_to_follow =
false;
855 path_to_follow =
false;
860 path_to_follow =
false;
865 if (path_to_follow) {
892 l_idx[0] = gp_end.
idx;
893 l_fd0[0][0] = gp_end.
fd[0];
896 for (
Index i = gp_end.
idx; i >= 0 && background < 0; i--) {
900 dz_step = z -
z_field(i, 0, 0);
907 dz_step <= max_dz ? 1 :
Index(ceil(dz_step / max_dz));
914 l_fd0[iout].resize(np);
915 l_z[iout].resize(np);
918 for (
Index j = 0; j < np - 1; j++) {
919 l_z[iout][j] = z - (
Numeric(j) + 1) * dz;
920 l_fd0[iout][j] = (l_z[iout][j] -
z_field(i, 0, 0)) / dz_layer;
928 l_fd0[iout][np - 1] =
929 (l_z[iout][np - 1] -
z_field(i, 0, 0)) / dz_layer;
931 l_z[iout][np - 1] =
z_field(i, 0, 0);
932 l_fd0[iout][np - 1] = 0;
947 for (
Index i = gp_end.
idx; i < nz && background < 0; i++) {
956 }
else if (i == nz - 1) {
961 dz_step =
z_field(i + 1, 0, 0) - z;
966 dz_step <= max_dz ? 1 :
Index(ceil(dz_step / max_dz));
972 l_fd0[iout].resize(np);
973 l_z[iout].resize(np);
976 if (i == gp_end.
idx) {
978 l_z[iout][0] = z_sensor;
979 l_fd0[iout][0] = gp_end.
fd[0];
980 }
else if (i == nz - 1) {
982 l_z[iout][0] =
z_field(i, 0, 0);
986 l_z[iout][0] =
z_field(i, 0, 0);
991 for (
Index j = 1; j < np; j++) {
992 l_z[iout][j] = z +
Numeric(j) * dz;
993 l_fd0[iout][j] = (l_z[iout][j] -
z_field(i, 0, 0)) / dz_layer;
997 if (background < 0) {
1009 for (
Index i = 0; i < nz; i++) {
1013 ppath.gp_p[iout].idx = l_idx[i];
1014 ppath.gp_p[iout].fd[0] = l_fd0[i][j];
1015 ppath.gp_p[iout].fd[1] = 1 - l_fd0[i][j];
1019 ppath.lstep[iout - 1] = dz2dl *
abs(z_last - l_z[i][j]);
1028 if (
ppath.np == 1) {
1030 ppath.gp_p[0] = gp_end;
1034 ppath.constant = INFINITY;
1037 ppath.start_pos[1] = 0;
1038 ppath.start_los[0] = za_sensor;
1039 ppath.end_pos[0] = z_sensor;
1040 ppath.end_pos[1] = 0;
1041 ppath.end_los[0] = za_sensor;
1043 ppath.end_lstep = dz2dl * (z_sensor - z_toa);
1092 const String& file_format,
1103 ppath_partial.
gp_p = empty_gp;
1104 ppath_partial.
gp_lat = empty_gp;
1105 ppath_partial.
gp_lon = empty_gp;
1136 const Index& zenith_angles_per_position,
1139 throw std::runtime_error(
"Only for 1D atmospheres");
1141 throw std::runtime_error(
"Not allowed for non-spherical planets");
1143 throw std::runtime_error(
"Only allowed for long paths (ppath_lmax < 0)");
1149 const Numeric above_surface_tangent =
1150 90 -
RAD2DEG * std::acos((r) / (r + zmax)) + 1e-4;
1151 const Numeric below_surface_tangent =
1152 90 -
RAD2DEG * std::acos((r) / (r + zmax)) - 1e-4;
1153 const Numeric top_tangent = 90 - 1e-4;
1155 ppath_field.resize(3 * zenith_angles_per_position);
1156 Index ppath_field_pos = 0;
1158 Vector zenith_angles(zenith_angles_per_position);
1161 nlinspace(zenith_angles, 0, 90, zenith_angles_per_position);
1163 rte_pos_true[0] = zmin;
1165 for (
Index iz = 0; iz < zenith_angles_per_position; iz++) {
1166 rte_los_true[0] = zenith_angles[iz];
1188 above_surface_tangent,
1190 zenith_angles_per_position);
1191 rte_pos_true[0] = zmax;
1192 for (
Index iz = 0; iz < zenith_angles_per_position; iz++) {
1193 rte_los_true[0] = 180 - zenith_angles[iz];
1215 zenith_angles, 0, below_surface_tangent, zenith_angles_per_position);
1216 for (
Index iz = 0; iz < zenith_angles_per_position; iz++) {
1217 rte_los_true[0] = 180 - zenith_angles[iz];
1257 throw std::runtime_error(
1258 "Your sensor position matrix and sensor line of sight matrix do not match in size.\n");
1260 for (
auto i = 0; i < n; i++)
1324 throw runtime_error(
"The atmospheric dimensionality must be 1-3.");
1405 throw runtime_error(
"The atmospheric dimensionality must be 1-3.");
1520 los2xyz(za, aa, r1, lat1, lon1,
x1, y1, z1,
x2, y2, z2);
1566 if (np == 0)
throw runtime_error(
"The input *ppath* is empty.");
1568 throw runtime_error(
1569 "Internal inconsistency in *ppath* (size of data "
1570 "does not match np).");
1588 const Matrix& target_pos,
1593 throw runtime_error(
1594 "The number of columns of sensor_pos must be "
1595 "equal to the atmospheric dimensionality.");
1598 throw runtime_error(
1599 "The number of columns of targe_pos must be equal to "
1600 "the atmospheric dimensionality, except for 1D where "
1601 "two columns are demended (as for *rte_pos2*).");
1602 if (target_pos.
nrows() != n)
1603 throw runtime_error(
1604 "*sensor_pos* and *target_pos* must have the same "
1609 for (
Index i = 0; i < n; i++) {
1616 target_pos(i,
joker),
1632 tan_pos = std::numeric_limits<Numeric>::quiet_NaN();
1652 os <<
"Lowest altitude found at the end of the propagation path.\n"
1653 <<
"This indicates that the tangent point is either above the\n"
1654 <<
"top-of-the-atmosphere or below the planet's surface.";
1656 os <<
"Tangent point position:\n-----------------------\n"
1657 <<
" z = " <<
ppath.
pos(it, 0) / 1e3 <<
" km\n"
1658 <<
" lat = " <<
ppath.
pos(it, 1) <<
" deg";
1660 os <<
"\n lon: " <<
ppath.
pos(it, 2) <<
" deg";
1679 const Vector& ztan_vector,
1682 throw runtime_error(
"The function can only be used for 1D atmospheres.");
1687 os <<
"The number of altitudes in true tangent altitude vector must\n"
1688 <<
"match the number of positions in *sensor_pos*.";
1689 throw runtime_error(os.str());
1699 for (
Index i = 0; i < ztan_vector.
nelem(); i++) {
1702 os <<
"Invalid observation geometry: sensor (at z=" <<
sensor_pos(i, 0)
1703 <<
"m) is located below the requested tangent altitude (tanh="
1704 << ztan_vector[i] <<
"m)";
1705 throw runtime_error(os.str());
1732 const Vector& ztan_vector,
1735 throw runtime_error(
"The function can only be used for 1D atmospheres.");
1740 if (ztan_vector.
nelem() != npos) {
1742 os <<
"The number of altitudes in the geometric tangent altitude vector\n"
1743 <<
"must match the number of positions in *sensor_pos*.";
1744 throw runtime_error(os.str());
1749 for (
Index i = 0; i < npos; i++) {
1752 os <<
"Invalid observation geometry: sensor (at z=" <<
sensor_pos(i, 0)
1753 <<
"m) is located below the requested tangent altitude (tanh="
1754 << ztan_vector[i] <<
"m)";
1755 throw runtime_error(os.str());
Index atmosphere_dim(Workspace &ws) noexcept
std::size_t pos() const noexcept
void sph2cart(Numeric &x, Numeric &y, Numeric &z, const Numeric &r, const Numeric &lat, const Numeric &lon)
sph2cart
Ppath ppath_step(Workspace &ws) noexcept
Index first_pos_before_altitude(const Ppath &p, const Numeric &alt)
Determines ppath position just below an altitude.
Vector geo_pos(Workspace &ws) noexcept
Tensor3 z_field(Workspace &ws) noexcept
void DiffZaAa(Matrix &dlos, const Vector &ref_los, const Matrix &other_los, const Verbosity &)
WORKSPACE METHOD: DiffZaAa.
void ppath_init_structure(Ppath &ppath, const Index &atmosphere_dim, const Index &np)
Initiates a Ppath structure to hold the given number of points.
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.
Agenda ppath_step_agenda(Workspace &ws) noexcept
Numeric lat(Workspace &ws) noexcept
void gridpos_copy(GridPos &gp_new, const GridPos &gp_old)
gridpos_copy
Index atmgeom_checked(Workspace &ws) noexcept
Complex w(Complex z) noexcept
The Faddeeva function.
void ppath_agendaExecute(Workspace &ws, Ppath &ppath, const Numeric ppath_lmax, const Numeric ppath_lraytrace, const Vector &rte_pos, const Vector &rte_los, const Vector &rte_pos2, const Index cloudbox_on, const Index ppath_inside_cloudbox_do, const Vector &f_grid, const Agenda &input_agenda)
void add_za_aa(Numeric &za, Numeric &aa, const Numeric &za0, const Numeric &aa0, const Numeric &dza, const Numeric &daa)
Adds up zenith and azimuth angles.
void TangentPointExtract(Vector &tan_pos, const Ppath &ppath, const Verbosity &)
WORKSPACE METHOD: TangentPointExtract.
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.
void linreg(Vector &p, ConstVectorView x, ConstVectorView y)
Vector lat_grid(Workspace &ws) noexcept
Index ppath_inside_cloudbox_do(Workspace &ws) noexcept
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)
Calculates 1D propagation path steps including effects of refraction.
Verbosity verbosity(Workspace &ws) noexcept
Agenda refr_index_air_agenda(Workspace &ws) noexcept
void ppath_step_geom_2d(Ppath &ppath, ConstVectorView lat_grid, ConstMatrixView z_field, ConstVectorView refellipsoid, ConstVectorView z_surface, const Numeric &lmax)
Calculates 2D geometrical propagation path steps.
void ppath_step_geom_1d(Ppath &ppath, ConstVectorView z_field, ConstVectorView refellipsoid, const Numeric &z_surface, const Numeric &lmax)
Calculates 1D geometrical propagation path steps.
ArrayOfIndex cloudbox_limits(Workspace &ws) noexcept
void resize(Index n)
Resize function.
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.
Numeric refr_index_air(Workspace &ws) noexcept
void WriteXML(const String &file_format, const T &v, const String &f, const Index &no_clobber, const String &v_name, const String &f_name, const String &no_clobber_name, const Verbosity &verbosity)
WORKSPACE METHOD: WriteXML.
#define SWITCH_OUTPUT(x, y)
void get_refr_index_1d(Workspace &ws, Numeric &refr_index_air, Numeric &refr_index_air_group, const Agenda &refr_index_air_agenda, ConstVectorView p_grid, ConstVectorView refellipsoid, ConstTensor3View z_field, ConstTensor3View t_field, ConstTensor4View vmr_field, ConstVectorView f_grid, const Numeric &r)
get_refr_index_1d
void geo_posWherePpathPassesZref(Vector &geo_pos, const Ppath &ppath, const Numeric &z_ref, const Verbosity &verbosity)
WORKSPACE METHOD: geo_posWherePpathPassesZref.
void geo_posLowestAltitudeOfPpath(Vector &geo_pos, const Ppath &ppath, const Verbosity &verbosity)
WORKSPACE METHOD: geo_posLowestAltitudeOfPpath.
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.
Index nrows() const
Returns the number of rows.
void line_sphere_intersect(Numeric &x, Numeric &y, Numeric &z, const Numeric &xl, const Numeric &yl, const Numeric &zl, const Numeric &dx, const Numeric &dy, const Numeric &dz, const Numeric &xc, const Numeric &yc, const Numeric &zc, const Numeric &r)
geomtanpoint
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.
void cart2sph(Numeric &r, Numeric &lat, Numeric &lon, const Numeric &x, const Numeric &y, const Numeric &z, const Numeric &lat0, const Numeric &lon0, const Numeric &za0, const Numeric &aa0)
cart2sph
void get_refr_index_2d(Workspace &ws, Numeric &refr_index_air, Numeric &refr_index_air_group, const Agenda &refr_index_air_agenda, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView refellipsoid, ConstTensor3View z_field, ConstTensor3View t_field, ConstTensor4View vmr_field, ConstVectorView f_grid, const Numeric &r, const Numeric &lat)
get_refr_index_2d
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.
void TangentPointPrint(const Ppath &ppath, const Index &level, const Verbosity &verbosity)
WORKSPACE METHOD: TangentPointPrint.
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 structure to describe a propagation path and releated quantities.
ArrayOfGridPos gp_p
Index position with respect to the pressure grid.
Numeric lon(Workspace &ws) noexcept
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)
Calculates 3D propagation path steps, with refraction, using a simple and fast ray tracing scheme.
void cart2poslos(Numeric &r, Numeric &lat, Numeric &za, const Numeric &x, const Numeric &z, const Numeric &dx, const Numeric &dz, const Numeric &ppc, const Numeric &lat0, const Numeric &za0)
cart2poslos
This can be used to make arrays out of anything.
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.
void rte_pos_losMoveToStartOfPpath(Vector &rte_pos, Vector &rte_los, const Index &atmosphere_dim, const Ppath &ppath, const Verbosity &)
WORKSPACE METHOD: rte_pos_losMoveToStartOfPpath.
void cart2pol(Numeric &r, Numeric &lat, const Numeric &x, const Numeric &z, const Numeric &lat0, const Numeric &za0)
cart2pol
ArrayOfGridPos gp_lat
Index position with respect to the latitude grid.
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.
Declarations having to do with the four output streams.
Vector rte_pos(Workspace &ws) noexcept
Vector ngroup
The group index of refraction.
Numeric pos2refell_r(const Index &atmosphere_dim, ConstVectorView refellipsoid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstVectorView rte_pos)
pos2refell_r
Index ncols() const
Returns the number of columns.
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.
void rte_losSet(Vector &rte_los, const Index &atmosphere_dim, const Numeric &za, const Numeric &aa, const Verbosity &)
WORKSPACE METHOD: rte_losSet.
Matrix los
Line-of-sight at each ppath point.
ArrayOfGridPos gp_lon
Index position with respect to the longitude grid.
void line_circle_intersect(Numeric &x, Numeric &z, const Numeric &xl, const Numeric &zl, const Numeric &dx, const Numeric &dz, const Numeric &xc, const Numeric &zc, const Numeric &r)
geomtanpoint2d
Numeric geompath_za_at_r(const Numeric &ppc, const Numeric &a_za, const Numeric &r)
Calculates the zenith angle for a given radius along a geometrical propagation path.
Index np
Number of points describing the ppath.
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.
Index nelem() const
Returns the number of elements.
Array< Index > ArrayOfIndex
An array of Index.
Tensor4 vmr_field(Workspace &ws) noexcept
Vector rte_los(Workspace &ws) noexcept
Vector p_grid(Workspace &ws) noexcept
Ppath ppath(Workspace &ws) noexcept
void los2xyz(Numeric &za, Numeric &aa, const Numeric &r1, const Numeric &lat1, const Numeric &lon1, const Numeric &x1, const Numeric &y1, const Numeric &z1, const Numeric &x2, const Numeric &y2, const Numeric &z2)
los2xyz
NUMERIC Numeric
The type to use for all floating point numbers.
Linear algebra functions.
ArrayOfPpath ppath_field(Workspace &ws) noexcept
Numeric refr_index_air_group(Workspace &ws) noexcept
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 &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 bool &ppath_inside_cloudbox_do, const Verbosity &verbosity)
This is the core for the WSM ppathStepByStep.
Vector lstep
The length between ppath points.
Vector refellipsoid(Workspace &ws) noexcept
Vector f_grid(Workspace &ws) noexcept
Matrix sensor_pos(Workspace &ws) noexcept
void resize(Index r, Index c)
Resize function.
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)
Calculates 2D propagation path steps, with refraction, using a simple and fast ray tracing scheme.
Workspace methods and template functions for supergeneric XML IO.
void ppathWriteXMLPartial(const String &file_format, const Ppath &ppath, const String &f, const Index &file_index, const Verbosity &verbosity)
WORKSPACE METHOD: ppathWriteXMLPartial.
Vector nreal
The real part of the refractive index at each path position.
Vector lon_grid(Workspace &ws) noexcept
void nlinspace(Vector &x, const Numeric start, const Numeric stop, const Index n)
nlinspace
Numeric ppath_lmax(Workspace &ws) noexcept
Numeric ppath_lraytrace(Workspace &ws) noexcept
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.
void ppath_copy(Ppath &ppath1, const Ppath &ppath2, const Index &ncopy)
Copy the content in ppath2 to ppath1.
Structure to store a grid position.
Agenda ppath_agenda(Workspace &ws) noexcept
Propagation path structure and functions.
void find_tanpoint(Index &it, const Ppath &ppath)
Identifies the tangent point of a propagation path.
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.
Vector rte_pos2(Workspace &ws) noexcept
void geo_posEndOfPpath(Vector &geo_pos, const Ppath &ppath, const Verbosity &verbosity)
WORKSPACE METHOD: geo_posEndOfPpath.
void pol2cart(Numeric &x, Numeric &z, const Numeric &r, const Numeric &lat)
pol2cart
void ppath_step_geom_3d(Ppath &ppath, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstTensor3View z_field, ConstVectorView refellipsoid, ConstMatrixView z_surface, const Numeric &lmax)
Calculates 3D geometrical propagation path steps.
Tensor3 t_field(Workspace &ws) noexcept
Vector r
Radius of each ppath point.
Header file for special_interp.cc.
void get_refr_index_3d(Workspace &ws, Numeric &refr_index_air, Numeric &refr_index_air_group, const Agenda &refr_index_air_agenda, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstVectorView refellipsoid, ConstTensor3View z_field, ConstTensor3View t_field, ConstTensor4View vmr_field, ConstVectorView f_grid, const Numeric &r, const Numeric &lat, const Numeric &lon)
void poslos2cart(Numeric &x, Numeric &z, Numeric &dx, Numeric &dz, const Numeric &r, const Numeric &lat, const Numeric &za)
poslos2cart
void rte_pos2gridpos(GridPos &gp_p, GridPos &gp_lat, GridPos &gp_lon, const Index &atmosphere_dim, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstTensor3View z_field, ConstVectorView rte_pos)
Converts a geographical position (rte_pos) to grid positions for p, lat and lon.
Index file_index(Workspace &ws) noexcept
void diff_za_aa(Numeric &dza, Numeric &daa, const Numeric &za0, const Numeric &aa0, const Numeric &za, const Numeric &aa)
Takes the difference of zenith and azimuth angles.
void AddZaAa(Matrix &new_los, const Vector &ref_los, const Matrix &dlos, const Verbosity &)
WORKSPACE METHOD: AddZaAa.
void ppath_set_background(Ppath &ppath, const Index &case_nr)
Sets the background field of a Ppath structure.
INDEX Index
The type to use for all integer numbers and indices.
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.
Index ppath_what_background(const Ppath &ppath)
Returns the case number for the radiative background.
void distance3D(Numeric &l, const Numeric &r1, const Numeric &lat1, const Numeric &lon1, const Numeric &r2, const Numeric &lat2, const Numeric &lon2)
distance3D
Matrix pos
The distance between start pos and the last position in pos.
Index nelem() const
Number of elements.
Matrix sensor_los(Workspace &ws) noexcept
Index cloudbox_checked(Workspace &ws) noexcept
Matrix z_surface(Workspace &ws) noexcept
void filename_xml_with_index(String &filename, const Index &file_index, const String &varname, const Index &digits)
Gives the default filename, with file index, for the XML formats.
void distance2D(Numeric &l, const Numeric &r1, const Numeric &lat1, const Numeric &r2, const Numeric &lat2)
distance2D
The global header file for ARTS.
Index cloudbox_on(Workspace &ws) noexcept
This file contains basic functions to handle XML data files.
Template functions for general supergeneric ws methods.