constant_vmr_clr#

exo_skryer.vert_chem.constant_vmr_clr(species_order: tuple[str, ...], use_log10_vmr: bool = False)[source]#

Build a JIT-optimized function for constant VMR profiles using centered-log-ratio (CLR) parameterization.

This function creates a chemistry kernel that generates constant (vertically uniform) volume mixing ratio profiles from abundance parameters using a softmax transform. The filler (H2+He) coordinate is fixed at zero, guaranteeing that all VMRs are non-negative and sum to unity.

The kernel accepts either native CLR parameters (clr_*) or traditional log10 VMR parameters (log_10_f_*). When log10 VMR parameters are used, they are converted to CLR coordinates internally before applying softmax, which acts as a soft constraint ensuring valid atmospheric composition.

Parameters:
species_ordertuple of str

Ordered tuple of trace species names (e.g., (‘H2O’, ‘CH4’, ‘CO’)).

use_log10_vmrbool, optional

If True, kernel expects ‘log_10_f_<species>’ parameters and converts them to CLR coordinates internally. If False (default), expects ‘clr_<species>’ parameters directly.

Returns:
callable

A chemistry kernel function with signature: kernel(p_lay, T_lay, params, nlay) -> Dict[str, jnp.ndarray]

The kernel takes: - p_lay : Layer pressures (unused but kept for API compatibility) - T_lay : Layer temperatures (unused but kept for API compatibility) - params : Dictionary containing abundance parameters - nlay : Number of atmospheric layers

And returns a dictionary mapping species names to their VMR profiles.