ARTS 2.5.11 (git: 725533f0)
ppath.h
Go to the documentation of this file.
1
12#ifndef ppath_h
13#define ppath_h
14
15#include "array.h"
16#include "arts.h"
17#include "messages.h"
18#include "ppath_struct.h"
19
20class Agenda;
21class Workspace;
22
28constexpr Numeric POLELAT = 90 - 1e-8;
29
39constexpr Numeric ANGTOL = 1e-6;
40
41/*===========================================================================
42 === Functions from ppath.cc
43 ===========================================================================*/
44
60void add_za_aa(Numeric& za,
61 Numeric& aa,
62 const Numeric& za0,
63 const Numeric& aa0,
64 const Numeric& dza,
65 const Numeric& daa);
66
89void cart2zaaa(Numeric& za,
90 Numeric& aa,
91 const Numeric& dx,
92 const Numeric& dy,
93 const Numeric& dz);
94
117void zaaa2cart(Numeric& dx,
118 Numeric& dy,
119 Numeric& dz,
120 const Numeric& za,
121 const Numeric& aa);
122
138void enu2zaaa(Numeric& za,
139 Numeric& aa,
140 const Numeric& de,
141 const Numeric& dn,
142 const Numeric& du);
143
159void zaaa2enu(Numeric& de,
160 Numeric& dn,
161 Numeric& du,
162 const Numeric& za,
163 const Numeric& aa);
164
180void diff_za_aa(Numeric& dza,
181 Numeric& daa,
182 const Numeric& za0,
183 const Numeric& aa0,
184 const Numeric& za,
185 const Numeric& aa);
186
194void error_if_limb_ppath(const Ppath& ppath);
195
209void find_tanpoint(Index& it, const Ppath& ppath);
210
223Index first_pos_before_altitude(const Ppath& p, const Numeric& alt);
224
237Numeric geometrical_ppc(const Numeric& r, const Numeric& za);
238
254Numeric geompath_lat_at_za(const Numeric& za0,
255 const Numeric& lat0,
256 const Numeric& za);
257
271Numeric geompath_l_at_r(const Numeric& ppc, const Numeric& r);
272
286Numeric geompath_r_at_l(const Numeric& ppc, const Numeric& l);
287
306Numeric geompath_za_at_r(const Numeric& ppc,
307 const Numeric& a_za,
308 const Numeric& r);
309
329bool is_los_downwards(const Numeric& za, const Numeric& tilt);
330
344Numeric plevel_angletilt(const Numeric& r, const Numeric& c);
345
371void plevel_slope_2d(Numeric& c1,
372 ConstVectorView lat_grid,
373 ConstVectorView refellipsoid,
374 ConstVectorView z_surf,
375 const GridPos& gp,
376 const Numeric& za);
377
402void plevel_slope_3d(Numeric& c1,
403 Numeric& c2,
404 ConstVectorView lat_grid,
405 ConstVectorView lon_grid,
406 ConstVectorView refellipsoid,
407 ConstMatrixView z_surf,
408 const GridPos& gp_lat,
409 const GridPos& gp_lon,
410 const Numeric& aa);
411
440 Ppath& ppath,
441 const Agenda& ppath_step_agenda,
442 const Index& atmosphere_dim,
443 const Vector& p_grid,
444 const Vector& lat_grid,
445 const Vector& lon_grid,
446 const Tensor3& z_field,
447 const Vector& f_grid,
448 const Vector& refellipsoid,
449 const Matrix& z_surface,
450 const Index& cloudbox_on,
451 const ArrayOfIndex& cloudbox_limits,
452 const Vector& rte_pos,
453 const Vector& rte_los,
454 const Numeric& ppath_lmax,
455 const Numeric& ppath_lraytrace,
456 const bool& ppath_inside_cloudbox_do,
457 const Verbosity& verbosity);
458
473void ppath_copy(Ppath& ppath1, const Ppath& ppath2, const Index& ncopy);
474
489void ppath_init_structure(Ppath& ppath,
490 const Index& atmosphere_dim,
491 const Index& np);
492
511void ppath_set_background(Ppath& ppath, const Index& case_nr);
512
556void ppath_start_stepping(Ppath& ppath,
557 const Index& atmosphere_dim,
558 ConstVectorView p_grid,
559 ConstVectorView lat_grid,
560 ConstVectorView lon_grid,
561 ConstTensor3View z_field,
562 ConstVectorView refellipsoid,
563 ConstMatrixView z_surface,
564 const Index& cloudbox_on,
565 const ArrayOfIndex& cloudbox_limits,
566 const bool& outside_cloudbox,
567 ConstVectorView rte_pos,
568 ConstVectorView rte_los,
569 const Verbosity& verbosity);
570
595void ppath_step_geom_1d(Ppath& ppath,
596 ConstVectorView z_field,
597 ConstVectorView refellipsoid,
598 const Numeric& z_surface,
599 const Numeric& lmax);
600
616void ppath_step_geom_2d(Ppath& ppath,
617 ConstVectorView lat_grid,
618 ConstMatrixView z_field,
619 ConstVectorView refellipsoid,
620 ConstVectorView z_surface,
621 const Numeric& lmax);
622
639void ppath_step_geom_3d(Ppath& ppath,
640 ConstVectorView lat_grid,
641 ConstVectorView lon_grid,
642 ConstTensor3View z_field,
643 ConstVectorView refellipsoid,
644 ConstMatrixView z_surface,
645 const Numeric& lmax);
646
674 Ppath& ppath,
675 ConstVectorView p_grid,
676 ConstTensor3View z_field,
677 ConstTensor3View t_field,
678 ConstTensor4View vmr_field,
679 ConstVectorView f_grid,
680 ConstVectorView refellipsoid,
681 const Numeric& z_surface,
682 const Numeric& lmax,
683 const Agenda& refr_index_agenda,
684 const String& rtrace_method,
685 const Numeric& lraytrace);
686
713 Ppath& ppath,
714 ConstVectorView p_grid,
715 ConstVectorView lat_grid,
716 ConstTensor3View z_field,
717 ConstTensor3View t_field,
718 ConstTensor4View vmr_field,
719 ConstVectorView f_grid,
720 ConstVectorView refellipsoid,
721 ConstVectorView z_surface,
722 const Numeric& lmax,
723 const Agenda& refr_index_agenda,
724 const String& rtrace_method,
725 const Numeric& lraytrace);
726
754 Ppath& ppath,
755 ConstVectorView p_grid,
756 ConstVectorView lat_grid,
757 ConstVectorView lon_grid,
758 ConstTensor3View z_field,
759 ConstTensor3View t_field,
760 ConstTensor4View vmr_field,
761 ConstVectorView f_grid,
762 ConstVectorView refellipsoid,
763 ConstMatrixView z_surface,
764 const Numeric& lmax,
765 const Agenda& refr_index_agenda,
766 const String& rtrace_method,
767 const Numeric& lraytrace);
768
780Index ppath_what_background(const Ppath& ppath);
781
803void resolve_lon(Numeric& lon, const Numeric& lon5, const Numeric& lon6);
804
827void zaaa2cart(Numeric& dx,
828 Numeric& dy,
829 Numeric& dz,
830 const Numeric& za,
831 const Numeric& aa);
832
833#endif // ppath_h
This file contains the definition of Array.
The global header file for ARTS.
The Agenda class.
Workspace class.
Array< WorkspaceVariable > ws
Workspace variable container.
Declarations having to do with the four output streams.
constexpr Numeric POLELAT
Size of north and south poles.
Definition ppath.h:28
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)
Calculates 3D propagation path steps, with refraction, using a simple and fast ray tracing scheme.
Definition ppath.cc:4300
bool is_los_downwards(const Numeric &za, const Numeric &tilt)
Determines if a line-of-sight is downwards compared to the angular tilt of the surface or a pressure ...
Definition ppath.cc:606
void zaaa2cart(Numeric &dx, Numeric &dy, Numeric &dz, const Numeric &za, const Numeric &aa)
Converts zenith and azimuth angles to a cartesian unit vector.
Definition ppath.cc:296
Numeric geompath_r_at_l(const Numeric &ppc, const Numeric &l)
Calculates the radius for a distance from the tangent point.
Definition ppath.cc:153
void error_if_limb_ppath(const Ppath &ppath)
Throws an error if ppath altitudes not are strictly increasing or decreasing.
Definition ppath.cc:524
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.
Definition ppath.cc:413
Index ppath_what_background(const Ppath &ppath)
Returns the case number for the radiative background.
Definition ppath.cc:1460
Index first_pos_before_altitude(const Ppath &p, const Numeric &alt)
Determines ppath position just below an altitude.
Definition ppath.cc:506
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)
Initiates a Ppath structure for calculation of a path with ppath_step.
Definition ppath.cc:4460
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.
Definition ppath.cc:3235
constexpr Numeric ANGTOL
Width of zenith and nadir directions.
Definition ppath.h:39
Numeric geometrical_ppc(const Numeric &r, const Numeric &za)
Calculates the propagation path constant for pure geometrical calculations.
Definition ppath.cc:80
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.
Definition ppath.cc:375
void zaaa2enu(Numeric &de, Numeric &dn, Numeric &du, const Numeric &za, const Numeric &aa)
Converts zenith and azimuth angles to ENU unit vector.
Definition ppath.cc:319
void ppath_copy(Ppath &ppath1, const Ppath &ppath2, const Index &ncopy)
Copy the content in ppath2 to ppath1.
Definition ppath.cc:1480
void enu2zaaa(Numeric &za, Numeric &aa, const Numeric &de, const Numeric &dn, const Numeric &du)
Converts ENU unit vector vector to zenith and azimuth.
Definition ppath.cc:310
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)
Calculates the radial slope of the surface or a pressure level for 3D.
Definition ppath.cc:1129
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.
Definition ppath.cc:2701
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.
Definition ppath.cc:87
void cart2zaaa(Numeric &za, Numeric &aa, const Numeric &dx, const Numeric &dy, const Numeric &dz)
Converts a cartesian directional vector to zenith and azimuth.
Definition ppath.cc:283
void find_tanpoint(Index &it, const Ppath &ppath)
Identifies the tangent point of a propagation path.
Definition ppath.cc:494
void ppath_set_background(Ppath &ppath, const Index &case_nr)
Sets the background field of a Ppath structure.
Definition ppath.cc:1434
void resolve_lon(Numeric &lon, const Numeric &lon5, const Numeric &lon6)
Resolves which longitude angle that shall be used.
Definition ppath.cc:484
Numeric geompath_lat_at_za(const Numeric &za0, const Numeric &lat0, const Numeric &za)
Calculates the latitude for a given zenith angle along a geometrical propagation path.
Definition ppath.cc:132
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)
Calculates 2D propagation path steps, with refraction, using a simple and fast ray tracing scheme.
Definition ppath.cc:3885
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.
Definition ppath.cc:5162
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)
Calculates 1D propagation path steps including effects of refraction.
Definition ppath.cc:3541
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.
Definition ppath.cc:2337
void ppath_init_structure(Ppath &ppath, const Index &atmosphere_dim, const Index &np)
Initiates a Ppath structure to hold the given number of points.
Definition ppath.cc:1393
Numeric plevel_angletilt(const Numeric &r, const Numeric &c)
Calculates the angular tilt of the surface or a pressure level.
Definition ppath.cc:600
Numeric geompath_l_at_r(const Numeric &ppc, const Numeric &r)
Calculates the length from the tangent point for the given radius.
Definition ppath.cc:142
void plevel_slope_2d(Numeric &c1, ConstVectorView lat_grid, ConstVectorView refellipsoid, ConstVectorView z_surf, const GridPos &gp, const Numeric &za)
Calculates the radial slope of the surface or a pressure level for 2D.
Definition ppath.cc:563
Structure to store a grid position.
The structure to describe a propagation path and releated quantities.
#define c