Constituents#
- class sasktran2.constituent.Rayleigh(method: str = 'bates', method_kwargs: dict | None = None)[source]#
Bases:
ConstituentAn implementation of Rayleigh scattering. Cross sections (and depolarization factors) can be calculated multiple ways, with the default method being that of ‘bates’.
Rayleigh scattering number density is estimated through the ideal gas law.
This Constituent requires that the atmosphere object have temperature_k, pressure_pa, and wavelength_nm are all defined inside the
sasktran2.Atmosphereobject.- Parameters:
- Raises:
ValueError – If input method is not supported
- class sasktran2.constituent.VMRAltitudeAbsorber(optical_property: OpticalProperty, altitudes_m: array, vmr: array, out_of_bounds_mode: str = 'zero')[source]#
Bases:
ConstituentAn atmospheric constituent that is specified through volume mixing ratio (VMR) on an altitude grid. The altitude grid need not match the global atmospheric grid, in the case they are different the VMRs will be linearly interpolated to the atmospheric grid locations.
The constituent has an associated OpticalProperty that defines the absorption cross section as a function of wavelength.
- Parameters:
optical_property (OpticalProperty) – An object that provides absorption cross sections as a function of wavelength
altitudes_m (np.array) – Altitudes in [m] that the VMR is specified on
vmr (np.array) – Volume mixing ratio
out_of_bounds_mode (str, optional) – One of [‘zero’, ‘extend’], ‘zero’ will set the VMR to be 0 on any altitudes that are out of bounds. ‘extend’ will extend the last or first VMR value. By default ‘zero’
- class sasktran2.constituent.NumberDensityScatterer(optical_property: OpticalProperty, altitudes_m: array, number_density: array, out_of_bounds_mode: str = 'zero', **kwargs)[source]#
Bases:
ConstituentA scattering constituent that is defined by a number density on an altitude grid and an optical property
- Parameters:
optical_property (OpticalProperty) – The optical property defining the scattering information
altitudes_m (np.array) – The altitude grid in [m]
number_density (np.array) – Number density in [m^-3]
out_of_bounds_mode (str, optional) – Interpolation mode outside of the boundaries, “extend” and “zero” are supported, by default “zero”
kwargs (dict) – Additional arguments to pass to the optical property.
- class sasktran2.constituent.ExtinctionScatterer(optical_property: OpticalProperty, altitudes_m: array, extinction_per_m: array, extinction_wavelength_nm: float, out_of_bounds_mode: str = 'zero', **kwargs)[source]#
Bases:
NumberDensityScattererA scattering constituent that is defined by a number density on an altitude grid and an optical property
- Parameters:
optical_property (OpticalProperty) – The optical property defining the scattering information
altitudes_m (np.array) – The altitude grid in [m]
extinction_per_m (np.array) – Extinction in [m^-1]
extinction_wavelength_nm (float) – Wavelength that the extinction profile is specified at
out_of_bounds_mode (str, optional) – Interpolation mode outside of the boundaries, “extend” and “zero” are supported, by default “zero”
kwargs (dict) – Additional arguments passed to the optical property
- class sasktran2.constituent.CollisionInducedAbsorber(optical_property: OpticalProperty, name: str)[source]#
Bases:
ConstituentAn implementation of collision-induced absorption for quantities with known constant mole fractions.
Air number density is estimated through the ideal gas law. Currently the mole fraction is applied to the air number density, though in the future it should be applied to dry air only.
This Constituent requires that the atmosphere object have temperature_k, pressure_pa, and wavelength_nm all defined inside the
sasktran2.Atmosphereobject.- Parameters:
optical_property (OpticalProperty) – Optical property that computes the collision-induced cross section in [m^5].
name (str) – Molecule names to load mole fractions. Currently supported: O2O2
Surfaces#
- class sasktran2.constituent.LambertianSurface(albedo: array, wavelengths_nm: array = None, wavenumbers_cminv: array = None, out_of_bounds_mode='zero')[source]#
Bases:
ConstituentA Lambertian surface that is defined by albedo at discrete grid points.
This can either operate in a “scalar” mode where the albedo is constant in wavelength, a “native” mode where the albedo is defined on the same grid as the atmosphere, or an “interpolated” mode where the albedo is interpolated either in wavenumber or wavelength
- Parameters:
albedo (np.array) – Surface albedo. Can be a scalar to indicate it is constant in wavelength. If set to an array it must either match the atmosphere wavelength grid dimension, or one of wavelengths_nm or wavenumbers_cminv must be set.
wavelengths_nm (np.array, optional) – Wavelengths in [nm] that the albedo is specified at, by default None
wavenumbers_cminv (np.array, optional) – Wavenumbers in inverse cm that the albedo is specified at, by default None
out_of_bounds_mode (str, optional) – One of [“extend” or “zero”], “extend” will extend the last/first value if we are interpolating outside the grid. “zero” will set the albedo to 0 outside of the grid boundaries, by default “zero”