ARTS  2.2.66
optproperties.h File Reference

Scattering database structure and functions. More...

#include "matpackVII.h"
#include "mystring.h"
#include "messages.h"
#include "gridded_fields.h"

Go to the source code of this file.

Classes

struct  SingleScatteringData
 Structure which describes the single scattering properties of a particle or a particle distribution. More...
 
struct  ScatteringMetaData
 

Typedefs

typedef Array< SingleScatteringDataArrayOfSingleScatteringData
 
typedef Array< ScatteringMetaDataArrayOfScatteringMetaData
 

Enumerations

enum  ParticleType { PARTICLE_TYPE_GENERAL = 10, PARTICLE_TYPE_MACROS_ISO = 20, PARTICLE_TYPE_HORIZ_AL = 30, PARTICLE_TYPE_SPHERICAL = 40 }
 An attribute to classify the particle type in a SingleScatteringData structure. More...
 
enum  ParticleSSDMethod { PARTICLE_SSDMETHOD_NONE = 0, PARTICLE_SSDMETHOD_TMATRIX = 1 }
 An attribute to classify the method to be used for SingleScatteringData. More...
 

Functions

ostream & operator<< (ostream &os, const SingleScatteringData &ssd)
 
ostream & operator<< (ostream &os, const ArrayOfSingleScatteringData &assd)
 
ostream & operator<< (ostream &os, const ScatteringMetaData &ssd)
 
ostream & operator<< (ostream &os, const ArrayOfScatteringMetaData &assd)
 
void abs_vecTransform (VectorView abs_vec_lab, ConstTensor3View abs_vec_data, ConstVectorView za_datagrid, ConstVectorView aa_datagrid, const ParticleType &particle_type, const Numeric &za_sca, const Numeric &aa_sca, const Verbosity &verbosity)
 Transformation of absorption vector. More...
 
void ext_matTransform (MatrixView ext_mat_lab, ConstTensor3View ext_mat_data, ConstVectorView za_datagrid, ConstVectorView aa_datagrid, const ParticleType &particle_type, const Numeric &za_sca, const Numeric &aa_sca, const Verbosity &verbosity)
 Transformation of extinction matrix. More...
 
void pha_matTransform (MatrixView pha_mat_lab, ConstTensor5View pha_mat_data, ConstVectorView za_datagrid, ConstVectorView aa_datagrid, const ParticleType &particle_type, const Index &za_sca_idx, const Index &aa_sca_idx, const Index &za_inc_idx, const Index &aa_inc_idx, ConstVectorView scat_za_grid, ConstVectorView scat_aa_grid, const Verbosity &verbosity)
 Transformation of phase matrix. More...
 
void ext_matFromabs_vec (MatrixView ext_mat, ConstVectorView abs_vec, const Index &stokes_dim)
 Derive extinction matrix from absorption vector. More...
 
void interpolate_scat_angle (VectorView pha_mat_int, Numeric &theta_rad, ConstTensor5View pha_mat_data, ConstVectorView za_datagrid, const Numeric &za_sca, const Numeric &aa_sca, const Numeric &za_inc, const Numeric &aa_inc)
 Interpolate data on the scattering angle. More...
 
void pha_mat_labCalc (MatrixView pha_mat_lab, ConstVectorView pha_mat_int, const Numeric &za_sca, const Numeric &aa_sca, const Numeric &za_inc, const Numeric &aa_inc, const Numeric &theta_rad)
 Calculate phase matrix in laboratory coordinate system. More...
 
void opt_prop_sum_propmat_clearsky (Tensor3 &ext_mat, Matrix &abs_vec, const Tensor4 propmat_clearsky)
 Get optical properties from propmat_clearsky. More...
 
ParticleType ParticleTypeFromString (const String &particle_type_string)
 Convert particle name to enum value. More...
 
String ParticleTypeToString (const ParticleType &particle_type)
 Convert particle type enum value to String. More...
 
ParticleSSDMethod ParticleSSDMethodFromString (const String &particle_ssdmethod_string)
 Convert particle ssd method name to enum value. More...
 
String ParticleSSDMethodToString (const ParticleSSDMethod &particle_ssdmethod_type)
 

Detailed Description

Scattering database structure and functions.

Author
Claudia Emde claud.nosp@m.ia.e.nosp@m.mde@d.nosp@m.lr.d.nosp@m.e
Date
2003-03-06

This file contains the definition of the SingleScatteringData structure and the functions in optproperties.cc that are of interest elsewhere.

Definition in file optproperties.h.

