sasktran2.Atmosphere#

class sasktran2.Atmosphere(model_geometry: Geometry1D, config: Config, wavelengths_nm: array = None, wavenumber_cminv: array = None, numwavel: int | None = None, calculate_derivatives: bool = True, pressure_derivative: bool = True, temperature_derivative: bool = True, specific_humidity_derivative: bool = True, legendre_derivative: bool = True, spectral_grid: Grid | None = None)[source]#

Bases: object

The main specification for the atmospheric state.

See storage for details on how the atmospheric state parameters are stored.

See surface for details on how the surface parameters are stored.

Parameters:
  • model_geometry (sk.Geometry1D) – The geometry defining where the atmospheric quantities are specified on.

  • config (sk.Config) – Main configuration object.

  • wavelengths_nm (np.array, optional) – Array of wavelengths to specify the atmosphere at in [nm]. One of wavelengths_nm, wavenumber_cminv, numwavel must be set.

  • wavenumber_cminv (np.array, optional) – Array of wavenumbers to specify the atmosphere at in [\(\text{cm}^{-1}\)]. One of wavelengths_nm, wavenumber_cminv, numwavel must be set.

  • numwavel (int, optional) – Number of wavelengths to include in the calculation. Note that wavelength is a dummy variable, this dimension can be anaything. One of wavelengths_nm, wavenumber_cminv, numwavel must be set.

  • calculate_derivatives (bool, optional) – Whether or not the model should calculate derivatives with respect to atmospheric quantities., by default True

  • pressure_derivative (bool, optional) – Whether or not the model should calculate derivatives with respect to pressure., by default True

  • temperature_derivative (bool, optional) – Whether or not the model should calculate derivatives with respect to temperature., by default True

  • legendre_derivative (bool, optional) – Whether or not the model should calculate derivatives with respect to the legendre coefficients., by default True

__init__(model_geometry: Geometry1D, config: Config, wavelengths_nm: array = None, wavenumber_cminv: array = None, numwavel: int | None = None, calculate_derivatives: bool = True, pressure_derivative: bool = True, temperature_derivative: bool = True, specific_humidity_derivative: bool = True, legendre_derivative: bool = True, spectral_grid: Grid | None = None)[source]#

The main specification for the atmospheric state.

See storage for details on how the atmospheric state parameters are stored.

See surface for details on how the surface parameters are stored.

Parameters:
  • model_geometry (sk.Geometry1D) – The geometry defining where the atmospheric quantities are specified on.

  • config (sk.Config) – Main configuration object.

  • wavelengths_nm (np.array, optional) – Array of wavelengths to specify the atmosphere at in [nm]. One of wavelengths_nm, wavenumber_cminv, numwavel must be set.

  • wavenumber_cminv (np.array, optional) – Array of wavenumbers to specify the atmosphere at in [\(\text{cm}^{-1}\)]. One of wavelengths_nm, wavenumber_cminv, numwavel must be set.

  • numwavel (int, optional) – Number of wavelengths to include in the calculation. Note that wavelength is a dummy variable, this dimension can be anaything. One of wavelengths_nm, wavenumber_cminv, numwavel must be set.

  • calculate_derivatives (bool, optional) – Whether or not the model should calculate derivatives with respect to atmospheric quantities., by default True

  • pressure_derivative (bool, optional) – Whether or not the model should calculate derivatives with respect to pressure., by default True

  • temperature_derivative (bool, optional) – Whether or not the model should calculate derivatives with respect to temperature., by default True

  • legendre_derivative (bool, optional) – Whether or not the model should calculate derivatives with respect to the legendre coefficients., by default True

Methods

__init__(model_geometry, config[, ...])

The main specification for the atmospheric state.

internal_object()

The internal pybind11 object that can be used to perform the radiative transfer calculation.

Attributes

applied_delta_m_order

The order of the applied delta_m scaling.

calculate_pressure_derivative

True if we are calculating the derivative with respect to pressure

calculate_specific_humidity_derivative

True if we are calculating the derivative with respect to specific humidity

calculate_temperature_derivative

True if we are calculating the derivative with respect to temperature

