Description
Calculate the height difference \(dz\) between two pressure levels \(p_1\) and \(p_2\)(mb), with corresponding temperatures \(t_1\) and \(t_2\)(C) and relative humidities \(h_1\) and \(h_2\)(%).
\(Tv(p,t,h)\) is the virtual temperature.
Formula
$$
t_{v_1} = Tv(p_1, t_1, h_1) \\
t_{v_2} = Tv(p_2, t_2, h_2) \\
tb = \frac{t_{v_1}\ln(p_1) + t_{v_2}\ln(p_2)} {\ln(p_1) + \ln(p_2)} \\
dz = -(tb/0.034164)\ln(p_1/p_2);
$$
Source
Edit me