ARTS
2.3.1285(git:92a29ea9-dirty)
|
This filecontains workspace methods for calculating the optical properties for the radiative transfer. More...
#include <cfloat>
#include <cmath>
#include "array.h"
#include "arts.h"
#include "auto_md.h"
#include "check_input.h"
#include "exceptions.h"
#include "interpolation.h"
#include "logic.h"
#include "math_funcs.h"
#include "matpackIII.h"
#include "matpackVII.h"
#include "messages.h"
#include "montecarlo.h"
#include "optproperties.h"
#include "sorting.h"
#include "xml_io.h"
Go to the source code of this file.
Macros | |
#define | PART_TYPE scat_data[i_ss][i_se].ptype |
#define | F_DATAGRID scat_data[i_ss][i_se].f_grid |
#define | T_DATAGRID scat_data[i_ss][i_se].T_grid |
#define | ZA_DATAGRID scat_data[i_ss][i_se].za_grid |
#define | AA_DATAGRID scat_data[i_ss][i_se].aa_grid |
#define | PHA_MAT_DATA scat_data[i_ss][i_se].pha_mat_data |
#define | EXT_MAT_DATA scat_data[i_ss][i_se].ext_mat_data |
#define | ABS_VEC_DATA scat_data[i_ss][i_se].abs_vec_data |
#define | PND_LIMIT 1e-12 |
Functions | |
void | pha_mat_sptFromData (Tensor5 &pha_mat_spt, const ArrayOfArrayOfSingleScatteringData &scat_data, const Vector &za_grid, const Vector &aa_grid, const Index &za_index, const Index &aa_index, const Index &f_index, const Vector &f_grid, const Numeric &rtp_temperature, const Tensor4 &pnd_field, const Index &scat_p_index, const Index &scat_lat_index, const Index &scat_lon_index, const Verbosity &verbosity) |
WORKSPACE METHOD: pha_mat_sptFromData. More... | |
void | pha_mat_sptFromDataDOITOpt (Tensor5 &pha_mat_spt, const ArrayOfTensor7 &pha_mat_sptDOITOpt, const ArrayOfArrayOfSingleScatteringData &scat_data_mono, const Index &doit_za_grid_size, const Vector &aa_grid, const Index &za_index, const Index &aa_index, const Numeric &rtp_temperature, const Tensor4 &pnd_field, const Index &scat_p_index, const Index &scat_lat_index, const Index &scat_lon_index, const Verbosity &) |
WORKSPACE METHOD: pha_mat_sptFromDataDOITOpt. More... | |
void | opt_prop_sptFromData (ArrayOfPropagationMatrix &ext_mat_spt, ArrayOfStokesVector &abs_vec_spt, const ArrayOfArrayOfSingleScatteringData &scat_data, const Vector &za_grid, const Vector &aa_grid, const Index &za_index, const Index &aa_index, const Index &f_index, const Vector &f_grid, const Numeric &rtp_temperature, const Tensor4 &pnd_field, const Index &scat_p_index, const Index &scat_lat_index, const Index &scat_lon_index, const Verbosity &verbosity) |
WORKSPACE METHOD: opt_prop_sptFromData. More... | |
void | opt_prop_sptFromScat_data (ArrayOfPropagationMatrix &ext_mat_spt, ArrayOfStokesVector &abs_vec_spt, const ArrayOfArrayOfSingleScatteringData &scat_data, const Index &scat_data_checked, const Vector &za_grid, const Vector &aa_grid, const Index &za_index, const Index &aa_index, const Index &f_index, const Numeric &rtp_temperature, const Tensor4 &pnd_field, const Index &scat_p_index, const Index &scat_lat_index, const Index &scat_lon_index, const Verbosity &verbosity) |
WORKSPACE METHOD: opt_prop_sptFromScat_data. More... | |
void | opt_prop_bulkCalc (PropagationMatrix &ext_mat, StokesVector &abs_vec, const ArrayOfPropagationMatrix &ext_mat_spt, const ArrayOfStokesVector &abs_vec_spt, const Tensor4 &pnd_field, const Index &scat_p_index, const Index &scat_lat_index, const Index &scat_lon_index, const Verbosity &) |
WORKSPACE METHOD: opt_prop_bulkCalc. More... | |
void | ext_matAddGas (PropagationMatrix &ext_mat, const ArrayOfPropagationMatrix &propmat_clearsky, const Verbosity &) |
WORKSPACE METHOD: ext_matAddGas. More... | |
void | abs_vecAddGas (StokesVector &abs_vec, const ArrayOfPropagationMatrix &propmat_clearsky, const Verbosity &) |
WORKSPACE METHOD: abs_vecAddGas. More... | |
void | pha_matCalc (Tensor4 &pha_mat, const Tensor5 &pha_mat_spt, const Tensor4 &pnd_field, const Index &atmosphere_dim, const Index &scat_p_index, const Index &scat_lat_index, const Index &scat_lon_index, const Verbosity &) |
WORKSPACE METHOD: pha_matCalc. More... | |
void | scat_dataCheck (const ArrayOfArrayOfSingleScatteringData &scat_data, const String &check_type, const Numeric &threshold, const Verbosity &verbosity) |
WORKSPACE METHOD: scat_dataCheck. More... | |
void | DoitScatteringDataPrepare (Workspace &ws, ArrayOfTensor7 &pha_mat_sptDOITOpt, ArrayOfArrayOfSingleScatteringData &scat_data_mono, Tensor7 &pha_mat_doit, Vector &aa_grid, const Index &doit_za_grid_size, const ArrayOfArrayOfSingleScatteringData &scat_data, const Index &scat_data_checked, const Index &f_index, const Index &atmosphere_dim, const Index &stokes_dim, const Tensor3 &t_field, const ArrayOfIndex &cloudbox_limits, const Tensor4 &pnd_field, const Agenda &pha_mat_spt_agenda, const Verbosity &verbosity) |
WORKSPACE METHOD: DoitScatteringDataPrepare. More... | |
void | scat_dataCalc (ArrayOfArrayOfSingleScatteringData &scat_data, const ArrayOfArrayOfSingleScatteringData &scat_data_raw, const Vector &f_grid, const Index &interp_order, const Verbosity &) |
WORKSPACE METHOD: scat_dataCalc. More... | |
void | scat_dataReduceT (ArrayOfArrayOfSingleScatteringData &scat_data, const Index &i_ss, const Numeric &T, const Index &interp_order, const Index &phamat_only, const Numeric &threshold, const Verbosity &) |
WORKSPACE METHOD: scat_dataReduceT. More... | |
void | scat_data_monoCalc (ArrayOfArrayOfSingleScatteringData &scat_data_mono, const ArrayOfArrayOfSingleScatteringData &scat_data, const Vector &f_grid, const Index &f_index, const Verbosity &) |
WORKSPACE METHOD: scat_data_monoCalc. More... | |
void | scat_data_monoExtract (ArrayOfArrayOfSingleScatteringData &scat_data_mono, const ArrayOfArrayOfSingleScatteringData &scat_data, const Index &f_index, const Verbosity &) |
WORKSPACE METHOD: scat_data_monoExtract. More... | |
void | opt_prop_sptFromMonoData (ArrayOfPropagationMatrix &ext_mat_spt, ArrayOfStokesVector &abs_vec_spt, const ArrayOfArrayOfSingleScatteringData &scat_data_mono, const Vector &za_grid, const Vector &aa_grid, const Index &za_index, const Index &aa_index, const Numeric &rtp_temperature, const Tensor4 &pnd_field, const Index &scat_p_index, const Index &scat_lat_index, const Index &scat_lon_index, const Verbosity &verbosity) |
WORKSPACE METHOD: opt_prop_sptFromMonoData. More... | |
void | pha_mat_sptFromMonoData (Tensor5 &pha_mat_spt, const ArrayOfArrayOfSingleScatteringData &scat_data_mono, const Index &doit_za_grid_size, const Vector &aa_grid, const Index &za_index, const Index &aa_index, const Numeric &rtp_temperature, const Tensor4 &pnd_field, const Index &scat_p_index, const Index &scat_lat_index, const Index &scat_lon_index, const Verbosity &verbosity) |
WORKSPACE METHOD: pha_mat_sptFromMonoData. More... | |
void | pha_mat_sptFromScat_data (Tensor5 &pha_mat_spt, const ArrayOfArrayOfSingleScatteringData &scat_data, const Index &scat_data_checked, const Vector &za_grid, const Vector &aa_grid, const Index &za_index, const Index &aa_index, const Index &f_index, const Numeric &rtp_temperature, const Tensor4 &pnd_field, const Index &scat_p_index, const Index &scat_lat_index, const Index &scat_lon_index, const Verbosity &verbosity) |
WORKSPACE METHOD: pha_mat_sptFromScat_data. More... | |
void | ScatSpeciesMerge (Tensor4 &pnd_field, ArrayOfArrayOfSingleScatteringData &scat_data, ArrayOfArrayOfScatteringMetaData &scat_meta, ArrayOfString &scat_species, Index &cloudbox_checked, const Index &atmosphere_dim, const Index &cloudbox_on, const ArrayOfIndex &cloudbox_limits, const Tensor3 &t_field, const Tensor3 &z_field, const Matrix &z_surface, const Verbosity &) |
WORKSPACE METHOD: ScatSpeciesMerge. More... | |
void | ExtractFromMetaSingleScatSpecies (Vector &meta_param, const ArrayOfArrayOfScatteringMetaData &scat_meta, const String &meta_name, const Index &scat_species_index, const Verbosity &) |
WORKSPACE METHOD: ExtractFromMetaSingleScatSpecies. More... | |
Variables | |
const Numeric | PI |
const Numeric | DEG2RAD |
const Numeric | RAD2DEG |
This filecontains workspace methods for calculating the optical properties for the radiative transfer.
Definition in file m_optproperties.cc.
#define AA_DATAGRID scat_data[i_ss][i_se].aa_grid |
Definition at line 65 of file m_optproperties.cc.
Referenced by opt_prop_sptFromData(), opt_prop_sptFromScat_data(), pha_mat_sptFromData(), pha_mat_sptFromScat_data(), scat_data_monoExtract(), scat_dataCalc(), scat_dataCheck(), and scat_dataReduceT().
#define ABS_VEC_DATA scat_data[i_ss][i_se].abs_vec_data |
Definition at line 68 of file m_optproperties.cc.
Referenced by opt_prop_sptFromData(), opt_prop_sptFromScat_data(), scat_data_monoExtract(), scat_dataCalc(), scat_dataCheck(), and scat_dataReduceT().
#define EXT_MAT_DATA scat_data[i_ss][i_se].ext_mat_data |
Definition at line 67 of file m_optproperties.cc.
Referenced by opt_prop_sptFromData(), opt_prop_sptFromScat_data(), scat_data_monoExtract(), scat_dataCalc(), scat_dataCheck(), and scat_dataReduceT().
#define F_DATAGRID scat_data[i_ss][i_se].f_grid |
Definition at line 62 of file m_optproperties.cc.
Referenced by opt_prop_sptFromData(), pha_mat_sptFromData(), scat_data_monoExtract(), scat_dataCalc(), scat_dataCheck(), and scat_dataReduceT().
#define PART_TYPE scat_data[i_ss][i_se].ptype |
Definition at line 61 of file m_optproperties.cc.
Referenced by opt_prop_sptFromData(), opt_prop_sptFromScat_data(), pha_mat_sptFromData(), pha_mat_sptFromScat_data(), scat_data_monoExtract(), scat_dataCalc(), scat_dataCheck(), and scat_dataReduceT().
#define PHA_MAT_DATA scat_data[i_ss][i_se].pha_mat_data |
Definition at line 66 of file m_optproperties.cc.
Referenced by pha_mat_sptFromData(), pha_mat_sptFromScat_data(), scat_data_monoExtract(), scat_dataCalc(), scat_dataCheck(), and scat_dataReduceT().
#define PND_LIMIT 1e-12 |
Definition at line 72 of file m_optproperties.cc.
Referenced by opt_prop_sptFromData(), opt_prop_sptFromMonoData(), opt_prop_sptFromScat_data(), pha_mat_sptFromData(), pha_mat_sptFromDataDOITOpt(), pha_mat_sptFromMonoData(), pha_mat_sptFromScat_data(), and ScatSpeciesMerge().
#define T_DATAGRID scat_data[i_ss][i_se].T_grid |
Definition at line 63 of file m_optproperties.cc.
Referenced by opt_prop_sptFromData(), opt_prop_sptFromScat_data(), pha_mat_sptFromData(), pha_mat_sptFromScat_data(), scat_data_monoExtract(), scat_dataCalc(), scat_dataCheck(), and scat_dataReduceT().
#define ZA_DATAGRID scat_data[i_ss][i_se].za_grid |
Definition at line 64 of file m_optproperties.cc.
Referenced by opt_prop_sptFromData(), opt_prop_sptFromScat_data(), pha_mat_sptFromData(), pha_mat_sptFromScat_data(), scat_data_monoExtract(), scat_dataCalc(), scat_dataCheck(), and scat_dataReduceT().
void abs_vecAddGas | ( | StokesVector & | abs_vec, |
const ArrayOfPropagationMatrix & | propmat_clearsky, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: abs_vecAddGas.
Add gas absorption to first element of absorption vector.
The task of this method is to sum up the gas absorption of the different gas species and add the result to the first element of the absorption vector.
[in,out] | abs_vec | WS Input/Output |
[in] | propmat_clearsky | WS Input |
Definition at line 944 of file m_optproperties.cc.
References PropagationMatrix::NumberOfFrequencies(), pm, and PropagationMatrix::StokesDimensions().
Referenced by abs_vecAddGas_g().
void DoitScatteringDataPrepare | ( | Workspace & | ws, |
ArrayOfTensor7 & | pha_mat_sptDOITOpt, | ||
ArrayOfArrayOfSingleScatteringData & | scat_data_mono, | ||
Tensor7 & | pha_mat_doit, | ||
Vector & | aa_grid, | ||
const Index & | doit_za_grid_size, | ||
const ArrayOfArrayOfSingleScatteringData & | scat_data, | ||
const Index & | scat_data_checked, | ||
const Index & | f_index, | ||
const Index & | atmosphere_dim, | ||
const Index & | stokes_dim, | ||
const Tensor3 & | t_field, | ||
const ArrayOfIndex & | cloudbox_limits, | ||
const Tensor4 & | pnd_field, | ||
const Agenda & | pha_mat_spt_agenda, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: DoitScatteringDataPrepare.
Prepares single scattering data for a DOIT scattering calculation.
First the scattering data is interpolated in frequency using scat_data_monoCalc*. Then the phase matrix data is transformed or interpolated from the raw data to the laboratory frame for all possible combinations of the angles contained in the angular grids which are set in DOAngularGridsSet. The resulting phase matrices are stored in pha_mat_sptDOITOpt.
[in,out] | ws | Workspace |
[out] | pha_mat_sptDOITOpt | WS Output |
[out] | scat_data_mono | WS Output |
[out] | pha_mat_doit | WS Output |
[in,out] | aa_grid | WS Input/Output |
[in] | doit_za_grid_size | WS Input |
[in] | scat_data | WS Input |
[in] | scat_data_checked | WS Input |
[in] | f_index | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | stokes_dim | WS Input |
[in] | t_field | WS Input |
[in] | cloudbox_limits | WS Input |
[in] | pnd_field | WS Input |
[in] | pha_mat_spt_agenda | WS Input |
Definition at line 1345 of file m_optproperties.cc.
References joker, ConstTensor4View::nbooks(), Array< base >::nelem(), ConstVectorView::nelem(), nlinspace(), pha_mat_spt_agendaExecute(), pha_matCalc(), pha_matTransform(), Vector::resize(), Tensor7::resize(), scat_data_monoExtract(), and TotalNumberOfElements().
Referenced by DoitScatteringDataPrepare_g().
void ext_matAddGas | ( | PropagationMatrix & | ext_mat, |
const ArrayOfPropagationMatrix & | propmat_clearsky, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: ext_matAddGas.
Add gas absorption to all diagonal elements of extinction matrix.
The task of this method is to sum up the gas absorption of the different gas species and add the result to the extinction matrix.
[in,out] | ext_mat | WS Input/Output |
[in] | propmat_clearsky | WS Input |
Definition at line 917 of file m_optproperties.cc.
References PropagationMatrix::NumberOfFrequencies(), pm, and PropagationMatrix::StokesDimensions().
Referenced by ext_matAddGas_g().
void ExtractFromMetaSingleScatSpecies | ( | Vector & | meta_param, |
const ArrayOfArrayOfScatteringMetaData & | scat_meta, | ||
const String & | meta_name, | ||
const Index & | scat_species_index, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: ExtractFromMetaSingleScatSpecies.
Extract (numeric) parameters from scat_meta of a single scattering species.
...
[out] | meta_param | Generic output |
[in] | scat_meta | WS Input |
[in] | meta_name | Generic Input |
[in] | scat_species_index | Generic Input |
Definition at line 3090 of file m_optproperties.cc.
References i, Array< base >::nelem(), Vector::resize(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().
Referenced by ExtractFromMetaSingleScatSpecies_g().
void opt_prop_bulkCalc | ( | PropagationMatrix & | ext_mat, |
StokesVector & | abs_vec, | ||
const ArrayOfPropagationMatrix & | ext_mat_spt, | ||
const ArrayOfStokesVector & | abs_vec_spt, | ||
const Tensor4 & | pnd_field, | ||
const Index & | scat_p_index, | ||
const Index & | scat_lat_index, | ||
const Index & | scat_lon_index, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: opt_prop_bulkCalc.
Calculates bulk absorption extinction at one atmospheric grid point.
This WSM sums up the monochromatic absorption vectors and extinction matrices of all scattering elements (abs_vec_spt and ext_mat_spt*, respectively) weighted by their respective particle number density given by pnd_field, for a single location within the cloudbox, given by scat_p_index, scat_lat_index, and scat_lon_index*. The resulting extinction matrix is added to the workspace variable ext_mat*.
[in,out] | ext_mat | WS Input/Output |
[in,out] | abs_vec | WS Input/Output |
[in] | ext_mat_spt | WS Input |
[in] | abs_vec_spt | WS Input |
[in] | pnd_field | WS Input |
[in] | scat_p_index | WS Input |
[in] | scat_lat_index | WS Input |
[in] | scat_lon_index | WS Input |
Definition at line 857 of file m_optproperties.cc.
References PropagationMatrix::MultiplyAndAdd(), StokesVector::MultiplyAndAdd(), Array< base >::nelem(), PropagationMatrix::SetZero(), and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().
Referenced by cloud_fieldsCalc(), and opt_prop_bulkCalc_g().
void opt_prop_sptFromData | ( | ArrayOfPropagationMatrix & | ext_mat_spt, |
ArrayOfStokesVector & | abs_vec_spt, | ||
const ArrayOfArrayOfSingleScatteringData & | scat_data, | ||
const Vector & | za_grid, | ||
const Vector & | aa_grid, | ||
const Index & | za_index, | ||
const Index & | aa_index, | ||
const Index & | f_index, | ||
const Vector & | f_grid, | ||
const Numeric & | rtp_temperature, | ||
const Tensor4 & | pnd_field, | ||
const Index & | scat_p_index, | ||
const Index & | scat_lat_index, | ||
const Index & | scat_lon_index, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: opt_prop_sptFromData.
Calculates monochromatic optical properties for all scattering elements.
In this function the extinction matrix and the absorption vector are calculated in the laboratory frame. An interpolation of the data on the actual frequency is the first step in this function. The next step is a transformation from the database coordinate system to the laboratory coordinate system.
Output of the function are ext_mat_spt and abs_vec_spt, which hold the optical properties for a specified propagation direction for each scattering element.
[in,out] | ext_mat_spt | WS Input/Output |
[in,out] | abs_vec_spt | WS Input/Output |
[in] | scat_data | WS Input |
[in] | za_grid | WS Input |
[in] | aa_grid | WS Input |
[in] | za_index | WS Input |
[in] | aa_index | WS Input |
[in] | f_index | WS Input |
[in] | f_grid | WS Input |
[in] | rtp_temperature | WS Input |
[in] | pnd_field | WS Input |
[in] | scat_p_index | WS Input |
[in] | scat_lat_index | WS Input |
[in] | scat_lon_index | WS Input |
Definition at line 457 of file m_optproperties.cc.
References AA_DATAGRID, ABS_VEC_DATA, abs_vecTransform(), chk_interpolation_grids(), DEBUG_ONLY, EXT_MAT_DATA, ext_matTransform(), F_DATAGRID, gridpos(), i, interp(), interpweights(), joker, Array< base >::nelem(), ConstVectorView::nelem(), PART_TYPE, PND_LIMIT, Tensor3::resize(), Vector::resize(), _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), T_DATAGRID, TotalNumberOfElements(), and ZA_DATAGRID.
Referenced by opt_prop_sptFromData_g().
void opt_prop_sptFromMonoData | ( | ArrayOfPropagationMatrix & | ext_mat_spt, |
ArrayOfStokesVector & | abs_vec_spt, | ||
const ArrayOfArrayOfSingleScatteringData & | scat_data_mono, | ||
const Vector & | za_grid, | ||
const Vector & | aa_grid, | ||
const Index & | za_index, | ||
const Index & | aa_index, | ||
const Numeric & | rtp_temperature, | ||
const Tensor4 & | pnd_field, | ||
const Index & | scat_p_index, | ||
const Index & | scat_lat_index, | ||
const Index & | scat_lon_index, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: opt_prop_sptFromMonoData.
Calculates optical properties for the scattering elements.
As opt_prop_sptFromData but no frequency interpolation is performed. The single scattering data is here obtained from scat_data_mono*, instead of scat_data.
[in,out] | ext_mat_spt | WS Input/Output |
[in,out] | abs_vec_spt | WS Input/Output |
[in] | scat_data_mono | WS Input |
[in] | za_grid | WS Input |
[in] | aa_grid | WS Input |
[in] | za_index | WS Input |
[in] | aa_index | WS Input |
[in] | rtp_temperature | WS Input |
[in] | pnd_field | WS Input |
[in] | scat_p_index | WS Input |
[in] | scat_lat_index | WS Input |
[in] | scat_lon_index | WS Input |
Definition at line 2262 of file m_optproperties.cc.
References abs_vecTransform(), chk_interpolation_grids(), DEBUG_ONLY, ext_matTransform(), gridpos(), interp(), interpweights(), joker, Array< base >::nelem(), ConstVectorView::nelem(), pm, PND_LIMIT, _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), and TotalNumberOfElements().
Referenced by opt_prop_sptFromMonoData_g().
void opt_prop_sptFromScat_data | ( | ArrayOfPropagationMatrix & | ext_mat_spt, |
ArrayOfStokesVector & | abs_vec_spt, | ||
const ArrayOfArrayOfSingleScatteringData & | scat_data, | ||
const Index & | scat_data_checked, | ||
const Vector & | za_grid, | ||
const Vector & | aa_grid, | ||
const Index & | za_index, | ||
const Index & | aa_index, | ||
const Index & | f_index, | ||
const Numeric & | rtp_temperature, | ||
const Tensor4 & | pnd_field, | ||
const Index & | scat_p_index, | ||
const Index & | scat_lat_index, | ||
const Index & | scat_lon_index, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: opt_prop_sptFromScat_data.
Derives monochromatic optical properties for all scattering elements.
As opt_prop_sptFromData, but using frequency pre-interpolated data (as produced by scat_dataCalc), i.e. in here no frequency interpolation is done anymore.
[in,out] | ext_mat_spt | WS Input/Output |
[in,out] | abs_vec_spt | WS Input/Output |
[in] | scat_data | WS Input |
[in] | scat_data_checked | WS Input |
[in] | za_grid | WS Input |
[in] | aa_grid | WS Input |
[in] | za_index | WS Input |
[in] | aa_index | WS Input |
[in] | f_index | WS Input |
[in] | rtp_temperature | WS Input |
[in] | pnd_field | WS Input |
[in] | scat_p_index | WS Input |
[in] | scat_lat_index | WS Input |
[in] | scat_lon_index | WS Input |
Definition at line 661 of file m_optproperties.cc.
References AA_DATAGRID, ABS_VEC_DATA, abs_vecTransform(), chk_interpolation_grids(), DEBUG_ONLY, EXT_MAT_DATA, ext_matTransform(), gridpos(), i, interp(), interpweights(), joker, Array< base >::nelem(), PART_TYPE, pm, PND_LIMIT, Tensor3::resize(), Vector::resize(), _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), T_DATAGRID, TotalNumberOfElements(), and ZA_DATAGRID.
Referenced by opt_prop_sptFromScat_data_g().
void pha_mat_sptFromData | ( | Tensor5 & | pha_mat_spt, |
const ArrayOfArrayOfSingleScatteringData & | scat_data, | ||
const Vector & | za_grid, | ||
const Vector & | aa_grid, | ||
const Index & | za_index, | ||
const Index & | aa_index, | ||
const Index & | f_index, | ||
const Vector & | f_grid, | ||
const Numeric & | rtp_temperature, | ||
const Tensor4 & | pnd_field, | ||
const Index & | scat_p_index, | ||
const Index & | scat_lat_index, | ||
const Index & | scat_lon_index, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: pha_mat_sptFromData.
Calculation of the phase matrix of the individual scattering elements.
This function can be used in pha_mat_spt_agenda as part of the calculation of the scattering integral.
First, data at the requested frequency (given by f_grid and f_index*) and temperature (given by rtp_temperature) is extracted. This is followed by a transformation from the database coordinate system to the laboratory coordinate system.
Frequency extraction is always done by (linear) interpolation. Temperature is (linearly) interpolated when at least two temperature grid points are present in the scat_data and rtp_temperature* is positive. If only a single temperature point is available, data for this point is used without modification. In order to speed up calculations, temperature interpolation can be avoided by passing a rtp_temperature<0. In this case, a specific temperature grid from the scat_data grid is used without modification. The selection is as follows: <br> -10 < rtp_temperature * < 0 T_grid[0] lowest temperature <br> -20 < *rtp_temperature * < -10 T_grid[nT-1] highest temperature <br> *rtp_temperature < -20 T_grid[nT/2] median grid point
[in,out] | pha_mat_spt | WS Input/Output |
[in] | scat_data | WS Input |
[in] | za_grid | WS Input |
[in] | aa_grid | WS Input |
[in] | za_index | WS Input |
[in] | aa_index | WS Input |
[in] | f_index | WS Input |
[in] | f_grid | WS Input |
[in] | rtp_temperature | WS Input |
[in] | pnd_field | WS Input |
[in] | scat_p_index | WS Input |
[in] | scat_lat_index | WS Input |
[in] | scat_lon_index | WS Input |
Definition at line 75 of file m_optproperties.cc.
References AA_DATAGRID, chk_interpolation_grids(), F_DATAGRID, gridpos(), i, interp(), interpweights(), joker, ConstTensor4View::nbooks(), ConstTensor5View::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), ConstTensor5View::nshelves(), PART_TYPE, PHA_MAT_DATA, pha_matTransform(), PND_LIMIT, Tensor5::resize(), Vector::resize(), _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), T_DATAGRID, TotalNumberOfElements(), and ZA_DATAGRID.
Referenced by pha_mat_sptFromData_g().
void pha_mat_sptFromDataDOITOpt | ( | Tensor5 & | pha_mat_spt, |
const ArrayOfTensor7 & | pha_mat_sptDOITOpt, | ||
const ArrayOfArrayOfSingleScatteringData & | scat_data_mono, | ||
const Index & | doit_za_grid_size, | ||
const Vector & | aa_grid, | ||
const Index & | za_index, | ||
const Index & | aa_index, | ||
const Numeric & | rtp_temperature, | ||
const Tensor4 & | pnd_field, | ||
const Index & | scat_p_index, | ||
const Index & | scat_lat_index, | ||
const Index & | scat_lon_index, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: pha_mat_sptFromDataDOITOpt.
Calculation of the phase matrix of the individual scattering elements.
In this function the phase matrix is extracted from pha_mat_sptDOITOpt*. It can be used in the agenda pha_mat_spt_agenda*. This method must be used in combination with DoitScatteringDataPrepare*.
Temperature is considered as described for pha_mat_sptFromData
[in,out] | pha_mat_spt | WS Input/Output |
[in] | pha_mat_sptDOITOpt | WS Input |
[in] | scat_data_mono | WS Input |
[in] | doit_za_grid_size | WS Input |
[in] | aa_grid | WS Input |
[in] | za_index | WS Input |
[in] | aa_index | WS Input |
[in] | rtp_temperature | WS Input |
[in] | pnd_field | WS Input |
[in] | scat_p_index | WS Input |
[in] | scat_lat_index | WS Input |
[in] | scat_lon_index | WS Input |
Definition at line 275 of file m_optproperties.cc.
References chk_interpolation_grids(), gridpos(), i, interp(), interpweights(), joker, ConstTensor4View::nbooks(), ConstTensor4View::ncols(), ConstTensor5View::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), nlinspace(), ConstTensor5View::nshelves(), PND_LIMIT, _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), and TotalNumberOfElements().
Referenced by pha_mat_sptFromDataDOITOpt_g().
void pha_mat_sptFromMonoData | ( | Tensor5 & | pha_mat_spt, |
const ArrayOfArrayOfSingleScatteringData & | scat_data_mono, | ||
const Index & | doit_za_grid_size, | ||
const Vector & | aa_grid, | ||
const Index & | za_index, | ||
const Index & | aa_index, | ||
const Numeric & | rtp_temperature, | ||
const Tensor4 & | pnd_field, | ||
const Index & | scat_p_index, | ||
const Index & | scat_lat_index, | ||
const Index & | scat_lon_index, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: pha_mat_sptFromMonoData.
Calculation of the phase matrix of the individual scattering elements.
This function is the monochromatic version of pha_mat_sptFromData.
[in,out] | pha_mat_spt | WS Input/Output |
[in] | scat_data_mono | WS Input |
[in] | doit_za_grid_size | WS Input |
[in] | aa_grid | WS Input |
[in] | za_index | WS Input |
[in] | aa_index | WS Input |
[in] | rtp_temperature | WS Input |
[in] | pnd_field | WS Input |
[in] | scat_p_index | WS Input |
[in] | scat_lat_index | WS Input |
[in] | scat_lon_index | WS Input |
Definition at line 2432 of file m_optproperties.cc.
References chk_interpolation_grids(), gridpos(), gridpos_copy(), i, interp(), interpweights(), joker, ConstTensor4View::nbooks(), ConstTensor5View::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), nlinspace(), ConstTensor5View::nrows(), ConstTensor5View::nshelves(), pha_matTransform(), PND_LIMIT, _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), and TotalNumberOfElements().
Referenced by pha_mat_sptFromMonoData_g().
void pha_mat_sptFromScat_data | ( | Tensor5 & | pha_mat_spt, |
const ArrayOfArrayOfSingleScatteringData & | scat_data, | ||
const Index & | scat_data_checked, | ||
const Vector & | za_grid, | ||
const Vector & | aa_grid, | ||
const Index & | za_index, | ||
const Index & | aa_index, | ||
const Index & | f_index, | ||
const Numeric & | rtp_temperature, | ||
const Tensor4 & | pnd_field, | ||
const Index & | scat_p_index, | ||
const Index & | scat_lat_index, | ||
const Index & | scat_lon_index, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: pha_mat_sptFromScat_data.
Calculation of the phase matrix of the individual scattering elements.
As pha_mat_sptFromData, but using frequency pre-interpolated data (as produced by scat_dataCalc), i.e. in here no frequency interpolation is done anymore.
[in,out] | pha_mat_spt | WS Input/Output |
[in] | scat_data | WS Input |
[in] | scat_data_checked | WS Input |
[in] | za_grid | WS Input |
[in] | aa_grid | WS Input |
[in] | za_index | WS Input |
[in] | aa_index | WS Input |
[in] | f_index | WS Input |
[in] | rtp_temperature | WS Input |
[in] | pnd_field | WS Input |
[in] | scat_p_index | WS Input |
[in] | scat_lat_index | WS Input |
[in] | scat_lon_index | WS Input |
Definition at line 2596 of file m_optproperties.cc.
References AA_DATAGRID, abs, chk_interpolation_grids(), gridpos(), i, interp(), interpweights(), joker, ConstTensor4View::nbooks(), ConstTensor5View::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), ConstTensor5View::nshelves(), PART_TYPE, PHA_MAT_DATA, pha_matTransform(), PND_LIMIT, Tensor5::resize(), Vector::resize(), _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), T_DATAGRID, TotalNumberOfElements(), and ZA_DATAGRID.
Referenced by pha_mat_sptFromScat_data_g().
void pha_matCalc | ( | Tensor4 & | pha_mat, |
const Tensor5 & | pha_mat_spt, | ||
const Tensor4 & | pnd_field, | ||
const Index & | atmosphere_dim, | ||
const Index & | scat_p_index, | ||
const Index & | scat_lat_index, | ||
const Index & | scat_lon_index, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: pha_matCalc.
Calculates the total phase matrix of all scattering elements.
This function sums up the monochromatic phase matrices of all scattering elements pha_mat_spt weighted with their respective particle number density, given by pnd_field, for a single location within the cloudbox, given by scat_p_index, scat_lat_index, and scat_lon_index*.
[out] | pha_mat | WS Output |
[in] | pha_mat_spt | WS Input |
[in] | pnd_field | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | scat_p_index | WS Input |
[in] | scat_lat_index | WS Input |
[in] | scat_lon_index | WS Input |
Definition at line 1015 of file m_optproperties.cc.
References DEG2RAD, ConstTensor5View::nbooks(), ConstTensor5View::npages(), ConstTensor5View::nrows(), ConstTensor5View::nshelves(), and Tensor4::resize().
Referenced by doit_scat_fieldCalc(), doit_scat_fieldCalcLimb(), DoitScatteringDataPrepare(), and pha_matCalc_g().
void scat_data_monoCalc | ( | ArrayOfArrayOfSingleScatteringData & | scat_data_mono, |
const ArrayOfArrayOfSingleScatteringData & | scat_data, | ||
const Vector & | f_grid, | ||
const Index & | f_index, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: scat_data_monoCalc.
Interpolates scat_data by frequency to give scat_data_mono.
[out] | scat_data_mono | WS Output |
[in] | scat_data | WS Input |
[in] | f_grid | WS Input |
[in] | f_index | WS Input |
Definition at line 2065 of file m_optproperties.cc.
Referenced by scat_data_monoCalc_g().
void scat_data_monoExtract | ( | ArrayOfArrayOfSingleScatteringData & | scat_data_mono, |
const ArrayOfArrayOfSingleScatteringData & | scat_data, | ||
const Index & | f_index, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: scat_data_monoExtract.
Extracts data at f_index from scat_data to give scat_data_mono.
[out] | scat_data_mono | WS Output |
[in] | scat_data | WS Input |
[in] | f_index | WS Input |
Definition at line 2196 of file m_optproperties.cc.
References AA_DATAGRID, ABS_VEC_DATA, EXT_MAT_DATA, F_DATAGRID, joker, Array< base >::nelem(), PART_TYPE, PHA_MAT_DATA, T_DATAGRID, and ZA_DATAGRID.
Referenced by DoitScatteringDataPrepare(), and scat_data_monoExtract_g().
void scat_dataCalc | ( | ArrayOfArrayOfSingleScatteringData & | scat_data, |
const ArrayOfArrayOfSingleScatteringData & | scat_data_raw, | ||
const Vector & | f_grid, | ||
const Index & | interp_order, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: scat_dataCalc.
Prepares scat_data for the scattering solver.
Derives single scattering data for the frequencies given by f_grid* by interpolation from scat_data_raw. f_grid should be the actual WSV f_grid or a single-element Vector.
[out] | scat_data | WS Output |
[in] | scat_data_raw | WS Input |
[in] | f_grid | WS Input |
[in] | interp_order | Generic Input (Default: "1") |
Definition at line 1529 of file m_optproperties.cc.
References AA_DATAGRID, ABS_VEC_DATA, chk_interpolation_grids(), EXT_MAT_DATA, F_DATAGRID, gridpos_poly(), i, interp(), interpweights(), is_same_within_epsilon(), joker, Array< base >::nelem(), ConstVectorView::nelem(), PART_TYPE, PHA_MAT_DATA, _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), T_DATAGRID, and ZA_DATAGRID.
Referenced by scat_dataCalc_g().
void scat_dataCheck | ( | const ArrayOfArrayOfSingleScatteringData & | scat_data, |
const String & | check_type, | ||
const Numeric & | sca_mat_threshold, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: scat_dataCheck.
Method for checking the validity and consistency of the single scattering properties in scat_data.
It checks that scat_data does not contain any invalid values, that is any NaN elements in K, Z, or a or any negative values in the 'scalar' properties K11, Z11, and a1.
When check_type is 'all', it is furthermore checked that the scattering matrix is properly normalized, that is that the solid sphere integrated scattering matrix (int_Z11), which is supposed to be normalized to the scattering cross section, is sufficiently consistent with the scattering cross section (C_sca) derived from the difference of extinction (K11) and absorption (a1): int_z11 ~ C_sca = K11-a1. Sufficient consistency is defined by the maximum allowed deviation in single scattering albedo, sca_mat_threshold, testing for <br> ( <int_Z11>/<C_sca>-1. ) * ( <C_sca>/<K11> ) <= sca_mat_threshold. The check is skipped if check_type is 'sane'.
[in] | scat_data | WS Input |
[in] | check_type | Generic Input (Default: "all") |
[in] | sca_mat_threshold | Generic Input (Default: "5e-2") |
Definition at line 1094 of file m_optproperties.cc.
References AA_DATAGRID, abs, ABS_VEC_DATA, AngIntegrate_trapezoid(), CREATE_OUT0, CREATE_OUT1, CREATE_OUT2, EXT_MAT_DATA, F_DATAGRID, joker, Array< base >::nelem(), PART_TYPE, PHA_MAT_DATA, PTYPE_AZIMUTH_RND, PTYPE_TOTAL_RND, _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), T_DATAGRID, my_basic_string< charT >::toupper(), and ZA_DATAGRID.
Referenced by scat_dataCheck_g(), and ScatElementsToabs_speciesAdd().
void scat_dataReduceT | ( | ArrayOfArrayOfSingleScatteringData & | scat_data, |
const Index & | scat_index, | ||
const Numeric & | temperature, | ||
const Index & | interp_order, | ||
const Index & | phamat_only, | ||
const Numeric & | sca_mat_threshold, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: scat_dataReduceT.
Reduces temperature dimension of single scattering to a single entry.
FIXME... Derives single scattering data for the frequencies given by f_grid* by interpolation from scat_data. f_grid should be the actual WSV f_grid or a single-element Vector.
[in,out] | scat_data | WS Input/Output |
[in] | scat_index | Generic Input |
[in] | temperature | Generic Input |
[in] | interp_order | Generic Input (Default: "1") |
[in] | phamat_only | Generic Input (Default: "1") |
[in] | sca_mat_threshold | Generic Input (Default: "5e-2") |
Definition at line 1728 of file m_optproperties.cc.
References AA_DATAGRID, abs, ABS_VEC_DATA, AngIntegrate_trapezoid(), chk_interpolation_grids(), EXT_MAT_DATA, F_DATAGRID, gridpos_poly(), interp(), interpweights(), joker, Array< base >::nelem(), PART_TYPE, PHA_MAT_DATA, PTYPE_AZIMUTH_RND, PTYPE_TOTAL_RND, _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), T_DATAGRID, and ZA_DATAGRID.
Referenced by scat_dataReduceT_g().
void ScatSpeciesMerge | ( | Tensor4 & | pnd_field, |
ArrayOfArrayOfSingleScatteringData & | scat_data, | ||
ArrayOfArrayOfScatteringMetaData & | scat_meta, | ||
ArrayOfString & | scat_species, | ||
Index & | cloudbox_checked, | ||
const Index & | atmosphere_dim, | ||
const Index & | cloudbox_on, | ||
const ArrayOfIndex & | cloudbox_limits, | ||
const Tensor3 & | t_field, | ||
const Tensor3 & | z_field, | ||
const Matrix & | z_surface, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: ScatSpeciesMerge.
Merges single scattering data of all scattering elements into one element of bulk properties.
Before entering the scattering solver, this method prepares the effective bulk single scattering properties of all scattering elements. Done by calculating the particle number density weighted sum of the single scattering properties of all scattering elements per pressure level. Accordingly, pnd_field is resized to [np, np, 1, 1], where np is the number of pressure levels inside the cloudbox. The diagonal elements of the new pnd_field are set to 1, all others to 0. scat_data is resized to np. Each new scattering element represents the weighted sum of all particles at one presssure level.
The method also adapts scat_species and scat_meta such that they remain consistent with pnd_field and can pass cloudbox_checkedCalc*.
The method is suggested to be called directly after pnd_fieldCalcFromParticleBulkProps* (but also after cloudbox_checkedCalc*). Its purpose is to speed up the scattering calculations.
This is an experimental method currently only working for limited cases. All scattering elements must be of the same ptype and must share the same f_grid, za_grid, and aa_grid. That is, the scattering matrix, extinction matrix, and absorption vector of all scattering elements must have the same dimensions. No interpolation (apart from temperature) is performed.
This method can only be used with a 1D atmosphere.
[in,out] | pnd_field | WS Input/Output |
[in,out] | scat_data | WS Input/Output |
[in,out] | scat_meta | WS Input/Output |
[in,out] | scat_species | WS Input/Output |
[in,out] | cloudbox_checked | WS Input/Output |
[in] | atmosphere_dim | WS Input |
[in] | cloudbox_on | WS Input |
[in] | cloudbox_limits | WS Input |
[in] | t_field | WS Input |
[in] | z_field | WS Input |
[in] | z_surface | WS Input |
Definition at line 2781 of file m_optproperties.cc.
References SingleScatteringData::aa_grid, SingleScatteringData::abs_vec_data, chk_interpolation_grids(), SingleScatteringData::description, ScatteringMetaData::description, ScatteringMetaData::diameter_area_equ_aerodynamical, ScatteringMetaData::diameter_max, ScatteringMetaData::diameter_volume_equ, SingleScatteringData::ext_mat_data, SingleScatteringData::f_grid, FlattenedIndex(), gridpos(), i, interp(), interpweights(), is_size(), joker, ScatteringMetaData::mass, ConstTensor4View::nbooks(), ConstTensor7View::nbooks(), ConstTensor5View::ncols(), ConstTensor7View::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), ConstTensor7View::nlibraries(), ConstTensor5View::npages(), ConstTensor7View::npages(), ConstTensor5View::nrows(), ConstTensor7View::nrows(), ConstTensor5View::nshelves(), ConstTensor7View::nshelves(), SingleScatteringData::pha_mat_data, PND_LIMIT, SingleScatteringData::ptype, ScatteringMetaData::refr_index, Tensor4::resize(), Tensor5::resize(), Vector::resize(), Tensor7::resize(), ScatteringMetaData::source, _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str(), SingleScatteringData::T_grid, and SingleScatteringData::za_grid.
Referenced by ScatSpeciesMerge_g().
const Numeric DEG2RAD |
Referenced by pha_matCalc().
const Numeric PI |
const Numeric RAD2DEG |