ARTS  2.2.66
rte.h
Go to the documentation of this file.
1 /* Copyright (C) 2002-2012
2  Patrick Eriksson <Patrick.Eriksson@chalmers.se>
3  Stefan Buehler <sbuehler@ltu.se>
4 
5  This program is free software; you can redistribute it and/or modify it
6  under the terms of the GNU General Public License as published by the
7  Free Software Foundation; either version 2, or (at your option) any
8  later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18  USA. */
19 
20 
21 
22 /*===========================================================================
23  === File description
24  ===========================================================================*/
25 
36 #ifndef rte_h
37 #define rte_h
38 
39 /*===========================================================================
40  === External declarations
41  ===========================================================================*/
42 
43 #include "agenda_class.h"
44 #include "arts.h"
45 #include "auto_md.h"
46 #include "complex.h"
47 #include "jacobian.h"
48 #include "ppath.h"
49 #include "matpackI.h"
50 #include "matpackII.h"
51 #include "matpackIII.h"
52 #include "optproperties.h"
53 
54 
55 
56 /*===========================================================================
57  === Functions in rte.cc
58  ===========================================================================*/
59 
60 void adjust_los(
61  VectorView los,
62  const Index & atmosphere_dim );
63 
64 void apply_iy_unit(
65  MatrixView iy,
66  const String& y_unit,
67  ConstVectorView f_grid,
68  const Numeric& n,
69  const ArrayOfIndex& i_pol );
70 
71 void apply_iy_unit2(
72  Tensor3View J,
73  ConstMatrixView iy,
74  const String& y_unit,
75  ConstVectorView f_grid,
76  const Numeric& n,
77  const ArrayOfIndex& i_pol );
78 
79 void bending_angle1d(
80  Numeric& alpha,
81  const Ppath& ppath );
82 
83 void defocusing_general(
84  Workspace& ws,
85  Numeric& dlf,
86  const Agenda& ppath_step_agenda,
87  const Index& atmosphere_dim,
88  ConstVectorView p_grid,
89  ConstVectorView lat_grid,
90  ConstVectorView lon_grid,
91  ConstTensor3View t_field,
92  ConstTensor3View z_field,
93  ConstTensor4View vmr_field,
94  ConstVectorView f_grid,
95  ConstVectorView refellipsoid,
96  ConstMatrixView z_surface,
97  const Ppath& ppath,
98  const Numeric& ppath_lraytrace,
99  const Numeric& dza,
100  const Verbosity& verbosity );
101 
102 void defocusing_sat2sat(
103  Workspace& ws,
104  Numeric& dlf,
105  const Agenda& ppath_step_agenda,
106  const Index& atmosphere_dim,
107  ConstVectorView p_grid,
108  ConstVectorView lat_grid,
109  ConstVectorView lon_grid,
110  ConstTensor3View t_field,
111  ConstTensor3View z_field,
112  ConstTensor4View vmr_field,
113  ConstVectorView f_grid,
114  ConstVectorView refellipsoid,
115  ConstMatrixView z_surface,
116  const Ppath& ppath,
117  const Numeric& ppath_lraytrace,
118  const Numeric& dza,
119  const Verbosity& verbosity );
120 
122  ConstVectorView los,
123  const Numeric& u,
124  const Numeric& v,
125  const Numeric& w,
126  const Index& atmosphere_dim );
127 
128 void emission_rtstep(
129  Matrix& iy,
130  const Index& stokes_dim,
131  ConstVectorView bbar,
132  ArrayOfIndex& extmat_case,
133  ConstTensor3View t );
134 
135 void ext2trans(
136  MatrixView trans_mat,
137  Index& icase,
138  ConstMatrixView ext_mat_av,
139  const Numeric& l_step );
140 
141 void get_iy(
142  Workspace& ws,
143  Matrix& iy,
144  ConstTensor3View t_field,
145  ConstTensor3View z_field,
146  ConstTensor4View vmr_field,
147  const Index& cloudbox_on,
148  ConstVectorView f_grid,
149  ConstVectorView rte_pos,
150  ConstVectorView rte_los,
151  ConstVectorView rte_pos2,
152  const Agenda& iy_main_agenda );
153 
155  Workspace& ws,
156  Matrix& iy,
157  ArrayOfTensor3& diy_dx,
158  ConstTensor3View iy_transmission,
159  const Index& jacobian_do,
160  const Ppath& ppath,
161  ConstVectorView rte_pos2,
162  const Index& atmosphere_dim,
163  ConstTensor3View t_field,
164  ConstTensor3View z_field,
165  ConstTensor4View vmr_field,
166  const Index& cloudbox_on,
167  const Index& stokes_dim,
168  ConstVectorView f_grid,
169  const Agenda& iy_main_agenda,
170  const Agenda& iy_space_agenda,
171  const Agenda& iy_surface_agenda,
172  const Agenda& iy_cloudbox_agenda,
173  const Verbosity& verbosity);
174 
175 void get_ppath_atmvars(
176  Vector& ppath_p,
177  Vector& ppath_t,
178  Matrix& ppath_vmr,
179  Matrix& ppath_wind,
180  Matrix& ppath_mag,
181  const Ppath& ppath,
182  const Index& atmosphere_dim,
183  ConstVectorView p_grid,
184  ConstTensor3View t_field,
185  ConstTensor4View vmr_field,
186  ConstTensor3View wind_u_field,
187  ConstTensor3View wind_v_field,
188  ConstTensor3View wind_w_field,
189  ConstTensor3View mag_u_field,
190  ConstTensor3View mag_v_field,
191  ConstTensor3View mag_w_field );
192 
193 void get_ppath_abs(
194  Workspace& ws,
195  Tensor4& ppath_abs,
196  Tensor5& abs_per_species,
197  const Agenda& propmat_clearsky_agenda,
198  const Ppath& ppath,
199  ConstVectorView ppath_p,
200  ConstVectorView ppath_t,
201  ConstMatrixView ppath_vmr,
202  ConstMatrixView ppath_f,
203  ConstMatrixView ppath_mag,
204  ConstVectorView f_grid,
205  const Index& stokes_dim,
206  const ArrayOfIndex& ispecies );
207 
208 void get_ppath_blackrad(
209  Workspace& ws,
210  Matrix& ppath_blackrad,
211  const Agenda& blackbody_radiation_agenda,
212  const Ppath& ppath,
213  ConstVectorView ppath_t,
214  ConstMatrixView ppath_f );
215 
216 void get_ppath_ext(
217  ArrayOfIndex& clear2cloudbox,
218  Tensor3& pnd_abs_vec,
219  Tensor4& pnd_ext_mat,
221  Matrix& ppath_pnd,
222  const Ppath& ppath,
223  ConstVectorView ppath_t,
224  const Index& stokes_dim,
225  ConstMatrixView ppath_f,
226  const Index& atmosphere_dim,
227  const ArrayOfIndex& cloudbox_limits,
228  const Tensor4& pnd_field,
229  const Index& use_mean_scat_data,
230  const ArrayOfSingleScatteringData& scat_data_array,
231  const Verbosity& verbosity );
232 
233 void get_ppath_f(
234  Matrix& ppath_f,
235  const Ppath& ppath,
236  ConstVectorView f_grid,
237  const Index& atmosphere_dim,
238  const Numeric& rte_alonglos_v,
239  ConstMatrixView ppath_wind );
240 
241 void get_ppath_trans(
242  Tensor4& trans_partial,
243  ArrayOfArrayOfIndex& extmat_case,
244  Tensor4& trans_cumulat,
245  Vector& scalar_tau,
246  const Ppath& ppath,
247  ConstTensor4View& ppath_abs,
248  ConstVectorView f_grid,
249  const Index& stokes_dim );
250 
251 void get_ppath_trans2(
252  Tensor4& trans_partial,
253  ArrayOfArrayOfIndex& extmat_case,
254  Tensor4& trans_cumulat,
255  Vector& scalar_tau,
256  const Ppath& ppath,
257  ConstTensor4View& ppath_abs,
258  ConstVectorView f_grid,
259  const Index& stokes_dim,
260  const ArrayOfIndex& clear2cloudbox,
261  ConstTensor4View pnd_ext_mat );
262 
264  const Sparse& sensor_response,
265  const Index& imblock );
266 
268  Tensor3& iy_trans_total,
269  ConstTensor3View iy_trans_old,
270  ConstTensor3View iy_trans_new );
271 
272 void iyb_calc(
273  Workspace& ws,
274  Vector& iyb,
275  ArrayOfVector& iyb_aux,
276  ArrayOfMatrix& diyb_dx,
277  const Index& imblock,
278  const Index& atmosphere_dim,
279  ConstTensor3View t_field,
280  ConstTensor3View z_field,
281  ConstTensor4View vmr_field,
282  const Index& cloudbox_on,
283  const Index& stokes_dim,
284  ConstVectorView f_grid,
285  ConstMatrixView sensor_pos,
286  ConstMatrixView sensor_los,
287  ConstMatrixView transmitter_pos,
288  ConstVectorView mblock_za_grid,
289  ConstVectorView mblock_aa_grid,
290  const Index& antenna_dim,
291  const Agenda& iy_main_agenda,
292  const Index& j_analytical_do,
293  const ArrayOfRetrievalQuantity& jacobian_quantities,
294  const ArrayOfArrayOfIndex& jacobian_indices,
295  const ArrayOfString& iy_aux_vars,
296  const Verbosity& verbosity );
297 
298 void mirror_los(
299  Vector& los_mirrored,
300  ConstVectorView los,
301  const Index& atmosphere_dim );
302 
303 void pos2true_latlon(
304  Numeric& lat,
305  Numeric& lon,
306  const Index& atmosphere_dim,
307  ConstVectorView lat_grid,
308  ConstVectorView lat_true,
309  ConstVectorView lon_true,
310  ConstVectorView pos );
311 
312 void surface_calc(
313  Matrix& iy,
315  ConstMatrixView surface_los,
316  ConstTensor4View surface_rmatrix,
317  ConstMatrixView surface_emission );
318 
319 #endif // rte_h
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:35
The VectorView class.
Definition: matpackI.h:372
A class implementing complex numbers for ARTS.
void get_ppath_abs(Workspace &ws, Tensor4 &ppath_abs, Tensor5 &abs_per_species, const Agenda &propmat_clearsky_agenda, const Ppath &ppath, ConstVectorView ppath_p, ConstVectorView ppath_t, ConstMatrixView ppath_vmr, ConstMatrixView ppath_f, ConstMatrixView ppath_mag, ConstVectorView f_grid, const Index &stokes_dim, const ArrayOfIndex &ispecies)
get_ppath_abs
Definition: rte.cc:1351
The Agenda class.
Definition: agenda_class.h:44
void defocusing_sat2sat(Workspace &ws, Numeric &dlf, const Agenda &ppath_step_agenda, const Index &atmosphere_dim, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstTensor3View t_field, ConstTensor3View z_field, ConstTensor4View vmr_field, ConstVectorView f_grid, ConstVectorView refellipsoid, ConstMatrixView z_surface, const Ppath &ppath, const Numeric &ppath_lraytrace, const Numeric &dza, const Verbosity &verbosity)
defocusing_sat2sat
Definition: rte.cc:663
void bending_angle1d(Numeric &alpha, const Ppath &ppath)
bending_angle1d
Definition: rte.cc:353
Declarations required for the calculation of jacobians.
The Vector class.
Definition: matpackI.h:556
The MatrixView class.
Definition: matpackI.h:679
void mirror_los(Vector &los_mirrored, ConstVectorView los, const Index &atmosphere_dim)
mirror_los
Definition: rte.cc:2389
The Sparse class.
Definition: matpackII.h:55
The Tensor4 class.
Definition: matpackIV.h:383
The range class.
Definition: matpackI.h:148
void adjust_los(VectorView los, const Index &atmosphere_dim)
adjust_los
Definition: rte.cc:81
void apply_iy_unit(MatrixView iy, const String &y_unit, ConstVectorView f_grid, const Numeric &n, const ArrayOfIndex &i_pol)
apply_iy_unit
Definition: rte.cc:127
cmplx FADDEEVA() w(cmplx z, double relerr)
Definition: Faddeeva.cc:679
void ext2trans(MatrixView trans_mat, Index &icase, ConstMatrixView ext_mat_av, const Numeric &l_step)
Definition: rte.cc:903
void get_ppath_blackrad(Workspace &ws, Matrix &ppath_blackrad, const Agenda &blackbody_radiation_agenda, const Ppath &ppath, ConstVectorView ppath_t, ConstMatrixView ppath_f)
get_ppath_blackrad
Definition: rte.cc:1487
void iyb_calc(Workspace &ws, Vector &iyb, ArrayOfVector &iyb_aux, ArrayOfMatrix &diyb_dx, const Index &imblock, const Index &atmosphere_dim, ConstTensor3View t_field, ConstTensor3View z_field, ConstTensor4View vmr_field, const Index &cloudbox_on, const Index &stokes_dim, ConstVectorView f_grid, ConstMatrixView sensor_pos, ConstMatrixView sensor_los, ConstMatrixView transmitter_pos, ConstVectorView mblock_za_grid, ConstVectorView mblock_aa_grid, const Index &antenna_dim, const Agenda &iy_main_agenda, const Index &j_analytical_do, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfIndex &jacobian_indices, const ArrayOfString &iy_aux_vars, const Verbosity &verbosity)
iyb_calc
Definition: rte.cc:2101
void get_iy(Workspace &ws, Matrix &iy, ConstTensor3View t_field, ConstTensor3View z_field, ConstTensor4View vmr_field, const Index &cloudbox_on, ConstVectorView f_grid, ConstVectorView rte_pos, ConstVectorView rte_los, ConstVectorView rte_pos2, const Agenda &iy_main_agenda)
get_iy
Definition: rte.cc:1046
void apply_iy_unit2(Tensor3View J, ConstMatrixView iy, const String &y_unit, ConstVectorView f_grid, const Numeric &n, const ArrayOfIndex &i_pol)
apply_iy_unit2
Definition: rte.cc:232
A constant view of a Tensor4.
Definition: matpackIV.h:141
void get_iy_of_background(Workspace &ws, Matrix &iy, ArrayOfTensor3 &diy_dx, ConstTensor3View iy_transmission, const Index &jacobian_do, const Ppath &ppath, ConstVectorView rte_pos2, const Index &atmosphere_dim, ConstTensor3View t_field, ConstTensor3View z_field, ConstTensor4View vmr_field, const Index &cloudbox_on, const Index &stokes_dim, ConstVectorView f_grid, const Agenda &iy_main_agenda, const Agenda &iy_space_agenda, const Agenda &iy_surface_agenda, const Agenda &iy_cloudbox_agenda, const Verbosity &verbosity)
get_iy_of_background
Definition: rte.cc:1106
void get_ppath_ext(ArrayOfIndex &clear2cloudbox, Tensor3 &pnd_abs_vec, Tensor4 &pnd_ext_mat, Array< ArrayOfSingleScatteringData > &scat_data, Matrix &ppath_pnd, const Ppath &ppath, ConstVectorView ppath_t, const Index &stokes_dim, ConstMatrixView ppath_f, const Index &atmosphere_dim, const ArrayOfIndex &cloudbox_limits, const Tensor4 &pnd_field, const Index &use_mean_scat_data, const ArrayOfSingleScatteringData &scat_data_array, const Verbosity &verbosity)
get_ppath_ext
Definition: rte.cc:1546
The implementation for String, the ARTS string class.
Definition: mystring.h:63
The Tensor3 class.
Definition: matpackIII.h:348
The global header file for ARTS.
Header file for sparse matrices.
Range get_rowindex_for_mblock(const Sparse &sensor_response, const Index &imblock)
get_rowindex_for_mblock
Definition: rte.cc:1960
void iy_transmission_mult(Tensor3 &iy_trans_total, ConstTensor3View iy_trans_old, ConstTensor3View iy_trans_new)
iy_transmission_mult
Definition: rte.cc:2309
Declarations for agendas.
The Tensor3View class.
Definition: matpackIII.h:232
void get_ppath_atmvars(Vector &ppath_p, Vector &ppath_t, Matrix &ppath_vmr, Matrix &ppath_wind, Matrix &ppath_mag, const Ppath &ppath, const Index &atmosphere_dim, ConstVectorView p_grid, ConstTensor3View t_field, ConstTensor4View vmr_field, ConstTensor3View wind_u_field, ConstTensor3View wind_v_field, ConstTensor3View wind_w_field, ConstTensor3View mag_u_field, ConstTensor3View mag_v_field, ConstTensor3View mag_w_field)
get_ppath_atmvars
Definition: rte.cc:1233
void defocusing_general(Workspace &ws, Numeric &dlf, const Agenda &ppath_step_agenda, const Index &atmosphere_dim, ConstVectorView p_grid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstTensor3View t_field, ConstTensor3View z_field, ConstTensor4View vmr_field, ConstVectorView f_grid, ConstVectorView refellipsoid, ConstMatrixView z_surface, const Ppath &ppath, const Numeric &ppath_lraytrace, const Numeric &dza, const Verbosity &verbosity)
defocusing_general
Definition: rte.cc:530
Numeric dotprod_with_los(ConstVectorView los, const Numeric &u, const Numeric &v, const Numeric &w, const Index &atmosphere_dim)
dotprod_with_los
Definition: rte.cc:776
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:29
The Matrix class.
Definition: matpackI.h:788
void get_ppath_trans(Tensor4 &trans_partial, ArrayOfArrayOfIndex &extmat_case, Tensor4 &trans_cumulat, Vector &scalar_tau, const Ppath &ppath, ConstTensor4View &ppath_abs, ConstVectorView f_grid, const Index &stokes_dim)
get_ppath_trans
Definition: rte.cc:1770
Propagation path structure and functions.
This can be used to make arrays out of anything.
Definition: array.h:40
void get_ppath_trans2(Tensor4 &trans_partial, ArrayOfArrayOfIndex &extmat_case, Tensor4 &trans_cumulat, Vector &scalar_tau, const Ppath &ppath, ConstTensor4View &ppath_abs, ConstVectorView f_grid, const Index &stokes_dim, const ArrayOfIndex &clear2cloudbox, ConstTensor4View pnd_ext_mat)
get_ppath_trans2
Definition: rte.cc:1856
void emission_rtstep(Matrix &iy, const Index &stokes_dim, ConstVectorView bbar, ArrayOfIndex &extmat_case, ConstTensor3View t)
emission_rtstep
Definition: rte.cc:822
void get_ppath_f(Matrix &ppath_f, const Ppath &ppath, ConstVectorView f_grid, const Index &atmosphere_dim, const Numeric &rte_alonglos_v, ConstMatrixView ppath_wind)
get_ppath_f
Definition: rte.cc:1690
A constant view of a Tensor3.
Definition: matpackIII.h:139
A constant view of a Vector.
Definition: matpackI.h:292
A constant view of a Matrix.
Definition: matpackI.h:596
Workspace class.
Definition: workspace_ng.h:47
The structure to describe a propagation path and releated quantities.
Definition: ppath.h:59
void surface_calc(Matrix &iy, ConstTensor3View I, ConstMatrixView surface_los, ConstTensor4View surface_rmatrix, ConstMatrixView surface_emission)
surface_calc
Definition: rte.cc:2496
void pos2true_latlon(Numeric &lat, Numeric &lon, const Index &atmosphere_dim, ConstVectorView lat_grid, ConstVectorView lat_true, ConstVectorView lon_true, ConstVectorView pos)
pos2true_latlon
Definition: rte.cc:2438
Scattering database structure and functions.
The Tensor5 class.
Definition: matpackV.h:451