ARTS  2.3.1285(git:92a29ea9-dirty)
montecarlo.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2012 Cory Davis <cory@met.ed.ac.uk>
2 
3  This program is free software; you can redistribute it and/or
4  modify it under the terms of the GNU General Public License as
5  published by the Free Software Foundation; either version 2 of the
6  License, or (at your option) any 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 #ifndef montecarlo_h
19 #define montecarlo_h
20 
37 /*===========================================================================
38  === External declarations
39  ===========================================================================*/
40 #include <cmath>
41 #include <stdexcept>
42 #include "arts.h"
43 #include "check_input.h"
44 #include "cloudbox.h"
45 #include "lin_alg.h"
46 #include "logic.h"
47 #include "matpackI.h"
48 #include "messages.h"
49 #include "optproperties.h"
50 #include "physics_funcs.h"
51 #include "ppath.h"
52 #include "rng.h"
53 #include "rte.h"
54 #include "special_interp.h"
55 #include "xml_io.h"
56 
57 extern const Numeric DEG2RAD;
58 extern const Numeric RAD2DEG;
59 extern const Numeric PI;
60 
82  MatrixView ext_mat_mono,
83  VectorView abs_vec_mono,
84  Numeric& temperature,
85  const Agenda& propmat_clearsky_agenda,
86  const Numeric& f_mono,
87  const GridPos& gp_p,
88  const GridPos& gp_lat,
89  const GridPos& gp_lon,
90  ConstVectorView p_grid,
91  ConstTensor3View t_field,
92  ConstTensor4View vmr_field);
93 
122  MatrixView ext_mat_mono,
123  VectorView abs_vec_mono,
124  VectorView pnd_vec,
125  Numeric& temperature,
126  const Agenda& propmat_clearsky_agenda,
127  const Index stokes_dim,
128  const Index f_index,
129  const Vector& f_grid,
130  const GridPos& gp_p,
131  const GridPos& gp_lat,
132  const GridPos& gp_lon,
133  ConstVectorView p_grid_cloud,
134  ConstTensor3View t_field_cloud,
135  ConstTensor4View vmr_field_cloud,
136  const Tensor4& pnd_field,
137  const ArrayOfArrayOfSingleScatteringData& scat_data,
138  const ArrayOfIndex& cloudbox_limits,
139  const Vector& rte_los);
140 
164 void cloud_atm_vars_by_gp(VectorView pressure,
165  VectorView temperature,
166  MatrixView vmr,
167  MatrixView pnd,
168  const ArrayOfGridPos& gp_p,
169  const ArrayOfGridPos& gp_lat,
170  const ArrayOfGridPos& gp_lon,
171  const ArrayOfIndex& cloudbox_limits,
172  ConstVectorView p_grid_cloud,
173  ConstTensor3View t_field_cloud,
174  ConstTensor4View vmr_field_cloud,
175  ConstTensor4View pnd_field);
176 
205 void get_ppath_transmat(
206  Workspace& ws,
207  MatrixView& trans_mat,
208  const Ppath& ppath,
209  const Agenda& propmat_clearsky_agenda,
210  const Index stokes_dim,
211  const Index f_index,
212  const Vector& f_grid,
213  const Vector& p_grid,
214  const Tensor3& t_field,
215  const Tensor4& vmr_field,
216  const ArrayOfIndex& cloudbox_limits,
217  const Tensor4& pnd_field,
218  const ArrayOfArrayOfSingleScatteringData& scat_data_mono,
219  const Verbosity& verbosity);
220 
233  const ArrayOfArrayOfSingleScatteringData& scat_data_mono);
234 
289  MatrixView evol_op,
290  Vector& abs_vec_mono,
291  Numeric& temperature,
292  MatrixView ext_mat_mono,
293  Rng& rng,
294  Vector& rte_pos,
295  Vector& rte_los,
296  Vector& pnd_vec,
297  Numeric& g,
298  Ppath& ppath_step,
299  Index& termination_flag,
300  bool& inside_cloud,
301  const Agenda& ppath_step_agenda,
302  const Numeric& ppath_lmax,
303  const Numeric& ppath_lraytrace,
304  const Numeric& taustep_limit,
305  const Agenda& propmat_clearsky_agenda,
306  const Index stokes_dim,
307  const Index f_index,
308  const Vector& f_grid,
309  const Vector& p_grid,
310  const Vector& lat_grid,
311  const Vector& lon_grid,
312  const Tensor3& z_field,
313  const Vector& refellipsoid,
314  const Matrix& z_surface,
315  const Tensor3& t_field,
316  const Tensor4& vmr_field,
317  const ArrayOfIndex& cloudbox_limits,
318  const Tensor4& pnd_field,
319  const ArrayOfArrayOfSingleScatteringData& scat_data,
320  const Verbosity& verbosity);
321 
377 void mcPathTraceRadar(Workspace& ws,
378  MatrixView evol_op,
379  Vector& abs_vec_mono,
380  Numeric& temperature,
381  MatrixView ext_mat_mono,
382  Rng& rng,
383  Vector& rte_pos,
384  Vector& rte_los,
385  Vector& pnd_vec,
386  Numeric& stot,
387  Numeric& ttot,
388  Ppath& ppath_step,
389  Index& termination_flag,
390  bool& inside_cloud,
391  const Agenda& ppath_step_agenda,
392  const Numeric& ppath_lmax,
393  const Numeric& ppath_lraytrace,
394  const Agenda& propmat_clearsky_agenda,
395  const bool& anyptype_nonTotRan,
396  const Index stokes_dim,
397  const Index f_index,
398  const Vector& f_grid,
399  const Vector& Iprop,
400  const Vector& p_grid,
401  const Vector& lat_grid,
402  const Vector& lon_grid,
403  const Tensor3& z_field,
404  const Vector& refellipsoid,
405  const Matrix& z_surface,
406  const Tensor3& t_field,
407  const Tensor4& vmr_field,
408  const ArrayOfIndex& cloudbox_limits,
409  const Tensor4& pnd_field,
410  const ArrayOfArrayOfSingleScatteringData& scat_data_mono,
411  const Verbosity& verbosity);
412 
413 
436 void Sample_los(VectorView new_rte_los,
437  Numeric& g_los_csc_theta,
438  MatrixView Z,
439  Rng& rng,
440  ConstVectorView rte_los,
441  const ArrayOfArrayOfSingleScatteringData& scat_data,
442  const Index stokes_dim,
443  const Index f_index,
444  ConstVectorView pnd_vec,
445  ConstVectorView Z11maxvector,
446  const Numeric Csca,
447  const Numeric rtp_temperature,
448  const Index t_interp_order = 1);
449 
460 void Sample_los_uniform(VectorView new_rte_los, Rng& rng);
461 
462 #endif // montecarlo_h
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
The VectorView class.
Definition: matpackI.h:610
The Agenda class.
Definition: agenda_class.h:44
Declarations having to do with the four output streams.
The Vector class.
Definition: matpackI.h:860
The MatrixView class.
Definition: matpackI.h:1093
void mcPathTraceRadar(Workspace &ws, MatrixView evol_op, Vector &abs_vec_mono, Numeric &temperature, MatrixView ext_mat_mono, Rng &rng, Vector &rte_pos, Vector &rte_los, Vector &pnd_vec, Numeric &stot, Numeric &ttot, Ppath &ppath_step, Index &termination_flag, bool &inside_cloud, const Agenda &ppath_step_agenda, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace, const Agenda &propmat_clearsky_agenda, const bool &anyptype_nonTotRan, const Index stokes_dim, const Index f_index, const Vector &f_grid, const Vector &Iprop, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Vector &refellipsoid, const Matrix &z_surface, const Tensor3 &t_field, const Tensor4 &vmr_field, const ArrayOfIndex &cloudbox_limits, const Tensor4 &pnd_field, const ArrayOfArrayOfSingleScatteringData &scat_data_mono, const Verbosity &verbosity)
mcPathTraceRadar.
Definition: montecarlo.cc:1054
The Tensor4 class.
Definition: matpackIV.h:421
Linear algebra functions.
This file contains basic functions to handle XML data files.
const Numeric RAD2DEG
Structure to store a grid position.
Definition: interpolation.h:73
void Sample_los(VectorView new_rte_los, Numeric &g_los_csc_theta, MatrixView Z, Rng &rng, ConstVectorView rte_los, const ArrayOfArrayOfSingleScatteringData &scat_data, const Index stokes_dim, const Index f_index, ConstVectorView pnd_vec, ConstVectorView Z11maxvector, const Numeric Csca, const Numeric rtp_temperature, const Index t_interp_order=1)
Sample_los.
Definition: montecarlo.cc:1391
A constant view of a Tensor4.
Definition: matpackIV.h:133
void Sample_los_uniform(VectorView new_rte_los, Rng &rng)
Sample_los_uniform.
Definition: montecarlo.cc:1471
void mcPathTraceGeneral(Workspace &ws, MatrixView evol_op, Vector &abs_vec_mono, Numeric &temperature, MatrixView ext_mat_mono, Rng &rng, Vector &rte_pos, Vector &rte_los, Vector &pnd_vec, Numeric &g, Ppath &ppath_step, Index &termination_flag, bool &inside_cloud, const Agenda &ppath_step_agenda, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace, const Numeric &taustep_limit, const Agenda &propmat_clearsky_agenda, const Index stokes_dim, const Index f_index, const Vector &f_grid, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Tensor3 &z_field, const Vector &refellipsoid, const Matrix &z_surface, const Tensor3 &t_field, const Tensor4 &vmr_field, const ArrayOfIndex &cloudbox_limits, const Tensor4 &pnd_field, const ArrayOfArrayOfSingleScatteringData &scat_data, const Verbosity &verbosity)
mcPathTraceGeneral.
Definition: montecarlo.cc:711
The Tensor3 class.
Definition: matpackIII.h:339
The global header file for ARTS.
const Numeric PI
void cloudy_rt_vars_at_gp(Workspace &ws, MatrixView ext_mat_mono, VectorView abs_vec_mono, VectorView pnd_vec, Numeric &temperature, const Agenda &propmat_clearsky_agenda, const Index stokes_dim, const Index f_index, const Vector &f_grid, const GridPos &gp_p, const GridPos &gp_lat, const GridPos &gp_lon, ConstVectorView p_grid_cloud, ConstTensor3View t_field_cloud, ConstTensor4View vmr_field_cloud, const Tensor4 &pnd_field, const ArrayOfArrayOfSingleScatteringData &scat_data, const ArrayOfIndex &cloudbox_limits, const Vector &rte_los)
cloudy_rt_vars_at_gp.
Definition: montecarlo.cc:326
member functions of the Rng class and gsl_rng code
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
void clear_rt_vars_at_gp(Workspace &ws, MatrixView ext_mat_mono, VectorView abs_vec_mono, Numeric &temperature, const Agenda &propmat_clearsky_agenda, const Numeric &f_mono, const GridPos &gp_p, const GridPos &gp_lat, const GridPos &gp_lon, ConstVectorView p_grid, ConstTensor3View t_field, ConstTensor4View vmr_field)
clear_rt_vars_at_gp.
Definition: montecarlo.cc:244
The Matrix class.
Definition: matpackI.h:1193
Implementation of Matrix, Vector, and such stuff.
Header file for special_interp.cc.
Propagation path structure and functions.
Header file for logic.cc.
This can be used to make arrays out of anything.
Definition: array.h:40
void cloud_atm_vars_by_gp(VectorView pressure, VectorView temperature, MatrixView vmr, MatrixView pnd, const ArrayOfGridPos &gp_p, const ArrayOfGridPos &gp_lat, const ArrayOfGridPos &gp_lon, const ArrayOfIndex &cloudbox_limits, ConstVectorView p_grid_cloud, ConstTensor3View t_field_cloud, ConstTensor4View vmr_field_cloud, ConstTensor4View pnd_field)
cloud_atm_vars_by_gp.
Definition: montecarlo.cc:459
Definition: rng.h:554
A constant view of a Tensor3.
Definition: matpackIII.h:132
A constant view of a Vector.
Definition: matpackI.h:476
void get_ppath_transmat(Workspace &ws, MatrixView &trans_mat, const Ppath &ppath, const Agenda &propmat_clearsky_agenda, const Index stokes_dim, const Index f_index, const Vector &f_grid, const Vector &p_grid, const Tensor3 &t_field, const Tensor4 &vmr_field, const ArrayOfIndex &cloudbox_limits, const Tensor4 &pnd_field, const ArrayOfArrayOfSingleScatteringData &scat_data_mono, const Verbosity &verbosity)
get_ppath_transmat.
Definition: montecarlo.cc:544
Workspace class.
Definition: workspace_ng.h:40
const Numeric DEG2RAD
bool is_anyptype_nonTotRan(const ArrayOfArrayOfSingleScatteringData &scat_data_mono)
is_anyptype_nonTotRan.
Definition: montecarlo.cc:694
The structure to describe a propagation path and releated quantities.
Definition: ppath.h:48
Internal cloudbox functions.
Scattering database structure and functions.
This file contains declerations of functions of physical character.
Declaration of functions in rte.cc.