skyscapes.physical_model.exojax.components.mie_cloud#
Mie-scattering cloud component.
A drop-in replacement for GrayCloud that uses ExoJAX’s
OpaMie to pre-compute wavelength-dependent single-scattering
albedo and asymmetry parameter for a chosen condensate (e.g. water,
water-ice, NH3) and particle size distribution. The cloud’s vertical
distribution and total optical depth remain fittable PyTree leaves;
the wavelength dependence of ssa(lambda) and g(lambda) is fixed at
engine-build time.
ExoJAX’s PdbCloud triggers a one-time download of the chosen
condensate’s refractive-index data (cached under
./.database/particulates/virga/) on first use, similar to the
HITRAN line-list downloads.
Classes#
Single-layer cloud with Mie-scattering optical properties. |
Functions#
|
Build a Mie cloud component by pre-computing Mie params. |
Module Contents#
- class skyscapes.physical_model.exojax.components.mie_cloud.MieCloud[source]#
Bases:
skyscapes.physical_model.exojax.components.base.AbstractCloudsSingle-layer cloud with Mie-scattering optical properties.
The total cloud scattering optical depth is distributed vertically via a softmax-Gaussian in log-pressure (same as
GrayCloud). What’s different is that the single-scattering albedo and asymmetry parameter come from pre-computed Mie cross-sections rather than being scalar constants – they vary with wavelength according to the condensate’s refractive index n(lambda) + k(lambda).- Attributes (PyTree leaves, fittable):
log_pressure_bar: Log10 cloud-deck pressure [bar], shape
(K,). log_opt_depth: Log10 of the vertically-integrated cloudextinction optical depth, shape
(K,).
Pre-computed Mie quantities (built at engine time, shared across planets):
- ssa_grid: Single-scattering albedo on the wavenumber grid,
shape
(n_nu,).sigma_scattering / sigma_extinction.- g_grid: Asymmetry parameter on the wavenumber grid,
shape
(n_nu,).
- Static config:
- condensate: Condensate name (
"H2O","H2O_ice", "MgSiO3", etc.). Matters for the repr; the actual Mie params are baked into ssa_grid and g_grid.
rg_um: Geometric mean particle radius [um]. sigmag: Geometric standard deviation of the lognormal size
distribution.
- log_sigma: Cloud-deck vertical Gaussian half-width in
log10(pressure) [dex].
- condensate: Condensate name (
- log_pressure_bar: jaxtyping.Array#
- log_opt_depth: jaxtyping.Array#
- ssa_grid: jaxtyping.Array#
- g_grid: jaxtyping.Array#
- compute(log_pressure_bar_scalar, log_opt_depth_scalar, pressure, n_nu)[source]#
Mie-cloud contribution: gray-depth distribution, spectral ssa/g.
- Parameters:
log_pressure_bar_scalar (jaxtyping.Array)
log_opt_depth_scalar (jaxtyping.Array)
pressure (jaxtyping.Array)
n_nu (int)
- Return type:
skyscapes.physical_model.exojax.components.base.Contribution
- skyscapes.physical_model.exojax.components.mie_cloud.build_mie_cloud(*, nu_grid, log_pressure_bar, log_opt_depth, condensate='H2O', rg_um=10.0, sigmag=2.0, log_sigma=DEFAULT_CLOUD_LOG_SIGMA)[source]#
Build a Mie cloud component by pre-computing Mie params.
On first use for a given condensate this triggers two downloads / computations cached under
./.database/particulates/virga/:Refractive-index file (small, fetched from Zenodo).
Mie-grid lookup table (built locally via PyMieScatt; takes a couple of minutes per condensate). Subsequent calls reuse the cache.
- Args:
- nu_grid: Wavenumber grid [cm^-1] from
build_exojax_engines().
log_pressure_bar: Per-planet log10 cloud pressure [bar]. log_opt_depth: Per-planet log10 total cloud extinction tau. condensate: Condensate name. ExoJAX/Virga ships e.g.
"H2O","H2O_ice","NH3","MgSiO3","Mg2SiO4","Fe","KCl","Na2S","ZnS","MnS","Cr","Al2O3","TiO2".- rg_um: Mean particle radius [um] of the lognormal size
distribution.
sigmag: Geometric standard deviation of the size distribution. log_sigma: Vertical-distribution Gaussian half-width [dex].
- Returns:
A
MieCloudinstance ready to drop intoExoJaxPhysicalModel.