Atmosphere

Module: sasktran.atmosphere

class sasktran.Atmosphere

Bases: object

The Atmosphere class is a generic container that defines the atmospheric state for a radiative transfer calculation. The first component of this is defining a set of atmospheric constituents, which is controlled by the sasktran.Atmosphere.species property.

The second component is defining the ground reflectance. Sasktran support BRDF surfaces. The BRDF can be set with the sasktran.Atmosphere.brdf property.

Emissions can also be added to the atmosphere using the sasktran.Atmosphere.brdf property. Note that currently the only radiative transfer model that supports emissions is the HR engine.

Additionally, the atmosphere object can be used to set the temperature and pressure Climatology (see sasktran.Atmosphere.atmospheric_state), as well as species to calculate weighting functions for (see sasktran.Atmosphere.wf_species).

remove_species(name: str)

Removes a species with a given identifier from the atmosphere.

Parameters

name (str) – Identifier of the species to remove.

Examples

>>> import sasktran as sk
>>> atmosphere = sk.Atmosphere()
>>> atmosphere.species['o3'] = sk.Species(sk.O3DBM(), sk.Labow())
>>> print(atmosphere.species['o3'])
SKCLIMATOLOGY_O3_CM3
SasktranIF Climatology: O3LABOW
Supported Species: ['SKCLIMATOLOGY_O3_CM3', 'SKCLIMATOLOGY_O3_VMR']
SasktranIF Optical Property: O3_DBM
>>> atmosphere.remove_species('o3')             # remove the species
>>> print('o3' in atmosphere.species)
False
atmospheric_state

A special Climatology used to set the atmosphere’s temperature, and pressure. This climatology must support both ‘SKCLIMATOLOGY_TEMPERATURE_K’ and ‘SKCLIMATOLOGY_PRESSURE_PA’. The default atmospheric state is sasktran.MSIS90.

Examples

>>> import sasktran as sk
>>> atmosphere = sk.Atmosphere()
>>> msis90 = sk.MSIS90()   # MSIS90 is a climatology that supports the temperature and pressure identifiers
>>> print('SKCLIMATOLOGY_TEMPERATURE_K' in msis90.supported_species())
True
>>> print('SKCLIMATOLOGY_PRESSURE_PA' in msis90.supported_species())
True
>>> atmosphere.atmospheric_state = msis90
>>> print(atmosphere)
sasktran.Atmosphere:
Species: dict_keys([])
BRDF: BRDF Object: lambertian
Atmospheric State: SasktranIF Climatology: MSIS90
Supported Species: ['SKCLIMATOLOGY_PRESSURE_PA', 'SKCLIMATOLOGY_AIRNUMBERDENSITY_CM3', 'SKCLIMATOLOGY_TEMPERATURE_K']
WF Species: None
Type

sasktran.Climatology

brdf

The surface BRDF object. If set to a scalar, a Lambertian albedo is assumed.

Examples

>>> import sasktran as sk
>>> atmosphere = sk.Atmosphere()
>>> atmosphere.brdf = 1                 # Equivalent to sk.Lambertian(1.0)
>>> print(atmosphere.brdf)
BRDF Object: lambertian
>>> atmosphere.brdf = sk.Kokhanovsky()  # Non Lambertian surface
>>> print(atmosphere.brdf)
BRDF Object: SNOW_KOKHANOVSKY2012
Type

sk.BRDF

emissions

A dictionary of Emission objects with keys being the identifying emission strings

Examples

>>> import sasktran as sk
>>> atmosphere = sk.Atmosphere()
>>> emission = sk.EmissionThermal()
>>> atmosphere.emissions['thermal'] = emission
>>> print(atmosphere.emissions['thermal'])
Emission of type: THERMAL
Type

dict

has_changed

True if the atmosphere has changed since being added to an sasktran.Engine object.

Type

bool

species

A dictionary of Species objects with the keys being the species identifying strings.

Examples

>>> import sasktran as sk
>>> atmosphere = sk.Atmosphere()
>>> ozone = sk.Species(sk.O3DBM(), sk.Labow())  # create a species
>>> atmosphere.species['o3'] = ozone            # add the species
>>> print(atmosphere.species['o3'])             # get the species
SKCLIMATOLOGY_O3_CM3
SasktranIF Climatology: O3LABOW
Supported Species: ['SKCLIMATOLOGY_O3_CM3', 'SKCLIMATOLOGY_O3_VMR']
SasktranIF Optical Property: O3_DBM

Notes

The sasktran.Atmosphere.__getitem___() and sasktran.Atmosphere.__setitem___() are aliases to this dictionary. For example this means that

>>> import sasktran as sk
>>> atmosphere = sk.Atmosphere()
>>> atmosphere.species['o3'] = sk.Species(sk.O3DBM(), sk.Labow())

is equivalent to

>>> atmosphere['o3'] = sk.Species(sk.O3DBM(), sk.Labow())
Type

dict

wf_species

Species identifier to calculate weighing functions for. Weighting functions will be calculated if this property is set. Note that engines that support multi-species weighting functions can handle this property being a list of species identifiers. If this property is None, weighting functions won’t be calculated.

Examples

>>> import sasktran as sk
>>> atmosphere = sk.Atmosphere()
>>> atmosphere.species['o3'] = sk.Species(sk.O3DBM(), sk.Labow())
>>> print(atmosphere)
sasktran.Atmosphere:
Species: dict_keys(['o3'])
BRDF: BRDF Object: lambertian
Atmospheric State: None
WF Species: None
>>> atmosphere.wf_species = 'o3'
>>> print(atmosphere)
sasktran.Atmosphere:
Species: dict_keys(['o3'])
BRDF: BRDF Object: lambertian
Atmospheric State: None
WF Species: o3
Type

str

See Also

Species

Representation of a atmospheric constituent.

BRDF

SASKTRAN supports BRDF surfaces. This module contains the BRDF base class and the BRDF’s currently supported.