Typedef Documentation

◆ ArrayOfScatteringMetaData

◆ ArrayOfSingleScatteringData

Enumeration Type Documentation

◆ ParticleSSDMethod

An attribute to classify the method to be used for SingleScatteringData.

NONE Dummy value TMATRIX T-Matrix method

Enumerator
PARTICLE_SSDMETHOD_NONE 
PARTICLE_SSDMETHOD_TMATRIX 

Definition at line 68 of file optproperties.h.

◆ ParticleType

An attribute to classify the particle type in a SingleScatteringData structure.

GENERAL General case MACROS_ISO Macroscopically isotropic and mirror-symmetric scattering media HORIZ_AL Horizonatally aligned plates and columns SPHERICAL Spherical particles

A detailed description of the different cases can be found in AUG.

Enumerator
PARTICLE_TYPE_GENERAL 
PARTICLE_TYPE_MACROS_ISO 
PARTICLE_TYPE_HORIZ_AL 
PARTICLE_TYPE_SPHERICAL 

Definition at line 55 of file optproperties.h.

Function Documentation

◆ abs_vecTransform()

void abs_vecTransform ( VectorView  abs_vec_lab,
ConstTensor3View  abs_vec_data,
ConstVectorView  za_datagrid,
ConstVectorView  aa_datagrid,
const ParticleType particle_type,
const Numeric za_sca,
const Numeric aa_sca,
const Verbosity verbosity 
)

Transformation of absorption vector.

In the single scattering database the data of the absorption vector is stored in different coordinate systems, depending on the type of hydrometeor species.

See AUG for information about different classifications of the hydrometeor species.

Output and Input:

Parameters
abs_vec_labAbsorption vector in Laboratory frame. Input:
abs_vec_dataAbsorption vector in database.
za_datagridZenith angle grid in the database.
aa_datagridZenith angle grid in the database.
particle_typeClasiification of the hydometeor species.
za_scaZenith angle of scattered direction.
aa_scaAzimuth angle of scattered direction.
Author
Claudia Emde
Date
2003-05-24

Definition at line 85 of file optproperties.cc.

References CREATE_OUT0, gridpos(), interp(), interpweights(), joker, ConstTensor3View::ncols(), ConstVectorView::nelem(), ConstTensor3View::npages(), PARTICLE_TYPE_GENERAL, PARTICLE_TYPE_HORIZ_AL, and PARTICLE_TYPE_MACROS_ISO.

Referenced by opt_prop_sptFromData(), and opt_prop_sptFromMonoData().

◆ ext_matFromabs_vec()

void ext_matFromabs_vec ( MatrixView  ext_mat,
ConstVectorView  abs_vec,
const Index stokes_dim 
)

Derive extinction matrix from absorption vector.

In case, when only absorption of a particle shall be considered, and the scattering is negelected, the extinction matrix is set from the absorption vector only.

Extinction matrix is set the following way:

K11 = K22 = K33 = K44 = a1 K12 = K21 = a2 K13 = K31 = a3 K14 = K41 = a4

Other elements remain 0. However, note that the other elements might be supposed to contain non-zero values as well. We couldn't find an appropriate solution yet, though, and these elements are expected to be rather small. Also, using the absorption part only is anyway only a rough approximation. Hence, we deem the assumption of setting the remaining elements to zero reasonable.

Output and Input:

Parameters
ext_matExtinction matrix. Input:
abs_vecAbsorption vector.
stokes_dimas the WSV.
Author
Jana Mendrok
Date
2013-04-30

Definition at line 568 of file optproperties.cc.

References ConstMatrixView::ncols(), ConstVectorView::nelem(), and ConstMatrixView::nrows().

Referenced by fos(), and propmat_clearskyAddParticles().

◆ ext_matTransform()

void ext_matTransform ( MatrixView  ext_mat_lab,
ConstTensor3View  ext_mat_data,
ConstVectorView  za_datagrid,
ConstVectorView  aa_datagrid,
const ParticleType particle_type,
const Numeric za_sca,
const Numeric aa_sca,
const Verbosity verbosity 
)

Transformation of extinction matrix.

In the single scattering database the data of the extinction matrix is stored in different coordinate systems, depending on the type of hydrometeor species.

See AUG for information about different classifications of the hydrometeor species.

Output and Input:

Parameters
ext_mat_labExtinction matrix in Laboratory frame. Input:
ext_mat_dataExtinction matrix in database.
za_datagridZenith angle grid in the database.
aa_datagridZenith angle grid in the database.
particle_typeClasiification of the hydometeor species.
za_scaZenith angle of scattered direction.
aa_scaAzimuth angle of scattered direction.
Author
Claudia Emde
Date
2003-05-24

