Species

Module: sasktran.species

Classes that associate an atmospheric constituents Optical Properties and Climatology.

Molecular

class sasktran.Species(optical_property: OpticalProperty, climatology: Climatology, species: str = None)

Bases: object

An object representing some atmospheric constituent. A species is an object that associates a constituents Optical Properties and Climatology.

Examples

>>> import sasktran as sk
>>> no2 = sk.Species(optical_property=sk.NO2Vandaele1998(), climatology=sk.Pratmo())
>>> print(no2)
SKCLIMATOLOGY_NO2_CM3
SasktranIF Climatology: NO2PRATMO
Supported Species: ['SKCLIMATOLOGY_NO2_CM3']
SasktranIF Optical Property: NO2_VANDAELE1998
property climatology

The climatology associated with this species. There is not setter for this property.

Type:

sasktran.Climatology

property optical_property

The optical property associated with this species. There is not setter for this property.

Type:

sasktran.OpticalProperty

property skif_species

The species identifier that is passed to the sasktran engine. In most cases this is identical to the property species, however in some specialized cases this can be different. skif_species returns the species handled used by the climatology returned by climatology.skif_object(), while species returns the species handle used by the climatology object.

Type:

str

property species

The species identifier. If the species argument was given during construction, this property will be that value, otherwise an identifier will be generated. There is not setter for this property.

Type:

str

Aerosols

class sasktran.SpeciesAerosol(altitudes: ndarray, aerosol_values: dict, particle_size_values: dict, species: str = 'H2SO4', interp: str = 'linear', spline: bool = False)

Bases: Species

Special climatology which handles aerosol distributions. Contains a particle size Climatology and MieAerosol OpticalProperty internally to handle changes to size parameters.

Parameters:
  • altitudes (np.ndarray) – Array of altitudes in meters that the profile is to be specified at. Same shape as values.

  • aerosol_values (dict) – Dictionary of species names and values containing the aerosol number density Values should be the same size as altitudes.

  • particle_size_values (dict) – Dictionary of species names and values containing the particle size profile. Values should be the same size as altitudes.

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

  • interp (str, optional) – One of ‘linear’ or ‘log’. Defines the interpolation space. Default is ‘linear’

  • spline (bool, optional) – One of True of False. If True then a quadratic spline will be used to interpolate, if False then piecewise linear interpolation is done. Default is False.

Examples

>>> from sasktran.species import SpeciesAerosol
>>> import numpy as np
>>> altitudes = np.linspace(500, 99500, 100)
>>> values = np.ones_like(altitudes)
>>> species = SpeciesAerosol(altitudes, {'SKCLIMATOLOGY_AEROSOL_CM3': values},                                            {'SKCLIMATOLOGY_LOGNORMAL_MODERADIUS_MICRONS': values * 0.08,                                             'SKCLIMATOLOGY_LOGNORMAL_MODEWIDTH': values * 1.6}, 'H2SO4')
>>> species.get_parameter('SKCLIMATOLOGY_AEROSOL_CM3', latitude=0, longitude=0, altitudes=[10000, 11000], mjd=54372)
array([ 1.,  1.])
>>> species['SKCLIMATOLOGY_AEROSOL_CM3'] *= 2
>>> species.get_parameter('SKCLIMATOLOGY_AEROSOL_CM3', latitude=0, longitude=0, altitudes=[10000, 11000], mjd=54372)
array([ 2.,  2.])
>>> species.get_parameter('SKCLIMATOLOGY_LOGNORMAL_MODERADIUS_MICRONS', latitude=0, longitude=0,                              altitudes=[10000, 11000], mjd=54372)
array([ 0.08,  0.08])
>>> species['SKCLIMATOLOGY_LOGNORMAL_MODERADIUS_MICRONS'] *= 2
>>> species.get_parameter('SKCLIMATOLOGY_LOGNORMAL_MODERADIUS_MICRONS', latitude=0, longitude=0,                              altitudes=[10000, 11000], mjd=54372)
array([ 0.16,  0.16])
class sasktran.SpeciesAerosolGloSSAC(self, altitudes: np.ndarray = np.arange(0, 100001, 500), particle_size_values: dict = None, species: str = 'H2SO4', interp: str = 'linear', spline: bool = False, extend=False)

