sasktran2.constituent.Manual#
- class sasktran2.constituent.Manual(extinction: ndarray, ssa: ndarray, legendre_moments: ndarray | None = None, delta_scale: bool = False)[source]#
Bases:
ConstituentAn implementation of a manual constituent where the user provides the extinction, single scattering albedo, and optionally the Legendre moments.
Note that this is manual in the sense that the user provides all necessary atmospheric quantities directly, on the model grid. No interpolation is done between levels, or between “wavelength” calculations.
The legendre_moments must also be provided with the same number of moments as the model, including the batching of spherical legendre moments if using multiple stokes parameters.
- Parameters:
extinction (numpy.ndarray) – Extinction cross section in m^-1. Shape
(altitude, wavelength)or(horizontal, altitude, wavelength). Altitude-only input is broadcast horizontally in a 2D atmosphere.ssa (numpy.ndarray) – Single scattering albedo with the same shape as
extinction.legendre_moments (numpy.ndarray | None, optional) – Legendre moments, by default None. Shape
(moment, *extinction.shape).delta_scale (bool, optional) – Whether to apply delta-scaling to the scattering properties, by default False.
- __init__(extinction: ndarray, ssa: ndarray, legendre_moments: ndarray | None = None, delta_scale: bool = False) None[source]#
An implementation of a manual constituent where the user provides the extinction, single scattering albedo, and optionally the Legendre moments.
Note that this is manual in the sense that the user provides all necessary atmospheric quantities directly, on the model grid. No interpolation is done between levels, or between “wavelength” calculations.
The legendre_moments must also be provided with the same number of moments as the model, including the batching of spherical legendre moments if using multiple stokes parameters.
- Parameters:
extinction (numpy.ndarray) – Extinction cross section in m^-1. Shape
(altitude, wavelength)or(horizontal, altitude, wavelength). Altitude-only input is broadcast horizontally in a 2D atmosphere.ssa (numpy.ndarray) – Single scattering albedo with the same shape as
extinction.legendre_moments (numpy.ndarray | None, optional) – Legendre moments, by default None. Shape
(moment, *extinction.shape).delta_scale (bool, optional) – Whether to apply delta-scaling to the scattering properties, by default False.
Methods
__init__(extinction, ssa[, ...])An implementation of a manual constituent where the user provides the extinction, single scattering albedo, and optionally the Legendre moments.
add_to_atmosphere(atmo)register_derivative(atmo, name)Attributes
extinctionleg_coeffssaSpatial input mode used when adding the constituent to an atmosphere.
- property volume_spatial_mode: str#
Spatial input mode used when adding the constituent to an atmosphere.
Existing constituents are altitude profiles and are broadcast across the horizontal dimension of a 2D atmosphere. New constituents that consume native 2D fields can override this with
"native_2d".