Definition at line 190 of file optproperties.cc.

References CREATE_OUT0, gridpos(), interp(), interpweights(), joker, ConstMatrixView::ncols(), ConstTensor3View::ncols(), ConstTensor3View::npages(), PARTICLE_TYPE_GENERAL, PARTICLE_TYPE_HORIZ_AL, and PARTICLE_TYPE_MACROS_ISO.

Referenced by opt_prop_sptFromData(), and opt_prop_sptFromMonoData().

◆ interpolate_scat_angle()

void interpolate_scat_angle ( VectorView  pha_mat_int,
Numeric theta_rad,
ConstTensor5View  pha_mat_data,
ConstVectorView  za_datagrid,
const Numeric za_sca,
const Numeric aa_sca,
const Numeric za_inc,
const Numeric aa_inc 
)

Interpolate data on the scattering angle.

This function is used for the transformation of the phase matrix from scattering frame to the laboratory frame for randomly oriented scattering media (case PTYPE_MACRO_ISO).

The scattering angle is calculated from the angles defining the directions of the incoming and scattered radiation. After that the data (which is stored in the data files as a function of the scattering angle) is interpolated on the calculated scattering angle.

Parameters
[out]pha_mat_intInterpolated phase matrix.
[out]theta_radScattering angle [rad].
[in]pha_mat_dataPhase matrix in database.
[in]za_datagridZenith angle grid in the database.
[in]za_scaZenith angle of scattered direction [rad].
[in]aa_scaAzimuth angle of scattered direction [rad].
[in]za_incZenith angle of incoming direction [rad].
[in]aa_incAzimuth angle of incoming direction [rad].
Author
Claudia Emde
Date
2003-08-19

Definition at line 668 of file optproperties.cc.

References abs, DEG2RAD, gridpos(), interp(), interpweights(), joker, ConstTensor5View::ncols(), PI, and RAD2DEG.

Referenced by pha_matTransform().

◆ operator<<() [1/4]

ostream& operator<< ( ostream &  os,
const ArrayOfScatteringMetaData assd 
)

Definition at line 964 of file optproperties.cc.

◆ operator<<() [2/4]

ostream& operator<< ( ostream &  os,
const ArrayOfSingleScatteringData assd 
)

Definition at line 951 of file optproperties.cc.

◆ operator<<() [3/4]

ostream& operator<< ( ostream &  os,
const ScatteringMetaData ssd 
)

Definition at line 957 of file optproperties.cc.

◆ operator<<() [4/4]

ostream& operator<< ( ostream &  os,
const SingleScatteringData ssd 
)

Definition at line 944 of file optproperties.cc.

◆ opt_prop_sum_propmat_clearsky()

void opt_prop_sum_propmat_clearsky ( Tensor3 ext_mat,
Matrix abs_vec,
const Tensor4  propmat_clearsky 
)

Get optical properties from propmat_clearsky.

This turns propmat_clearsky into the extinction matrix and absorption vector for use when these are important.

Internal function to replace the old opt_prop_gas_agenda.

Output and Input:

Parameters
ext_matExtinction matrix.
abs_vecAbsorption vector. Input:
propmat_clearskyas the WSV.
Author
Richard Larsson
Date
2012-07-24

Definition at line 987 of file optproperties.cc.

References joker, ConstTensor4View::ncols(), ConstTensor4View::npages(), Tensor3::resize(), and Matrix::resize().

Referenced by clear_rt_vars_at_gp(), cloud_ppath_update1D_planeparallel(), cloud_RT_no_background(), and cloudy_rt_vars_at_gp().

◆ ParticleSSDMethodFromString()

ParticleSSDMethod ParticleSSDMethodFromString ( const String particle_ssdmethod_string)

Convert particle ssd method name to enum value.

Returns the ParticleSSDMethod enum value for the given String.

Parameters
[in]particle_ssdmethod_stringParticle SSD method name
Returns
ParticleSSDMethod enum value
Author
Oliver Lemke

Definition at line 1097 of file optproperties.cc.

References PARTICLE_SSDMETHOD_TMATRIX.

◆ ParticleSSDMethodToString()

String ParticleSSDMethodToString ( const ParticleSSDMethod particle_ssdmethod_type)

◆ ParticleTypeFromString()

ParticleType ParticleTypeFromString ( const String particle_type_string)