Bases: SpeciesAerosol

Special climatology which handles aerosol distributions. Similar to sasktran.SpeciesAerosol, however rather than a user defined aerosol profile the sasktran.GloSSAC climatology is used.

A dictionary of particle size values can be provided. If not, a lognormal distribution with median radius=80nm and width of 1.6 is used.

Notes

Although the user side uses the handle ‘SKCLIMATOLOGY_AEROSOL_EXTINCTIONPERKM’, aerosol properties are passed to sasktran using the ‘SKCLIMATOLOGY_AEROSOL_CM3’ handle

Examples

>>> from sasktran.species import SpeciesAerosolGloSSAC
>>> import numpy as np
>>> altitudes = np.linspace(500, 99500, 100)
>>> values = np.ones_like(altitudes)
>>> species = SpeciesAerosolGloSSAC()
>>> species.get_parameter('SKCLIMATOLOGY_AEROSOL_EXTINCTIONPERKM', latitude=0, longitude=0,                               altitudes=[22000, 23000], mjd=54372)
array([ 0.00049428,  0.0004945 ])
>>> species.get_parameter('SKCLIMATOLOGY_AEROSOL_EXTINCTIONPERKM', latitude=20, longitude=0,                               altitudes=[22000, 23000], mjd=54372)
array([ 0.00048611,  0.0004257 ])
>>> species.get_parameter('SKCLIMATOLOGY_LOGNORMAL_MODERADIUS_MICRONS', latitude=0, longitude=0,                                altitudes=[10000, 11000], mjd=54372)
array([ 0.08,  0.08])
>>> species['SKCLIMATOLOGY_LOGNORMAL_MODERADIUS_MICRONS'] *= 2
>>> species.get_parameter('SKCLIMATOLOGY_LOGNORMAL_MODERADIUS_MICRONS', latitude=0, longitude=0,                                altitudes=[10000, 11000], mjd=54372)
array([ 0.16,  0.16])
property skif_species

The species identifier that is passed to the sasktran engine. In most cases this is identical to the property species, however in some specialized cases this can be different. skif_species returns the species handled used by the climatology returned by climatology.skif_object(), while species returns the species handle used by the climatology object.

Type:

str

Clouds

class sasktran.SpeciesBaumIceCloud(particlesize_microns: float, cloud_top_m: float, cloud_width_fwhm_m: float, vertical_optical_depth: float, vertical_optical_depth_wavel_nm: float, altitude_resolution_m: float = 10, num_sigma: int = 5, name='icecloud', use_delta_eddington=True)

Bases: Species

Creates a species of Baum ice crystals with a Gaussian cloud shape.

Parameters:
  • particlesize_microns (float) – Particle size used for the sasktran.BaumIceCrystal optical property

  • cloud_top_m (float) – Cloud top altitude in m. Defined such that 95% of the cloud is below this height. [m]

  • cloud_width_fwhm_m (float) – Full width at half maximum of the Gaussian cloud. [m]

  • vertical_optical_depth (float) – Vertical optical depth of the cloud specified at vertical_optical_depth_wavel_nm

  • vertical_optical_depth_wavel_nm (float) – Wavelength where the cloud has the optical depth specified by vertical_optical_depth. [nm]

  • altitude_resolution_m (float, optional) – Internal resolution to calculate the cloud number density at. Default 10 m.

  • num_sigma (int, optional) – Number of standard deviations to include away from the center of the cloud. Default 5.

  • name (str, optional) – Name of the species, only necessary to change if you want a different name or want to add multiple ice cloud layers.

  • use_delta_eddington (bool, optional) – True if the delta-eddington reduction should be applied to the cloud optical property

See Also

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.

Optical Properties

Classes that describes the optical properties of some atmospheric Species.

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.