ARTS
2.2.66
|
This filecontains workspace methods for calculating the optical properties for the radiative transfer. More...
#include <cmath>
#include "arts.h"
#include "exceptions.h"
#include "array.h"
#include "matpackIII.h"
#include "matpackVII.h"
#include "logic.h"
#include "interpolation.h"
#include "messages.h"
#include "xml_io.h"
#include "optproperties.h"
#include "math_funcs.h"
#include "sorting.h"
#include "check_input.h"
#include "auto_md.h"
Go to the source code of this file.
Macros | |
#define | PART_TYPE scat_data_array[i_pt].particle_type |
#define | F_DATAGRID scat_data_array[i_pt].f_grid |
#define | T_DATAGRID scat_data_array[i_pt].T_grid |
#define | ZA_DATAGRID scat_data_array[i_pt].za_grid |
#define | AA_DATAGRID scat_data_array[i_pt].aa_grid |
#define | PHA_MAT_DATA_RAW scat_data_array[i_pt].pha_mat_data |
#define | EXT_MAT_DATA_RAW scat_data_array[i_pt].ext_mat_data |
#define | ABS_VEC_DATA_RAW scat_data_array[i_pt].abs_vec_data |
#define | PND_LIMIT 1e-12 |
Functions | |
void | pha_mat_sptFromData (Tensor5 &pha_mat_spt, const ArrayOfSingleScatteringData &scat_data_array, const Vector &scat_za_grid, const Vector &scat_aa_grid, const Index &scat_za_index, const Index &scat_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 ArrayOfSingleScatteringData &scat_data_array_mono, const Index &doit_za_grid_size, const Vector &scat_aa_grid, const Index &scat_za_index, const Index &scat_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 (Tensor3 &ext_mat_spt, Matrix &abs_vec_spt, const ArrayOfSingleScatteringData &scat_data_array, const Vector &scat_za_grid, const Vector &scat_aa_grid, const Index &scat_za_index, const Index &scat_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 | ext_matAddPart (Tensor3 &ext_mat, const Tensor3 &ext_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: ext_matAddPart. More... | |
void | abs_vecAddPart (Matrix &abs_vec, const Matrix &abs_vec_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: abs_vecAddPart. More... | |
void | ext_matInit (Tensor3 &ext_mat, const Vector &f_grid, const Index &stokes_dim, const Index &f_index, const Verbosity &verbosity) |
WORKSPACE METHOD: ext_matInit. More... | |
void | ext_matAddGas (Tensor3 &ext_mat, const Tensor4 &propmat_clearsky, const Verbosity &) |
WORKSPACE METHOD: ext_matAddGas. More... | |
void | abs_vecInit (Matrix &abs_vec, const Vector &f_grid, const Index &stokes_dim, const Index &f_index, const Verbosity &verbosity) |
WORKSPACE METHOD: abs_vecInit. More... | |
void | abs_vecAddGas (Matrix &abs_vec, const Tensor4 &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_data_arrayCheck (const ArrayOfSingleScatteringData &scat_data_array, const Numeric &threshold, const Verbosity &verbosity) |
WORKSPACE METHOD: scat_data_arrayCheck. More... | |
void | DoitScatteringDataPrepare (ArrayOfTensor7 &pha_mat_sptDOITOpt, ArrayOfSingleScatteringData &scat_data_array_mono, const Index &doit_za_grid_size, const Vector &scat_aa_grid, const ArrayOfSingleScatteringData &scat_data_array, const Vector &f_grid, const Index &f_index, const Index &atmosphere_dim, const Index &stokes_dim, const Verbosity &verbosity) |
WORKSPACE METHOD: DoitScatteringDataPrepare. More... | |
void | scat_data_array_monoCalc (ArrayOfSingleScatteringData &scat_data_array_mono, const ArrayOfSingleScatteringData &scat_data_array, const Vector &f_grid, const Index &f_index, const Verbosity &) |
WORKSPACE METHOD: scat_data_array_monoCalc. More... | |
void | opt_prop_sptFromMonoData (Tensor3 &ext_mat_spt, Matrix &abs_vec_spt, const ArrayOfSingleScatteringData &scat_data_array_mono, const Vector &scat_za_grid, const Vector &scat_aa_grid, const Index &scat_za_index, const Index &scat_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 ArrayOfSingleScatteringData &scat_data_array_mono, const Index &doit_za_grid_size, const Vector &scat_aa_grid, const Index &scat_za_index, const Index &scat_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 | ScatteringMergeParticles1D (Tensor4 &pnd_field, ArrayOfSingleScatteringData &scat_data_array, 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 Index &cloudbox_checked, const Verbosity &) |
WORKSPACE METHOD: ScatteringMergeParticles1D. More... | |
void | ExtractFromMetaSinglePartSpecies (Vector &meta_param, const ArrayOfScatteringMetaData &scat_meta_array, const ArrayOfIndex &scat_data_per_part_species, const String &meta_name, const Index &part_species_index, const Verbosity &) |
WORKSPACE METHOD: ExtractFromMetaSinglePartSpecies. 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_array[i_pt].aa_grid |
Definition at line 63 of file m_optproperties.cc.
Referenced by opt_prop_sptFromData(), pha_mat_sptFromData(), and scat_data_array_monoCalc().
#define ABS_VEC_DATA_RAW scat_data_array[i_pt].abs_vec_data |
Definition at line 66 of file m_optproperties.cc.
Referenced by opt_prop_sptFromData(), scat_data_array_monoCalc(), and scat_data_arrayCheck().
#define EXT_MAT_DATA_RAW scat_data_array[i_pt].ext_mat_data |
Definition at line 65 of file m_optproperties.cc.
Referenced by opt_prop_sptFromData(), scat_data_array_monoCalc(), and scat_data_arrayCheck().
#define F_DATAGRID scat_data_array[i_pt].f_grid |
Definition at line 60 of file m_optproperties.cc.
Referenced by opt_prop_sptFromData(), pha_mat_sptFromData(), scat_data_array_monoCalc(), and scat_data_arrayCheck().
#define PART_TYPE scat_data_array[i_pt].particle_type |
Definition at line 59 of file m_optproperties.cc.
Referenced by opt_prop_sptFromData(), pha_mat_sptFromData(), scat_data_array_monoCalc(), and scat_data_arrayCheck().
#define PHA_MAT_DATA_RAW scat_data_array[i_pt].pha_mat_data |
Definition at line 64 of file m_optproperties.cc.
Referenced by pha_mat_sptFromData(), scat_data_array_monoCalc(), and scat_data_arrayCheck().
#define PND_LIMIT 1e-12 |
Definition at line 67 of file m_optproperties.cc.
Referenced by opt_prop_sptFromData(), opt_prop_sptFromMonoData(), pha_mat_sptFromData(), pha_mat_sptFromDataDOITOpt(), pha_mat_sptFromMonoData(), and ScatteringMergeParticles1D().
#define T_DATAGRID scat_data_array[i_pt].T_grid |
Definition at line 61 of file m_optproperties.cc.
Referenced by opt_prop_sptFromData(), pha_mat_sptFromData(), scat_data_array_monoCalc(), and scat_data_arrayCheck().
#define ZA_DATAGRID scat_data_array[i_pt].za_grid |
Definition at line 62 of file m_optproperties.cc.
Referenced by opt_prop_sptFromData(), pha_mat_sptFromData(), scat_data_array_monoCalc(), and scat_data_arrayCheck().
void abs_vecAddGas | ( | Matrix & | abs_vec, |
const Tensor4 & | 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.
[out] | abs_vec | WS Output |
[in] | propmat_clearsky | WS Input |
Definition at line 754 of file m_optproperties.cc.
References joker, ConstTensor4View::ncols(), ConstMatrixView::ncols(), ConstTensor4View::npages(), and ConstMatrixView::nrows().
Referenced by abs_vecAddGas_g().
void abs_vecAddPart | ( | Matrix & | abs_vec, |
const Matrix & | abs_vec_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: abs_vecAddPart.
The particle absorption is added to abs_vec
This function sums up the absorption vectors for all particle types weighted with particle number density. The resluling absorption vector is added to the workspace variable abs_vec Output and input of this method is abs_vec (stokes_dim). The inputs are the absorption vector for the single particle type abs_vec_spt* (N_particletypes, stokes_dim) and the local particle <br> number densities for all particle types namely the pnd_field* (N_particletypes, p_grid, lat_grid, lon_grid, ) for given p_grid*, lat_grid, and lon_grid. The particle types required are specified in the control file.
[out] | abs_vec | WS Output |
[in] | abs_vec_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 594 of file m_optproperties.cc.
References joker, ConstMatrixView::ncols(), and ConstMatrixView::nrows().
Referenced by abs_vecAddPart_g().
void abs_vecInit | ( | Matrix & | abs_vec, |
const Vector & | f_grid, | ||
const Index & | stokes_dim, | ||
const Index & | f_index, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: abs_vecInit.
Initialize absorption vector.
This method is necessary, because all other absorption methods just add to the existing absorption vector.
So, here we have to make it the right size and fill it with 0.
Note, that the vector is not really a vector, because it has a leading frequency dimension.
[out] | abs_vec | WS Output |
[in] | f_grid | WS Input |
[in] | stokes_dim | WS Input |
[in] | f_index | WS Input |
Definition at line 728 of file m_optproperties.cc.
References CREATE_OUT2, ConstVectorView::nelem(), and Matrix::resize().
Referenced by abs_vecInit_g().
void DoitScatteringDataPrepare | ( | ArrayOfTensor7 & | pha_mat_sptDOITOpt, |
ArrayOfSingleScatteringData & | scat_data_array_mono, | ||
const Index & | doit_za_grid_size, | ||
const Vector & | scat_aa_grid, | ||
const ArrayOfSingleScatteringData & | scat_data_array, | ||
const Vector & | f_grid, | ||
const Index & | f_index, | ||
const Index & | atmosphere_dim, | ||
const Index & | stokes_dim, | ||
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_array_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 DoitAngularGridsSet. The resulting phase matrices are stored in pha_mat_sptDOITOpt.
[out] | pha_mat_sptDOITOpt | WS Output |
[out] | scat_data_array_mono | WS Output |
[in] | doit_za_grid_size | WS Input |
[in] | scat_aa_grid | WS Input |
[in] | scat_data_array | WS Input |
[in] | f_grid | WS Input |
[in] | f_index | WS Input |
[in] | atmosphere_dim | WS Input |
[in] | stokes_dim | WS Input |
Definition at line 1006 of file m_optproperties.cc.
References joker, Array< base >::nelem(), ConstVectorView::nelem(), nlinspace(), pha_matTransform(), and scat_data_array_monoCalc().
Referenced by DoitScatteringDataPrepare_g().
void ext_matAddGas | ( | Tensor3 & | ext_mat, |
const Tensor4 & | 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.
[out] | ext_mat | WS Output |
[in] | propmat_clearsky | WS Input |
Definition at line 683 of file m_optproperties.cc.
References joker, ConstTensor4View::ncols(), ConstTensor3View::ncols(), ConstTensor3View::npages(), ConstTensor4View::npages(), and ConstTensor3View::nrows().
Referenced by ext_matAddGas_g().
void ext_matAddPart | ( | Tensor3 & | ext_mat, |
const Tensor3 & | ext_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: ext_matAddPart.
The particle extinction is added to ext_mat
This function sums up the extinction matrices for all particle types weighted with particle number density. The resulting extinction matrix is added to the workspace variable ext_mat The output of this method is ext_mat (stokes_dim, stokes_dim). The inputs are the extinction matrix for the single particle type ext_mat_spt* (N_particletypes, stokes_dim, stokes_dim) and the local particle number densities for all particle types namely the pnd_field* (N_particletypes, p_grid, lat_grid, lon_grid ) for given p_grid*, lat_grid, and lon_grid. The particle types required are specified in the control file.
[out] | ext_mat | WS Output |
[in] | ext_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 516 of file m_optproperties.cc.
References joker, ConstTensor3View::ncols(), ConstTensor3View::npages(), and ConstTensor3View::nrows().
Referenced by ext_matAddPart_g().
void ext_matInit | ( | Tensor3 & | ext_mat, |
const Vector & | f_grid, | ||
const Index & | stokes_dim, | ||
const Index & | f_index, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: ext_matInit.
Initialize extinction matrix.
This method is necessary, because all other extinction methods just add to the existing extinction matrix.
So, here we have to make it the right size and fill it with 0.
Note, that the matrix is not really a matrix, because it has a leading frequency dimension.
[out] | ext_mat | WS Output |
[in] | f_grid | WS Input |
[in] | stokes_dim | WS Input |
[in] | f_index | WS Input |
Definition at line 655 of file m_optproperties.cc.
References CREATE_OUT2, ConstVectorView::nelem(), and Tensor3::resize().
Referenced by ext_matInit_g().
void ExtractFromMetaSinglePartSpecies | ( | Vector & | meta_param, |
const ArrayOfScatteringMetaData & | scat_meta_array, | ||
const ArrayOfIndex & | scat_data_per_part_species, | ||
const String & | meta_name, | ||
const Index & | part_species_index, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: ExtractFromMetaSinglePartSpecies.
Extract (numeric) parameters from scat_meta_array of a single scattering species.
...
[out] | meta_param | Generic output |
[in] | scat_meta_array | WS Input |
[in] | scat_data_per_part_species | WS Input |
[in] | meta_name | Generic Input |
[in] | part_species_index | Generic Input |
Definition at line 1739 of file m_optproperties.cc.
References Array< base >::nelem(), and Vector::resize().
Referenced by ExtractFromMetaSinglePartSpecies_g().
void opt_prop_sptFromData | ( | Tensor3 & | ext_mat_spt, |
Matrix & | abs_vec_spt, | ||
const ArrayOfSingleScatteringData & | scat_data_array, | ||
const Vector & | scat_za_grid, | ||
const Vector & | scat_aa_grid, | ||
const Index & | scat_za_index, | ||
const Index & | scat_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 opticle properties for the single particle types.
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 particle type.
[out] | ext_mat_spt | WS Output |
[out] | abs_vec_spt | WS Output |
[in] | scat_data_array | WS Input |
[in] | scat_za_grid | WS Input |
[in] | scat_aa_grid | WS Input |
[in] | scat_za_index | WS Input |
[in] | scat_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 317 of file m_optproperties.cc.
References AA_DATAGRID, ABS_VEC_DATA_RAW, abs_vecTransform(), chk_interpolation_grids(), EXT_MAT_DATA_RAW, ext_matTransform(), F_DATAGRID, gridpos(), interp(), interpweights(), joker, ConstTensor3View::ncols(), Array< base >::nelem(), ConstTensor3View::npages(), ConstMatrixView::nrows(), PART_TYPE, PND_LIMIT, Tensor3::resize(), Vector::resize(), Matrix::resize(), T_DATAGRID, and ZA_DATAGRID.
Referenced by opt_prop_sptFromData_g().
void opt_prop_sptFromMonoData | ( | Tensor3 & | ext_mat_spt, |
Matrix & | abs_vec_spt, | ||
const ArrayOfSingleScatteringData & | scat_data_array_mono, | ||
const Vector & | scat_za_grid, | ||
const Vector & | scat_aa_grid, | ||
const Index & | scat_za_index, | ||
const Index & | scat_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 single particle types.
As opt_prop_sptFromData but no frequency interpolation is performed. The single scattering data is here obtained from scat_data_array_mono*, instead of scat_data_array.
[out] | ext_mat_spt | WS Output |
[out] | abs_vec_spt | WS Output |
[in] | scat_data_array_mono | WS Input |
[in] | scat_za_grid | WS Input |
[in] | scat_aa_grid | WS Input |
[in] | scat_za_index | WS Input |
[in] | scat_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 1250 of file m_optproperties.cc.
References abs_vecTransform(), ext_matTransform(), gridpos(), interp(), interpweights(), joker, ConstTensor3View::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), ConstTensor3View::npages(), ConstMatrixView::nrows(), and PND_LIMIT.
Referenced by opt_prop_sptFromMonoData_g().
void pha_mat_sptFromData | ( | Tensor5 & | pha_mat_spt, |
const ArrayOfSingleScatteringData & | scat_data_array, | ||
const Vector & | scat_za_grid, | ||
const Vector & | scat_aa_grid, | ||
const Index & | scat_za_index, | ||
const Index & | scat_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 for the single particle types.
This function can be used in pha_mat_spt_agenda as part of the calculation of the scattering integral.
The interpolation of the data on the actual frequency is the first step in this function. This is followed by a transformation from the database coordinate system to the laboratory coordinate system.
[out] | pha_mat_spt | WS Output |
[in] | scat_data_array | WS Input |
[in] | scat_za_grid | WS Input |
[in] | scat_aa_grid | WS Input |
[in] | scat_za_index | WS Input |
[in] | scat_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 72 of file m_optproperties.cc.
References AA_DATAGRID, CREATE_OUT3, F_DATAGRID, gridpos(), interp(), interpweights(), joker, ConstTensor5View::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), ConstTensor5View::nshelves(), PART_TYPE, PHA_MAT_DATA_RAW, pha_matTransform(), PND_LIMIT, Tensor5::resize(), T_DATAGRID, and ZA_DATAGRID.
Referenced by pha_mat_sptFromData_g().
void pha_mat_sptFromDataDOITOpt | ( | Tensor5 & | pha_mat_spt, |
const ArrayOfTensor7 & | pha_mat_sptDOITOpt, | ||
const ArrayOfSingleScatteringData & | scat_data_array_mono, | ||
const Index & | doit_za_grid_size, | ||
const Vector & | scat_aa_grid, | ||
const Index & | scat_za_index, | ||
const Index & | scat_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 for the single particle types.
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 <br> combination with DoitScatteringDataPrepare.
[out] | pha_mat_spt | WS Output |
[in] | pha_mat_sptDOITOpt | WS Input |
[in] | scat_data_array_mono | WS Input |
[in] | doit_za_grid_size | WS Input |
[in] | scat_aa_grid | WS Input |
[in] | scat_za_index | WS Input |
[in] | scat_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 189 of file m_optproperties.cc.
References chk_interpolation_grids(), gridpos(), interp(), interpweights(), joker, ConstTensor4View::ncols(), ConstTensor5View::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), nlinspace(), ConstTensor5View::nshelves(), and PND_LIMIT.
Referenced by pha_mat_sptFromDataDOITOpt_g().
void pha_mat_sptFromMonoData | ( | Tensor5 & | pha_mat_spt, |
const ArrayOfSingleScatteringData & | scat_data_array_mono, | ||
const Index & | doit_za_grid_size, | ||
const Vector & | scat_aa_grid, | ||
const Index & | scat_za_index, | ||
const Index & | scat_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 for the single particle types.
This function is the monochromatic version of pha_mat_sptFromData.
[out] | pha_mat_spt | WS Output |
[in] | scat_data_array_mono | WS Input |
[in] | doit_za_grid_size | WS Input |
[in] | scat_aa_grid | WS Input |
[in] | scat_za_index | WS Input |
[in] | scat_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 1390 of file m_optproperties.cc.
References chk_interpolation_grids(), CREATE_OUT3, gridpos(), interp(), interpweights(), joker, ConstTensor5View::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), nlinspace(), ConstTensor5View::nrows(), ConstTensor5View::nshelves(), pha_matTransform(), and PND_LIMIT.
Referenced by pha_mat_sptFromMonoData_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.
This function sums up the phase matrices for all particle types weighted with particle number density.
[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 832 of file m_optproperties.cc.
References ConstTensor5View::nbooks(), ConstTensor5View::npages(), ConstTensor5View::nrows(), ConstTensor5View::nshelves(), and Tensor4::resize().
Referenced by doit_scat_fieldCalc(), doit_scat_fieldCalcLimb(), and pha_matCalc_g().
void scat_data_array_monoCalc | ( | ArrayOfSingleScatteringData & | scat_data_array_mono, |
const ArrayOfSingleScatteringData & | scat_data_array, | ||
const Vector & | f_grid, | ||
const Index & | f_index, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: scat_data_array_monoCalc.
Interpolates scat_data_array by frequency to give scat_data_array_mono.
[out] | scat_data_array_mono | WS Output |
[in] | scat_data_array | WS Input |
[in] | f_grid | WS Input |
[in] | f_index | WS Input |
Definition at line 1095 of file m_optproperties.cc.
References AA_DATAGRID, ABS_VEC_DATA_RAW, chk_interpolation_grids(), EXT_MAT_DATA_RAW, F_DATAGRID, gridpos(), interp(), interpweights(), joker, Array< base >::nelem(), PART_TYPE, PHA_MAT_DATA_RAW, T_DATAGRID, and ZA_DATAGRID.
Referenced by DoitScatteringDataPrepare(), get_ppath_ext(), iyMC(), pha_matExtractManually(), propmat_clearskyAddParticles(), and scat_data_array_monoCalc_g().
void scat_data_arrayCheck | ( | const ArrayOfSingleScatteringData & | scat_data_array, |
const Numeric & | threshold, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: scat_data_arrayCheck.
Method for checking the consistency of the optical properties in the database.
This function can be used to check datafiles containing data for randomly oriented scattering media. For other particle types, the check is skipped and a warning is printed to screen. It is checked whether that the integral over the phase matrix element Z11 is equal (or: close to) the scattering cross section as derived from the difference of (scalar) extinction and absorption cross sections: <int_Z11> == <C_sca> = <K11> - <a1>.
An error is thrown, if the product of the single scattering albedo and the fractional deviation of <int_Z11> from <C_sca> (which is actually equal the absolute albedo deviation) exceeds the given threshold:
( <int_Z11>/<C_sca>-1. ) * ( <C_sca>/<K11> ) > threshold
The results for all calculated quantities are printed on the screen, if verbosity>1.
[in] | scat_data_array | WS Input |
[in] | threshold | Generic Input (Default: "1e-3") |
Definition at line 919 of file m_optproperties.cc.
References abs, ABS_VEC_DATA_RAW, AngIntegrate_trapezoid(), CREATE_OUT0, CREATE_OUT2, EXT_MAT_DATA_RAW, F_DATAGRID, joker, Array< base >::nelem(), PART_TYPE, PARTICLE_TYPE_MACROS_ISO, PHA_MAT_DATA_RAW, T_DATAGRID, and ZA_DATAGRID.
Referenced by scat_data_arrayCheck_g().
void ScatteringMergeParticles1D | ( | Tensor4 & | pnd_field, |
ArrayOfSingleScatteringData & | scat_data_array, | ||
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 Index & | cloudbox_checked, | ||
const Verbosity & | verbosity | ||
) |
WORKSPACE METHOD: ScatteringMergeParticles1D.
This method pre-calculates a weighted sum of all particles per pressure level. before the actual DOIT calculation is taking place in ScatteringDoit. It should be called directly after pnd_fieldSetup (but after cloudbox_checkedCalc*). It's purpose is speeding up DOIT calculations.
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. Accordingly, scat_data_array is resized to np. Each particle is the weighted sum of all particles at this presssure level. This is an experimental method currently only working for very specific cases. All particles must be of the same type and all particles must share the same f_grid and za_grid. And pha_mat_data, ext_mat_data and abs_vec_data must be all the same size. This method can only be used with a 1D atmosphere.
[out] | pnd_field | WS Output |
[out] | scat_data_array | WS 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 |
[in] | cloudbox_checked | WS Input |
Definition at line 1507 of file m_optproperties.cc.
References SingleScatteringData::aa_grid, SingleScatteringData::abs_vec_data, chk_interpolation_grids(), SingleScatteringData::description, SingleScatteringData::ext_mat_data, SingleScatteringData::f_grid, gridpos(), interp(), interpweights(), is_size(), joker, 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::particle_type, SingleScatteringData::pha_mat_data, PND_LIMIT, Tensor4::resize(), Tensor5::resize(), Vector::resize(), Tensor7::resize(), SingleScatteringData::T_grid, and SingleScatteringData::za_grid.
Referenced by ScatteringMergeParticles1D_g().
const Numeric DEG2RAD |
const Numeric PI |
const Numeric RAD2DEG |