skOpticalProperties  2.1
Public Member Functions | List of all members
skOpticalProperties_HitranChemical Class Reference

#include <skspectralline_hitran.h>

Inheritance diagram for skOpticalProperties_HitranChemical:
skOpticalProperties skOpticalProperty_AdditionalStateInfo_PressTemperatureDependent skOpticalProperty_AdditionalStateInfo

Public Member Functions

bool SetNumberDensityClimatology (const CLIMATOLOGY_HANDLE &parameterguid, skClimatology *numberdensityclimatology)
bool SetLineShapeObject (skSpectralLineShape *lineshapeobject)
virtual bool SetAtmosphericState (skClimatology *neutralatmosphere, const GEODETIC_INSTANT &pt, bool *crosssectionschanged) override
virtual bool CalculateCrossSections (double wavenumber, double *absxs, double *extxs, double *scattxs, size_t threadindex) override
 Calculate cross-sections at the specified wave-number. More...
virtual bool CalculateCrossSectionsArray (const std::vector< double > &wavenumber, std::vector< double > *absxs, std::vector< double > *extxs, std::vector< double > *scattxs) override
 Calculate cross-sections at the specified array of wave-numbers. More...
virtual bool UpdateInternalClimatology (const GEODETIC_INSTANT &pt) override
virtual bool IsScatterer () const override
 Returns true if this particles scatters radiation.
virtual bool IsAbsorber () const override
 Returns true if this particles absorbs radiation radiation.
- Public Member Functions inherited from skOpticalProperties
 skOpticalProperties ()
bool GetRotatedPhaseMatrix (double wavenum, double mu, double muprime, double dphi, skRTPhaseMatrix *rotatedmatrix, size_t threadindex)
 Returns the rotated phase matrix necessary for scattering. More...
void CheckCosineRange (double *mu)
bool IsDeltaFunctionForwardScatter () const
 Returns true if this cross-section has a delta function forward scatter element.
virtual bool CalculatePhaseMatrix (double wavenumber, double cosscatterangle, skRTPhaseMatrix *phasematrix, size_t threadindex)
 Calculate the phase matrix at the specified wavenumber and scattering angle. More...

Detailed Description

The skOpticalProperties interface to the HITRAN database. The code treats the HITRAN database as a collection of about 41 different chemicals. Each chemical is a collection of various isotopes and each isotope is a collection of spectral lines.

This class wraps up all of the detail and provides a flexible interface that should provide the capability for state-of-the-art spectral line calculations. The class allows the user to programatically select the line shape calculation of their choice.

Atmospheric state information (typically pressure and temperature) is enabled through the standard climatology interfaces in skOpticalProperties (i.e. SetAtmopshericState) while partial pressure climatologies required for self broadening calculations are supported through SetNumberDensityClimatology and UpdateInternalClimatology.

Member Function Documentation

bool skOpticalProperties_HitranChemical::SetNumberDensityClimatology ( const CLIMATOLOGY_HANDLE &  parameterguid,
skClimatology *  numberdensityclimatology 

Sets the number density climatology associated with the selected chemical species. The current implementation uses this number density to calculate the species partial pressure. This in turn is used to work out the self broadening term used in the voigt, lorenz and other line shape objects. As such this is a fairly detailed refinement and is not required for medium precision calculations: the point being that it can be difficult for users to get profiles of various chemical species. If you choose not to use this function the partial pressure is set to 0.0 and self broadening of the line shape is ignored.

/param parameterguid The SKCLIMATOLOGY that provides the chemical species number density in molecules per cm3. The partial pressure is calculated using the ideal gas law p = NkT where T is the atmospheric temperature and is taken from the primary atmospheric state climatology.

/param numberdensityclimatology An instance of skClimatology* that provides the number density of the chemical species in molecules per cm3. The code keeps a reference count on this object and releases it when it is finished.

bool skOpticalProperties_HitranChemical::SetLineShapeObject ( skSpectralLineShape lineshapeobject)

Sets the line shape object to be used in calculation of optical properties. By deafult, if this function is not called (or if NULL is passed in), then the optical properties will be calculated with skSpectralLineShape_VoigtTabulated which is pretty good

/param lineshapeobject The line shape object to be used in spectral line calculations. Several references are placed on the object but are released when the object is no longer required.

bool skOpticalProperties_HitranChemical::SetAtmosphericState ( skClimatology *  atmosphericstate,
bool *  crosssectionschanged 

The skOpticalProperties method to SetAtmosphericState. Our spectral line object will typically need pressure (Pascals) and temperature (K) if they are based on regular, Doppler, Lorenz or Voigt profiles.

A separate climatology interface (which may or may not use the same actual skClimatology object) is used to describe chemical number desnity for partial pressure calculations

The user will typically use a standard "atmospheric" skClimatology class for calls to SetAtmosphericState, eg, ECMWF, NCEP, MSIS or user defined tables. If you choose to use a LineShapeObject that needs more info that pressure and temperature then the atmosphericstate climatology must support that information and the LineShapeObject must extract that information during this call (and the asscoiated function calls)

Implements skOpticalProperties.

bool skOpticalProperties_HitranChemical::CalculateCrossSections ( double  wavenumber,
double *  absxs,
double *  extxs,
double *  scattxs,
size_t  threadindex 

Calculate cross-sections at the specified wave-number.

The main function of the class. The user calls this function so the optical properties object can
calculate and update its three cross-sections: absorption, scattering and extinction.
The user may fetch the calculated cross-sections  by calling #AbsorptionCrossSection, #ScatteringCrossSection

and #ExtinctionCrossSection.

There is no requirement that the class generate physically meaningful cross-sections where the sxtinction is the sum of the absorption and the scattering (although this will normally be the case)

Well-written classes will check that the user is not calling for a calculation under identical conditions.

wavenumberThe wavenumber (cm-1) at which the calculations are required.
absxsReturns the absorption cross-section in cm-2
extxsReturns the extinction cross-section in cm-2
scattxsReturns the scattering cross-section in cm-2
threadidPasses in the 0 based index of this thread. This is used by derived classes to store thread local storage. Default value is zero.
True if success otherwise false.

Implements skOpticalProperties.

bool skOpticalProperties_HitranChemical::CalculateCrossSectionsArray ( const std::vector< double > &  wavenumber,
std::vector< double > *  absxs,
std::vector< double > *  extxs,
std::vector< double > *  scattxs 

Calculate cross-sections at the specified array of wave-numbers.

Calculate the cross-sectios for an array of wavenumbers. The defualt implementation is a single threaded loop to calculate the cross-section for each wavenumber separately. Optimized versions, for Hitran and Voigt lineshapes for example, override this member and provide code optimized, multi-threaded versions.

Reimplemented from skOpticalProperties.

bool skOpticalProperties_HitranChemical::UpdateInternalClimatology ( const GEODETIC_INSTANT &  pt)

Implements the skOpticalProperties interface function. The HITRAN optical properties do use a secondary internal climatology to calculate partial pressure of the chemical species using an ideal gas formulation. This function allows this skOpticalProperties to update its chemical number density information which is then used to calculate partial pressure.

Implements skOpticalProperties.

The documentation for this class was generated from the following files: