ARTS  2.2.66
ppath.h
Go to the documentation of this file.
1 /* Copyright (C) 2002-2012 Patrick Eriksson <Patrick.Eriksson@chalmers.se>
2 
3  This program is free software; you can redistribute it and/or modify it
4  under the terms of the GNU General Public License as published by the
5  Free Software Foundation; either version 2, or (at your option) any
6  later version.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16  USA. */
17 
18 
19 
20 /*===========================================================================
21  === File description
22  ===========================================================================*/
23 
36 #ifndef ppath_h
37 #define ppath_h
38 
39 
40 #include "agenda_class.h"
41 #include "array.h"
42 #include "arts.h"
43 #include "interpolation.h"
44 #include "matpackI.h"
45 #include "mystring.h"
46 
47 
48 
49 /*===========================================================================
50  === The Ppath structure
51  ===========================================================================*/
52 
54 
59 struct Ppath {
79 };
80 
81 
84 
85 
86 
87 /*===========================================================================
88  === South/north pole, nadir/zenith
89  ===========================================================================*/
90 
91 // Latitudes with an absolute value > POLELAT are considered to be on
92 // the south or north pole for 3D.
93 //
94 const Numeric POLELAT = 90-1e-8;
95 
96 // This variable defines how much zenith and azimuth angles can
97 // deviate from 0, 90 and 180 degrees, but still be treated to be 0,
98 // 90 or 180. For example, an azimuth angle of 180-0.999*ANGTOL will
99 // be treated as a strictly southward observation. However, the
100 // angles are not allowed to go outside their defined range. This
101 // means, for example, that values above 180 are never allowed.
102 //
103 const Numeric ANGTOL = 1e-6;
104 
105 
106 
107 
108 /*===========================================================================
109  === Functions from ppath.cc
110  ===========================================================================*/
111 
112 Numeric geometrical_ppc( const Numeric& r, const Numeric& za );
113 
115  const Numeric& ppc,
116  const Numeric& a_za,
117  const Numeric& r );
118 
120  const Numeric& za0,
121  const Numeric& lat0,
122  const Numeric& za );
123 
124 void cart2zaaa(
125  Numeric& za,
126  Numeric& aa,
127  const Numeric& dx,
128  const Numeric& dy,
129  const Numeric& dz );
130 
131 void zaaa2cart(
132  Numeric& dx,
133  Numeric& dy,
134  Numeric& dz,
135  const Numeric& za,
136  const Numeric& aa );
137 
138 void map_daa(
139  Numeric& za,
140  Numeric& aa,
141  const Numeric& za0,
142  const Numeric& aa0,
143  const Numeric& aa_grid );
144 
145 void find_tanpoint(
146  Index& it,
147  const Ppath ppath );
148 
149 void plevel_slope_2d(
150  Numeric& c1,
151  ConstVectorView lat_grid,
152  ConstVectorView refellipsoid,
153  ConstVectorView z_surf,
154  const GridPos& gp,
155  const Numeric& za );
156 
157 void plevel_slope_3d(
158  Numeric& c1,
159  Numeric& c2,
160  ConstVectorView lat_grid,
161  ConstVectorView lon_grid,
162  ConstVectorView refellipsoid,
163  ConstMatrixView z_surf,
164  const GridPos& gp_lat,
165  const GridPos& gp_lon,
166  const Numeric& aa );
167 
168 bool is_los_downwards(
169  const Numeric& za,
170  const Numeric& tilt );
171 
173  const Numeric& r,
174  const Numeric& c );
175 
177  Ppath& ppath,
178  const Index& atmosphere_dim,
179  const Index& np );
180 
182  Ppath& ppath,
183  const Index& case_nr );
184 
185 Index ppath_what_background( const Ppath& ppath );
186 
187 void ppath_copy(
188  Ppath& ppath1,
189  const Ppath& ppath2,
190  const Index& ncopy );
191 
192 void ppath_step_geom_1d(
193  Ppath& ppath,
194  ConstVectorView z_field,
195  ConstVectorView refellipsoid,
196  const Numeric& z_surface,
197  const Numeric& lmax );
198 
200  Ppath& ppath,
201  ConstVectorView z_field,
202  ConstVectorView refellipsoid,
203  const Numeric& z_surface,
204  const Index& cloudbox_on,
205  const ArrayOfIndex& cloudbox_limits );
206 
207 void ppath_step_geom_2d(
208  Ppath& ppath,
209  ConstVectorView lat_grid,
210  ConstMatrixView z_field,
211  ConstVectorView refellipsoid,
212  ConstVectorView z_surface,
213  const Numeric& lmax );
214 
215 void ppath_step_geom_3d(
216  Ppath& ppath,
217  ConstVectorView lat_grid,
218  ConstVectorView lon_grid,
219  ConstTensor3View z_field,
220  ConstVectorView refellipsoid,
221  ConstMatrixView z_surface,
222  const Numeric& lmax );
223 
224 void ppath_step_refr_1d(
225  Workspace& ws,
226  Ppath& ppath,
227  ConstVectorView p_grid,
228  ConstTensor3View z_field,
229  ConstTensor3View t_field,
230  ConstTensor4View vmr_field,
231  ConstVectorView f_grid,
232  ConstVectorView refellipsoid,
233  const Numeric& z_surface,
234  const Numeric& lmax,
235  const Agenda& refr_index_agenda,
236  const String& rtrace_method,
237  const Numeric& lraytrace );
238 
239 void ppath_step_refr_2d(
240  Workspace& ws,
241  Ppath& ppath,
242  ConstVectorView p_grid,
243  ConstVectorView lat_grid,
244  ConstTensor3View z_field,
245  ConstTensor3View t_field,
246  ConstTensor4View vmr_field,
247  ConstVectorView f_grid,
248  ConstVectorView refellipsoid,
249  ConstVectorView z_surface,
250  const Numeric& lmax,
251  const Agenda& refr_index_agenda,
252  const String& rtrace_method,
253  const Numeric& lraytrace );
254 
255 void ppath_step_refr_3d(
256  Workspace& ws,
257  Ppath& ppath,
258  ConstVectorView p_grid,
259  ConstVectorView lat_grid,
260  ConstVectorView lon_grid,
261  ConstTensor3View z_field,
262  ConstTensor3View t_field,
263  ConstTensor4View vmr_field,
264  ConstVectorView f_grid,
265  ConstVectorView refellipsoid,
266  ConstMatrixView z_surface,
267  const Numeric& lmax,
268  const Agenda& refr_index_agenda,
269  const String& rtrace_method,
270  const Numeric& lraytrace );
271 
273  Ppath& ppath,
274  const Index& atmosphere_dim,
275  ConstVectorView p_grid,
276  ConstVectorView lat_grid,
277  ConstVectorView lon_grid,
278  ConstTensor3View z_field,
279  ConstVectorView refellipsoid,
280  ConstMatrixView z_surface,
281  const Index & cloudbox_on,
282  const ArrayOfIndex & cloudbox_limits,
283  const bool & outside_cloudbox,
284  ConstVectorView rte_pos,
285  ConstVectorView rte_los,
286  const Verbosity& verbosity);
287 
288 void ppath_calc(
289  Workspace& ws,
290  Ppath& ppath,
291  const Agenda& ppath_step_agenda,
292  const Index& atmosphere_dim,
293  const Vector& p_grid,
294  const Vector& lat_grid,
295  const Vector& lon_grid,
296  const Tensor3& t_field,
297  const Tensor3& z_field,
298  const Tensor4& vmr_field,
299  const Vector& f_grid,
300  const Vector& refellipsoid,
301  const Matrix& z_surface,
302  const Index& cloudbox_on,
303  const ArrayOfIndex& cloudbox_limits,
304  const Vector& rte_pos,
305  const Vector& rte_los,
306  const Numeric& ppath_lraytrace,
307  const bool& ppath_inside_cloudbox_do,
308  const Verbosity& verbosity);
309 
310 #endif // ppath_h
Matrix
The Matrix class.
Definition: matpackI.h:788
find_tanpoint
void find_tanpoint(Index &it, const Ppath ppath)
find_tanpoint
Definition: ppath.cc:705
ANGTOL
const Numeric ANGTOL
Definition: ppath.h:103
ppath_calc
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
Definition: ppath.cc:5344
zaaa2cart
void zaaa2cart(Numeric &dx, Numeric &dy, Numeric &dz, const Numeric &za, const Numeric &aa)
zaaa2cart
Definition: ppath.cc:484
Tensor3
The Tensor3 class.
Definition: matpackIII.h:348
geometrical_ppc
Numeric geometrical_ppc(const Numeric &r, const Numeric &za)
geometrical_ppc
Definition: ppath.cc:118
interpolation.h
Header file for interpolation.cc.
Ppath::background
String background
Definition: ppath.h:63
POLELAT
const Numeric POLELAT
Definition: ppath.h:94
Ppath::end_lstep
Numeric end_lstep
Definition: ppath.h:73
Ppath::start_lstep
Numeric start_lstep
Definition: ppath.h:66
plevel_slope_2d
void plevel_slope_2d(Numeric &c1, ConstVectorView lat_grid, ConstVectorView refellipsoid, ConstVectorView z_surf, const GridPos &gp, const Numeric &za)
plevel_slope_2d
Definition: ppath.cc:782
Tensor4
The Tensor4 class.
Definition: matpackIV.h:383
array.h
This file contains the definition of Array.
plevel_angletilt
Numeric plevel_angletilt(const Numeric &r, const Numeric &c)
plevel_angletilt
Definition: ppath.cc:844
Ppath
The structure to describe a propagation path and releated quantities.
Definition: ppath.h:59
Ppath::gp_p
ArrayOfGridPos gp_p
Definition: ppath.h:76
Agenda
The Agenda class.
Definition: agenda_class.h:44
Ppath::end_pos
Vector end_pos
Definition: ppath.h:71
dx
#define dx
Definition: continua.cc:21928
ConstTensor4View
A constant view of a Tensor4.
Definition: matpackIV.h:141
matpackI.h
ppath_init_structure
void ppath_init_structure(Ppath &ppath, const Index &atmosphere_dim, const Index &np)
ppath_init_structure
Definition: ppath.cc:1726
ppath_copy
void ppath_copy(Ppath &ppath1, const Ppath &ppath2, const Index &ncopy)
ppath_copy
Definition: ppath.cc:1876
Array< GridPos >
ppath_what_background
Index ppath_what_background(const Ppath &ppath)
ppath_what_background
Definition: ppath.cc:1835
agenda_class.h
Declarations for agendas.
Ppath::gp_lat
ArrayOfGridPos gp_lat
Definition: ppath.h:77
Ppath::ngroup
Vector ngroup
Definition: ppath.h:75
my_basic_string< char >
Ppath::los
Matrix los
Definition: ppath.h:68
Ppath::start_pos
Vector start_pos
Definition: ppath.h:64
Ppath::gp_lon
ArrayOfGridPos gp_lon
Definition: ppath.h:78
ppath_step_refr_2d
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
Definition: ppath.cc:4121
Ppath::np
Index np
Definition: ppath.h:61
ppath_step_refr_1d
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
Definition: ppath.cc:3809
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:29
Verbosity
Definition: messages.h:50
ppath_step_geom_2d
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
Definition: ppath.cc:3136
ppath_step_geom_1d
void ppath_step_geom_1d(Ppath &ppath, ConstVectorView z_field, ConstVectorView refellipsoid, const Numeric &z_surface, const Numeric &lmax)
ppath_step_geom_1d
Definition: ppath.cc:2783
ppath_set_background
void ppath_set_background(Ppath &ppath, const Index &case_nr)
ppath_set_background
Definition: ppath.cc:1790
Ppath::lstep
Vector lstep
Definition: ppath.h:70
Ppath::start_los
Vector start_los
Definition: ppath.h:65
map_daa
void map_daa(Numeric &za, Numeric &aa, const Numeric &za0, const Numeric &aa0, const Numeric &aa_grid)
Definition: ppath.cc:576
ppath_start_stepping
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
Definition: ppath.cc:4606
Ppath::nreal
Vector nreal
Definition: ppath.h:74
geompath_lat_at_za
Numeric geompath_lat_at_za(const Numeric &za0, const Numeric &lat0, const Numeric &za)
geompath_lat_at_za
Definition: ppath.cc:218
ConstMatrixView
A constant view of a Matrix.
Definition: matpackI.h:596
Ppath::end_los
Vector end_los
Definition: ppath.h:72
geompath_za_at_r
Numeric geompath_za_at_r(const Numeric &ppc, const Numeric &a_za, const Numeric &r)
geompath_za_at_r
Definition: ppath.cc:147
ArrayOfPpath
Array< Ppath > ArrayOfPpath
An array of propagation paths.
Definition: ppath.h:83
GridPos
Structure to store a grid position.
Definition: interpolation.h:74
Ppath::constant
Numeric constant
Definition: ppath.h:62
ppath_step_refr_3d
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
Definition: ppath.cc:4466
Workspace
Workspace class.
Definition: workspace_ng.h:47
ConstTensor3View
A constant view of a Tensor3.
Definition: matpackIII.h:139
Ppath::r
Vector r
Definition: ppath.h:69
plevel_slope_3d
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
Definition: ppath.cc:1435
ppath_step_geom_3d
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
Definition: ppath.cc:3553
cart2zaaa
void cart2zaaa(Numeric &za, Numeric &aa, const Numeric &dx, const Numeric &dy, const Numeric &dz)
cart2zaaa
Definition: ppath.cc:443
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:35
is_los_downwards
bool is_los_downwards(const Numeric &za, const Numeric &tilt)
is_los_downwards
Definition: ppath.cc:875
Ppath::dim
Index dim
Definition: ppath.h:60
Vector
The Vector class.
Definition: matpackI.h:556
ppath_geom_updown_1d
void ppath_geom_updown_1d(Ppath &ppath, ConstVectorView z_field, ConstVectorView refellipsoid, const Numeric &z_surface, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits)
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:292
Ppath::pos
Matrix pos
Definition: ppath.h:67
mystring.h
This file contains the definition of String, the ARTS string class.
arts.h
The global header file for ARTS.