Atmosphere

class radtran.atmosphere.Atmosphere

A class which holds the atmosphere for an engine within the SASKTRAN framework, i.e. that follows the climatology, optical property, guid model.

There are two primary methods of adding species to the atmosphere, one is the default way of specifying a climatology/optical property/guid, and the other is by specifying a user defined profile.

Climatology Optical Property Guid:
Species can be added through add_species(), this function takes in a climatology, optical property, and guid from sasktranif and keeps a reference to them inside the class. Once the species is added it cannot be modified/removed directly through the Atmosphere class. This is the preferred method for adding species that wont be modified later in some retrieval process.
User Defined Profile:
The other method of adding a species is with add_user_defined() here we add a species by specifying the optical property and guid (from sasktranif) and an array of heights/profile values. The atmosphere class automatically creates a ISKClimatology(‘USERDEFINED_PROFILE’) object and stores the species internally. Later the climatology can be modified through the functions modify_user_defined() and get_user_defined(). Use this method of adding a species when you are going to be modifying it later.
Albedo:
Albedo is assumed to be constant both spatially and spectrally. It can be set through the albedo member variable
Background Atmosphere:
As of July 23 2015, all SASKTRAN engines appear to have a bug where the default pressure/temperature climatology (MSIS) is not initialized properly for the first wavelength. Because of this we explicitly call SetAtmosphericState() with a background climatology. By default this is ISKCLIMATOLOGY(‘ECMWF’), but can be changed by modifying the backgroundclim member variable.

Methods

add_albedo_to_engine
add_species
add_to_engine
add_user_defined
add_wf_species_to_engine
get_user_defined
modify_user_defined
set_albedo
set_wf_species
add_species(clim: sasktranif.sasktranif.ISKClimatology, optprop: sasktranif.sasktranif.ISKOpticalProperty, guid: str) → None

Adds a species to the atmosphere

Parameters:

clim :

ISKClimatology

optprop :

ISKOpticalProperty

guid :

guid from sasktranif

add_to_engine(engine: sasktranif.sasktranif.ISKEngine, addbackground: bool=True) → None

Adds the atmosphere to the engine

Parameters:engine : ISKEngine
add_user_defined(guid: str, optprop: sasktranif.sasktranif.ISKOpticalProperty, heights: numpy.ndarray, profile: numpy.ndarray, ident: str, doLogInterpolation: bool=False, doPiecewiseLinear: bool=False) → None

Adds a user defined species (of type ISKClimatology(‘USERDEFINED_PROFILE’)) to the atmosphere

Parameters:

guid :

guid from sasktranif

optprop :

ISKOpticalProperty

heights : numpy array

Heights in meters in ascending order

profile : numpy array

values for the user defined profile, same size and shape as heights

ident : string

A user specified identifier for the profile, for example ‘o3’

add_wf_species_to_engine(engine: sasktranif.sasktranif.ISKEngine) → None

Adds the weighting function species to the engine

Parameters:engine : ISKEngine
get_user_defined(ident: str)

Gets a user defined profile that is present in the Atmosphere

Parameters:

ident : string

The user specified identifer for the profile to be retrieved

Returns:

tuple

(profile_heights_m, profile_values)

Raises:

KeyError

If there is no profile specified by ident

modify_user_defined(ident: str, profile: numpy.ndarray) → None

Modifies a user defined profile that has already been added to the atmosphere

Parameters:

ident : string

The user specified identifier for the profile to be modified

profile : numpy array

The new value for the profile

Raises:

KeyError

If a profile matching ident does not exist in the atmosphere

set_wf_species(optprop: sasktranif.sasktranif.ISKOpticalProperty) → None

Sets the species to calculate weighting functions for

Parameters:

optprop : ISKOpticalProperty

Optical Property from sasktranif