Solution (source code)

= Solution

The <entropy form of dry potential temperature> follows from its parcel definition. The <potential temperature> is the temperature a parcel would reach if brought reversibly and adiabatically to a reference pressure $p_0$. For dry air of fixed composition, treated as an <ideal gas> with constant <specific heat capacity>,
$$
\boxed{\theta=T\left(\frac{p_0}{p}\right)^\kappa,\qquad \kappa=R_d/c_p.}
$$
Per unit mass, the <first law of thermodynamics>, together with $\alpha=R_dT/p$ for <specific volume>, gives $\delta q=c_p\,dT-\alpha\,dp$. The reversible form of the <Second law of thermodynamics> then gives
$$
 ds=\frac{\delta q_{\rm rev}}T=c_p\,d\ln T-R_d\,d\ln p
 =c_p\,d\ln\theta.
$$
Hence \b[dry reversible adiabatic motion has $D\theta/Dt=0$]. Pressure changes cause expansion cooling or compression warming, while the pressure factor in theta compensates exactly. Adiabaticity alone is insufficient if irreversible mixing or viscous dissipation produces <entropy>. Condensation or freezing supplies latent heating, so ordinary dry potential temperature need not be conserved in a moist adiabatically moving parcel.