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
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:35
void findZ11max(Vector &Z11maxvector, const ArrayOfSingleScatteringData &scat_data_array_mono)
findZ11max
Definition: montecarlo.cc:337
The VectorView class.
Definition: matpackI.h:372
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
The Agenda class.
Definition: agenda_class.h:44
bool is_anyptype30(const ArrayOfSingleScatteringData &scat_data_array_mono)
is_anyptype30
Definition: montecarlo.cc:373
Declarations having to do with the four output streams.
The Vector class.
Definition: matpackI.h:556
The MatrixView class.
Definition: matpackI.h:679
The Tensor4 class.
Definition: matpackIV.h:383
Linear algebra functions.
This file contains basic functions to handle XML data files.
Structure which describes the single scattering properties of a particle or a particle distribution...
Definition: optproperties.h:84
const Numeric RAD2DEG
Structure to store a grid position.
Definition: interpolation.h:74
A constant view of a Tensor4.
Definition: matpackIV.h:141
The Tensor3 class.
Definition: matpackIII.h:348
The global header file for ARTS.
const Numeric PI
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
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
Defines the Rng random number generator class.
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:29
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
The Matrix class.
Definition: matpackI.h:788
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
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:243
Definition: rng.h:569
A constant view of a Tensor3.
Definition: matpackIII.h:139
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
A constant view of a Vector.
Definition: matpackI.h:292
Workspace class.
Definition: workspace_ng.h:47
const Numeric DEG2RAD
The structure to describe a propagation path and releated quantities.
Definition: ppath.h:59
Internal cloudbox functions.
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
Scattering database structure and functions.
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
Declaration of functions in rte.cc.