ARTS  2.2.66
m_optproperties.cc File Reference

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
 

Detailed Description

This filecontains workspace methods for calculating the optical properties for the radiative transfer.

Author
Sreerekha T.R. rekha.nosp@m.@uni.nosp@m.-brem.nosp@m.en.d.nosp@m.e, Claudia Emde claud.nosp@m.ia.e.nosp@m.mde@d.nosp@m.lr.d.nosp@m.e Cory Davies cory@.nosp@m.met..nosp@m.ed.ac.nosp@m..uk
Date
Mon Jun 10 11:19:11 2002

Optical properties are the extinction matrix, absorption vector and scattering vector. The optical properties for the gases can be calculated with or without Zeeman effect.

Definition in file m_optproperties.cc.

Macro Definition Documentation

◆ AA_DATAGRID

#define AA_DATAGRID   scat_data_array[i_pt].aa_grid

Definition at line 63 of file m_optproperties.cc.

◆ ABS_VEC_DATA_RAW

#define ABS_VEC_DATA_RAW   scat_data_array[i_pt].abs_vec_data

Definition at line 66 of file m_optproperties.cc.

◆ EXT_MAT_DATA_RAW

#define EXT_MAT_DATA_RAW   scat_data_array[i_pt].ext_mat_data

Definition at line 65 of file m_optproperties.cc.

◆ F_DATAGRID

#define F_DATAGRID   scat_data_array[i_pt].f_grid

Definition at line 60 of file m_optproperties.cc.

◆ PART_TYPE

#define PART_TYPE   scat_data_array[i_pt].particle_type

Definition at line 59 of file m_optproperties.cc.

◆ PHA_MAT_DATA_RAW

#define PHA_MAT_DATA_RAW   scat_data_array[i_pt].pha_mat_data

Definition at line 64 of file m_optproperties.cc.

◆ PND_LIMIT

#define PND_LIMIT   1e-12

Definition at line 67 of file m_optproperties.cc.

◆ T_DATAGRID

#define T_DATAGRID   scat_data_array[i_pt].T_grid

Definition at line 61 of file m_optproperties.cc.

◆ ZA_DATAGRID

#define ZA_DATAGRID   scat_data_array[i_pt].za_grid

Definition at line 62 of file m_optproperties.cc.

Function Documentation

◆ abs_vecAddGas()

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.

Author
Stefan Buehler
Parameters
[out]abs_vecWS Output
[in]propmat_clearskyWS Input

Definition at line 754 of file m_optproperties.cc.

References joker, ConstMatrixView::ncols(), ConstTensor4View::ncols(), ConstTensor4View::npages(), and ConstMatrixView::nrows().

Referenced by abs_vecAddGas_g().

◆ abs_vecAddPart()

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.

Author
Sreerekha T.R.
Parameters
[out]abs_vecWS Output
[in]abs_vec_sptWS Input
[in]pnd_fieldWS Input
[in]atmosphere_dimWS Input
[in]scat_p_indexWS Input
[in]scat_lat_indexWS Input
[in]scat_lon_indexWS Input

Definition at line 594 of file m_optproperties.cc.

References joker, ConstMatrixView::ncols(), and ConstMatrixView::nrows().

Referenced by abs_vecAddPart_g().

◆ abs_vecInit()

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.

Author
Stefan Buehler
Parameters
[out]abs_vecWS Output
[in]f_gridWS Input
[in]stokes_dimWS Input
[in]f_indexWS Input

Definition at line 728 of file m_optproperties.cc.

References CREATE_OUT2, ConstVectorView::nelem(), and Matrix::resize().

Referenced by abs_vecInit_g().

◆ DoitScatteringDataPrepare()

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.

Author
Claudia Emde
Parameters
[out]pha_mat_sptDOITOptWS Output
[out]scat_data_array_monoWS Output
[in]doit_za_grid_sizeWS Input
[in]scat_aa_gridWS Input
[in]scat_data_arrayWS Input
[in]f_gridWS Input
[in]f_indexWS Input
[in]atmosphere_dimWS Input
[in]stokes_dimWS 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().

◆ ext_matAddGas()

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.

Author
Stefan Buehler
Parameters
[out]ext_matWS Output
[in]propmat_clearskyWS Input

Definition at line 683 of file m_optproperties.cc.

References joker, ConstTensor3View::ncols(), ConstTensor4View::ncols(), ConstTensor3View::npages(), ConstTensor4View::npages(), and ConstTensor3View::nrows().

Referenced by ext_matAddGas_g().

◆ ext_matAddPart()

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.

Author
Sreerekha T.R.
Parameters
[out]ext_matWS Output
[in]ext_mat_sptWS Input
[in]pnd_fieldWS Input
[in]atmosphere_dimWS Input
[in]scat_p_indexWS Input
[in]scat_lat_indexWS Input
[in]scat_lon_indexWS Input

Definition at line 516 of file m_optproperties.cc.

References joker, ConstTensor3View::ncols(), ConstTensor3View::npages(), and ConstTensor3View::nrows().

Referenced by ext_matAddPart_g().

◆ ext_matInit()

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.

Author
Stefan Buehler
Parameters
[out]ext_matWS Output
[in]f_gridWS Input
[in]stokes_dimWS Input
[in]f_indexWS Input

Definition at line 655 of file m_optproperties.cc.

