hypsometric_variable_g#

exo_skryer.vert_alt.hypsometric_variable_g(p_lev: Array, T_lay: Array, mu_lay: Array, params: Dict[str, Array]) Tuple[Array, Array, Array][source]#

Compute an altitude profile with altitude-dependent gravity.

This implementation uses an exact (per-layer) analytic update for spherical gravity, assuming layer-wise constant temperature and mean molecular weight:

g(z) = g_ref * (R0 / (R0 + z))**2

Under these assumptions, hydrostatic balance integrates to a closed-form mapping between pressure ratio and altitude increment, avoiding any predictor-corrector or iterative solve.

Parameters:
p_levndarray, shape (nlev,)

Pressure at layer interfaces (levels), units consistent across the grid.

T_layndarray, shape (nlay,)

Layer temperatures in Kelvin.

mu_layndarray, shape (nlay,)

Mean molecular weight per layer in g mol^-1.

paramsdict[str, ndarray]

Parameter dictionary containing:

  • log_10_gfloat

    Log₁₀ gravity at the reference radius in cm s⁻².

  • R_pfloat

    Planet radius in Jupiter radii (used to form R0 = R_p × R_jup).

Returns:
z_levndarray, shape (nlev,)

Altitude at levels in cm, with z_lev[0] = 0.

z_layndarray, shape (nlay,)

Altitude at layer midpoints in cm.

dzndarray, shape (nlay,)

Layer thickness in cm.