skyscapes.physical_model.exojax.components.base#

Abstract base classes for atmosphere components.

Each abstract class declares the contract its concrete subclasses must implement. Returning a structured Contribution (rather than a bare dtau) lets the atmosphere combine absorption, Rayleigh, and cloud contributions uniformly without each component caring whether the others are present.

Classes#

Contribution

Per-layer optical-property contribution from one component.

AbstractTPProfile

Temperature-pressure profile.

AbstractAbsorption

Per-layer absorption opacity from line lists / cross-sections.

AbstractScattering

Per-layer scattering opacity (e.g. Rayleigh).

AbstractClouds

Per-layer cloud opacity (mixed scattering + absorption).

AbstractSurface

Bottom-of-atmosphere reflectivity.

Module Contents#

class skyscapes.physical_model.exojax.components.base.Contribution[source]#

Bases: NamedTuple

Per-layer optical-property contribution from one component.

Fields:
dtau_total: Layer optical depth this component adds to the total

opacity budget, shape (n_layers, n_nu).

dtau_scatter: Subset of dtau_total that is scattering

(non-absorbing), shape (n_layers, n_nu). For a pure absorber this is zero. For Rayleigh ssa=1 so it equals dtau_total. For a partly-absorbing cloud with single- scattering albedo ssa_c, this is ssa_c * dtau_cloud.

g_weighted_num: g * dtau_scatter numerator for the weighted-

average asymmetry parameter, shape (n_layers, n_nu). Rayleigh contributes zero (isotropic, g=0). A cloud with asymmetry g_c contributes g_c * ssa_c * dtau_cloud.

dtau_total: jaxtyping.Array#
dtau_scatter: jaxtyping.Array#
g_weighted_num: jaxtyping.Array#
class skyscapes.physical_model.exojax.components.base.AbstractTPProfile[source]#

Bases: equinox.Module

Temperature-pressure profile.

abstractmethod compute_Tarr(rt_engine, T_eq_K_scalar, T_alpha_scalar)[source]#

Return layer temperatures, shape (n_layers,).

Parameters:
  • T_eq_K_scalar (jaxtyping.Array)

  • T_alpha_scalar (jaxtyping.Array)

Return type:

jaxtyping.Array

class skyscapes.physical_model.exojax.components.base.AbstractAbsorption[source]#

Bases: equinox.Module

Per-layer absorption opacity from line lists / cross-sections.

Concrete implementations iterate over the atmosphere’s MolecularSpecies tuple, calling each species’ opa engine and summing the contributions.

abstractmethod compute(species, Tarr, pressure, gravity, rt_engine)[source]#

Absorption contribution.

dtau_scatter and g_weighted_num are zero for pure absorbers, but the return shape is the same as for scattering components so the atmosphere can combine them uniformly.

Parameters:
Return type:

Contribution

class skyscapes.physical_model.exojax.components.base.AbstractScattering[source]#

Bases: equinox.Module

Per-layer scattering opacity (e.g. Rayleigh).

abstractmethod compute(species, bulk, gravity, rt_engine, n_layers, n_nu)[source]#

Scattering contribution from tracked species + optional bulk gas.

For a pure scatterer dtau_total == dtau_scatter; g_weighted_num is zero for isotropic Rayleigh.

Parameters:
Return type:

Contribution

class skyscapes.physical_model.exojax.components.base.AbstractClouds[source]#

Bases: equinox.Module

Per-layer cloud opacity (mixed scattering + absorption).

abstractmethod compute(log_pressure_bar_scalar, log_opt_depth_scalar, pressure, n_nu)[source]#

Cloud contribution.

For a single-scattering-albedo cloud the scattering and absorption parts are both nonzero; for a purely scattering cloud dtau_total == dtau_scatter.

Parameters:
  • log_pressure_bar_scalar (jaxtyping.Array)

  • log_opt_depth_scalar (jaxtyping.Array)

  • pressure (jaxtyping.Array)

  • n_nu (int)

Return type:

Contribution

class skyscapes.physical_model.exojax.components.base.AbstractSurface[source]#

Bases: equinox.Module

Bottom-of-atmosphere reflectivity.

abstractmethod compute_refl(log_albedo_scalar, n_nu)[source]#

Return surface reflectivity, shape (n_nu,).

Parameters:
  • log_albedo_scalar (jaxtyping.Array)

  • n_nu (int)

Return type:

jaxtyping.Array