deriv_mappings

A nested dictionary of sasktran2.atmosphere.DerivativeMapping objects.

leg_coeff

model_geometry

The model geometry object

nstokes

The number of stokes parameters the atmosphere contains information to calculate

num_wavel

The number of wavelengths the atmosphere is specified at

pressure_pa

Pressure in [Pa] on the same grid as model_geometry

specific_humidity

Specific humidity on the same grid as model_geometry

spectral_integration_mode

The spectral integration mode for the atmosphere

state_equation

The equation of state object which contains the temperature, pressure, and specific humidity

storage

The internal object which contains the atmosphere extinction, single scatter albedo, and legendre coefficients.

surface

The surface object

temperature_k

Atmospheric temperature in [K] on the same grid as model_geometry

unscaled_extinction

The unscaled extinction.

unscaled_ssa

The unscaled single scatter albedo.

wavelengths_nm

The wavelengths in [nm] the atmosphere is specified at.

wavenumbers_cminv

The wavenumbers in [\(\text{cm}^{-1}\)].

property applied_delta_m_order: int | None#

The order of the applied delta_m scaling. Can be None if no scaling has been applied

property calculate_pressure_derivative: bool#

True if we are calculating the derivative with respect to pressure

Return type:

bool

property calculate_specific_humidity_derivative: bool#

True if we are calculating the derivative with respect to specific humidity

Return type:

bool

property calculate_temperature_derivative: bool#

True if we are calculating the derivative with respect to temperature

Return type:

bool

property deriv_mappings: dict#

A nested dictionary of sasktran2.atmosphere.DerivativeMapping objects.

Return type:

dict

internal_object() sk.AtmosphereStokes_1 | sk.AtmosphereStokes_3[source]#

The internal pybind11 object that can be used to perform the radiative transfer calculation. Calling this method will trigger a construction of the atmosphere object if necessary, and then return back the internal object.

Return type:

Union[sk.AtmosphereStokes_1, sk.AtmosphereStokes_3]

property model_geometry: Geometry1D#

The model geometry object

Return type:

sk.Geometry1D

property nstokes: int#

The number of stokes parameters the atmosphere contains information to calculate

Return type:

int

property num_wavel: int#

The number of wavelengths the atmosphere is specified at

Return type:

int

property pressure_pa: array#

Pressure in [Pa] on the same grid as model_geometry

Return type:

np.array

property specific_humidity: array#

Specific humidity on the same grid as model_geometry

Return type:

np.array

property spectral_integration_mode: SpectralGridMode#

The spectral integration mode for the atmosphere

Return type:

sk.SpectralGridMode

property state_equation: EquationOfState#

The equation of state object which contains the temperature, pressure, and specific humidity

Return type:

EquationOfState

property storage: sk.AtmosphereStorageStokes_1 | sk.AtmosphereStorageStokes_3#

The internal object which contains the atmosphere extinction, single scatter albedo, and legendre coefficients.

Return type:

Union[sk.AtmosphereGridStorageStokes_1, sk.AtmosphereGridStorageStokes_3]

property surface: sk.SurfaceStokes_1 | sk.SurfaceStokes_3#

The surface object

Return type:

sk.Surface

property temperature_k: array#

Atmospheric temperature in [K] on the same grid as model_geometry

Return type:

np.array

property unscaled_extinction: ndarray#

The unscaled extinction. After performing the calculation, storage.total_extinction may be modified because of the delta-m scaling. This property stores the original unscaled single scatter albedo.

Return type:

np.ndarray

property unscaled_ssa: ndarray#

The unscaled single scatter albedo. After performing the calculation, storage.ssa may be modified because of the delta-m scaling. This property stores the original unscaled single scatter albedo.

Return type:

np.ndarray

property wavelengths_nm: ndarray | None#

The wavelengths in [nm] the atmosphere is specified at. This is an optional property, it may be None.

Return type:

Optional[np.array]

property wavenumbers_cminv: ndarray | None#

The wavenumbers in [\(\text{cm}^{-1}\)]. This is an optional property, it may be set to None

Return type:

Optional[np.array]