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

#include <skrtscatter_tabulatedcirrusproperties.h>

Inheritance diagram for skOpticalProperties_TabulatedCrossSectionAndPhaseMatrix_BaumDB:
skOpticalProperties

Public Member Functions

bool ConfigureRayTracingByExtinctionProfile (nx2dArray< double > *cloudscatextinct, double minraytracedelta, std::vector< double > *raytracealts)
 
bool SetIceRadiusAndCrossSectionProfile (nx2dArray< double > icesizeprofile, std::vector< double > lambdasnm, nx2dArray< double > *cloudscatextinct, const char *configdir)
 
bool SetIceRadiusAndNumDensityProfileGivenTau (std::vector< double > lambdasnm, double hCloudTopKm, double cloudthickM, double opticaldelta, double particlesize, double lambdatau, double tau, nx2dArray< double > *iceprofile, nx2dArray< double > *cloudscatextinct, std::vector< double > *raytracealts, double minraytracedelta, double *iwp, const char *configdir)
 
bool SetDefaultTruncationAngles ()
 
bool LoadHeightWavelengthProfileFromMasterFile (const char *masterfilename)
 
bool SetCrossSectionTable (const nx2dArray< double > &extinction, const std::vector< double > &wavelens, const nx1dArray< double > &heights_meters)
 
virtual bool SetAtmosphericState (skClimatology *neutralatmosphere, const GEODETIC_INSTANT &pt, bool *crosssectionschanged)
 Sets the atmospheric state and location for calculating cross-sections, usually temperature, pressure and position.
 
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.
 
virtual bool CalculatePhaseMatrix (double wavenumber, double cosscatterangle, skRTPhaseMatrix *phasematrix, size_t threadindex) 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 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...
 

Detailed Description

A class that interfaces to Bryan Baum's database of cirrus ice crystal cross-sections and phase functions, built using capabilities of both skOpticalProperties_TabulatedExtinction_HeightWavelength and skOpticalProperties_TabulatedPhaseMatrix_HeightWavelength. Required data are retrieved from the database (whose directory is sepcified with a registry key) and are cached locally (in the directory specified in m_configdir) using the base class functions. Before you use this class, set up the directory that will be pointed to with the registry key. This directory must contain all of the files containing cross-sections (De=10..180um) and phase functions (lambda=0.4..2.2um). Also see Ice Cloud Research Team web site: http://www.ssec.wisc.edu/~baum/Cirrus/IceCloudModels.html University of Wisconsin-Madison Space Science and Engineering Center Ice Cloud Research Team: Bryan Baum (bryan.nosp@m..bau.nosp@m.m@sse.nosp@m.c.wi.nosp@m.sc.ed.nosp@m.u), Ping Yang (Texas A&M), Andrew J. Heymsfield and Carl Schmitt (NCAR) The cross-section database contains 18 text files, each one specific to a given effective diameter (De), which span a range from 10 to 180 microns in 10 micron increments. Each file contains entries for each of the 144 wavelengths at which properties are available. The ice crystal habit mixture described above is used for all calculations of microphysical and optical properties. Cross-sections data provided for each wavelength are the following: Asymmetry factor (g) .. Single scattering albedo (omega) .. Extinction efficiency (Qe) .. Scattering cross section (sig_scat) (in units of um^2) Extinction cross section (sig_ext) (in units of um^2) Within each of the (ascii) phase function files, data are formatted as follows: 1st column: scattering angle (from 0 to 180 degrees with 498 angles) 2nd column: mean value of scattering phase function at De = 10 microns 3rd column: standard deviation of phase function at De = 10 microns 4th column: mean value of scattering phase function at De = 20 microns 5th column: standard deviation of phase function at De = 20 microns .... and so forth for the rest of the De values up to 180 microns NOTE: the files read in by this class have been stripped of header data by a Python script. These files are subject to change, and the Python script is available in the current directory. Run it on the supplied data files to strip away the text. After this, set up a directory for these files, and this class will generate a registry key to point to this directory. The most up-to-date version of the phase functions for solar wavelengths can be found on the above website.

Member Function Documentation