References CREATE_OUT2, ConstVectorView::nelem(), and Tensor3::resize().

Referenced by ext_matInit_g().

◆ ExtractFromMetaSinglePartSpecies()

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.

...

Author
Jana Mendrok
Parameters
[out]meta_paramGeneric output
[in]scat_meta_arrayWS Input
[in]scat_data_per_part_speciesWS Input
[in]meta_nameGeneric Input
[in]part_species_indexGeneric Input

Definition at line 1739 of file m_optproperties.cc.

References Array< base >::nelem(), and Vector::resize().

Referenced by ExtractFromMetaSinglePartSpecies_g().

◆ opt_prop_sptFromData()

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.

Author
Claudia Emde
Parameters
[out]ext_mat_sptWS Output
[out]abs_vec_sptWS Output
[in]scat_data_arrayWS Input
[in]scat_za_gridWS Input
[in]scat_aa_gridWS Input
[in]scat_za_indexWS Input
[in]scat_aa_indexWS Input
[in]f_indexWS Input
[in]f_gridWS Input
[in]rtp_temperatureWS Input
[in]pnd_fieldWS Input
[in]scat_p_indexWS Input
[in]scat_lat_indexWS Input
[in]scat_lon_indexWS 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, Vector::resize(), Tensor3::resize(), T_DATAGRID, and ZA_DATAGRID.

Referenced by opt_prop_sptFromData_g().

◆ opt_prop_sptFromMonoData()

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.

Author
Cory Davis
Parameters
[out]ext_mat_sptWS Output
[out]abs_vec_sptWS Output
[in]scat_data_array_monoWS Input
[in]scat_za_gridWS Input
[in]scat_aa_gridWS Input
[in]scat_za_indexWS Input
[in]scat_aa_indexWS Input
[in]rtp_temperatureWS Input
[in]pnd_fieldWS Input
[in]scat_p_indexWS Input
[in]scat_lat_indexWS Input
[in]scat_lon_indexWS 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().

◆ pha_mat_sptFromData()

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.

Author
Claudia Emde
Parameters
[out]pha_mat_sptWS Output
[in]scat_data_arrayWS Input
[in]scat_za_gridWS Input
[in]scat_aa_gridWS Input
[in]scat_za_indexWS Input
[in]scat_aa_indexWS Input
[in]f_indexWS Input
[in]f_gridWS Input
[in]rtp_temperatureWS Input
[in]pnd_fieldWS Input
[in]scat_p_indexWS Input
[in]scat_lat_indexWS Input
[in]scat_lon_indexWS 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().

◆ pha_mat_sptFromDataDOITOpt()

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.

Author
Claudia Emde
Parameters
[out]pha_mat_sptWS Output
[in]pha_mat_sptDOITOptWS Input
[in]scat_data_array_monoWS Input
[in]doit_za_grid_sizeWS Input
[in]scat_aa_gridWS Input
[in]scat_za_indexWS Input
[in]scat_aa_indexWS Input
[in]rtp_temperatureWS Input
[in]pnd_fieldWS Input
[in]scat_p_indexWS Input
[in]scat_lat_indexWS Input
[in]scat_lon_indexWS 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().

◆ pha_mat_sptFromMonoData()

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.

Author
Claudia Emde
Parameters
[out]pha_mat_sptWS Output
[in]scat_data_array_monoWS Input
[in]doit_za_grid_sizeWS Input
[in]scat_aa_gridWS Input
[in]scat_za_indexWS Input
[in]scat_aa_indexWS Input
[in]rtp_temperatureWS Input
[in]pnd_fieldWS Input
[in]scat_p_indexWS Input
[in]scat_lat_indexWS Input
[in]scat_lon_indexWS 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().

◆ pha_matCalc()

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.

Author
Sreerekha T.R.
Parameters
[out]pha_matWS Output
[in]pha_mat_sptWS Input
[in]pnd_fieldWS Input
[in]atmosphere_dimWS Input
[in]scat_p_indexWS Input
[in]scat_lat_indexWS Input
[in]scat_lon_indexWS 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().

◆ scat_data_array_monoCalc()

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.

Author
Cory Davis
Parameters
[out]scat_data_array_monoWS Output
[in]scat_data_arrayWS Input
[in]f_gridWS Input
[in]f_indexWS 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().

◆ scat_data_arrayCheck()

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.

Author
Claudia Emde
Jana Mendrok
Parameters
[in]scat_data_arrayWS Input
[in]thresholdGeneric 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().

◆ ScatteringMergeParticles1D()

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.

Author
Oliver Lemke
Parameters
[out]pnd_fieldWS Output
[out]scat_data_arrayWS Output
[in]atmosphere_dimWS Input
[in]cloudbox_onWS Input
[in]cloudbox_limitsWS Input
[in]t_fieldWS Input
[in]z_fieldWS Input
[in]z_surfaceWS Input
[in]cloudbox_checkedWS 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(), Tensor7::resize(), Vector::resize(), Tensor5::resize(), SingleScatteringData::T_grid, and SingleScatteringData::za_grid.

Referenced by ScatteringMergeParticles1D_g().

Variable Documentation

◆ DEG2RAD

const Numeric DEG2RAD
extern

◆ PI

const Numeric PI
extern

◆ RAD2DEG

const Numeric RAD2DEG
extern