compute_cia_opacity#
- exo_skryer.opacity_cia.compute_cia_opacity(state: Dict[str, Array], opac: Dict[str, Array], params: Dict[str, Array]) Array[source]#
Compute collision-induced absorption (CIA) mass opacity for all molecular pairs.
This function calculates the total CIA opacity by summing contributions from all enabled molecular pairs (e.g., H2-He, H2-H2). For each pair, it: 1. Interpolates pre-loaded cross-sections to layer temperatures 2. Computes the VMR pair product (f_A × f_B) 3. Applies the opacity formula: κ = f_A × f_B × (n_d)² / ρ × σ(λ, T) 4. Sums over all pairs to get total CIA opacity
- Parameters:
- statedict[str,
ndarray] Atmospheric state dictionary containing:
nlayintNumber of atmospheric layers.
nwlintNumber of wavelength points.
wlndarray, shape (nwl,)Wavelength grid in microns (must match CIA table wavelengths).
T_layndarray, shape (nlay,)Layer temperatures in Kelvin.
nd_layndarray, shape (nlay,)Layer number density in molecule cm⁻³.
rho_layndarray, shape (nlay,)Layer mass density in g cm⁻³.
vmr_laydict[str,ndarray]Volume mixing ratios for each species. Values can be scalars or arrays with shape (nlay,).
- paramsdict[str,
ndarray] Parameter dictionary (unused; kept for API compatibility with other opacity functions that may depend on retrieval parameters).
- statedict[str,
- Returns:
- kappa_cia
ndarray, shape (nlay, nwl) Total CIA mass opacity in cm² g⁻¹, summed over all molecular pairs. Returns zeros if no CIA pairs are enabled.
- kappa_cia
- Raises:
- ValueError
If the CIA wavelength grid does not match the forward model master grid.