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

#include <skrtscatter_phasematrix.h>

Inheritance diagram for skOpticalProperties_MieAerosol:
skOpticalProperties_ParticleBase skOpticalProperties skOpticalProperties_MieAerosolCached

Public Member Functions

 skOpticalProperties_MieAerosol ()
 
virtual ~skOpticalProperties_MieAerosol ()
 
void LoadDefaultStratosphere ()
 
void LoadDefaultTroposphere ()
 
virtual bool Set_RefractiveIndex (skRTRefractiveIndex *newri)
 
virtual bool Set_ParticleDistribution (skRTParticleDist *newdistribution)
 
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. More...
 
virtual bool UpdateInternalClimatology (const GEODETIC_INSTANT &pt) 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 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 CalculatePhaseMatrix (double wavenumber, double cosscatterangle, skRTPhaseMatrix *phasematrix, size_t threadindex) override
 Calculate the phase matrix at the specified wavenumber and scattering angle.
 

Detailed Description

This is a class that calculates the scattering phase matrix for a particle distribution of spherical particles obeying mie scattering. Most users will use class skOpticalProperties_MieAerosolCached

Internally the class stores a table giving the phase matrix at a set of interpolation cos( scattering angles). The table is calculated when the base class sk_ExtinctionPhaseMatrix calls Interpolate_PhaseMatrixTables The call is not made until the user wants a Phase Matrix or cross-section value;

Note that the class does not detect cases where the user changes the underlying paramaters of the associated refractive index or particle distribution. It is not anticpated that the user will "mess" with these parameters between usage.

The class implicitly assumes that the particle distribution is normalized to unity.

Calculating the lookup table is quite intensive as for each wavelength it requires an evaluation of the mie scattering code over all the possible angles and particle radii.

Constructor & Destructor Documentation

skOpticalProperties_MieAerosol::skOpticalProperties_MieAerosol ( )

Default constructor initializes the Mie Aerosol code so it uses 100 fourier harmonics.

skOpticalProperties_MieAerosol::~skOpticalProperties_MieAerosol ( )
virtual

default destructor

Member Function Documentation

void skOpticalProperties_MieAerosol::LoadDefaultStratosphere ( )

Load up a default stratospheric aerosol. Normally used for testing purposes. NOT RECOMMENDED FOR GENERAL USE.

References Set_ParticleDistribution(), and Set_RefractiveIndex().

void skOpticalProperties_MieAerosol::LoadDefaultTroposphere ( )

Load up a default stratospheric aerosol. Normally used for testing purposes. NOT RECOMMENDED FOR GENERAL USE.

References Set_ParticleDistribution(), and Set_RefractiveIndex().

bool skOpticalProperties_MieAerosol::Set_RefractiveIndex ( skRTRefractiveIndex newri)
virtual

Set the refractive index of the Mie Aerosol spheres to the new value.

Parameters
newriPointer to the new refractive index object. The class will call AddRef() on the new refractive index to keep the object alive and it will call Release() when it is finished with the object.

Implements skOpticalProperties_ParticleBase.

Reimplemented in skOpticalProperties_MieAerosolCached.

Referenced by LoadDefaultStratosphere(), LoadDefaultTroposphere(), and skOpticalProperties_MieAerosolCached::Set_RefractiveIndex().

bool skOpticalProperties_MieAerosol::Set_ParticleDistribution ( skRTParticleDist newdistribution)
virtual

Set #newdistribution as the new particle distribution for the Mie scatterers. The #newdistribution is cloned into memory. The code checks to see if the current and new distributions are identical

Parameters
newdistributionThe new particle distribution.

Implements skOpticalProperties_ParticleBase.

Reimplemented in skOpticalProperties_MieAerosolCached.

References skRTParticleDist::IsSameDistributionAs().

Referenced by LoadDefaultStratosphere(), LoadDefaultTroposphere(), and skOpticalProperties_MieAerosolCached::Set_ParticleDistribution().

bool skOpticalProperties_MieAerosol::SetAtmosphericState ( skClimatology *  neutralatmosphere,
const GEODETIC_INSTANT &  pt,
bool *  crosssectionschanged 
)
overridevirtual

Sets the atmospheric state and location for calculating cross-sections, usually temperature, pressure and position.

[NOT THREAD SAFE} Function that allows the optical properties class to update internal parameters in response to the caller changing geophysical location. This is provided so that radiative transfer models can manage cross-sections that depend upon pressure and temperature. The user (eg the radiative transfer model) will usually call SetAtmosphericState before calling CalculateCrossSections.

Parameters
neutralatmosphereA climatology passed in by the user. The optical properties class can use this class if they wish to lookup parameters of interest. The climatology will usually support, pressure, temperature and density.
ptThe time and location at which the next set of cross-sections will be needed. Note that the height field in point will be valid (as this is often used to get the pressure and temperature).
crosssectionschangedreturns true if the new geophysical location will cause a change in cross-section. Several species (eg Rayleigh scattering) are completely unaffected by changes in location.

Implements skOpticalProperties.

virtual bool skOpticalProperties_MieAerosol::UpdateInternalClimatology ( const GEODETIC_INSTANT &  pt)
inlineoverridevirtual
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.
Parameters
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.
Returns
True if success otherwise false.

Implements skOpticalProperties.

bool skOpticalProperties_MieAerosol::CalculateCrossSections ( double  wavenum,
double *  absxs,
double *  extxs,
double *  scattxs,
size_t  threadindex 
)
overridevirtual

Calculate cross-sections at the specified wave-number.

This code is a protected virtual interface call that sk_ExtinctionPhaseMatrix will call to generate new extinction, absorption and scattering cross sections. This call must calculate the new cross-sections in cm**2 and call SetCrossSections to pass the information back to the base class. In addition the code should use this opportunity to update any internal tables that enable rapid evaluation of the phase matrix for arbitrary scattering angle.

This code actually generates a lookup table of the phase matrix for a range of angles. The phase matrix has been integrated over the particle distribution. The user may derive the phase matrix at any angle by linear interpolation. I have implicitly assumed that the internal scattering angle tables are monotonically increasing and the user has enough common sense to place a sufficient number of points in the angular distribution. The integration formulae are taken from eqns 2.47 to 2.49 of Hansen and Travis.

Implements skOpticalProperties.

Reimplemented in skOpticalProperties_MieAerosolCached.

Referenced by CalculatePhaseMatrix().


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