ARTS  2.4.0(git:4fb77825)
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,
86  const Numeric& f_mono,
87  const GridPos& gp_p,
88  const GridPos& gp_lat,
89  const GridPos& gp_lon,
93 
122  MatrixView ext_mat_mono,
123  VectorView abs_vec_mono,
124  VectorView pnd_vec,
125  Numeric& temperature,
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,
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,
172  ConstVectorView p_grid_cloud,
173  ConstTensor3View t_field_cloud,
174  ConstTensor4View vmr_field_cloud,
176 
205 void get_ppath_transmat(
206  Workspace& ws,
207  MatrixView& trans_mat,
208  const Ppath& ppath,
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,
217  const Tensor4& pnd_field,
219  const Verbosity& verbosity);
220 
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,
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,
318  const Tensor4& pnd_field,
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,
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,
409  const Tensor4& pnd_field,
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,
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
Matrix
The Matrix class.
Definition: matpackI.h:1193
ARTS::Var::ppath_step
Ppath ppath_step(Workspace &ws) noexcept
Definition: autoarts.h:5213
ARTS::Var::z_field
Tensor3 z_field(Workspace &ws) noexcept
Definition: autoarts.h:7690
MatrixView
The MatrixView class.
Definition: matpackI.h:1093
ARTS::Var::ppath_step_agenda
Agenda ppath_step_agenda(Workspace &ws) noexcept
Definition: autoarts.h:5220
Tensor3
The Tensor3 class.
Definition: matpackIII.h:339
RAD2DEG
const Numeric RAD2DEG
PI
const Numeric PI
ARTS::Var::lat_grid
Vector lat_grid(Workspace &ws) noexcept
Definition: autoarts.h:3962
ARTS::Var::pnd_field
Tensor4 pnd_field(Workspace &ws) noexcept
Definition: autoarts.h:5081
ARTS::Var::verbosity
Verbosity verbosity(Workspace &ws) noexcept
Definition: autoarts.h:7112
ARTS::Var::scat_data_mono
ArrayOfArrayOfSingleScatteringData scat_data_mono(Workspace &ws) noexcept
Definition: autoarts.h:5862
ARTS::Var::f_index
Index f_index(Workspace &ws) noexcept
Definition: autoarts.h:3464
ARTS::Var::cloudbox_limits
ArrayOfIndex cloudbox_limits(Workspace &ws) noexcept
Definition: autoarts.h:2762
DEG2RAD
const Numeric DEG2RAD
ARTS::Var::stokes_dim
Index stokes_dim(Workspace &ws) noexcept
Definition: autoarts.h:6650
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_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
Tensor4
The Tensor4 class.
Definition: matpackIV.h:421
Sample_los_uniform
void Sample_los_uniform(VectorView new_rte_los, Rng &rng)
Sample_los_uniform.
Definition: montecarlo.cc:1471
Ppath
The structure to describe a propagation path and releated quantities.
Definition: ppath.h:48
Agenda
The Agenda class.
Definition: agenda_class.h:44
ConstTensor4View
A constant view of a Tensor4.
Definition: matpackIV.h:133
matpackI.h
Implementation of Matrix, Vector, and such stuff.
rng.h
member functions of the Rng class and gsl_rng code
Array
This can be used to make arrays out of anything.
Definition: array.h:108
Sample_los
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
messages.h
Declarations having to do with the four output streams.
ARTS::Var::rte_pos
Vector rte_pos(Workspace &ws) noexcept
Definition: autoarts.h:5672
VectorView
The VectorView class.
Definition: matpackI.h:610
ARTS::Var::vmr_field
Tensor4 vmr_field(Workspace &ws) noexcept
Definition: autoarts.h:7130
ARTS::Var::rte_los
Vector rte_los(Workspace &ws) noexcept
Definition: autoarts.h:5651
physics_funcs.h
This file contains declerations of functions of physical character.
ARTS::Var::p_grid
Vector p_grid(Workspace &ws) noexcept
Definition: autoarts.h:4763
ARTS::Var::ppath
Ppath ppath(Workspace &ws) noexcept
Definition: autoarts.h:5139
optproperties.h
Scattering database structure and functions.
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
lin_alg.h
Linear algebra functions.
Verbosity
Definition: messages.h:49
ARTS::Var::refellipsoid
Vector refellipsoid(Workspace &ws) noexcept
Definition: autoarts.h:5519
ARTS::Var::f_grid
Vector f_grid(Workspace &ws) noexcept
Definition: autoarts.h:3449
ARTS::Var::scat_data
ArrayOfArrayOfSingleScatteringData scat_data(Workspace &ws) noexcept
Definition: autoarts.h:5840
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:459
ARTS::Var::lon_grid
Vector lon_grid(Workspace &ws) noexcept
Definition: autoarts.h:4090
ARTS::Var::ppath_lmax
Numeric ppath_lmax(Workspace &ws) noexcept
Definition: autoarts.h:5183
cloudbox.h
Internal cloudbox functions.
ARTS::Var::ppath_lraytrace
Numeric ppath_lraytrace(Workspace &ws) noexcept
Definition: autoarts.h:5195
GridPos
Structure to store a grid position.
Definition: interpolation.h:73
ppath.h
Propagation path structure and functions.
ARTS::Var::rtp_temperature
Numeric rtp_temperature(Workspace &ws) noexcept
Definition: autoarts.h:5807
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:244
rte.h
Declaration of functions in rte.cc.
Rng
Definition: rng.h:554
ARTS::Var::t_field
Tensor3 t_field(Workspace &ws) noexcept
Definition: autoarts.h:6947
Workspace
Workspace class.
Definition: workspace_ng.h:40
ConstTensor3View
A constant view of a Tensor3.
Definition: matpackIII.h:132
special_interp.h
Header file for special_interp.cc.
is_anyptype_nonTotRan
bool is_anyptype_nonTotRan(const ArrayOfArrayOfSingleScatteringData &scat_data_mono)
is_anyptype_nonTotRan.
Definition: montecarlo.cc:694
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 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
get_ppath_transmat
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
ARTS::Var::propmat_clearsky_agenda
Agenda propmat_clearsky_agenda(Workspace &ws) noexcept
Definition: autoarts.h:5405
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
check_input.h
Vector
The Vector class.
Definition: matpackI.h:860
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:476
mcPathTraceRadar
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
ARTS::Var::z_surface
Matrix z_surface(Workspace &ws) noexcept
Definition: autoarts.h:7754
arts.h
The global header file for ARTS.
xml_io.h
This file contains basic functions to handle XML data files.