Potential-vorticity generation by heating and friction (source code)

= Potential-vorticity generation by heating and friction
{title2=$Dq_E/Dt=[\boldsymbol\omega_a\cdot\nabla\dot\theta+(\nabla\times\mathbf F)\cdot\nabla\theta]/\rho$}

For a composition-fixed equation of state, let $\dot\theta=D\theta/Dt$ and let $\mathbf F$ be nonconservative force per unit mass. The vorticity and scalar-gradient evolution equations give the source terms in the title. Spatially varying heating projected along absolute vorticity and the curl of friction can generate or destroy <Ertel potential vorticity>. Heating that changes potential temperature does not automatically change PV everywhere: its spatial gradient and orientation matter. Unresolved irreversible mixing can also alter the parcelwise conservation picture.