How to derive the total potential energy of the atmosphere? In one of Lorenz’s paper (I mean the meteorologists Edward Lorenz), he stated that the total potential energy of the whole atmosphere $P + I$ (means the sum of potential energy and internal energy) is
\begin{equation}
P + I = c_p p_{00}^{-x} \int p^x \Theta dM
\end{equation}
where $p$ is pressure, $p_{00}$ is a standard pressure, and $x$ is the ratio $(c_p - c_v)/c_p$, $c_v$ and $c_p$ are the specific heats of air,$\Theta$ is the temperature and M is the mass.
Based on my knowledge, the internal energy should be a simple form that
\begin{equation}
I = \int c_v T dM
\end{equation}
and the potential energy is actually the gravitational potential energy, which is
\begin{equation}
P = \int g h dM
\end{equation}
where $g$ is the gravitational acceleration and $h$ is the height. So my question is how did Lorenz derived his form of the total potential energy of the atmosphere? The original paper is Energy and numerical weather predictionLorenz 1960, and this equation was the first equation in the paper.
First, let's acknowledge this fact: $$c_p=R+c_v \tag{1}$$,
where $R$ is the specific gas constant.
This means that $x=R/c_p$.
Rearranging the equation, we can see that $$P+I=\int{c_p\left(\frac{P}{P_{00}}\right)^{R/c_p}\Theta dM}\tag{2}$$
Notice that $\left(\frac{P}{P_{00}}\right)^{R/c_p}$ is the Exner function. By extension,$$P+I=\int{c_p T dM}\tag{3}$$ If we rearrange (1) we can get
$$P+I=\int{c_v T+RT dM}\tag{4}$$.
You observed correctly that $I=\int{c_v T}dM$. This leaves $$P=\int{RT dM}\tag{5}$$.
Using the ideal gas law,$$P=\int{P\alpha dM}$$, where $\alpha$ is specific volume. This makes (4) look like $$P+I=\int{c_v T+P\alpha dM}\tag{4}$$ which is just a restatement of the first law of thermodynamics: $\delta q = c_v dT + p d\alpha$