Convert particle name to enum value.

Returns the ParticleType enum value for the given String.

Parameters
[in]particle_type_stringParticle type name
Returns
ParticleType enum value
Author
Oliver Lemke

Definition at line 1026 of file optproperties.cc.

References PARTICLE_TYPE_GENERAL, PARTICLE_TYPE_HORIZ_AL, PARTICLE_TYPE_MACROS_ISO, and PARTICLE_TYPE_SPHERICAL.

Referenced by scat_meta_arrayAddTmatrix(), scat_meta_arrayAddTmatrixOldVersion(), and xml_read_from_stream().

◆ ParticleTypeToString()

String ParticleTypeToString ( const ParticleType particle_type)

Convert particle type enum value to String.

Returns the ParticleType enum value for the given String.

Parameters
[in]particle_typeParticle type
Returns
String representation of ParticleType
Author
Oliver Lemke

Definition at line 1059 of file optproperties.cc.

References PARTICLE_TYPE_GENERAL, PARTICLE_TYPE_HORIZ_AL, PARTICLE_TYPE_MACROS_ISO, and PARTICLE_TYPE_SPHERICAL.

Referenced by xml_write_to_stream().

◆ pha_mat_labCalc()

void pha_mat_labCalc ( MatrixView  pha_mat_lab,
ConstVectorView  pha_mat_int,
const Numeric za_sca,
const Numeric aa_sca,
const Numeric za_inc,
const Numeric aa_inc,
const Numeric theta_rad 
)

Calculate phase matrix in laboratory coordinate system.

Transformation function for the phase matrix for the case of randomly oriented particles (case PTYPE_MACRO_ISO).

Some of the formulas can be found in

Mishchenkho: "Scattering, Absorption and Emission of Light by Small Particles", Cambridge University Press, 2002 Capter 4

The full set of formulas will be documented in AUG.

Output and Input:

Parameters
pha_mat_labPhase matrix in laboratory frame. Input:
pha_mat_intInterpolated phase matrix.
za_scaZenith angle of scattered direction.
aa_scaAzimuth angle of scattered direction.
za_incZenith angle of incoming direction.
aa_incAzimuth angle of incoming direction.
theta_radScattering angle [rad].
Author
Claudia Emde
Date
2003-05-13

Definition at line 759 of file optproperties.cc.

References abs, ANGTOL, DEG2RAD, F11, F12, F22, F33, F34, F44, ConstMatrixView::ncols(), PI, and RAD2DEG.

Referenced by pha_mat_singleExtract(), and pha_matTransform().

◆ pha_matTransform()

void pha_matTransform ( MatrixView  pha_mat_lab,
ConstTensor5View  pha_mat_data,
ConstVectorView  za_datagrid,
ConstVectorView  aa_datagrid,
const ParticleType particle_type,
const Index za_sca_idx,
const Index aa_sca_idx,
const Index za_inc_idx,
const Index aa_inc_idx,
ConstVectorView  scat_za_grid,
ConstVectorView  scat_aa_grid,
const Verbosity verbosity 
)

Transformation of phase matrix.

In the single scattering database the data of the phase matrix is stored in different coordinate systems, depending on the type of hydrometeor species.

See AUG for information about different classifications of the hydrometeor species.

Parameters
[in,out]pha_mat_labPhase matrix in Laboratory frame.
[in]pha_mat_dataPhase matrix in database.
[in]za_datagridZenith angle grid in the database.
[in]aa_datagridZenith angle grid in the database.
[in]particle_typeClassification of the hydometeor species.
[in]za_sca_idxIndex of zenith angle of scattered direction.
[in]aa_sca_idxIndex of azimuth angle of scattered direction.
[in]za_inc_idxIndex of zenith angle of incoming direction.
[in]aa_inc_idxIndex of azimuth angle of incoming direction.
[in]scat_za_gridFIXME: DOC
[in]scat_aa_gridFIXME: DOC
Author
Claudia Emde
Date
2003-08-19

Definition at line 345 of file optproperties.cc.

References abs, CREATE_OUT0, gridpos(), interp(), interpolate_scat_angle(), interpweights(), joker, ConstMatrixView::ncols(), ConstTensor5View::ncols(), ConstTensor5View::npages(), PARTICLE_TYPE_GENERAL, PARTICLE_TYPE_HORIZ_AL, PARTICLE_TYPE_MACROS_ISO, and pha_mat_labCalc().

Referenced by DoitScatteringDataPrepare(), pha_mat_sptFromData(), and pha_mat_sptFromMonoData().