%% LyX 2.3.2 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[12pt,letterpaper,oneside,american]{book}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\special{papersize=\the\paperwidth,\the\paperheight}

%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
% make units in Roman type with space before
\newcommand{\sunit}[1]{\mbox{ #1}}
\setcounter{chapter}{2}
\setcounter{page}{35}

\makeatother

\usepackage{babel}
\begin{document}

\chapter{Moist thermodynamics}

In order to understand atmospheric convection, we need a deep understanding
of the thermodynamics of mixtures of gases and of phase transitions.
We begin with a review of some of the fundamental ideas of statistical
mechanics as it applies to the atmosphere. We then derive the entropy
and chemical potential of an ideal gas and a condensate. We use these
results to calculate the saturation vapor pressure as a function of
temperature. Next we derive a consistent expression for the entropy
of a mixture of dry air, water vapor, and either liquid water or ice.
The equation of state of a moist atmosphere is then considered, resulting
in an expression for the density as a function of temperature and
pressure. Finally the governing thermodynamic equations are derived
and various alternative simplifications of the thermodynamic variables
are presented.

\section{Review of fundamentals}

In statistical mechanics, the entropy of a system is proportional
to the logarithm of the number of available states:
\begin{equation}
S(E,M)=k_{B}\ln(\delta\mathcal{N}),\label{eq:entropydef}
\end{equation}
where $\delta\mathcal{N}$ is the number of states available in the
internal energy range $[E,E+\delta E]$. The quantity $M=mN/N_{A}$
is the mass of the system, which we relate to the number of molecules
in the system $N$, the molecular weight of these molecules $m$,
and Avogadro's number $N_{A}$. The quantity $k_{B}$ is Boltzmann's
constant.

Consider two systems in thermal contact, so that they can exchange
energy. The total energy of the system $E=E_{1}+E_{2}$ is fixed,
so that if the energy of system 1 increases, the energy of system
2 decreases correspondingly. Likewise, the total entropy of the system
is the sum of the entropies of each part, $S=S_{1}+S_{2}$. In equilibrium,
the total entropy will be at a maximum, which means that the partial
derivative of entropy with respect to $E_{1}$ will be zero. Furthermore,
since $dE_{1}=-dE_{2}$, we have at thermal equilibrium
\begin{equation}
\frac{\partial S}{\partial E_{1}}=\frac{\partial S_{1}}{\partial E_{1}}+\frac{\partial S_{2}}{\partial E_{1}}=\frac{\partial S_{1}}{\partial E_{1}}-\frac{\partial S_{2}}{\partial E_{2}}=0,\label{eq:thermalequilib}
\end{equation}
which tells us that $\partial S_{1}/\partial E_{1}=\partial S_{2}/\partial E_{2}$.
The thermodynamic definition of \emph{temperature} $T$ is given by
\begin{equation}
\frac{1}{T}=\frac{\partial S}{\partial E},\label{eq:thermotempdef}
\end{equation}
so at thermal equilibrium we have $T_{1}=T_{2}$.

If the two systems are also in diffusive equilibrium, with as many
molecules going from system 1 to system 2 as vice versa, then we have
in analogy to equation (\ref{eq:thermalequilib})
\begin{equation}
\frac{\partial S}{\partial M_{1}}=\frac{\partial S_{1}}{\partial M_{1}}+\frac{\partial S_{2}}{\partial M_{1}}=\frac{\partial S_{1}}{\partial M_{1}}-\frac{\partial S_{2}}{\partial M_{2}}=0,\label{eq:diffusiveequilib}
\end{equation}
where the total mass $M=M_{1}+M_{2}$ is constant so that the change
in the mass of one system is minus the change in mass of the other
system $dM_{2}=-dM_{1}$. Thus, the condition for diffusive equilibrium
is $\partial S_{1}/\partial M_{1}=\partial S_{2}/\partial M_{2}$.
The \emph{chemical potential $\mu$} is defined by
\begin{equation}
\frac{\mu}{T}=-\frac{\partial S}{\partial M},\label{eq:chempotdef}
\end{equation}
so the condition for diffusive equilibrium (but not necessarily thermal
equilibrium) is $\mu_{1}/T_{1}=\mu_{2}/T_{2}$. If thermal equilibrium
also exists, then this simplifies to $\mu_{1}=\mu_{2}$.

In most physical systems the entropy is also a function of one or
more external parameters as well as of the internal energy and mass
of the system. For instance, the entropy of an ideal gas is also a
function of the volume $V$ in which the gas is contained. Taking
the differential of the entropy $S=S(E,M,V)$, we find
\begin{equation}
dS=\frac{\partial S}{\partial E}dE+\frac{\partial S}{\partial M}dM+\frac{\partial S}{\partial V}dV=\frac{1}{T}dE-\frac{\mu}{T}dM+\frac{\partial S}{\partial V}dV.\label{eq:entropydiff}
\end{equation}
Solving for $dE$ results in a familiar equation:
\begin{equation}
dE=TdS-T\frac{\partial S}{\partial V}dV+\mu dM.\label{eq:energydiff}
\end{equation}
The second term on the right side of the above equation is the mechanical
work done by the system on the outside world. Thus the coefficient
of $dV$ must be the pressure if the system under consideration is
a gas:
\begin{equation}
T\frac{\partial S}{\partial V}=p.\label{eq:pressuredef}
\end{equation}
The physical meaning of the chemical potential is now clear; $-\mu/T$
is the entropy per unit mass added to the system by inward mass transfer
at constant energy and volume. The enthalpy of an ideal gas is defined
$H=E+pV$. Combining this with equations (\ref{eq:entropydiff}) and
(\ref{eq:pressuredef}) results in
\begin{equation}
dS=\frac{1}{T}dH-\frac{V}{T}dp-\frac{\mu}{T}dM.\label{eq:entropydiff2}
\end{equation}

\begin{table}
\begin{centering}
\begin{tabular}{|c|c|c|}
\hline 
Constant & Value & Meaning\tabularnewline
\hline 
\hline 
$k_{B}$ & $1.38\times10^{-23}\sunit{J}\sunit{K}^{-1}$ & Boltzmann's constant\tabularnewline
\hline 
$N_{A}$ & $6.02\times10^{23}$ & Avogadro's number\tabularnewline
\hline 
$R$ & $8.314\sunit{J}\sunit{K}^{-1}$ & Universal gas constant\tabularnewline
\hline 
$m_{D}$ & $28.9\sunit{g}\sunit{mol}^{-1}$ & Molecular weight of dry air\tabularnewline
\hline 
$m_{V}$ & $18.0\sunit{g}\sunit{mol}^{-1}$ & Molecular weight of water\tabularnewline
\hline 
$\epsilon$ & $0.623$ & $m_{V}/m_{D}$\tabularnewline
\hline 
$R_{D}$ & $287\sunit{J}\sunit{K}^{-1}\sunit{kg}^{-1}$ & Gas constant for dry air $R/m_{D}$\tabularnewline
\hline 
$R_{V}$ & $461\sunit{J}\sunit{K}^{-1}\sunit{kg}^{-1}$ & Gas constant for water vapor $R/m_{V}$\tabularnewline
\hline 
$C_{PD}$ & $1005\sunit{J}\sunit{K}^{-1}\sunit{kg}^{-1}$ & Specific heat of dry air at const pres\tabularnewline
\hline 
$C_{VD}$ & $718\sunit{J}\sunit{K}^{-1}\sunit{kg}^{-1}$ & Specific heat of dry air at const vol\tabularnewline
\hline 
$C_{PV}$ & $1850\sunit{J}\sunit{K}^{-1}\sunit{kg}^{-1}$ & Specific heat of water vapor at const pres\tabularnewline
\hline 
$C_{VV}$ & $1390\sunit{J}\sunit{K}^{-1}\sunit{kg}^{-1}$ & Specific heat of water vapor at const vol\tabularnewline
\hline 
$C_{L}$ & $4218\sunit{J}\sunit{K}^{-1}\sunit{kg}^{-1}$ & Specific heat of liquid water\tabularnewline
\hline 
$C_{I}$ & $1959\sunit{J}\sunit{K}^{-1}\sunit{kg}^{-1}$ & Specific heat of ice ($-20^{\circ}\sunit{C}$)\tabularnewline
\hline 
$\mu_{BL}$ & $3.15\times10^{6}\sunit{J}\sunit{kg}^{-1}$ & Binding energy for liquid water\tabularnewline
\hline 
$\mu_{BI}$ & $2.86\times10^{6}\sunit{J}\sunit{kg}^{-1}$ & Binding energy for ice\tabularnewline
\hline 
$e_{SF}$ & $611\sunit{Pa}$ & Saturation vapor pressure at freezing\tabularnewline
\hline 
$T_{F}$ & $273.15\sunit{K}$ & Freezing point\tabularnewline
\hline 
$p_{R}$ & $10^{5}\sunit{Pa}$ & Reference pressure\tabularnewline
\hline 
\end{tabular}
\par\end{centering}
\caption{\label{cap:thermconstants} Thermodynamic constants.}
\end{table}


\section{Ideal gas again}

The entropy of a diatomic ideal gas is given by
\begin{equation}
S=\left(\frac{MR}{m}\right)\left[\frac{5}{2}\ln\left(\frac{E}{M}\right)+\ln\left(\frac{V}{M}\right)+D\right]\label{eq:entropyigas1}
\end{equation}
where $R=N_{A}k_{B}$ is the universal gas constant, $N_{A}$ being
Avogadro's number. The constant $D$ can be taken as arbitrary for
our purposes. The factor of $5/2$ changes to $3/2$ for a monatomic
gas and $3$ for non-linear triatomic molecules such as water. 

The temperature may be obtained from equation (\ref{eq:thermotempdef}),
from which we find that
\begin{equation}
E=\frac{5MRT}{2m}=MC_{V}T,\label{eq:energytempigas}
\end{equation}
where $C_{V}=5R/(2m)$ is the \emph{specific heat at constant volume}.
The specific energy, or the energy per unit mass, is given by
\begin{equation}
e=C_{V}T.\label{eq:specenergygas}
\end{equation}
The pressure comes from equation (\ref{eq:pressuredef}) with the
ideal gas law as a result:
\begin{equation}
p=\frac{MRT}{mV}=\frac{RT\rho}{m}.\label{eq:gaslaw}
\end{equation}
The density is defined $\rho=M/V$. The chemical potential, as defined
by equation (\ref{eq:chempotdef}), is
\begin{equation}
\mu=C_{P}T-sT\label{eq:chempotigas}
\end{equation}
where $C_{P}=C_{V}+R/m=7R/(2m)$ is the \emph{specific heat at constant
pressure} and $s=S/M$ is the \emph{specific entropy}, or the entropy
per unit mass. Finally, the specific enthalpy is defined as
\begin{equation}
h=e+p/\rho=C_{P}T.\label{eq:specenthalpygas}
\end{equation}

The specific entropy, which is the preferred form of entropy for atmospheric
thermodynamics, may be recast in terms of the temperature and density,
temperature and pressure, or pressure and density, using the ideal
gas law:
\begin{eqnarray}
s & = & C_{V}\ln(T/T_{R})-(R/m)\ln(\rho/\rho_{R})+s_{R}\nonumber \\
 & = & C_{P}\ln(T/T_{R})-(R/m)\ln(p/p_{R})+s_{R}\nonumber \\
 & = & C_{V}\ln(p/p_{R})-C_{p}\ln(\rho/\rho_{R})+s_{R}.\label{eq:specificentropy}
\end{eqnarray}
The constant reference values $T_{R}$, $p_{R}$, and $\rho_{R}$
are those values related by the ideal gas law which yield a specific
entropy equal to $s_{R}$.

\section{Equation of state for air}

Air effectively consists of a mixture of gases in constant proportions
plus water vapor in variable proportions plus any condensate content.
Treating the gaseous components of air as ideal gases, we first consider
all gas components with the exception of water vapor. The partial
pressure of this dry gaseous component is the sum of the partial pressures
of the constituent gases:
\begin{equation}
p_{D}=\sum p_{i}=RT\sum(\rho_{i}/m_{i})=RT\rho_{D}/m_{D}=R_{D}T\rho_{D},\label{eq:density1}
\end{equation}
where $R_{D}=R/m_{D}$ is the gas constant for dry air and the total
density of dry air is the sum of the component densities
\begin{equation}
\rho_{D}=\sum\rho_{i}.\label{eq:density2}
\end{equation}
The mean molecular weight of the dry air is defined by
\begin{equation}
\frac{1}{m_{D}}=\frac{1}{\rho_{D}}\sum\left(\frac{\rho_{i}}{m_{i}}\right).\label{eq:meanmolecularwt}
\end{equation}
Dry air as a whole thus satisfies the ideal gas law with a molecular
weight $m_{D}$. A similar equation exists for the vapor pressure
of water:
\begin{equation}
p_{V}=R_{V}T\rho_{V}\label{eq:densityvapor}
\end{equation}
where $R_{V}=R/m_{V}$ is the gas constant for water vapor.

The total pressure is the sum of the partial pressures of dry air
and water vapor. Applying the ideal gas law to each of these components
results in
\begin{equation}
p=p_{D}+p_{V}=RT\left(\frac{\rho_{D}}{m_{D}}+\frac{\rho_{V}}{m_{V}}\right)=\frac{RT\rho}{m_{D}}\left[1+\frac{\rho_{V}}{\rho}\left(\frac{m_{D}}{m_{V}}-1\right)\right].\label{eq:density3}
\end{equation}
The ratio $\rho_{V}/\rho=\rho_{V}/(\rho_{D}+\rho_{V})=r_{V}/(1+r_{V})\approx r_{V}$
where $r_{V}=\rho_{V}/\rho_{D}$ is the mixing ratio of water vapor.
Furthermore $m_{D}/m_{V}-1\approx0.61$, so to a good approximation
in the Earth's atmosphere,
\begin{equation}
p=R_{D}T\rho(1+0.61r_{V})\label{eq:density4}
\end{equation}
where $R_{D}=R/m_{D}$ is the gas constant for dry air. The quantity
\begin{equation}
T_{V}=T(1+0.61r_{V})\label{eq:virtualtemp}
\end{equation}
is called the virtual temperature. It allows the dependence of the
equation of state for air on moisture to be swept under the rug, resulting
in the simple form
\begin{equation}
p=R_{D}T_{V}\rho.\label{eq:virtualtemp2}
\end{equation}


\section{Condensed matter}

From elementary quantum statistical mechanics, the entropy of a collection
of $N$ identical harmonic oscillators with classical resonance frequency
$\omega=E_{0}/\hbar$ and total energy $E$ is
\begin{equation}
S=Nk_{B}\left[\ln\left(\frac{E-U}{NE_{0}}\right)+\mbox{const}\right]\label{eq:oscillatorentropy1}
\end{equation}
where $U$ is the external potential energy of the oscillators exclusive
of the internal oscillator energy. This potential energy could arise,
for instance, if the entire set of oscillators exists in a potential
well.

We can approximate the entropy of a blob of condensed matter at room
temperature by this equation if we assume that each molecule is associated
with three oscillators, one for each dimension. We first rewrite this
equation in terms of the mass $M$ of the blob rather than the number
of oscillators, realizing that $Nk_{B}=3nR=3MR/m\equiv MC_{C}$, where
$k_{B}$ is Boltzmann's constant, $n$ is the number of moles, $m$
is the molecular weight of the condensate, and $C_{C}=3R/m$ is the
specific heat:
\begin{equation}
S=MC_{C}\left[\ln\left(\frac{E-U}{M}\right)+D\right].\label{eq:oscillatorentropy2}
\end{equation}
The quantity $D$ is an arbitrary constant.

To apply this equation to a real condensate we have to take into account
the fact that the oscillators exist in a potential well with binding
energy per unit mass $\mu_{B}$. We also have to take into account
the fact that the condensate is an elastic medium on the macroscopic
scale, so that compressing it adds internal energy and therefore decreases
binding energy. To the extent that the compression remains small and
elastic, the potential energy is $U=-M\mu_{B}+Mk(V/M-1/\rho_{C})^{2}/2$
where $V$ is the compressed volume of the condensate and $\rho_{C}$
is its uncompressed density. When there is no compression, $V/M=1/\rho_{C}$,
and the last term vanishes. The constant $k$ is related to the compressibility
of the condensate. The result is 
\begin{equation}
S=MC_{C}\{\ln[E/M+\mu_{B}-k(V/M-1/\rho_{C})^{2}/2]+D\}.\label{eq:entropysolid1}
\end{equation}

Applying equations (\ref{eq:thermotempdef}) and (\ref{eq:chempotdef}),
we find the temperature $T$
\begin{equation}
C_{C}T=E/M+\mu_{B}-k(V/M-1/\rho_{C})^{2}/2\label{eq:condensatetemp}
\end{equation}
and chemical potential $\mu$:
\begin{equation}
\mu=-sT+e-(kV/M)(V/M-1/\rho_{C}),\label{eq:condensatechempot1}
\end{equation}
where $s=S/M$ is the specific entropy and $e=E/M$ is the specific
energy. Using equations (\ref{eq:pressuredef}) and (\ref{eq:condensatetemp})
we find an expression for the pressure:
\begin{equation}
p=-k(V/M-1/\rho_{C}).\label{eq:condensatepressure}
\end{equation}

Using equations (\ref{eq:condensatetemp}) and (\ref{eq:condensatepressure}),
we can rewrite the specific entropy in terms of just the temperature
\begin{equation}
s=C_{C}\ln(T/T_{R})+s_{RC},\label{eq:entropysolid2}
\end{equation}
where $s_{RC}$ is the entropy of the condensate at the reference
temperature $T_{R}$, and the chemical potential in terms of temperature,
volume, mass, and pressure
\begin{equation}
\mu=-sT+C_{C}T-\mu_{B}+pV/M+p^{2}/(2k).\label{eq:condensatechempot2}
\end{equation}
The term quadratic in pressure $p^{2}/(2k)=k(V/M-1/\rho_{C})^{2}/2$
can be omitted from the chemical potential under ordinary conditions
since it is typically much less than $pV/M=p/\rho$, where $\rho$
is the actual density of the condensate under pressure $p$. This
is easily demonstrated:
\begin{equation}
\frac{p^{2}/(2k)}{pV/M}=\frac{p\rho}{2k}=-\frac{k(1/\rho-1/\rho_{C})\rho}{2k}=(\rho/\rho_{C}-1)/2,\label{eq:psquareddemo}
\end{equation}
which is much less than unity as long as the condensate's density
doesn't increase much under compression. Given this near-incompressibility,
we can also set $V/M=1/\rho_{C}$ in equation (\ref{eq:condensatechempot2}),
so that the chemical potential simplifies to
\begin{equation}
\mu=-sT+C_{C}T-\mu_{B}+p/\rho_{C}.\label{eq:condensatechempot3}
\end{equation}

Finally, we use equation (\ref{eq:condensatetemp}) to obtain an expression
for the specific energy $e=E/M$:
\begin{equation}
e=C_{C}T-\mu_{B}.\label{eq:condensatespecenergy}
\end{equation}
The specific enthalpy is
\begin{equation}
h=e+pV/M=C_{C}T-\mu_{B}+p/\rho_{C}.\label{eq:condensatespecificenthalpy}
\end{equation}
Terms involving $p^{2}/(2k)$ have been dropped in the specific energy
and enthalpy equations as was done in the chemical potential equation.

\section{Vapor and condensate in equilibrium}

In equilibrium the vapor pressure of water equals its saturation vapor
pressure. Since diffusive as well as thermal equilibrium exists between
the phases, the temperatures and chemical potentials of the two phases
must be equal. From equations (\ref{eq:chempotigas}) and (\ref{eq:specificentropy})
we find that the chemical potential of the vapor phase of water is
\begin{equation}
\mu_{V}=C_{PV}T[1-\ln(T/T_{R})]+R_{V}T\ln(p_{V}/e_{SF})-s_{RV}T\label{eq:vaporchempot}
\end{equation}
where $C_{PV}$ is the specific heat of water vapor at constant pressure,
$T_{R}$ is a constant reference temperature, $R_{V}=R/m_{V}$ is
the gas constant for water vapor, $p_{V}$ is the partial pressure
of water vapor, $e_{SF}$ is a constant reference pressure taken to
equal the saturation vapor for freezing, and $s_{RV}$ is the specific
entropy of water vapor when $T$ and $p_{V}$ equal their reference
values. Similarly, the chemical potential for condensed water is obtained
from equations (\ref{eq:entropysolid2}) and (\ref{eq:condensatechempot3}):
\begin{equation}
\mu_{C}=C_{C}T[1-\ln(T/T_{R})]-\mu_{B}+p_{C}/\rho_{w}-s_{RC}T\label{eq:condchempot}
\end{equation}
where $C_{C}$ is the specific heat of the condensate, $\mu_{B}$
is its specific binding energy, $p_{C}$ is the pressure in the condensate,
$\rho_{w}$ is the condensate density, and $s_{RC}$ is the specific
entropy of the condensate at temperature $T=T_{R}$.

Equating these two chemical potentials and solving for the vapor pressure
of water $p_{V}$, which in equilibrium equals the saturation vapor
pressure $e_{S}$ yields
\begin{equation}
e_{S}=e_{SF}\left(\frac{T_{R}}{T}\right)^{(C_{C}-C_{PV})/R_{V}}\exp\left(\frac{s_{RV}-s_{RC}+C_{C}-C_{PV}}{R_{V}}-\frac{\mu_{B}-p_{C}/\rho_{w}}{R_{V}T}\right).\label{eq:satvp}
\end{equation}
A simple way to write this is
\begin{equation}
e_{S}=e_{SF}\left(\frac{T_{F}}{T}\right)^{(C_{C}-C_{PV})/R_{V}}\exp\left(\frac{L_{C}(T_{F})}{R_{V}T_{F}}-\frac{L_{C}(T)}{R_{V}T}\right)\exp\left(\frac{p_{C}}{R_{V}T\rho_{w}}\right),\label{eq:satvp2}
\end{equation}
where
\begin{equation}
L_{C}(T)=\mu_{B}-(C_{C}-C_{PV})T\label{eq:latent_heat_cond}
\end{equation}
is called the latent heat and where we must satisfy the constraint
\begin{equation}
s_{RV}-s_{RC}=\frac{L_{C}(T_{F})}{T_{F}}.\label{eq:entconstreln0}
\end{equation}
We have taken the freezing point $T_{F}=T_{R}$ as a convenient reference
temperature. In practice $e_{SF}$ is determined by experiment, as
is $L_{C}(T_{F})$, and hence $\mu_{B}$.

The condensate pressure in the last factor in the exponential in equation
(\ref{eq:satvp2}) is conventionally approximated by zero, since this
term normally introduces a fractional error of only about $0.001$
in most atmospheric problems. However, there are applications in cloud
physics for which this term is very important, as we shall see later.

\section{Moist entropy}

We now have the tools to compute the specific entropy of air containing
water vapor, condensate, either in the form of small water or ice
particles that move with the airflow or precipitation that falls relative
to the flow.

The entropy per unit mass of dry air under these conditions is
\begin{equation}
s=s_{D}+r_{V}s_{V}+r_{C}s_{C},\label{eq:moistentropy1}
\end{equation}
where
\begin{equation}
s_{D}=C_{PD}\ln(T/T_{R})-R_{D}\ln(p_{D}/p_{R})+s_{RD}\label{eq:dryentropy}
\end{equation}
is the specific entropy of dry air, $C_{PD}$ is the specific heat
of dry air at constant pressure, $R_{D}=R/m_{D}$ where $m_{D}$ is
the molecular weight of dry air, $p_{D}$ is the partial pressure
of dry air, $s_{RD}$ is the constant reference entropy for dry air,
and the reference pressure is unconstrained, but typically chosen
to be $p_{R}=1000\sunit{hPa}$.
\begin{equation}
s_{V}=C_{PV}\ln(T/T_{R})-R_{V}\ln(p_{V}/e_{SF})+s_{RV}\label{eq:vaporentropy}
\end{equation}
is the specific entropy of water vapor, $C_{PV}$ is the specific
heat of water vapor at constant pressure, $R_{V}=R/m_{V}$ where $m_{V}$
is the molecular weight of water vapor, $p_{V}$ is the partial pressure
of water vapor, $s_{RV}$ is the constant reference entropy for water
vapor, and 
\begin{equation}
s_{C}=C_{C}\ln(T/T_{R})+s_{RC}\label{eq:condenentropy}
\end{equation}
is the specific entropy of both advected condensate ($s_{C}$) and
precipitation ($s_{R}$), $C_{C}$ is its specific heat, and $s_{RC}$
is the constant reference entropy for the condensate. The mixing ratio
of water vapor is defined as the ratio of the densities of vapor and
dry air, $r_{V}=\rho_{V}/\rho_{D}$, with a similar definition for
advected condensate mixing ratio in terms of the densities of the
respective condensate components and dry air $r_{C}=\rho_{C}/\rho_{D}$.

Substituting these expressions into equation (\ref{eq:moistentropy1})
and rearranging, we get
\begin{eqnarray}
s & = & (C_{PD}+r_{V}C_{PV}+r_{C}C_{C})\ln(T/T_{R})-R_{D}\ln(p_{D}/p_{R})\nonumber \\
 &  & -r_{V}R_{V}\ln(p_{V}/e_{SF})+s_{RD}+r_{V}s_{RV}+r_{C}s_{RC}.\label{eq:moistentropy2}
\end{eqnarray}
For many purposes this is a perfectly adequate form for the moist
entropy. However, an alternate form is more commonly used, which takes
advantage of the fact that $p_{V}/e_{SF}=\mathcal{H}e_{S}/e_{SF}$,
where $\mathcal{H}$ is the relative humidity. The ratio $e_{S}/e_{SF}$
may be obtained from equation (\ref{eq:satvp}), resulting in the
form
\begin{eqnarray}
s & = & (C_{PD}+r_{T}C_{C})\ln(T/T_{R})-R_{D}\ln(p_{D}/p_{R})\nonumber \\
 &  & +\frac{L_{C}r_{V}}{T}-r_{V}R_{V}\ln\mathcal{H}+s_{RD}+r_{T}s_{RC},\label{eq:moistentropy3}
\end{eqnarray}
where the total cloud water mixing ratio $r_{T}=r_{V}+r_{C}$ appears.
We have ignored the term containing the pressure in the condensate
$p_{C}$, as this is normally small as long as the condensate occurs
in sufficiently large particles (see the chapter on cloud physics).

The final bit of physics needed is the fact that liquid and ice co-exist
in diffusive equilibrium at the freezing temperature $T_{F}$. (The
freezing point does not vary with pressure with the approximations
used here for the entropy of the condensate, so the triple point has
the same temperature as the freezing point in our treatment.) Setting
the chemical potentials of ice and liquid to each other at the freezing
point and taking this temperature as our reference temperature, we
find
\begin{equation}
(C_{L}-s_{RL})T_{F}-\mu_{BL}=(C_{I}-s_{RI})T_{F}-\mu_{BI},\label{eq:liqiceequilib}
\end{equation}
where a subscripted $L$ indicates liquid and a subscripted $I$ indicates
ice. This can be rearranged to yield
\begin{equation}
s_{RI}-s_{RL}=\frac{L_{L}(T_{F})-L_{I}(T_{F})}{T_{F}}=\frac{L_{F}(T_{F})}{T_{F}}\label{eq:entconstreln}
\end{equation}
where the latent heats of condensation and fusion are defined
\begin{equation}
L_{L}(T)=\mu_{BL}-(C_{L}-C_{PV})T\label{eq:latentheatcond}
\end{equation}
and
\begin{equation}
L_{I}(T)=\mu_{BI}-(C_{I}-C_{PV})T.\label{eq:latentheatfusion}
\end{equation}
We also define the latent heat of freezing as the difference between
the latent heats of fusion and condensation:
\begin{equation}
L_{F}(T)=L_{I}(T)-L_{L}(T)=\mu_{BI}-\mu_{BL}+\left(C_{L}-C_{I}\right)T.\label{eq:latentheatfreezing}
\end{equation}

We finally arrive at consistent equations for the entropy of moist
air for temperatures warmer
\begin{eqnarray}
s & = & (C_{PD}+r_{T}C_{L})\ln(T/T_{F})-R_{D}\ln(p_{D}/p_{R})\nonumber \\
 &  & +\frac{L_{L}r_{V}}{T}-r_{V}R_{V}\ln\mathcal{H},~~~~T>T_{F},\label{eq:moistentliq}
\end{eqnarray}
and colder
\begin{eqnarray}
s & = & (C_{PD}+r_{T}C_{I})\ln(T/T_{F})-R_{D}\ln(p_{D}/p_{R})\nonumber \\
 &  & +\frac{L_{I}r_{V}}{T}-r_{V}R_{V}\ln\mathcal{H}\nonumber \\
 &  & -\frac{L_{F}(T_{F})r_{T}}{T_{F}},~~~~T<T_{F}\label{eq:moistentice}
\end{eqnarray}
than freezing. We have made the assumption that condensate is ice
below freezing and liquid water above freezing. In these equations
we have set $s_{RD}=s_{RL}=0$, which leaves us with
\begin{equation}
s_{RI}=-\frac{L_{F}(T_{F})}{T_{F}}\label{eq:entropyiceconst}
\end{equation}
according to equation (\ref{eq:entconstreln0}). Setting $T_{R}=T=T_{F}$
in equation (\ref{eq:satvp}), substituting condensate constants appropriate
to liquid water, and using equation (\ref{eq:latentheatcond}) we
find that
\begin{equation}
s_{RV}=\frac{L_{L}(T_{F})}{T_{F}}.\label{eq:entropyvaporconst}
\end{equation}
Using the above choices for entropy constants and reference temperature,
we finally rewrite equation (\ref{eq:moistentropy2}) into a form
which is valid both above and below freezing,
\begin{eqnarray}
s & = & \left(C_{PD}+r_{V}C_{PV}+r_{L}C_{L}+r_{I}C_{I}\right)\ln(T/T_{F})\nonumber \\
 &  & -R_{D}\ln(p_{D}/p_{R})-r_{V}R_{V}\ln(p_{V}/e_{SF})\nonumber \\
 &  & +\frac{L_{L}(T_{F})r_{V}-L_{F}(T_{F})r_{I}}{T_{F}}.\label{eq:moistentropy4}
\end{eqnarray}
In deriving this equation we make the equilibrium assumption that
$r_{L}=0$ for $T<T_{F}$ and $r_{I}=0$ for $T>T_{F}$. We can write
the vapor pressure of water $p_{V}$ in terms of the mixing ratio
$r_{V}$ using the ideal gas law for each of these components:
\begin{equation}
\frac{p_{V}}{p_{D}}=\frac{R_{V}T\rho_{V}}{R_{D}T\rho_{D}}=\frac{r_{V}}{\epsilon}\label{eq:vapor_pressure-mixing_ratio}
\end{equation}
where $\epsilon=m_{V}/m_{D}=0.623$.

\section{Wet-bulb temperature}

The wet-bulb temperature $T_{W}$ is the temperature at which a parcel
reaches saturation as condensate is evaporated into it at constant
pressure. Since moist entropy is (approximately) conserved in this
evaporation process, the wet-bulb temperature may be obtained by inverting
the entropy equation (\ref{eq:moistentropy4}) for temperature, using
the actual values of entropy and pressure with the actual vapor pressure
and mixing ratio replaced by their saturation values at the wet-bulb
temperature. Since these latter values are not known in advance, the
calculation is necessarily iterative.

\section{Governing equations}

In this section we consider the governing equations for mass, water
substance, and moist entropy in a real atmosphere.

\subsection{Mass continuity}

The fact that water substance can be added to and subtracted from
a parcel of air complicates the mass continuity equation. Since the
mass of the dry air component is conserved, we define the mass continuity
equation in terms of the dry air component only, resulting in
\begin{equation}
\frac{\partial\rho_{D}}{\partial t}+\nabla\cdot\left(\rho_{D}\boldsymbol{v}\right)=0\label{eq:massgov1}
\end{equation}
where $\rho_{D}$ is the density of dry air and $\boldsymbol{v}$
is the air velocity. Note in this case that the velocity must be defined
as that of the dry air component in order for this equation to be
correct.

\subsection{Water substance}

The total water substance divides naturally into three components
in the atmosphere, with the total water substance mixing ratio equal
to the sum of the vapor mixing ratio $r_{V}$, the advected condensate
mixing ratio $r_{C}$, and the precipitation mixing ratio $r_{P}$.
It is helpful to consider the vapor and advected condensate together,
which gives us the total cloud water mixing ratio $r_{T}=r_{V}+r_{C}$.
The cloud water mixing ratio obeys the equation
\begin{equation}
\frac{\partial\rho_{D}r_{T}}{\partial t}+\nabla\cdot\left(\rho_{D}r_{T}\boldsymbol{v}-K\nabla r_{T}\right)=\rho_{D}\left(\mathcal{E}-\mathcal{P}\right)-\frac{\partial F_{V}}{\partial z}\label{eq:cloudwatergov1}
\end{equation}
where $\rho_{D}$ is the density of dry air, $\mathcal{E}$ is the
evaporation rate of precipitation per unit mass of dry air, $\mathcal{P}$
is the corresponding production rate of precipitation, $K$ is the
dynamic eddy mixing coefficient (i.e., it includes the density factor
$\rho_{d}$), and $F_{V}(z)$ is the upward diffusive flux of water
vapor from the surface into the lowest layers of the atmosphere. Note
that eddy mixing tends to homogenize mixing ratios, which explains
the form of the eddy mixing term in equation (\ref{eq:cloudwatergov1}).
The bulk flow velocity $\boldsymbol{v}$ is defined as the velocity
of the dry air component.

The precipitation mixing ratio obeys a similar equation
\begin{equation}
\frac{\partial\rho_{D}r_{R}}{\partial t}+\nabla\cdot\left[\rho_{D}r_{R}(\boldsymbol{v}-w_{T}\boldsymbol{k})-K\nabla r_{R}\right]=-\rho_{D}\left(\mathcal{E}-\mathcal{P}\right)\label{eq:precipgov1}
\end{equation}
with the exception that the precipitation terminal velocity $-w_{T}\boldsymbol{k}$
is included and the signs of the precipitation source and sink terms
are reversed.

\subsection{Entropy}

The change of entropy of a parcel of air with volume $V$ and fixed
dry air mass $M_{D}$ consists of three parts, the change due to added
heat, the change due to added mass, and the change due to phase transformations
and other chemistry:
\begin{equation}
dS=dS_{heat}+dS_{mass}+dS_{chem}.\label{eq:entgov1}
\end{equation}
The heating part is simply
\begin{equation}
dS_{heat}=\frac{M_{D}Qdt}{T}\label{eq:entgov2}
\end{equation}
where $T$ is the temperature and $Q$ is the heat added per unit
mass of dry air per unit time.

We divide the change in mass of component $i$ of the parcel as 
\begin{equation}
dO_{i}=dM_{i}+dN_{i}\label{eq:entgov2a}
\end{equation}
where $dM_{i}$ is the net transfer of the mass of the $i$th component
into the parcel and $dN_{i}$ is the change in the mass of this component
via phase change or chemical reaction. Given that the two components
with variable mass are water vapor and advected condensate, the mass
part can be written
\begin{equation}
dS_{mass}=s_{V}dM_{V}+s_{C}dM_{C}\label{eq:entgov3}
\end{equation}
where $dM_{V}$ and $dM_{C}$ represent the changes in the masses
of water vapor and advected condensate in the parcel due to diffusion
through the sides of the parcel as well as addition and removal of
mass through precipitation formation and evaporation. (Precipitation
is not considered to be part of the system.) We assume implicitly
that mass enters and leaves the parcel with the specific entropies
characteristic of the parcel.

The chemical part of the change in entropy is assumed to take place
at constant volume, $dV=0$, and zero mass flux in and out of the
parcel, $dM_{V}=dM_{C}=0$. In the case of phase transitions between
water vapor and condensate it can be written
\begin{equation}
dS_{chem}=-\frac{\mu_{V}}{T}dN_{V}-\frac{\mu_{C}}{T}dN_{C}=-\frac{\mu_{V}-\mu_{C}}{T}dN_{V}\label{eq:entgov3a}
\end{equation}
where $dN_{V}$ and $dN_{C}$ are the masses added to water vapor
and advected condensate by evaporation and condensation respectively
and where $\mu_{V}$ and $\mu_{C}$ are the chemical potentials of
vapor and condensate. This equation arises from the fact that
\begin{equation}
\frac{\mu_{i}}{T}=-\left(\frac{\partial S}{\partial O_{i}}\right)=-\left(\frac{\partial S}{\partial N_{i}}\right)\label{eq:entgov3b}
\end{equation}
where the last step is justified since $dM_{i}$ is assumed to be
zero for this part of the change in entropy. Since loss of water vapor
by condensation results in an equal gain in condensate in this case,
we have $dN_{C}=-dN_{V}$. The temperature of the advected condensate
is assumed to equal the temperature of the air parcel as a whole.
This is justified because equilibration between the small advected
condensate particles and vapor occurs rapidly. Thus, to a good approximation
the condensate will be in phase equilibrium with the vapor, resulting
in $\mu_{V}=\mu_{C}$. In this case $dS_{chem}=0$.

The specific entropy of water vapor is given by equations (\ref{eq:vaporentropy})
and (\ref{eq:entropyvaporconst}),
\begin{equation}
s_{V}=C_{PV}\ln(T/T_{F})-R_{V}\ln(p_{V}/e_{SF})+L_{L}(T_{F})/T_{F},\label{eq:entgov4}
\end{equation}
while that for condensate is 
\begin{equation}
s_{C}=\left\{ \begin{array}{cc}
C_{I}\ln(T/T_{F})-L_{F}(T_{F})/T_{F}, & T<T_{F}\\
C_{L}\ln(T/T_{F}), & T>T_{F}
\end{array}\right.\label{eq:entgov5}
\end{equation}
from equations (\ref{eq:condenentropy}) and (\ref{eq:entropyiceconst}).
For the dry air component,
\begin{equation}
s_{D}=C_{PD}\ln(T/T_{F})-R_{V}\ln(p_{D}/p_{R}).\label{eq:entgov5a}
\end{equation}
The chemical potentials of vapor and condensate divided by temperature
are similarly
\begin{equation}
\mu_{V}/T=-C_{PV}\ln(T/T_{F})+R_{V}\ln(p_{V}/e_{SF})+C_{L}-\mu_{BL}/T_{F}\label{eq:entgov5b}
\end{equation}
and
\begin{equation}
\mu_{C}/T=\left\{ \begin{array}{cc}
C_{I}[1-\ln(T/T_{F})]-\mu_{BI}/T+L_{F}(T_{F})/T_{F}, & T<T_{F}\\
C_{L}[1-\ln(T/T_{F})]-\mu_{BL}/T, & T>T_{F}
\end{array}\right..\label{eq:entgov5c}
\end{equation}

Recognizing $s=S/M_{D}=s_{D}+r_{V}s_{V}+r_{C}s_{C}$ as the specific
entropy of air, dividing equation (\ref{eq:entgov1}) by $M_{D}dt$,
and substituting equations (\ref{eq:entgov2}) and (\ref{eq:entgov3})
results in the governing equation for entropy,
\begin{equation}
\frac{ds}{dt}=\frac{Q}{T}+s_{V}\left(\frac{dr_{V}}{dt}\right)_{d}+s_{C}\left[\left(\frac{dr_{C}}{dt}\right)_{d}+\left(\frac{dr_{C}}{dt}\right)_{p}\right]+s_{C}^{*}\left(\frac{dr_{C}}{dt}\right)_{e},\label{eq:entgov6}
\end{equation}
where $dr_{V}=dM_{V}/M_{D}$ and $dr_{C}=dM_{C}/M_{D}$ are the changes
in mixing ratios of vapor and advected condensate. The subscripted
$d$ refers to mass addition by a diffusive process, the subscripted
$p$ refers to conversion of advected condensate to precipitation,
and the subscripted $e$ refers to conversion of precipitation to
advected condensate. The quantity $s_{C}^{*}$ is the condensate entropy
at the wet-bulb temperature $T_{W}$, which is the temperature toward
which precipitation tends as it falls through unsaturated air.

Multiplication by the density of dry air $\rho_{D}$ and use of the
mass continuity equation (\ref{eq:massgov1}) allows conversion to
flux form:
\begin{align}
\frac{\partial\rho_{D}s}{\partial t}+\nabla\cdot\left(\rho_{D}s\boldsymbol{v}\right)= & \frac{\rho_{D}Q}{T}+\rho_{D}s_{V}\left(\frac{dr_{V}}{dt}\right)_{d}+\nonumber \\
 & \rho_{D}s_{C}\left[\left(\frac{dr_{C}}{dt}\right)_{d}+\left(\frac{dr_{C}}{dt}\right)_{p}\right]+\rho_{D}s_{C}^{*}\left(\frac{dr_{C}}{dt}\right)_{e}.\label{eq:entgov7}
\end{align}

The water vapor diffusion term can be written
\begin{equation}
\rho_{D}s_{V}\left(\frac{dr_{V}}{dt}\right)_{d}=-s_{V}\nabla\cdot\boldsymbol{J}_{V}=-\nabla\cdot\left(s_{V}\boldsymbol{J}_{V}\right)+\boldsymbol{J}_{V}\cdot\nabla s_{V}\label{eq:entgov8}
\end{equation}
where $\boldsymbol{J}_{V}$ is the molecular flux of water vapor.
This is proportional to minus the gradient of the chemical potential
of water vapor, but this will not enter the analysis directly due
to its small magnitude in atmospheric applications. In particular,
the first term on the right side of equation (\ref{eq:entgov8}) is
completely negligible compared to the divergence of the bulk entropy
flux on the left side of equation (\ref{eq:entgov7}). However, the
second term enters indirectly when there is turbulence. Turbulence
transforms variance on large scales down to tiny scales at which molecular
processes can act. We account for this by imposing implicit smoothing
(a Reynolds separation) and replace the molecular flux of water vapor
by the turbulent flux, so that $\boldsymbol{J}_{V}\rightarrow-K\nabla r_{V}$
where $K$ is the eddy mixing coefficient. Assumed here is that turbulent
mixing homogenizes mixing ratio, in contrast to molecular diffusion,
which homogenizes chemical potential divided by temperature. Though
both occur, the former dominates the latter. Applying a similar treatment
to the advected cloud water diffusion term results in our final governing
equation for entropy,
\begin{align}
\frac{\partial\rho_{D}s}{\partial t}+\nabla\cdot\left(\rho_{D}s\boldsymbol{v}-K\nabla s\right)= & \frac{\rho_{D}Q}{T}-K\nabla r_{V}\cdot\nabla s_{V}-K\nabla r_{C}\cdot\nabla s_{C}\nonumber \\
 & -\rho_{D}s_{C}\mathcal{P}+\rho_{D}s_{C}^{*}\mathcal{E},\label{eq:entgov9}
\end{align}
where the time tendencies of condensate mixing ratio due to formation
and evaporation of precipitation have been replaced by $-\mathcal{P}$
and $\mathcal{E}$ respectively. A turbulent eddy flux term for the
entropy has been added to the left side of the governing equation
as well.

The heating term has contributions from radiation, heat conduction,
turbulent dissipation of the flow, turbulent dissipation associated
with falling precipitation, and heat transfer between precipitation
and air:
\begin{equation}
\frac{Q}{T}=\frac{Q_{RAD}+Q_{COND}+Q_{DISS}+Q_{PDISS}+Q_{PTRANS}}{T}.\label{eq:entgov10}
\end{equation}
The radiative heating per unit volume $\rho_{D}Q_{RAD}$ is specified
externally. The contribution of heat conduction $\rho_{D}Q_{COND}$
was found to be very small by Pauluis and Held (2002a).

The dissipation term is given by
\begin{equation}
\rho_{D}Q_{DISS}=2K|\boldsymbol{D}|^{2}\label{eq:entgov11}
\end{equation}
Where $\boldsymbol{D}$ is the rate of strain tensor. As shown by
Pauluis, Balaji, and Held (2000), the precipitation-induced dissipation
term is
\begin{equation}
\rho_{D}Q_{PDISS}=g\rho_{D}r_{P}w_{T}\label{eq:entgov12}
\end{equation}
where $r_{P}$ is the mixing ratio of precipitation and $w_{T}$ is
the precipitation terminal fall velocity.

The heating term due to sensible heat transfer from the falling precipitation
to the air as it warms is approximately
\begin{equation}
\rho_{D}Q_{PTRANS}\approx\rho_{D}r_{P}(v_{z}-w_{T})\left[-C_{C}\frac{dT_{W}}{dz}+L_{F}(T_{F})\delta(z-z_{F})\right].\label{eq:entgov13}
\end{equation}
In this approximation, the temperature of precipitation is assumed
to be the wet-bulb temperature $T_{W}$ of the atmosphere. The second
term on the right side represents melting or freezing, assumed to
occur instantly at the freezing level $z_{F}$, of ascending or descending
precipitation. (Technically, this is the level at which $T_{W}=T_{F}$.)
The specific heat of condensate, $C_{C}$, is assumed to be that for
liquid, $C_{L}$ below the freezing level and that for ice, $C_{I}$,
above the freezing level. Except for the freezing/melting term in
$Q_{PTRANS}$, the terms $Q_{PDISS}$ and $Q_{PTRANS}$ are typically
similar in magnitude and opposite in sign.

\subsection{Classical entropy governing equation}

The classical treatment for the generation of entropy by diffusion
is given by de Groot (1951, pp 97-98), Landau and Lifshitz (1959,
p 221), de Groot and Mazur (1962, pp 19-24), Yourgrau, van der Merwe,
and Raw (1966, pp 13-14), etc. The arguments of these authors are
all variations on a common theme that starts for our case with the
Gibbs relation (with $dM_{D}=0$),
\begin{equation}
TdS=dE+pdV-\mu_{V}dO_{V}-\mu_{C}dO_{C}\label{eq:oldentgov1}
\end{equation}
where the terminology is as before. The first law of thermodynamics
is then applied, which we write for consistency with the above work
as
\begin{equation}
dE=Qdt-pdV,\label{eq:oldentgov2}
\end{equation}
where $Q$ is the heating rate per unit mass. The result is
\begin{equation}
dS=\frac{Qdt}{T}-\frac{\mu_{V}dO_{V}+\mu_{C}O_{C}}{T}.\label{eq:oldentgov3}
\end{equation}
The rest of the development follows along lines similar to those given
above, where $dr_{V}=dO_{V}/M_{D}$, etc., with the result that
\begin{equation}
\frac{ds}{dt}=\frac{Q}{T}-\frac{\mu_{V}}{T}\left(\frac{dr_{V}}{dt}\right)-\frac{\mu_{C}}{T}\left(\frac{dr_{C}}{dt}\right)\label{eq:oldentgov4}
\end{equation}
in place of equation (\ref{eq:entgov6}).

I believe this derivation to be incorrect for the following reasons:
(1) The closed system first law is applied to an open system. (2)
The work done by the system $dW$ is incorrectly equated to $pdV$
in the case in which only part of $dV$ is associated with work-producing
expansion.

Can the above derivation be rescued? Let us generalize equation (\ref{eq:oldentgov2})
to use the actual work done by expansion $dW$ and to include the
import and export of energy via mass exchange,
\begin{equation}
dE=Qdt-dW+e_{V}dM_{V}+e_{C}dM_{C},\label{eq:oldentgov6}
\end{equation}
where quantities $e_{V}$ and $e_{C}$ are the specific energies of
water vapor and advected condensate. Note that this equation is derived
from energy conservation and is therefore a true expression of the
first law of thermodynamics. It differs from the expression for $dE$
obtained by simply inverting the Gibbs equation (\ref{eq:oldentgov1})
in that the heat added $Qdt$ is not equated to the entropy term $TdS$,
the work done $dW$ is not set equal to $pdV$, and the specific energies
replace the chemical potentials of water vapor and condensate.

The change in volume of the system actually consists of two parts,
the change due to expansion and compression, $dV_{X}$, and the change
due to the addition and removal of mass, $dV_{M}$. The total change
in volume is thus $dV=dV_{X}+dV_{M}$. The work done by expansion
is $dW=pdV_{X}$. On the other hand, the change in volume due to a
change in mass alone holding pressure and temperature constant is
\begin{equation}
pdV_{M}=d(pV_{M})=d(M_{V}R_{V}T+M_{C}R_{C}T)=R_{V}TdM_{V}+R_{C}TdM_{C}.\label{eq:oldentgov7}
\end{equation}
where we have used the ideal gas law. (The condensate can be considered
as an ideal gas with very massive molecules, and hence a very small
value of $R_{C}$.)

Combining equations (\ref{eq:oldentgov1}), (\ref{eq:oldentgov6}),
and (\ref{eq:oldentgov7}) and identifying $e_{i}+R_{i}T=h_{i}$ as
the specific enthalpy of the $i$th component results in
\begin{equation}
TdS=Qdt+(h_{V}-\mu_{V})dM_{V}-\mu_{V}dN_{V}+(h_{C}-\mu_{C})dM_{C}-\mu_{C}dN_{C}\label{eq:oldentgov8}
\end{equation}
where we have used $dO_{V}=dM_{V}+dN_{V}$, etc. Dividing by $T$
and recognizing the specific entropy of the $i$th component as $s_{i}=(h_{i}-\mu_{i})/T$
brings us to our original equation (\ref{eq:entgov1}):
\begin{align}
dS & =\frac{Qdt}{T}+s_{V}dM_{V}+s_{C}dM_{C}-\frac{\mu_{V}-\mu_{C}}{T}dN_{V}\nonumber \\
 & =dS_{heat}+dS_{mass}+dS_{chem}.\label{eq:oldentgov9}
\end{align}
Thus, the Gibbs equation approach is consistent with our original
result with phase equilibrium between vapor and advected condensate,
provided that the proper version of the first law of thermodynamics
is used.

\subsection{Momentum}

In order to derive the momentum equation, consider a parcel that moves
with the dry air component and is closed with respect to that component,
i.e., the mass of dry air in the parcel $M_{D}$ is conserved. Newton's
second law generalized for open systems takes the form
\begin{equation}
\frac{d}{dt}\left[\left(M_{D}+M_{T}\right)\boldsymbol{v}\right]=V\boldsymbol{F}+\boldsymbol{v}\frac{dM_{T}}{dt}\label{eq:momentumgov1}
\end{equation}
where $M_{T}$ is the mass of the total cloud water, i.e., vapor plus
advected condensate. The term on the left is the time rate of change
of momentum of the dry air plus the total cloud water. Precipitation
is not considered to be part of the system. The first term on the
right is the product of the volume $V$ of the parcel and the external
force per unit volume,
\begin{equation}
\boldsymbol{F}=\nabla\cdot\boldsymbol{T}-g\rho_{D}\left(1+r_{T}+r_{R}\right)\boldsymbol{k},\label{eq:momentumgov2}
\end{equation}
where $\boldsymbol{T}=-p\boldsymbol{I}+2K\boldsymbol{D}$ is the stress
tensor with $p$ being the pressure, $K$ the eddy mixing coefficient,
and $\boldsymbol{D}$ the strain rate of the fluid. The second part
of equation (\ref{eq:momentumgov2}) is just the weight of all material
in the parcel, incorporating the mass densities of the dry air component
$\rho_{D}$, the total cloud water $\rho_{T}=\rho_{D}r_{T}$ and the
precipitation $\rho_{P}=\rho_{D}r_{P}$. The third term on the right
side of equation (\ref{eq:momentumgov1}) represents the rate at which
cloud water mass is added to the parcel, which we assume to enter
with the parcel's velocity.

Expanding the derivative on the left side of equation (\ref{eq:momentumgov1}),
dividing by $V$, and simplifying results in
\begin{equation}
\rho_{D}(1+r_{T})\frac{d\boldsymbol{v}}{dt}=-\nabla p+\nabla\cdot\left(2K\boldsymbol{D}\right)-g\rho_{D}\left(1+r_{T}+r_{R}\right)\boldsymbol{k}.\label{eq:momentumgov3}
\end{equation}
Finally, dividing by $1+r_{T}$ and converting the left side to flux
form using equation (\ref{eq:massgov1}) results in
\begin{equation}
\frac{\partial\rho_{D}\boldsymbol{v}}{\partial t}+\nabla\cdot\left(\rho_{D}\boldsymbol{v}\boldsymbol{v}\right)=\frac{-\nabla p+\nabla\cdot\left(2K\boldsymbol{D}\right)}{1+r_{T}}-g\rho_{D}\left(1+r_{R}\right)\boldsymbol{k}.\label{eq:momentumgov4}
\end{equation}
We have made the minor approximation that $1+r_{R}/(1+r_{T})\approx1+r_{R}$,
which is valid because $r_{R},r_{T}\ll1$.

\section{Other thermodynamic variables}

A variety of approximately conserved thermodynamic variables besides
entropy are used in studies of convection. Here we mention a few and
discuss their characteristics.

A simplified form of the entropy is
\begin{equation}
s=C_{PD}\ln(T/T_{F})-R_{D}\ln(p/p_{R})+\frac{Lr_{V}}{T_{F}},\label{eq:simpleentropy}
\end{equation}
where $L$ is the latent heat of condensation at freezing. This approximation
comes from neglecting $r_{L}$ and $r_{I}$ in equation (\ref{eq:moistentropy4})
and neglecting $r_{V}$ everywhere except where multiplied by $L$.
This also leads to the approximation $p_{D}=p$. It is sometimes used
in numerical models where maximal simplification is desired. A common
variation of this formula replaces the constant reference temperature
$T_{F}$ in the latent heat term by the actual temperature. This is
actually a serious mistake, since it means that the dry entropy (given
by the first two terms on the right side of equation (\ref{eq:simpleentropy})),
the moist entropy $s$, and the water vapor mixing ratio $r_{V}$
are not all simultaneously conserved in transformations which change
the temperature but remain non-condensing. Use of this variation should
be avoided.

Meteorologists use a variable called the \emph{equivalent potential
temperature}, which can be approximated roughly as
\begin{equation}
\theta_{e}=T_{R}\exp(s/C_{P})=T(p_{R}/p)^{R_{D}/C_{PD}}\exp[Lr_{V}/(C_{PD}T_{R})],\label{eq:thetae1}
\end{equation}
where the simplified entropy given by equation (\ref{eq:simpleentropy})
has been substituted. The equivalent potential temperature is defined
by the meteorologists as the temperature of a parcel carried moist
adiabatically to very low pressure so as to condense out all the water,
and then compressed dry adiabatically to the reference pressure.

The \emph{pseudo-adiabatic} equivalent potential temperature is the
version of equivalent potential temperature which is constant under
adiabatic expansion with all condensed water removed as it is formed.

The \emph{reversible} equivalent potential temperature is related
to the entropy as defined by equation (\ref{eq:moistentliq})
\begin{equation}
\theta_{e}=T_{F}\exp[s/(C_{PD}+r_{T}C_{L})].\label{eq:thetae2}
\end{equation}
The extra term $r_{T}C_{L}$ is included to make the equivalent potential
temperature proportional to the temperature when the entropy is substituted.
However, it has the unfortunate side effect of giving the entropy
and the equivalent potential temperature different conservation properties
when $r_{T}$ varies, perhaps as a result of the fallout of precipitation.

The final variable we consider is the \emph{moist static energy}.
From the first law of thermodynamics for a closed parcel, we have
for a parcel of unit mass
\begin{equation}
C_{PD}dT=dq+\frac{dp}{\rho}\label{eq:firstlaw}
\end{equation}
where is the heat added per unit mass. We thus ignore the contribution
of vapor and condensate to the energetics of the system except by
virtue of the effect of latent heat release: $dq=-Ldr_{V}$, where
a constant latent heat of condensation $L$ is assumed. The crucial
assumption is that the pressure change is given by the hydrostatic
equation $dp=-g\rho dz$, which allows us to write
\begin{equation}
d(C_{PD}T+Lr_{V}+gz)=d\sigma=0,\label{eq:moiststaticenergy}
\end{equation}
where $\sigma$ is the moist static energy.

The conservation properties of the moist static energy are problematic,
not only from the point of view of the approximate thermodynamic treatment
(a problem which can be fixed) but also from the assumption of hydrostatic
equilibrium in pressure changes. Rearranging equation (\ref{eq:firstlaw})
results in $\rho^{-1}\nabla p=\nabla(C_{PD}T+Lr_{V})$ which may be
substituted in the momentum equation. Using the identity $\mathbf{v}\cdot\nabla\mathbf{v}=\nabla(v^{2}/2)-\mathbf{v}\times\zeta$
and dotting the momentum equation with $\mathbf{v}$, we get
\begin{equation}
\frac{\partial v^{2}/2}{\partial t}+\mathbf{v}\cdot\nabla(v^{2}/2+C_{PD}T+Lr_{V}+gz)=0.\label{eq:msegov}
\end{equation}
In the steady state where $\partial(v^{2}/2)/\partial t=0$, we infer
that $v^{2}/2+\sigma$ is conserved along streamlines. Thus, $\sigma$
by itself is not conserved. The error is often small, but can be signficant
in extreme cases. In non-steady situations, the conservation properties
of $\sigma$ are undefined, though non-conservation is probably of
order $v^{2}/2$ here as well. However, there seems to be no obvious
way to bound the error in the non-steady situation. 

\section{References}
\begin{description}
\item [{Bohren,}] C. F., and B. A. Albrecht, 1998: \emph{Atmospheric Thermodynamics}.
Oxford University Press, 402 pp. An interesting alternative to standard
treatments of atmospheric thermodynamics.
\item [{Emanuel,}] K. A., 1994: \emph{Atmospheric Convection}. Oxford University
Press, 580 pp. This is a popular text on convection and has extensive
coverage of atmospheric thermodynamics.
\item [{de}] \textbf{Groot}, S. R., 1951: \emph{Thermodynamics of irreversible
processes.} North-Holland Publishing, 242 pp.
\item [{de}] \textbf{Groot}, S. R. and P. Mazur, 1962: \emph{Non-equilibrium
thermodynamics}. North-Holland, Amsterdam, 510 pp.
\item [{Landau,}] L. D., and E. M. Lifshitz (1959): \emph{Fluid mechanics.}
Pergamon Press, 536 pp.
\item [{L\'{o}pez}] Carrillo, C., and D. J. Raymond, 2005: Moisture tendency
equations in a tropical atmosphere. \emph{J. Atmos. Sci.}, \textbf{62},
1601-1613. This presents the latest work on moist entropy and moist
static energy, and includes a derivation of the moist entropy with
ice.
\item [{Pauluis,}] O., V. Balaji, and I. M. Held, 2000: Frictional dissipation
in a precipitating atmosphere. j\emph{J. Atmos. Sci.}, \textbf{57},
989-994.
\item [{Pauluis,}] O., and I. M. Held, 2002: Entropy budget of an atmosphere
in radiative-convective equilibrium. Part I: Maximum work and frictional
dissipation. \emph{J. Atmos. Sci.}, \textbf{59}, 125-139.
\item [{Pauluis,}] O., and I. M. Held, 2002: Entropy budget of an atmosphere
in radiative-convective equilibrium. Part II: Latent heat transport
and moist processes. \emph{J. Atmos. Sci.}, \textbf{59}, 140-149.
This and the previous reference explore the role of precipitation,
evaporation, and diffusion of water vapor on the irreversible production
of entropy in the atmosphere.
\item [{Yourgrau,}] W., A. van der Merwe, and G. Raw, 1982: \emph{Treatise
on irreversible and statistical thermophysics.} Dover Publications,
268 pp (reprinted from the original work published in 1966 by Macmillan).
\end{description}

\section{Problems}
\begin{enumerate}
\item Given that the mean radiative brightness temperature of the atmosphere
is about $259\sunit{K}$ i.\,e., the earth radiates energy at the
same rate as a black body at this temperature, compute the outflow
of energy from the earth per unit area per unit time.
\item Assuming that the surface latent heat flux exceeds the surface sensible
heat flux by an order of magnitude (true over oceans), estimate the
rainfall rate in radiative-convective equilibrium, converting the
units to millimeters of rain per day. You will need the answer to
the previous problem plus the assumption that all solar radiation
is absorbed by the surface and that thermal radiation is emitted from
the middle to upper troposphere. Moist convection is responsible for
transporting this energy upwards.
\item Given the above-quoted brightness temperature of the earth, that the
mean surface temperature of the earth in the tropics is near $300\sunit{K}$,
and that most solar radiation is absorbed by the surface before being
transferred to the atmosphere, estimate the irreversible entropy production
per unit area per unit time in the earth's tropical regions. Hint:
Recall that $dS=dQ/T$.
\item Given the rainfall rate in radiative-convective equilibrium and assuming
that rainfall is formed on the average at an elevation of $5\sunit{km}$,
estimate the work done on the atmosphere by the frictional force of
falling raindrops. From this, estimate the irreversible entropy production
per area per time due to this frictional heating.
\item Consider a box of volume $V$ with air in it at temperature $T$ and
total pressure $p$. Initially the air in the left half of the box
has partial pressure of water vapor equal to $p_{V}=0$ whereas the
air in the right half of it is $p_{V}=p_{0}>0$ (non-condensing).
Compute the total entropy of the air in the box before moisture diffusion
starts and after diffusion has homogenized the vapor pressure in the
box. What is the change in the total entropy in the box, and what
is the sign of the change? Hint: Take the total entropy in each half
of the box as the sum of the entropies of the air and the water vapor.
Note that the entropy of a mass $M$ of ideal gas can be written $S=M[C_{P}\ln(T/T_{R})-(R/m)\ln(p/p_{R})]$.
Also note that the mass of each component in each half of the box
is proportional to its partial pressure in that half, since the temperature
remains constant throughout the mixing process.
\item The rate of viscous heat production per unit mass is equal to the
rate per unit mass at which mechanical energy is destroyed. Compute
the entropy generation rate per unit mass due to mechanical dissipation
for eddies with a typical outer scale of $10^{3}\sunit{m}$ and a
typical velocity at this scale of $10\sunit{m}\sunit{s}^{-1}$. For
this problem exclude the precipitation-generated part of the dissipation.
\item Consider a steady flow in which parcels are accelerated from zero
velocity to $100\sunit{m}\sunit{s}^{-1}$, such as might occur on
being drawn into a jet stream. Compute the change in static energy
under these conditions and express the change as an equivalent temperature
change by dividing by $C_{PD}$.
\end{enumerate}

\end{document}