bool skOpticalProperties_TabulatedCrossSectionAndPhaseMatrix_BaumDB::ConfigureRayTracingByExtinctionProfile ( nx2dArray< double > *  cloudscatextinct,
double  minraytracedelta,
std::vector< double > *  raytracealts 
)

Set up the SASKTRAN configuration altitudes (ray tracing alts and diffuse points) according to the specified extinction profile, usually assuming a Gaussian numden profile. the goal here is to maintain a constant cell optical depth. The maximum cell optical depth is calculated from the point of the max. number density of the profile, and this per-cell depth is used to scale the ray-tracing shells outward from this maximum.

bool skOpticalProperties_TabulatedCrossSectionAndPhaseMatrix_BaumDB::SetIceRadiusAndCrossSectionProfile ( nx2dArray< double >  icesizeprofile,
std::vector< double >  lambdasnm,
nx2dArray< double > *  cloudscatextinct,
const char *  configdir = "./" 
)

The primary setup function for this class. Configure the height- and wavelength-dependent cross sections and phase matrices for the class using the specified particle size, and build the cross section profile. 'configdir' specifies the location in which several needed working files are stored: the master file (maps size(phase function file) to heights), phase functions (spec at height, as funct. of wavelength and scatter angle), and the crosssection file (as a function of height and wavelength)

References LoadHeightWavelengthProfileFromMasterFile().

bool skOpticalProperties_TabulatedCrossSectionAndPhaseMatrix_BaumDB::SetIceRadiusAndNumDensityProfileGivenTau ( std::vector< double >  lambdasnm,
double  hCloudTopKm,
double  cloudthickM,
double  opticaldelta,
double  particlesize,
double  lambdatau,
double  tau,
nx2dArray< double > *  iceprofile,
nx2dArray< double > *  cloudscatextinct,
std::vector< double > *  raytracealts,
double  minraytracedelta,
double *  iwp,
const char *  configdir = "./" 
)

The primary setup function for class IF the user desires to treat the cross-sections as extinctions (i.e. fold num density into cross-section and use a 'one' climatology for the species. Configure the height- and wavelength-dependent extinctions and phase matrices for the class using the specified particle size, and build the extinction profile such that the vertical optical depth at wavelength 'lambdatau' is 'tau' for the given optical property spacing 'opticaldelta'. 'configdir' specifies the location in which several needed working files are stored: the master file (maps size(phase function file) to heights), phase functions (spec at height, as funct. of wavelength and scatter angle), and the extinction file (as a function of height and wavelength)

References LoadHeightWavelengthProfileFromMasterFile().

bool skOpticalProperties_TabulatedCrossSectionAndPhaseMatrix_BaumDB::SetDefaultTruncationAngles ( )

Set the default truncation angles for all DB effective sizes. Selections are based on minimizing the absolute geometric mean (over inc. directions) of the photon-conservation multipliers. For reference on these selections, see Wiensz et al, JQSRT, 2012.

bool skOpticalProperties_TabulatedCrossSectionAndPhaseMatrix_BaumDB::LoadHeightWavelengthProfileFromMasterFile ( const char *  masterfilename)

Loads in the set of phasematrices asa function of height, wavelength and scattering angle. This method is responsible for managing the entire load and it controls loading the height profiles. This consists of reading

Referenced by SetIceRadiusAndCrossSectionProfile(), and SetIceRadiusAndNumDensityProfileGivenTau().

bool skOpticalProperties_TabulatedCrossSectionAndPhaseMatrix_BaumDB::SetCrossSectionTable ( const nx2dArray< double > &  crosssection,
const std::vector< double > &  wavelen_nm,
const nx1dArray< double > &  heights_meters 
)

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

virtual bool skOpticalProperties_TabulatedCrossSectionAndPhaseMatrix_BaumDB::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_TabulatedCrossSectionAndPhaseMatrix_BaumDB::CalculatePhaseMatrix ( double  wavenumber,
double  cosscatterangle,
skRTPhaseMatrix phasematrix,
size_t  threadindex 
)
overridevirtual

Return the value of the phase matrix for this wavenum and (cos)scatter angle. NOTE: This function works with database phase functions that have already been truncated, and these will be normalized according to f=[P_{smooth}()/2]d = (1-f), where f is the fraction of light scattering into the forward direction.

Reimplemented from skOpticalProperties.


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