Optical Properties

Module: sasktran.opticalproperty

Classes that describe the optical properties of some atmospheric Species. These objects are used to create Species objects.

See our Useful Shorthands for optical properties that we use a lot.

Base Classes

class sasktran.OpticalProperty(name: str)

Bases: object

Generic optical property container that is applicable to a wide variety of optical properties.

Parameters

name (str) – Name of the optical property to create

Examples

>>> from sasktran import OpticalProperty, Climatology
>>> opt_prop = OpticalProperty('O3_OSIRISRES')
>>> print(opt_prop)
SasktranIF Optical Property: O3_OSIRISRES
>>> atmospheric_state = Climatology('msis90')
>>> opt_prop.calculate_cross_sections(atmospheric_state, latitude=0, longitude=0, altitude=20000, mjd=54372,                                          wavelengths=[350, 600])
CrossSections(wavelengths=array([350, 600]), absorption=array([  7.09857544e-23,   5.27719024e-21]), scattering=array([ 0.,  0.]), total=array([  7.09857544e-23,   5.27719024e-21]))
calculate_cross_sections(atmospheric_state: sasktran.climatology.Climatology, latitude: float, longitude: float, altitude: float, mjd: float, wavelengths: numpy.core.multiarray.array)

Calculates absorption and scattering cross sections for the given optical property with a specific atmospheric state and location.

Parameters
  • atmospheric_state (sasktran.Climatology) – Atmospheric state (sometime called background climatology, corresponds to sasktran.Atmosphere.atmospheric_state). Typically the background climatology must support temperature and pressure, e.g. msis90. Some optical properties may not need a background climatology, for example Mie aerosols, however one must still be passed in for the function to operate.

  • latitude (float) – Latitude in degrees.

  • longitude (float) – Longitude in degrees.

  • altitude (float) – Altitude in meters.

  • mjd (float) – Modified Julian Date.

  • wavelengths (np.array) – Wavelengths in nm.

Returns

NamedTuple with fields wavelengths, absorption, scattering, total. wavelengths field matches the input wavelengths, absorption and scattering are the absorption and scattering cross sections respectively in \(\mathrm{cm^2}\) and total is the sum of the two.

Return type

CrossSections

Examples

>>> from sasktran import OpticalProperty, Climatology
>>> opt_prop = OpticalProperty('O3_OSIRISRES')
>>> print(opt_prop)
SasktranIF Optical Property: O3_OSIRISRES
>>> atmospheric_state = Climatology('msis90')
>>> opt_prop.calculate_cross_sections(atmospheric_state, latitude=0, longitude=0, altitude=20000, mjd=54372,                                              wavelengths=[350, 600])
CrossSections(wavelengths=array([350, 600]), absorption=array([  7.09857544e-23,   5.27719024e-21]), scattering=array([ 0.,  0.]), total=array([  7.09857544e-23,   5.27719024e-21]))
calculate_phase_matrix(atmospheric_state: sasktran.climatology.Climatology, latitude: float, longitude: float, altitude: float, mjd: float, wavelengths: numpy.core.multiarray.array, cosine_scatter_angles: numpy.core.multiarray.array)

Calculates the scattering phase matrix for the given optical property with a specific atmospheric state and location.

Parameters
  • atmospheric_state (sasktran.Climatology) – Atmospheric state (sometime called background climatology, corresponds to sasktran.Atmosphere.atmospheric_state). Typically the background climatology must support temperature and pressure, e.g. msis90. Some optical properties may not need a background climatology, for example Mie aerosols, however one must still be passed in for the function to operate.

  • latitude (float) – Latitude in degrees.

  • longitude (float) – Longitude in degrees.

  • altitude (float) – Altitude in meters.

  • mjd (float) – Modified Julian Date.

  • wavelengths (np.array) – Wavelengths in nm. Shape (N_wavel,)

  • cosine_scatter_angles (np.array) – Array of cosine of the scattering angle. Shape (N_angle,)

Returns

phase_matrix – Array of shape (N_wavel, N_angle, 4, 4) of phase matrices.

Return type

np.ndarray

class sasktran.OpticalPropertyConvolved(optical_property: sasktran.opticalproperty.OpticalProperty, psf_wavelength: numpy.ndarray, psf: numpy.ndarray, wavel_spacing: float = 0.01, num_stdev: float = 4, output_spacing: numpy.ndarray = None)

Bases: sasktran.opticalproperty.OpticalProperty

Generic optical property container that is applicable to a wide variety of optical properties.

Parameters
  • name (str) – Name of the optical property to create

  • psf_wavelength (np.ndarray) – array of wavelengths in nanometers where the point spread function is defined.

  • psf (np.ndarray) – array of point spread function values in nanometers. Same length as psf_wavelength

  • wavel_spacing (scalar, optional) – Spacing to calculate the high resolution wavelengths on in nanometers, default is 0.01nm

  • num_stdev (scalar, optional) – Number of standard deviations to use in the gaussian for convolution, default is 4

  • output_spacing (scalar, string optional) – Spacing to calculate the convolved cross section on. Either a scalar to use a fixed spacing, or None to use the wavelengths of the point spread function (wavel parameter). Default is none.

