Species

Module: sasktran.species

Classes that associate an atmospheric constituents Optical Properties and Climatology.

Molecular

class sasktran.Species(optical_property: sasktran.opticalproperty.OpticalProperty, climatology: sasktran.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
climatology

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

Type

sasktran.Climatology

optical_property

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

Type

sasktran.OpticalProperty

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

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: numpy.ndarray, aerosol_values: dict, particle_size_values: dict, species: str = 'H2SO4', interp: str = 'linear', spline: bool = False)

Bases: sasktran.species.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: sasktran.species.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])
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)

Bases: sasktran.species.Species

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.