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_layndarray, shape (nlay,)

Initial layer temperatures in Kelvin.

p_layndarray, shape (nlay,)

Layer pressures.

p_levndarray, 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.

Returns:
T_lay_adjndarray, shape (nlay,)

Convectively adjusted layer temperature profile in Kelvin.