ARTS  2.2.66
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 
21 /*===========================================================================
22  === External declarations
23  ===========================================================================*/
24 #include <stdexcept>
25 #include <cmath>
26 #include "messages.h"
27 #include "arts.h"
28 #include "ppath.h"
29 #include "matpackI.h"
30 #include "special_interp.h"
31 #include "check_input.h"
32 #include "rte.h"
33 #include "lin_alg.h"
34 #include "logic.h"
35 #include "optproperties.h"
36 #include "physics_funcs.h"
37 #include "xml_io.h"
38 #include "rng.h"
39 #include "cloudbox.h"
40 #include "optproperties.h"
41 
42 extern const Numeric DEG2RAD;
43 extern const Numeric RAD2DEG;
44 extern const Numeric PI;
45 
47  MatrixView ext_mat_mono,
48  VectorView abs_vec_mono,
49  Numeric& temperature,
50  const Agenda& propmat_clearsky_agenda,
51  const Numeric& f_mono,
52  const GridPos& gp_p,
53  const GridPos& gp_lat,
54  const GridPos& gp_lon,
55  ConstVectorView p_grid,
56  ConstTensor3View t_field,
57  ConstTensor4View vmr_field);
58 
60  MatrixView ext_mat_mono,
61  VectorView abs_vec_mono,
62  VectorView pnd_vec,
63  Numeric& temperature,
64  const Agenda& propmat_clearsky_agenda,
65  const Index stokes_dim,
66  const Numeric& f_mono,
67  const GridPos& gp_p,
68  const GridPos& gp_lat,
69  const GridPos& gp_lon,
70  ConstVectorView p_grid_cloud,
71  ConstTensor3View t_field_cloud,
72  ConstTensor4View vmr_field_cloud,
73  const Tensor4& pnd_field,
74  const ArrayOfSingleScatteringData& scat_data_array_mono,
75  const ArrayOfIndex& cloudbox_limits,
76  const Vector& rte_los,
77  const Verbosity& verbosity);
78 
79 void cloud_atm_vars_by_gp (VectorView pressure,
80  VectorView temperature,
81  MatrixView vmr,
82  MatrixView pnd,
83  const ArrayOfGridPos& gp_p,
84  const ArrayOfGridPos& gp_lat,
85  const ArrayOfGridPos& gp_lon,
86  const ArrayOfIndex& cloudbox_limits,
87  ConstVectorView p_grid_cloud,
88  ConstTensor3View t_field_cloud,
89  ConstTensor4View vmr_field_cloud,
90  ConstTensor4View pnd_field);
91 
92 void findZ11max (Vector& Z11maxvector,
93  const ArrayOfSingleScatteringData& scat_data_array_mono);
94 
95 bool is_anyptype30 (const ArrayOfSingleScatteringData& scat_data_array_mono);
96 
97 
99  MatrixView evol_op,
100  Vector& abs_vec_mono,
101  Numeric& temperature,
102  MatrixView ext_mat_mono,
103  Rng& rng,
104  Vector& rte_pos,
105  Vector& rte_los,
106  Vector& pnd_vec,
107  Numeric& g,
108  Ppath& ppath_step,
109  Index& termination_flag,
110  bool& inside_cloud,
111  const Agenda& ppath_step_agenda,
112  const Numeric& ppath_lraytrace,
113  const Agenda& propmat_clearsky_agenda,
114  const Index stokes_dim,
115  const Numeric& f_mono,
116  const Vector& p_grid,
117  const Vector& lat_grid,
118  const Vector& lon_grid,
119  const Tensor3& z_field,
120  const Vector& refellipsoid,
121  const Matrix& z_surface,
122  const Tensor3& t_field,
123  const Tensor4& vmr_field,
124  const ArrayOfIndex& cloudbox_limits,
125  const Tensor4& pnd_field,
126  const ArrayOfSingleScatteringData& scat_data_array_mono,
127  const Verbosity& verbosity);
128 
129 void opt_propCalc (MatrixView K,
130  VectorView K_abs,
131  const Numeric za,
132  const Numeric aa,
133  const ArrayOfSingleScatteringData& scat_data_array_mono,
134  const Index stokes_dim,
135  ConstVectorView pnd_vec,
136  const Numeric rtp_temperature,
137  const Verbosity& verbosity);
138 
139 void opt_propExtract (MatrixView K_spt,
140  VectorView K_abs_spt,
141  const SingleScatteringData& scat_data,
142  const Numeric za,
143  const Numeric aa,
144  const Numeric rtp_temperature,
145  const Index stokes_dim,
146  const Verbosity& verbosity);
147 
149  const Numeric za_sca,
150  const Numeric aa_sca,
151  const Numeric za_inc,
152  const Numeric aa_inc,
153  const ArrayOfSingleScatteringData& scat_data_array_mono,
154  const Index stokes_dim,
155  ConstVectorView pnd_vec,
156  const Numeric rtp_temperature,
157  const Verbosity& verbosity);
158 
160  const SingleScatteringData& scat_data,
161  const Numeric za_sca,
162  const Numeric aa_sca,
163  const Numeric za_inc,
164  const Numeric aa_inc,
165  const Numeric rtp_temperature,
166  const Index stokes_dim,
167  const Verbosity& verbosity);
168 
169 
170 void Sample_los (VectorView new_rte_los,
171  Numeric& g_los_csc_theta,
172  MatrixView Z,
173  Rng& rng,
174  ConstVectorView rte_los,
175  const ArrayOfSingleScatteringData& scat_data_array_mono,
176  const Index stokes_dim,
177  ConstVectorView pnd_vec,
178  const bool anyptype30,
179  ConstVectorView Z11maxvector,
180  const Numeric Csca,
181  const Numeric rtp_temperature,
182  const Verbosity& verbosity);
183 
184 
185 #endif // montecarlo_h
Matrix
The Matrix class.
Definition: matpackI.h:788
opt_propExtract
void opt_propExtract(MatrixView K_spt, VectorView K_abs_spt, const SingleScatteringData &scat_data, const Numeric za, const Numeric aa, const Numeric rtp_temperature, const Index stokes_dim, const Verbosity &verbosity)
Definition: montecarlo.cc:751
pha_mat_singleCalc
void pha_mat_singleCalc(MatrixView Z, const Numeric za_sca, const Numeric aa_sca, const Numeric za_inc, const Numeric aa_inc, const ArrayOfSingleScatteringData &scat_data_array_mono, const Index stokes_dim, ConstVectorView pnd_vec, const Numeric rtp_temperature, const Verbosity &verbosity)
pha_mat_singleCalc
Definition: montecarlo.cc:928
MatrixView
The MatrixView class.
Definition: matpackI.h:679
Tensor3
The Tensor3 class.
Definition: matpackIII.h:348
RAD2DEG
const Numeric RAD2DEG
PI
const Numeric PI
findZ11max
void findZ11max(Vector &Z11maxvector, const ArrayOfSingleScatteringData &scat_data_array_mono)
findZ11max
Definition: montecarlo.cc:337
is_anyptype30
bool is_anyptype30(const ArrayOfSingleScatteringData &scat_data_array_mono)
is_anyptype30
Definition: montecarlo.cc:373
DEG2RAD
const Numeric DEG2RAD
Tensor4
The Tensor4 class.
Definition: matpackIV.h:383
Ppath
The structure to describe a propagation path and releated quantities.
Definition: ppath.h:59
Agenda
The Agenda class.
Definition: agenda_class.h:44
SingleScatteringData
Structure which describes the single scattering properties of a particle or a particle distribution.
Definition: optproperties.h:84
ConstTensor4View
A constant view of a Tensor4.
Definition: matpackIV.h:141
matpackI.h
rng.h
Defines the Rng random number generator class.
Array
This can be used to make arrays out of anything.
Definition: array.h:107
messages.h
Declarations having to do with the four output streams.
pha_mat_singleExtract
void pha_mat_singleExtract(MatrixView Z_spt, const SingleScatteringData &scat_data, const Numeric za_sca, const Numeric aa_sca, const Numeric za_inc, const Numeric aa_inc, const Numeric rtp_temperature, const Index stokes_dim, const Verbosity &verbosity)
Extract the phase matrix from a monochromatic SingleScatteringData object.
Definition: montecarlo.cc:981
Sample_los
void Sample_los(VectorView new_rte_los, Numeric &g_los_csc_theta, MatrixView Z, Rng &rng, ConstVectorView rte_los, const ArrayOfSingleScatteringData &scat_data_array_mono, const Index stokes_dim, ConstVectorView pnd_vec, const bool anyptype30, ConstVectorView Z11maxvector, const Numeric Csca, const Numeric rtp_temperature, const Verbosity &verbosity)
Sample_los.
Definition: montecarlo.cc:1187
VectorView
The VectorView class.
Definition: matpackI.h:372
physics_funcs.h
optproperties.h
Scattering database structure and functions.
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:29
lin_alg.h
Linear algebra functions.
Verbosity
Definition: messages.h:50
cloudy_rt_vars_at_gp
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 Numeric &f_mono, 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 ArrayOfSingleScatteringData &scat_data_array_mono, const ArrayOfIndex &cloudbox_limits, const Vector &rte_los, const Verbosity &verbosity)
cloudy_rt_vars_at_gp
Definition: montecarlo.cc:135
cloud_atm_vars_by_gp
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:243
cloudbox.h
Internal cloudbox functions.
GridPos
Structure to store a grid position.
Definition: interpolation.h:74
opt_propCalc
void opt_propCalc(MatrixView K, VectorView K_abs, const Numeric za, const Numeric aa, const ArrayOfSingleScatteringData &scat_data_array_mono, const Index stokes_dim, ConstVectorView pnd_vec, const Numeric rtp_temperature, const Verbosity &verbosity)
opt_propCalc
Definition: montecarlo.cc:684
ppath.h
Propagation path structure and functions.
logic.h
Header file for logic.cc.
clear_rt_vars_at_gp
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:56
rte.h
Declaration of functions in rte.cc.
Rng
Definition: rng.h:569
Workspace
Workspace class.
Definition: workspace_ng.h:47
ConstTensor3View
A constant view of a Tensor3.
Definition: matpackIII.h:139
mcPathTraceGeneral
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_lraytrace, const Agenda &propmat_clearsky_agenda, const Index stokes_dim, const Numeric &f_mono, 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 ArrayOfSingleScatteringData &scat_data_array_mono, const Verbosity &verbosity)
mcPathTraceGeneral
Definition: mc_NotUsed.cc:1402
special_interp.h
Header file for special_interp.cc.
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:35
check_input.h
Vector
The Vector class.
Definition: matpackI.h:556
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:292
arts.h
The global header file for ARTS.
xml_io.h
This file contains basic functions to handle XML data files.