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

#include <skabsorptiontable.h>

Inheritance diagram for skOpticalProperties_TabulatedExtinction_HeightWavelength:

Public Member Functions

bool SetExtinctionTable (const nx2dArray< double > &extinction, const nx1dArray< double > &wavelens, const nx1dArray< double > &heights_meters)
bool LoadHeightWavelengthProfileFromFile (const char *filename)
virtual bool SetAtmosphericState (skClimatology *neutralatmosphere, const GEODETIC_INSTANT &pt, bool *crosssectionschanged) override
 Sets the atmospheric state and location for calculating cross-sections, usually temperature, pressure and position.
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 IsScatterer () const override
 Returns true if this particles scatters radiation.
virtual bool IsAbsorber () const override
 Returns true if this particles absorbs radiation radiation.
virtual bool UpdateInternalClimatology (const GEODETIC_INSTANT &pt) override
- 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 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. More...
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

A class for tabulating extinction (or absorption) as a function of altitude and wavelength. This was originally built for manually defining the extinction of henyey-Greenstein phase functions.

Member Function Documentation

bool skOpticalProperties_TabulatedExtinction_HeightWavelength::SetExtinctionTable ( const nx2dArray< double > &  extinction,
const nx1dArray< double > &  wavelens,
const nx1dArray< double > &  heights_meters 

Sets up the table that will be used for extinction (or absorption) as a function of altitude and wavelength. The user passes in a 2-D array of extinction values and two 1D arrays that define the wavelength and height "axes" of the grid.

extinctionA 2D array of atmopsheric extinction (or absorption). The units are extinction per cm. The array is double( numwavelens, numheights ) where numwavelens is the number of wavelengths in parameter wavelens and numheights is the number of heights in parameter heights_meets. The code linearly interpolates the table in both height and wavelength. It truncates the interpolation at the end points of the array.
wavelensThe wavelengths at which the table is specified. The units are nm. Must be 1 or more. All elements must be provided in ascending order.
heights_metersThe heights at which the table is specified. The units are in meters. Muts be 1 or more values. All elements must be provided in ascending order.

Referenced by LoadHeightWavelengthProfileFromFile().

bool skOpticalProperties_TabulatedExtinction_HeightWavelength::LoadHeightWavelengthProfileFromFile ( const char *  filename)

Loads in the tabulated extinction from a file.

Line 1: numwave numheights number of wavelengths and number of heights Line 2: wavelengths(numwavelen) expressed in nanometers. Line 3: heights(numheights) expressed in meters. Line 4: extinction(numwave) extinction for wavelengths at height (0) Line 5: extinction(numwave) extinction for wavelengths at height (1) .. Line (numheights+3): extinction(numwave) extinction for wavelengths at height (numheights-1)

References SetExtinctionTable().

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

Calculate cross-sections at the specified wave-number.

[THREAD-SAFE]. Calculates the cross-section at the specified wavenumber. Code is instrinsically thread-safe as it only uses const methods

Implements skOpticalProperties.

virtual bool skOpticalProperties_TabulatedExtinction_HeightWavelength::UpdateInternalClimatology ( const GEODETIC_INSTANT &  pt)
Function that allows the optical properties class to update any internal
climatologies it may be using. This is useful for optical properties that use
internal climatologies to store various parameters (eg aerosols that store geographical distributions
of mode radius and mode width). The call to UpdateInternalClimatology differs from SetAtmosphericState
in its expected usage: a call to UpdateInternalClimatology configures internal climatologies so they
can quickly service the many subsequent calls to SetAtmosphericState.
ptThe time and location at which the next set of cross-sections will be needed. Note thatthe height field is usually ignored as all internal climatologies are expected to cache height profiles of their respective parameters.
True if success otherwise false.

Implements skOpticalProperties.

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