dry_convective_adjustment#
- exo_skryer.vert_Tp.dry_convective_adjustment(T_lay: Array, p_lay: Array, p_lev: Array, kappa: float, max_iter: int = 10, tol: float = 1e-06) Array[source]#
Apply dry convective adjustment to a temperature profile.
This function iteratively adjusts a temperature profile to ensure it is convectively stable, preserving total enthalpy.
- Parameters:
- T_lay
ndarray, shape (nlay,) Initial layer temperatures in Kelvin.
- p_lay
ndarray, shape (nlay,) Layer pressures.
- p_lev
ndarray, shape (nlay+1,) Level pressures.
- kappafloat
Adiabatic index (R/cp).
- max_iterint, optional
Maximum number of adjustment iterations.
- tolfloat, optional
Tolerance for the stability check.
- T_lay
- Returns:
- T_lay_adj
ndarray, shape (nlay,) Convectively adjusted layer temperature profile in Kelvin.
- T_lay_adj