ARTS
2.4.0(git:4fb77825)
|
Workspace functions for the solution of cloud-box radiative transfer by Monte Carlo methods. All of these functions refer to 3D calculations. More...
#include <cmath>
#include <ctime>
#include <fstream>
#include <stdexcept>
#include "arts.h"
#include "auto_md.h"
#include "check_input.h"
#include "lin_alg.h"
#include "logic.h"
#include "math_funcs.h"
#include "matpackI.h"
#include "mc_interp.h"
#include "messages.h"
#include "montecarlo.h"
#include "physics_funcs.h"
#include "ppath.h"
#include "refraction.h"
#include "rng.h"
#include "rte.h"
#include "special_interp.h"
#include "xml_io.h"
Go to the source code of this file.
Functions | |
void | mc_antennaSetGaussian (MCAntenna &mc_antenna, const Numeric &za_sigma, const Numeric &aa_sigma, const Verbosity &) |
WORKSPACE METHOD: mc_antennaSetGaussian. More... | |
void | mc_antennaSetGaussianByFWHM (MCAntenna &mc_antenna, const Numeric &za_fwhm, const Numeric &aa_fwhm, const Verbosity &) |
WORKSPACE METHOD: mc_antennaSetGaussianByFWHM. More... | |
void | mc_antennaSetPencilBeam (MCAntenna &mc_antenna, const Verbosity &) |
WORKSPACE METHOD: mc_antennaSetPencilBeam. More... | |
void | MCGeneral (Workspace &ws, Vector &y, Index &mc_iteration_count, Vector &mc_error, Tensor3 &mc_points, ArrayOfIndex &mc_source_domain, ArrayOfIndex &mc_scat_order, const MCAntenna &mc_antenna, const Vector &f_grid, const Index &f_index, const Matrix &sensor_pos, const Matrix &sensor_los, const Index &stokes_dim, const Index &atmosphere_dim, const Agenda &ppath_step_agenda, const Numeric &ppath_lmax, const Numeric &ppath_lraytrace, const Agenda &iy_space_agenda, const Agenda &surface_rtprop_agenda, const Agenda &propmat_clearsky_agenda, 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 Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Tensor4 &pnd_field, const ArrayOfArrayOfSingleScatteringData &scat_data, const Index &atmfields_checked, const Index &atmgeom_checked, const Index &scat_data_checked, const Index &cloudbox_checked, const String &iy_unit, const Index &mc_seed, const Numeric &std_err, const Index &max_time, const Index &max_iter, const Index &min_iter, const Numeric &taustep_limit, const Index &l_mc_scat_order, const Index &t_interp_order, const Verbosity &verbosity) |
WORKSPACE METHOD: MCGeneral. More... | |
void | MCRadar (Workspace &ws, Vector &y, Vector &mc_error, const MCAntenna &mc_antenna, const Vector &f_grid, const Index &f_index, const Matrix &sensor_pos, const Matrix &sensor_los, const Index &stokes_dim, const Index &atmosphere_dim, const Numeric &ppath_lmax, const Agenda &ppath_step_agenda, const Numeric &ppath_lraytrace, const Agenda &propmat_clearsky_agenda, 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 Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Tensor4 &pnd_field, const ArrayOfArrayOfSingleScatteringData &scat_data, const Vector &mc_y_tx, const Vector &range_bins, const Index &atmfields_checked, const Index &atmgeom_checked, const Index &scat_data_checked, const Index &cloudbox_checked, const String &iy_unit, const Index &mc_max_scatorder, const Index &mc_seed, const Index &mc_max_iter, const Numeric &ze_tref, const Numeric &k2, const Index &t_interp_order, const Verbosity &verbosity) |
WORKSPACE METHOD: MCRadar. More... | |
void | MCSetSeedFromTime (Index &mc_seed, const Verbosity &) |
WORKSPACE METHOD: MCSetSeedFromTime. More... | |
Variables | |
const Numeric | DEG2RAD |
const Numeric | RAD2DEG |
const Numeric | PI |
const Numeric | BOLTZMAN_CONST |
const Numeric | SPEED_OF_LIGHT |
Workspace functions for the solution of cloud-box radiative transfer by Monte Carlo methods. All of these functions refer to 3D calculations.
Definition in file m_montecarlo.cc.
void mc_antennaSetGaussian | ( | MCAntenna & | mc_antenna, |
const Numeric & | za_sigma, | ||
const Numeric & | aa_sigma, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: mc_antennaSetGaussian.
Makes mc_antenna (used by MCGeneral) a 2D Gaussian pattern.
The gaussian antenna pattern is determined by za_sigma and aa_sigma*, which represent the standard deviations in the uncorrelated bivariate normal distribution.
[out] | mc_antenna | WS Output |
[in] | za_sigma | Generic Input |
[in] | aa_sigma | Generic Input |
Definition at line 64 of file m_montecarlo.cc.
References ARTS::Var::mc_antenna().
Referenced by mc_antennaSetGaussian_g().
void mc_antennaSetGaussianByFWHM | ( | MCAntenna & | mc_antenna, |
const Numeric & | za_fwhm, | ||
const Numeric & | aa_fwhm, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: mc_antennaSetGaussianByFWHM.
Makes mc_antenna (used by MCGeneral) a 2D Gaussian pattern.
The gaussian antenna pattern is determined by za_fwhm and aa_fwhm*, which represent the full width half maximum (FWHM) of the antenna response, in the zenith and azimuthal planes.
[out] | mc_antenna | WS Output |
[in] | za_fwhm | Generic Input |
[in] | aa_fwhm | Generic Input |
Definition at line 73 of file m_montecarlo.cc.
References ARTS::Var::mc_antenna().
Referenced by mc_antennaSetGaussianByFWHM_g().
WORKSPACE METHOD: mc_antennaSetPencilBeam.
Makes mc_antenna (used by MCGeneral) a pencil beam.
This WSM makes the subsequent MCGeneral WSM perform pencil beam RT calculations.
[out] | mc_antenna | WS Output |
Definition at line 82 of file m_montecarlo.cc.
References ARTS::Var::mc_antenna().
Referenced by mc_antennaSetPencilBeam_g().
void MCGeneral | ( | Workspace & | ws, |
Vector & | y, | ||
Index & | mc_iteration_count, | ||
Vector & | mc_error, | ||
Tensor3 & | mc_points, | ||
ArrayOfIndex & | mc_source_domain, | ||
ArrayOfIndex & | mc_scat_order, | ||
const MCAntenna & | mc_antenna, | ||
const Vector & | f_grid, | ||
const Index & | f_index, | ||
const Matrix & | sensor_pos, | ||
const Matrix & | sensor_los, | ||
const Index & | stokes_dim, | ||
const Index & | atmosphere_dim, | ||
const Agenda & | ppath_step_agenda, | ||
const Numeric & | ppath_lmax, | ||
const Numeric & | ppath_lraytrace, | ||
const Agenda & | iy_space_agenda, | ||
const Agenda & | surface_rtprop_agenda, | ||
const Agenda & | propmat_clearsky_agenda, | ||
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 Index & | cloudbox_on, | ||
const ArrayOfIndex & | cloudbox_limits, | ||
const Tensor4 & | pnd_field, | ||
const ArrayOfArrayOfSingleScatteringData & | scat_data, | ||
const Index & | atmfields_checked, | ||
const Index & | atmgeom_checked, | ||
const Index & | scat_data_checked, | ||
const Index & | cloudbox_checked, | ||
const String & | iy_unit, | ||
const Index & | mc_seed, | ||
const Numeric & | mc_std_err, | ||
const Index & | mc_max_time, | ||
const Index & | mc_max_iter, | ||
const Index & | mc_min_iter, | ||
const Numeric & | mc_taustep_limit, | ||
const Index & | l_mc_scat_order, | ||
const Index & | t_interp_order, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: MCGeneral.
A generalised 3D reversed Monte Carlo radiative algorithm, that allows for 2D antenna patterns, surface reflection and arbitrary sensor positions.
The main output variables y and mc_error represent the Stokes vector integrated over the antenna function, and the estimated error in this vector, respectively.
The WSV mc_max_iter describes the maximum number of ‘photons’ used in the simulation (more photons means smaller mc_error). mc_std_err* is the desired value of mc_error. mc_max_time is the maximum allowed number of seconds for MCGeneral. The method will terminate once any of the max_iter, std_err, max_time criteria are met. If negative values are given for these parameters then it is ignored.
The WSV mc_min_iter sets the minimum number of photons to apply before the condition set by mc_std_err is considered. Values of mc_min_iter below 100 are not accepted.
Only "1" and "RJBT" are allowed for iy_unit. The value of mc_error* follows the selection for iy_unit (both for in- and output.
[in,out] | ws | Workspace |
[out] | y | WS Output |
[out] | mc_iteration_count | WS Output |
[out] | mc_error | WS Output |
[out] | mc_points | WS Output |
[out] | mc_source_domain | WS Output |
[out] | mc_scat_order | WS Output |
[in] | mc_antenna | WS Input |
[in] | f_grid | WS Input |
[in] | f_index | WS Input |
[in] | sensor_pos | WS Input |
[in] | sensor_los | WS Input |
[in] | stokes_dim | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | ppath_step_agenda | WS Input |
[in] | ppath_lmax | WS Input |
[in] | ppath_lraytrace | WS Input |
[in] | iy_space_agenda | WS Input |
[in] | surface_rtprop_agenda | WS Input |
[in] | propmat_clearsky_agenda | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | z_field | WS Input |
[in] | refellipsoid | WS Input |
[in] | z_surface | WS Input |
[in] | t_field | WS Input |
[in] | vmr_field | WS Input |
[in] | cloudbox_on | WS Input |
[in] | cloudbox_limits | WS Input |
[in] | pnd_field | WS Input |
[in] | scat_data | WS Input |
[in] | atmfields_checked | WS Input |
[in] | atmgeom_checked | WS Input |
[in] | scat_data_checked | WS Input |
[in] | cloudbox_checked | WS Input |
[in] | iy_unit | WS Input |
[in] | mc_seed | WS Input |
[in] | mc_std_err | WS Input |
[in] | mc_max_time | WS Input |
[in] | mc_max_iter | WS Input |
[in] | mc_min_iter | WS Input |
[in] | mc_taustep_limit | WS Input |
[in] | l_mc_scat_order | Generic Input (Default: "11") |
[in] | t_interp_order | Generic Input (Default: "1") |
Definition at line 87 of file m_montecarlo.cc.
References ARTS::Var::atmfields_checked(), ARTS::Var::atmgeom_checked(), ARTS::Var::atmosphere_dim(), BOLTZMAN_CONST, chk_if_in_range(), ARTS::Var::cloudbox_checked(), ARTS::Var::cloudbox_limits(), ARTS::Var::cloudbox_on(), CREATE_OUT0, Rng::draw(), ConstMatrixView::empty(), ARTS::Var::f_grid(), ARTS::Var::f_index(), id_mat(), ARTS::Var::iy_space_agenda(), iy_space_agendaExecute(), ARTS::Var::iy_unit(), joker, ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), max, ARTS::Var::mc_antenna(), ARTS::Var::mc_error(), ARTS::Var::mc_iteration_count(), ARTS::Var::mc_points(), ARTS::Var::mc_scat_order(), ARTS::Var::mc_seed(), ARTS::Var::mc_source_domain(), mcPathTraceGeneral(), min, mult(), ConstTensor4View::nbooks(), ARTS::Var::p_grid(), planck(), ARTS::Var::pnd_field(), ARTS::Var::ppath_lmax(), ARTS::Var::ppath_lraytrace(), ARTS::Var::ppath_step(), ARTS::Var::ppath_step_agenda(), ARTS::Var::propmat_clearsky_agenda(), q, ARTS::Var::refellipsoid(), rotmat_enu(), rotmat_stokes(), Sample_los(), ARTS::Var::scat_data(), ARTS::Var::scat_data_checked(), Rng::seed(), ARTS::Var::sensor_los(), ARTS::Var::sensor_pos(), SPEED_OF_LIGHT, sqrt(), ARTS::Var::stokes_dim(), ARTS::Var::surface_rtprop_agenda(), surface_rtprop_agendaExecute(), ARTS::Var::t_field(), ARTS::Var::time(), vector1(), ARTS::Var::verbosity(), ARTS::Var::vmr_field(), ARTS::Var::y(), ARTS::Var::z_field(), and ARTS::Var::z_surface().
Referenced by iyMC(), and MCGeneral_g().
void MCRadar | ( | Workspace & | ws, |
Vector & | y, | ||
Vector & | mc_error, | ||
const MCAntenna & | mc_antenna, | ||
const Vector & | f_grid, | ||
const Index & | f_index, | ||
const Matrix & | sensor_pos, | ||
const Matrix & | sensor_los, | ||
const Index & | stokes_dim, | ||
const Index & | atmosphere_dim, | ||
const Numeric & | ppath_lmax, | ||
const Agenda & | ppath_step_agenda, | ||
const Numeric & | ppath_lraytrace, | ||
const Agenda & | propmat_clearsky_agenda, | ||
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 Index & | cloudbox_on, | ||
const ArrayOfIndex & | cloudbox_limits, | ||
const Tensor4 & | pnd_field, | ||
const ArrayOfArrayOfSingleScatteringData & | scat_data, | ||
const Vector & | mc_y_tx, | ||
const Vector & | range_bins, | ||
const Index & | atmfields_checked, | ||
const Index & | atmgeom_checked, | ||
const Index & | scat_data_checked, | ||
const Index & | cloudbox_checked, | ||
const String & | iy_unit, | ||
const Index & | mc_max_scatorder, | ||
const Index & | mc_seed, | ||
const Index & | mc_max_iter, | ||
const Numeric & | ze_tref, | ||
const Numeric & | k2, | ||
const Index & | t_interp_order, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: MCRadar.
A radar 3D foward Monte Carlo radiative algorithm, that allows for 2D antenna patterns and arbitrary sensor positions. Surface reflections are currently ignored.
The main output variable y and mc_error represent the radar reflectivity integrated over the antenna function, and the estimated error in this vector, respectively.
Unlike with yActive, the range bins gives the boundaries of the range bins as either round-trip time or distance from radar.
The WSV mc_y_tx gives the polarization state of the transmitter.
The WSV mc_max_scatorder prescribes the maximum scattering order to consider, after which ‘photon’-tracing will be terminated. A value of one calculates only single scattering.
The WSV mc_max_iter describes the maximum number of ‘photons’ used in the simulation (more photons means smaller mc_error). The method will terminate once the max_iter criterium is met. If negative values are given for these parameters then it is ignored.
Only "1" and "Ze" are allowed for iy_unit. The value of mc_error* follows the selection for iy_unit (both for in- and output.
[in,out] | ws | Workspace |
[out] | y | WS Output |
[out] | mc_error | WS Output |
[in] | mc_antenna | WS Input |
[in] | f_grid | WS Input |
[in] | f_index | WS Input |
[in] | sensor_pos | WS Input |
[in] | sensor_los | WS Input |
[in] | stokes_dim | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | ppath_lmax | WS Input |
[in] | ppath_step_agenda | WS Input |
[in] | ppath_lraytrace | WS Input |
[in] | propmat_clearsky_agenda | WS Input |
[in] | p_grid | WS Input |
[in] | lat_grid | WS Input |
[in] | lon_grid | WS Input |
[in] | z_field | WS Input |
[in] | refellipsoid | WS Input |
[in] | z_surface | WS Input |
[in] | t_field | WS Input |
[in] | vmr_field | WS Input |
[in] | cloudbox_on | WS Input |
[in] | cloudbox_limits | WS Input |
[in] | pnd_field | WS Input |
[in] | scat_data | WS Input |
[in] | mc_y_tx | WS Input |
[in] | range_bins | WS Input |
[in] | atmfields_checked | WS Input |
[in] | atmgeom_checked | WS Input |
[in] | scat_data_checked | WS Input |
[in] | cloudbox_checked | WS Input |
[in] | iy_unit | WS Input |
[in] | mc_max_scatorder | WS Input |
[in] | mc_seed | WS Input |
[in] | mc_max_iter | WS Input |
[in] | ze_tref | Generic Input (Default: "273.15") |
[in] | k2 | Generic Input (Default: "-1") |
[in] | t_interp_order | Generic Input (Default: "1") |
Definition at line 548 of file m_montecarlo.cc.
References ANTENNA_TYPE_GAUSSIAN, ARTS::Var::atmfields_checked(), ARTS::Var::atmgeom_checked(), ARTS::Var::atmosphere_dim(), chk_if_in_range(), ARTS::Var::cloudbox_checked(), ARTS::Var::cloudbox_limits(), ARTS::Var::cloudbox_on(), CREATE_OUT0, Rng::draw(), ARTS::Var::f_grid(), ARTS::Var::f_index(), fac(), is_anyptype_nonTotRan(), is_increasing(), ARTS::Var::iy_unit(), joker, ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), max, ARTS::Var::mc_antenna(), ARTS::Var::mc_error(), ARTS::Var::mc_max_iter(), ARTS::Var::mc_seed(), ARTS::Var::mc_y_tx(), mcPathTraceRadar(), min, mirror_los(), mult(), ARTS::Var::p_grid(), PI, ARTS::Var::pnd_field(), ARTS::Var::ppath(), ARTS::Var::ppath_lmax(), ARTS::Var::ppath_lraytrace(), ARTS::Var::ppath_step(), ARTS::Var::ppath_step_agenda(), ARTS::Var::propmat_clearsky_agenda(), ARTS::Var::range_bins(), ARTS::Var::refellipsoid(), rotmat_enu(), rotmat_stokes(), rte_losGeometricFromRtePosToRtePos2(), ARTS::Var::scat_data(), ARTS::Var::scat_data_checked(), Rng::seed(), ARTS::Var::sensor_los(), ARTS::Var::sensor_pos(), SPEED_OF_LIGHT, ARTS::Var::stokes_dim(), ARTS::Var::t_field(), transpose(), ARTS::Var::verbosity(), ARTS::Var::vmr_field(), ARTS::Var::y(), ARTS::Var::z_field(), ARTS::Var::z_surface(), and ze_cfac().
Referenced by MCRadar_g().
WORKSPACE METHOD: MCSetSeedFromTime.
Sets the value of mc_seed from system time
[out] | mc_seed | WS Output |
Definition at line 1096 of file m_montecarlo.cc.
References ARTS::Var::mc_seed(), and ARTS::Var::time().
Referenced by iyMC(), and MCSetSeedFromTime_g().
|
extern |
Referenced by MCGeneral().
|
extern |
|
extern |
|
extern |
Referenced by MCGeneral(), and MCRadar().