Examples

>>> from sasktran import OpticalPropertyConvolved, MSIS90, O3DBM
>>> import numpy as np
>>> convolved_dbm = OpticalPropertyConvolved(O3DBM(), psf_wavelength=np.linspace(250, 1000, 50),                                                 psf=np.linspace(0.5, 10, 50))
>>> print(convolved_dbm)
SasktranIF Optical Property: O3_DBM_Convolved
>>> convolved_dbm.calculate_cross_sections(MSIS90(), latitude=0, longitude=0, altitude=20000, mjd=54372,                                               wavelengths=[350, 600])
CrossSections(wavelengths=array([350, 600]), absorption=array([  2.83084701e-22,   5.01481379e-21]), scattering=array([ 0.,  0.]), total=array([  2.83084701e-22,   5.01481379e-21]))
static convolved_optical_property(hires_optprop: sasktran.opticalproperty.OpticalProperty, wavel: numpy.ndarray, psf: numpy.ndarray, wavel_spacing: float = 0.01, num_stdev: float = 4, output_spacing: numpy.ndarray = None)

Convolves down the hi-resolution cross sections and creates a user defined optical property. Convolution assumes the hi-resolution version has infinite resolution

Parameters
  • hires_optprop (sasktran.OpticalProperty) – sasktran OpticalProperty that will be convolved down to desired resolution.

  • wavel (numpy array) – Wavelengths to calculate the new cross section for in nm

  • psf (numpy array) – Standard deviations of the gaussian to convolve by for each wavelength Can be the same size as wavel, or size 1 in which case the psf is assumed to be the same for all wavelengths

  • wavel_spacing (scalar, optional) – Spacing to calculate the high resolution wavelengths on in nanometers, default is 0.01nm

  • num_stdev (scalar, optional) – Number of standard deviations to use in the gaussian for convolution, default is 4

  • output_spacing (scalar,string optional) – Spacing to calculate the convolved cross section on. Either a scalar to use a fixed spacing, or None to use the wavelengths of the point spread function (wavel parameter). Default is none.

Returns

optprop – Convolved optical property

Return type

ISKOpticalProperty

Useful Shorthands

class sasktran.Rayleigh

Bases: sasktran.opticalproperty.OpticalProperty

An optical property object that provides Rayleigh molecular scattering in dry-air. The code closely follows the algorithm published by Bates 1984 and exactly replicates his cross-section calculations to the 4 significant digits in his Table 1. The cross-section is weighted to account for the different gas ratios in standard atmospheric composition. No attempt is made to track changes in CO2 composition. Note that water vapour effects are implicitly ignored as it only considers dry air. The only difference with Bates is that this object takes into account the tiny fraction of gas that is not N2, O2, Argon or CO2. Bates ignores this component while this object assumes it the residual gas with properties similar to Argon.

class sasktran.O3DBM

Bases: sasktran.opticalproperty.OpticalProperty

Tabulated high resolution cross-sections of O3 measured by Daumont, Brion and Malicet in the early 1990’s [1]. The wavelength range slightly varies with temperature but covers the entire UV to NIR region, from 194.50 nm to 830.00 nm at 0.01 to 0.02 nm resolution. The cross-section data were collected at 0.01-0.02 nm resolution and each wavelength/cross-section table varies in size from 22,052 to 63,501 entries. The data consists of 5 tables of wavelength versus cross-section for 5 temperatures.

Notes

Temerature Range

Measurements are provided at 5 temperatures covering typical stratospheric and tropospheric conditions:

218 K
228 K
243 K
273 K
295 K
Wavelength Range

The wavelength range of each temperature table is slightly different and is given below. Note that most of the temperature variation occurs in the Huggins band between 315 and 360 nm:

218K -> 194.50nm to 650.01nm
228K -> 194.50nm to 520.01nm
243K -> 194.50nm to 519.01nm
273K -> 299.50nm to 520.01nm
295K -> 195.00nm to 830.00nm

We looked into temperature interpolation and while DBM suggest that a quadratic interpolation scheme [3] they do not indicate an explicit technique. We tested several quadratic fitting routines and found that a truncated linear fit in temperature was visually more appealing than any of the quadratic fits and had none of the undesirable artifacts (excessive curvature etc.) that naturally arise with quadratic curve fitting. Consequently this object uses a truncated linear fit in temperature.

Data Source

These data are an exact replication of the data files:

O3_CRS_BDM_218K.dat
O3_CRS_BDM_228K.dat
O3_CRS_BDM_243K.dat
O3_CRS_BDM_273K.dat
O3_CRS_BDM_295K.dat

Data is from the IGACO site, http://igaco-o3.fmi.fi/ACSO/files/cross_sections. The files were copied on July 16-July 25 2012.

References

1

Daumont, D., et al. “Ozone UV spectroscopy I: Absorption cross-sections at room temperature.” Journal of Atmospheric Chemistry 15.2 (1992): 145-155.

2

Brion, J., et al. “High-resolution laboratory absorption cross section of O3. Temperature effect.” Chemical physics letters 213.5 - 6(1993): 610-612.

3

Malicet, J., et al. “Ozone UV spectroscopy. II. Absorption cross-sections and temperature dependence.” Journal of Atmospheric Chemistry 21.3 (1995): 263-273.

4

Brion, J., et al. “Absorption spectra measurements for the ozone molecule in the 350–830 nm region.” Journal of Atmospheric Chemistry 30.2 (1998): 291-299.

class sasktran.O3OSIRISRes

Bases: sasktran.opticalproperty.OpticalProperty

” These are the cross-sections used in the OSIRIS level 2 analysis for Saskmart V5.07. This table is based upon the cross-sections of Bogumil Orphal and Burrows and has been reduced to the nominal resolution of the OSIRIS instrument (approx. 1.0 nm). The cross-sections range from 270nm to 820 nm in 0.1 nm steps.

class sasktran.NO2Vandaele1998

Bases: sasktran.opticalproperty.OpticalProperty

Calculates the absorption cross section of NO2 molecules from 230 nm to 1000 nm at 220 K to 294 K following [1]

1

Vandaele, Ann Carine, et al. “Measurements of the NO2 absorption cross-section from 42 000 cm− 1 to 10 000 cm− 1 (238–1000 nm) at 220 K and 294 K.” Journal of Quantitative Spectroscopy and Radiative Transfer 59.3-5 (1998): 171-184.

class sasktran.NO2OSIRISRes

Bases: sasktran.opticalproperty.OpticalProperty

Calculates the absorption cross section of NO2 molecules from 230 nm to 795 nm and 221K to 293K. The cross-sections have been reduced to the resolution of OSIRIS and these cross-sections have been used in the OSIRIS level 2 MART retrievals.

class sasktran.HITRANChemical(chemical_name: str, line_tolerance=None, max_line_strength=None, isotope_filter=None)

Bases: sasktran.opticalproperty.OpticalProperty

Calculates the optical absorption and extinction of various atmospheric molecules using the Voigt line-shape and the HITRAN spectral line database. The object supports all of the HITRAN species specified in the HITRAN database file molparam.txt. This optical property requires additional configuration, see Configuration for more information.

Parameters
  • chemical_name (str) – Chemical abbreviation of the molecule of interest.

  • isotope_filter (int, optional) – Allows the HITRAN object to load in just one isotope of the requested molecule. The value set must match one of the isotope labels used for the given molecule in the HITRAN database file, molparam.txt. Note that the code does not adjust the line strength but uses the line strength value as written in the HITRAN database. This means you may have to account for and/or remove the abundance automatically built into the HITRAN database line strength values.

  • line_tolerance (float, optional) – Allows the user to set the tolerance used to reject weak lines from the current micro-window. The default value is 1.0E-09. A larger value will speed up calculation of spectra but may result in choppy spectra at the smaller intensities, especially in extinction/absorption spectra which typically follow the log of the cross-secton. A smaller value will reduce choppiness but invrease computational speed. A similar result can be achived by changing property SetMaxLineStrength; the choice is really down to the users preference. Only values greater than zero are acceptable.

  • max_line_strength (float, optional) – Allows the user to manually set the maximum line strength within a micro-window. By default the object will use the strongest line in the micro-window. The value is used with the line tolerance to reject weak lines from spectral calculations. Reducing the value of the maximum line strength can reduce choppiness in the spectra. Its use is similar to property SetLineTolerance. Only values greater than zero are acceptable. A negative value is an error. A value of zero will disable the manual setting and reinstate usage of the default.

class sasktran.MieAerosol(particlesize_climatology: sasktran.climatology.Climatology, species: str)

Bases: sasktran.opticalproperty.OpticalProperty

Specialized OpticalProperty which supports Mie Aerosol calculations.

Parameters
  • particlesize_climatology (sasktran.Climatology) –

  • species (str) – Molecule to use, one of [‘H2SO4’, ‘ICE’, ‘WATER’]

class sasktran.SimpleRayleigh

Bases: sasktran.opticalproperty.OpticalProperty

An optical property object that provides Rayleigh molecular scattering without any corrections. This is very similar to the sasktran.Rayleigh optical property except that the Bates correction factor is not included. For most calculations it is preferred to use the sasktran.Rayleigh optical property instead.

class sasktran.BaumIceCrystal(effective_size_microns, use_delta_eddington=True)

Bases: sasktran.opticalproperty.OpticalProperty

Scattering non-spherical ice crystals based upon the database from Baum.

Parameters
  • effective_size_microns (float) – Size of the particles, typically from 10 microns to 50 microns

  • use_delta_eddington (bool, optional) – True if the delta eddington approximation is to be used. Should be True for use in either the HR or DO engines. Default: True.

See Also

Species

Representation of a atmospheric constituent.

Climatology

A profile quantifying something in/about the atmosphere. For example climatologies could be used to define profiles for temperature, pressure, gas number densities, etc.

Atmosphere

An object that describes the atmospheric constituents, and surface type to the engine. Atmospheric constituents are defined by a list of Species, and surfaces are defined by a given BRDF.