Barometric formulas: various derivations and comparisons to environmentally relevant observations

Three different lines of thinking (mechanical, mixed thermodynamical-mechanical, statistical thermodynamic) are presented to derive the noted barometric formula, which gives the altitude dependence of the pressure of a gas in a gravity field. It is shown that the first two methods can be extended to non-isothermal cases, whereas statistical thermodynamics relies on the concept of thermal equilibrium and its usefulness is limited to the isothermal barometric formula. The temperature changes in the gravity field are taken into account by two different methods: simple conservation of energy, and a more refined line of thought based on the adiabatic expansion of an ideal gas. The changes in gravitational acceleration are also considered in further refinements. Overall, six different formulas are derived and their usefulness is tested on the atmosphere of the Earth. It is found that none of the formulas is particularly useful above an altitude of 20 km because radiation effects make the temperature changes in the atmosphere difficult to predict by simple theories. Finally, the different components of air are also considered separately in the context of the barometric formula, and it is shown that the known composition changes of the atmosphere are primarily caused by photochemical processes and not by the gravity field.


Introduction
The barometric formula expresses the dependence of atmospheric pressure on altitude [1][2][3][4][5][6][7][8][9]. Its useful mathematical form is given as follows: In this equation, p(h) is the atmospheric pressure at altitude h, p 0 is the atmospheric pressure at sea level, g is the gravitational acceleration, ρ 0 is the mass density of air at sea level, R is the gas constant, T is the temperature, M is the (average) molar mass, m is the average mass of a gas molecule, and H is a composite parameter sometimes called "scale height". The significance of dropping atmospheric pressure with increasing elevation is quite well known in everyday life and has a number of notable consequences. First, elevation can be estimated with a barometer, and Eq. 1 has a fundamental role in the process. Altitude sickness is also well documented even in popular stories [10]. This syndrome occurs in the mountains at high elevation and is caused by a general lack of oxygen in the body. At high altitudes, the overall atmospheric pressure is lower than at sea level, which means that the partial pressure of oxygen is also much lower than human bodies are used to even if the percentage composition of air is the same.
Airplanes change their altitude very fast and, of course, must have instruments to keep the inside pressure at convenient levels. A very sad chapter in the history of modern aviation was the case when pilots failed to switch on the pressurizing instrument on Helios flight 522 from Cyprus to Athens on August 14, 2005 [10]. The pilot crew did not recognize their mistake soon enough, and one of the first victims of oxygen deprivation was their logical thinking. Even though ground control reminded them to check pressure, they did not respond by proper action and-along with all the passengers on board-fell into a deep coma. The plane reached the destination on automatic pilot but could not land without human intervention and crashed when the fuel supply was exhausted. No one survived the accident. A very similar private jet accident was the cause of the death of world-famous golf player William Payne Stewart on October 25, 1999. There are less tragic consequences of the falling atmospheric pressure in elevation. For example, the capital of South American landlocked state Bolivia, La Paz, lies at an elevation of 3700 m and their national soccer team is allowed to play their official games there. Needless to say, this means a major (and, most would probably argue, highly unfair) advantage to the home side, whose players are used to these conditions, but the opponent never has the time to undergo full acclimatization. Less spectacularly, cooking in boiling water in La Paz takes a lot more time than at normal elevations because the lower atmospheric pressure causes water to boil at about 90 °C instead of 100 °C as explained by the Clausius-Clapeyron equation [11].
Accurate description of atmospheric phenomena is obviously important in environmental science [12]. The altitude dependence of pressure, temperature, and the composition of the atmosphere all play dominant roles in forming weather patterns on Earth, radiative phenomena [13] such as airglow [14] on polar lights (aurora australis on the southern hemisphere and aurora borealis in the northern hemisphere) [12], and the maintenance and operation of the ozone layer [15]. It is also clear that the use of the barometric formula is not limited to planet Earth [13]; it should be valid for other solar and extrasolar planets as well because gases exist there in a gravitational field.
Most general and physical chemistry textbooks include the barometric formula given in Eq. 1 [11]. This article will show some less standard, but theoretically somewhat more acceptable formulae for the same purpose. In each case, the range of validity and the theoretical limitations on their use will be given. It will also be discussed how well they describe the actual observations on Earth.
The text here will present derivations in a sufficiently detailed form so that they can be understood without consulting other texts. These derivations are mostly based on equilibrium considerations. There are kinetic ways of deriving the barometric formula based on the speed distribution of particles [3,5], but these will not be recalled in this article. For most of the time, radiation effects will be ignored. These play a major role especially in forming the temperature profile of the atmosphere and, through temperature, they affect the pressure dependence as well. However, radiation effects are difficult to quantify in a way that is simple enough for inclusion in this article. Instead, the disagreement between some of the theoretical formulas and reality will be used as proof of the atmospheric importance of radiative processes. The presence of water vapor in the atmosphere will also be disregarded (i.e., air will be idealized as dry air). Some laws and equation will need to be borrowed from standard physical chemistry textbooks. In these cases, the textbook by Atkins and de Paula will be used as a reference [11]. Furthermore, sometimes it will be necessary to find the solutions of certain ordinary differential equations. This will not be done in detail here. An excellent account of first-order differential equations in chemistry was published as the first article ever in Chem-Texts [16]. For other differential equations, the solutions will be simply given. Use of the rules of differentiation allows the validity of these solutions to be tested readily. It is more laborious to find these solutions, but even symbolic mathematical software such as Mathematica can do this, so all that remains to be done by the investigator is to learn the syntax.

Mechanical line of thought
In the mechanical way of thought, the starting point is that the change in the gas pressure going down in a gravity field is only caused by the weight of the gas. Imagine a very thin layer of air in a column that has a horizontal cross section of A, and its vertical size is dh (i.e., infinitesimal). The pressure acting on the lower surface is larger than on the upper one by dp (Fig. 1). The difference dp is caused by the weight of the air between the two surfaces, so: In this formula, ρ(h) (Greek letter rho) is the mass density of air at altitude h, and g is the gravitational acceleration (9.81 m s −2 for mid-latitude geographical locations). The mass density of an ideal gas can be calculated from the definition of mass density and the ideal gas law [11] as ρ = m/V = nM/V and n/V = p/(RT), so this equation will give a direct connection between mass density and pressure: The quantities used in this equation were used and defined in Eq. 1. The next step is combining Eqs. 2 and 3 to calculate the derivative of pressure with respect to altitude. Altitude h is measured starting from the surface of Earth, so it increases upward, but pressure decreases upward, so a negative sign is also needed in the final equation: In this section, it is assumed that the temperature does not change with altitude. Thus, the whole term Mg/(RT) in Eq. 4 is independent of altitude. Therefore, Eq. 4 is one of the simplest possible ordinary differential equations: a first-order, linear one, whose solution is the exponential function [16]. Using the notation p 0 for the pressure at zero altitude, the solution takes the following form: This becomes identical to the classical barometric formula in the first part of Eq. 1 if the ideal gas law in Eq. 3 is used again for the pressure and mass density at sea level: M/RT = ρ 0 /p 0 . The value of scale height H is between 4 and 8 km depending on the temperature.

Mixed thermodynamical-mechanical thinking
In this sequence of thought, the starting point will be that equilibrium is maintained under conditions when the forces acting on a particle are balanced. Gravity exerts an obvious force on any particle in the gas phase (which would be the weight of the molecule if it were exerted on some object below): The force balancing F gr is a less obvious one. In mechanics, the concept of potential energy is used quite widely [11]. Actually, there is something very similar in thermodynamics as well: it is called chemical potential, μ (Greek letter mu). Usually, force can be calculated as the spatial derivative (gradient) of the potential, and this is true for chemical potential as well: The negative sign is the consequence of the fact that smaller chemical potentials are preferred, so the force points into the direction of decrease in the potential. The pressure dependence of the chemical potential of an ideal gas at constant temperature is readily given by a simple formula [11]: Therefore, the gradient of chemical potential can be calculated using the derivation rules for a composite function: Combining Eqs. 8 and 9 and calculating the derivative gives: Before applying the condition of balancing the two forces, some dimensional analysis is necessary, which reveals that F gr (unit: newton) gives the force acting on a single molecule, whereas F td (unit: newton per mole) is the force acting on one mole of molecules. Therefore, the Avogadro constant (N A = 6.02 × 10 23 mol −1 ) needs to be included in one of the forms. Considering all these, the balanced equation becomes: When the definition of molar mass (M = N A m) is introduced in this formula, it is clear that Eq. 4 is derived here by an independent line of thought and the end result of these considerations will also be Eq. 1.

A method based on statistical thermodynamics
Statistical thermodynamics has an important formula for the energy distribution of particles, which is called the Boltzmann distribution [11]. It states that in any molecular system in thermal equilibrium, the following equation will hold for the number of particles in a state with energy ε (n ε ) and the number of particles in the ground state (n 0 ): Here, T is the absolute temperature, whereas k is the Boltzmann constant (k = R/N A = 1.38 × 10 −23 J K −1 ). Thermal equilibrium means that the temperature is the same everywhere, i.e., it does not have a gradient. In this case, the difference between the energies of particles at different altitudes comes only from the potential energy, which can be calculated for a molecule in a simple manner: In an ideal gas at a constant temperature, the ratio of n ε and n 0 is exactly the same as the ratio of pressures: Substituting Eqs. 13 and 14 into Eq. 12 gives the following expression: This is, again, identical to Eq. 1 as m = M/N A and k = R/N A .

General thoughts
It is well known from experience that the temperature of air changes with altitude. So, when a more realistic barometric formula is sought, this fact must be somehow taken into account. The first thing to note is that the considerations based on statistical mechanics must be abandoned entirely in this case, as their underlying principle is the concept of thermal equilibrium. On the other hand, the mechanical way of thought does not need any adjustment, so Eq. 4 is still valid, the only difference being that temperature T becomes a function (12) of altitude h in it, which means that the simple solution in Eq. 5 cannot be used any more. The mixed thermodynamical-mechanical thinking is not beyond help, but this will be discussed in a separate subsection. There are two strategies to deal with the problem of temperature change: the first is to simply measure it and substitute the empirical temperature dependence into Eq. 4. This method is probably intellectually less satisfying than the alternative that will be presented in much detail as using the observed dependence does not even attempt to explain the findings. The second strategy is to look for a way of thought which either gives the altitude dependence of temperature directly or connects the altitude dependence of temperature and pressure.
As a first approach, one should think about the fact that the temperature differences with altitude in the atmosphere are sustained despite the fact that heat conduction would tend to equalize them. Although the temperature of air does change even at a given altitude, this is quite slow compared to the usual rate of heat conduction and is primarily caused by changes in the irradiation (day and night cycles, for example). So, it is a good starting point to think that constant temperature at a given altitude is maintained despite the fact that heat conduction occurs vertically. In short, a transport equation is needed here. The formulas describing heat transport are fully analogous with Fick's first and second laws (which describe the transport of matter). In physics, the direct analog of Fick's first law is called Fourier's law, whereas the direct analog of Fick's second law [11] is called the heat equation. The latter is important for our purposes here. In one dimension, it is stated as: The proportionality factor κ (Greek letter kappa) in this equation is called thermal conductivity, and c w is the specific heat. From the kinetic-molecular theory of gases, κ can be given for an ideal gas as follows [11]: The previously undefined quantities in this equation are ν (Greek letter nu), which is one half of the number of degrees of freedom for the molecule (dimensionless) and the diameter d of the molecule. This formula implies that the thermal conductivity of air will also change with altitude if the temperature changes. However, the only significant information used from Eq. 17 is the fact that κ is never zero.
As discussed previously, a convenient starting point of thinking is that the temperature of air at a given altitude does not change in time even though thermal conduction occurs. Mathematically, this is expressed by: Therefore, the right side of Eq. 16 must also be zero. κ is never zero (although altitude-dependent), c w and ρ are also positive, so the second partial derivative with respect to altitude should be zero at all points: This is only possible if the first partial derivative is constant. This quantity will be denoted α (Greek letter alpha) and called the thermal gradient of the atmosphere (unit: kelvin per meter). It is known that temperature decreases with altitude, so because of our usual human preference for positive numbers, α is defined as: Integrating Eq. 20 with the introduction of T 0 (the temperature at sea level) and T(h) (temperature at altitude h) gives: The essence of this equation is that the atmosphere can only be in a stationary state if the temperature decreases linearly with altitude (or isothermal, which means α = 0). This is in quite nice agreement with the experimental observations for the lower atmosphere. A notable property of Eq. 21 is that, taken literally, it would allow a limitless decrease in temperature. Of course, negative temperatures do not make sense on the absolute scale, so the use of this formula will only be reasonable until a limiting altitude. In fact, a deeper analysis of heat conduction reveals that it is necessary to assume both an upper and lower boundary. The lower boundary is obvious: it is the surface of Earth, whereas the upper boundary is less self-explanatory. Whatever it might be, its altitude must not be higher than T 0 /α, and the independence of the temperature of time in the whole atmosphere (i.e., the stationary state) is caused by the fact that the amount of heat entering through the lower boundary is the same as the one escaping through the upper boundary.
At this point, it should be pointed out that the picture sketched thus far for interpreting the atmospheric temperature profile is highly incomplete. The heat equation shown in Eq. 16 does not include the so-called source term, which means that it is assumed that heat is not produced within the atmosphere. In fact, this occurs because of the absorption of sunlight. Furthermore, heat loss also occurs through thermal radiation, which is also excluded from the considerations. In the following sections, theoretical considerations will be presented to interpret the value of the thermal gradient α based on thermodynamic thinking alone. These will be compared with the actual findings in later sections.
Instead of attempting to determine the value of α in a theoretical manner, Eq. 21 is first substituted back into Eq. 4, which has already been shown to be valid no matter what the temperature changes are. The result is: So, this line of thought decouples the problems of temperature and pressure changes. Equation 22 is still a wellbehaved, separable differential equation, which can be solved routinely: is an improved barometric formula, as it incorporates the temperature change as well.
Now, attention can be turned to finding theoretical estimates of the thermal gradient of the atmosphere.

Simple conservation of energy
Possibly the simplest approach is to include the potential energy in the gravity field as part of the overall energy of the molecule. The average internal energy of a single molecule of a perfect gas at temperature T is νkT, and the common convention is that sea level is the zero point of potential energy. At higher altitude, the internal energy of the molecule is partially transformed into potential energy. Therefore, the internal energy and, consequently, the temperature are smaller than at sea level. Conservation of energy sets the following equation: After multiplying by the Avogadro constant and some additional rearrangements, this yields a straightforward expression for T(h): Equation 25 is in full agreement with Eq. 21. The theoretically obtained temperature gradient is: This would give an estimate of 0.0137 K m −1 = 13.7 K km −1 for the temperature gradient. The experimental value (as discussed later) is 0.00649 K m −1 = 6.49 K km −1 for the lowest 10 km of the atmosphere.

Reversible adiabatic expansion of an ideal gas
In the explanations following Eq. 21, it was already mentioned that the model predicting a linear change in the temperature as a function of elevation was based on the stationary state of the heat equation, which implies that the same amount of heat enters and escapes the atmosphere at different places. So altogether, the heat exchange with the environment is zero (of course, radiation absorption and emission are still neglected in this model, and the possible role of water evaporation and condensation is also excluded). In this model, the decrease in temperature with increasing altitude may easily be attributed to the adiabatic expansion of an ideal gas. As the pressure and temperature change continuously and the whole atmosphere is in a stationary state, the expansion may also be assumed to be reversible. The law governing the reversible adiabatic expansion of a gas is well known from thermodynamics [11]: The new quantity γ (Greek letter gamma) is the ratio of the two molar heat capacities (measured at constant pressure and constant volume) of an ideal gas: One can obtain another equation from the ideal gas law: Comparing Eqs. 27 and 29 makes it possible to eliminate the volume from the calculations: This is now an equation that connects the pressure change with the temperature change instead of giving the altitude dependence of the temperature change directly. So now Eqs. 4 and 30 together form a system of two simultaneous equations with two unknown functions. Calculating the derivative of Eq. 30 with respect to altitude h gives: It is now advantageous to substitute Eqs. 4 and 28 into the above formula: This formula is still in full agreement with Eqs. 20 and 21, but gives a theoretical estimate for the temperature gradient of the atmosphere that is slightly different from Eq. 26: The numerical value is α = 0.00978 K m −1 = 9.78 K km −1 from this equation.

Salvaging the mixed thermodynamical-mechanical thinking
At this point it should be noted that all the considerations with altitude-dependent temperature have been based on the mechanical approach to the problem thus far. Since we consider air to be a single ideal gas, the chemical potential is the same as the molar Gibbs energy (G m ), and it depends on both temperature and pressure. The thermodynamic force would then be given as: The three question marks at the end of this equation mean that it will be shown to be incorrect later. The first term can be simplified by using the equation that the partial derivative of the Gibbs function with respect to pressure is the volume of the system [11]: The second term in Eq. 34 is the partial derivative of the Gibbs function with respect to temperature, which is the entropy [11]: So, the equation giving the thermodynamic force would take the following form now: The three question marks again mean that this equation will be shown to be incorrect.
Here lies a conundrum: if this force is taken to balance gravity analogously to Eq. 11, the following formula is obtained (the derivative of temperature with respect to temperature was already denoted α): , which was based on the mechanical line of thought, was already declared to be valid even in the presence of a temperature gradient. The third law of thermodynamics guarantees that the molar entropy S m is always positive (side note: the reversible adiabatic expansion is isentropic, so S m would be independent of the altitude under the scenario outlined in the previous subsection). So the only way to bring Eqs. 4 and 38 into agreement is to say that α = 0, so the case is isothermal. But this scenario was already dealt with in Sect. 2.2. How can this contradiction be avoided? It would take a large detour into the kingdom of nonequilibrium thermodynamics to resolve this contradiction. A consistent view on the nature and calculation of thermodynamic forces was a significant part of the scientific work for which Norwegian-born American physical chemist and theoretical physicist Lars Onsager  was awarded the Nobel Prize in Chemistry in 1968 [17]. Without going into the details, it turned out that Eq. 34 has two problems. First, the gradient of chemical potential is not the only source of thermodynamic force under non-isothermal conditions. Second, the ultimate origin of the thermodynamic force is not the change in chemical potential (μ) or temperature (T), but the change in the ratio of the chemical potential and temperature (μ/T) and inverse temperature (1/T). Therefore, the correct formula that gives the thermodynamic force is this: Here, H m is the molar enthalpy of the system. It is easily seen that the above equation is identical to Eq. 7 under constant temperature as the second term is zero and the temperature can be moved out of the differentiation in the first term. Similarly to Eq. 35, we can first replace μ by G m , then expand the derivative considering the pressure dependence and temperature dependence separately and also substitute d(1/T) = − dT/T 2 : The first term can be simplified by using the equation that the partial derivative of the Gibbs function with respect to pressure is the volume of the system and then substituting the ideal gas law: The second term in Eq. 40 will require the derivative of (G m /T) with respect to temperature, which is just the essence of the Gibbs-Helmholtz equation [11,[18][19][20][21]: The equation giving the thermodynamic force takes the following form now: So, with much effort, the formula already given in Eq. 10 was obtained, but now under non-isothermal conditions. Therefore, Eq. 4 follows from the thermodynamical-mechanical way of thinking under non-isothermal conditions as well.

A more refined view of gravity
Thus far, gravity was only handled through a single gravitational acceleration, either in the form of force (mg) or potential energy (mgh). The law of gravity, however, requires a different sort of dependence: gravitational acceleration depends on the altitude as the gravitational force acting upon an object is smaller when it is farther away from the center of Earth. Given for the force acting on mass m at altitude h, the force exerted by gravity takes the following form: Here, γ gr is the gravitational constant (γ gr = 6.67 × 10 −11 kg −1 m 3 s −2 ), m E is the mass of the Earth (m E = 5.97 × 10 24 kg), and R E is the radius of the Earth (R E = 6.37 × 10 6 m). Instead of using all these parameters, it is better to define g 0 as the gravitational acceleration at the surface of the Earth (g 0 = γ gr m E /R E 2 = 9.81 m s −2 ) and give g as a function of h: The potential energy also takes a more complicated form: Some comments on this equation may be interesting, although they may not be directly relevant to the barometric formula. When h tends to infinity in Eq. 46, E gr (h) will tend to the finite limit of mg 0 R E . This is the energy needed for a gas molecule of mass m to escape the gravity of Earth. Calculations for the smallest of all gas particles, the hydrogen molecule (m = 3.32 × 10 −27 kg), give 2.07 × 10 −19 J for this limit. The average kinetic energy of the hydrogen molecule at 300 K (which is not very far from the usual surface temperature on the Earth) is 1.5kT = 6.21 × 10 −21 J, which is more than an order of magnitude lower than the limit. What is remarkable here is that a very common explanation of the low concentration of hydrogen and helium in the atmosphere is that these gases escape to outer space. Yet, at the surface of the Earth, they certainly do not have enough energy to do so (in other words, the average speed of their molecules is well below the escape velocity at sea level). It should also be noted that any possible gas escape is also limited by the mean free path, i.e., the average distance a molecule can travel between two collisions, which is less than 100 nm at the surface of the Earth. More will be said about this issue at the end of Sect. 6. Following in the footsteps of isothermal thinking, Eq. 45 can be simply substituted into mechanics-based Eq. 4 to yield: The solution of this separable ordinary differential equation is: This formula can also be derived by statistical thermodynamics using Eq. 46 as the potential energy.
The equation expressing the conservation of energy is now stated by a modification of Eq. 24 with the updated potential energy given in Eq. 46: The temperature as a function of altitude can be given after a straightforward rearrangement: It should be noted that this formula predicts non-linear change, which is a contradiction to Eq. 21 that awaits some explanation.
Setting T = 0 in Eq. 49 makes it possible to find the maximum altitude a molecule can achieve, h max : For air at 288.15 K, a numerical value would be h max = 22 km. Now, everything is ready to set up a new differential equation incorporating both the temperature change and the refined view of gravity; this can be done by substituting Eq. 50 into Eq. 47: This equation can be stated in a somewhat more orderly form after some rearrangements: This differential equation might seem frightening, but it is still a separable one. Therefore, routine calculations yield a full solution: Similarly to a previous line of thought, it is also possible to substitute the reversible adiabatic formula of Eq. 30 and the refined view of gravity in Eq. 45 into the mechanics-based Eq. 4: This is again a separable differential equation, the solution of which is: The dependence of temperature on altitude is then given as: Finally, the highest altitude that makes sense in this model is: A numerical estimate here would be h max = 30 km.
Equation 57 again displays non-linear dependence, which-similarly to Eq. 50-contradicts Eq. 21. Now it is time to think more deeply about this fact. The equations developed for the altitude dependence of temperature after introducing the more refined view of gravity all predict nonlinear formulas. In the case of Eq. 50, the mechanics-based differential equation given was not even used in the derivation, so modifying in Eq. 4 would not help the problem. The starting point of deducing a linear temperature dependence was the heat equation in Eq. 16. This assumes that the only driving force of heat transfer is the temperature gradient. The discrepancies imply that a gradient in gravitational acceleration is also a driving force of heat transfer, an effect that is not reflected by the usual heat equation. This would not be surprising in non-equilibrium thermodynamics at all. Actually, a very similar sequence of thought was already used: the temperature gradient had to be considered an additional driving force of matter transfer when the thermodynamicalmechanical thinking was salvaged.

Comparison with observations
In science, any theory should be compared to experimental observations to prove its usefulness. In the case of atmospheric pressure and barometric formulas, this comparison is somewhat hindered by the fact that pressure and temperature depend on the meteorological conditions according to the time of the day and year. However, pressure altimeter calibrations, aircraft performance calculations, rocket design, ballistic tables, meteorological diagrams, and other atmospheric modelling studies all require at least some sort of average values of pressures and temperatures as a function of altitude. For this purpose, the US standard atmosphere was developed in 1976, which gives an idealized, steady-state representation of mean annual conditions at mid-latitude from sea level up to 1000 km and is entirely empirical [22,23]. The temperature at sea level is taken as T 0 = 288.15 K (15 °C), the pressure at sea level is p 0 = 101,325 Pa, and the atmospheric gases are assumed to obey the ideal gas law. In the forthcoming section, the barometric formulas developed in earlier sections will be compared to the US standard atmosphere, which is shown in Fig. 2. It should be pointed out that the US standard atmosphere is still a model: the real atmospheric temperature and pressure profiles show obvious daily and seasonal variations and are also somewhat dependent on the geographical location.
In terms of temperature, the first 11 km is like a theorist's dream. It is in fact a linear decrease, in agreement with Eq. 21, with α = 0.00649 K m −1 = 6.49 K km −1 (which is often quoted as 1 °C decrease for each 150 m of increase in elevation). Equation 26 gives the estimate α = 0.0137 K m −1 = 13.7 K km −1 , which is about double the observed value, whereas Eq. 32 shoots significantly closer with α = 0.00978 K m −1 = 9.78 K km −1 . This suggests that the adiabatic expansion scenario may be closer to reality than simple conservation of energy. However, the rest of the temperature curve seems close to hopeless from the point of view of simple quantitative interpretation. There is a constant temperature part (about 215 K) from 11 to 20 km. It should be noted that real atmospheric conditions seldom show such an extended isothermal region, and this is one of the simplifications of the US standard atmosphere. This region is followed by an increase (often called temperature inversion) up to almost 0 °C at an altitude of 50 km, then a sharp drop to reach a minimum of 185 K at 90 km and finally a gradual increase until the temperature stabilizes at 1000 K above 300 km. In the theoretical considerations presented in earlier sections, there was nothing that made an increase of temperature with increasing elevation possible. Qualitatively, it is easy to understand that the phenomenon is caused by the effects of radiation [13]. For example, it is quite common knowledge that Fig. 2 Temperature and pressure at different altitudes in the atmosphere. Solid blue (temperature) and black (pressure) lines are those given in the US standard atmosphere [18,19]. Other curves are labelled by a letter, the meaning of which is given in Table 1. As explained in the text, curve G was calculated using Eq. 23 with the real value of α (0.00649 K m −1 = 6.49 K km −1 ). ISS: location of the International Space Station the ozone layer, most of which is between 15 and 35 km, absorbs most of the ultraviolet radiation of the Sun, which is converted to heat in the process [10,15]. This causes the temperature increase in that region. Both absorption and emission of electromagnetic radiation also occur simultaneously in all parts of the atmosphere, and these processes have a very important influence on the temperature profile. Within the lower 10 km of air, the radiative heat source is not very large because essentially all absorbable radiation is stopped by the upper layers [13]. However, solar heating of the surface and condensation of water vapor (cloud formation) still could influence the temperature there.
The pressure behaves in a much more predictable manner in Fig. 2: at least it decreases monotonically with increasing altitude. Actually, six different formulas were derived in the earlier sections to interpret this dependence; these are collected in Table 1 for easy reference, and are labelled A-F. Four of them (C-F) came with a limitation of altitude (h max ); these can be calculated as T 0 /α for C and E, whereas Eqs. 51 and 58 are used for cases D and F. It is now worth computing these limits numerically; they are 21, 29, 22, and 30 km for C, D, E, and F, respectively. Figure 2 shows that theoretical curve pairs A-B, C-D, and E-F are almost identical, which implies that considering the change in gravitational acceleration is unnecessary in the validity range of these formulas. Curves C and D give the poorest agreement with observations. This is not surprising as the thermal gradient of the atmosphere was overestimated by a factor of 2 by the sequence of thought based on the conservation of energy. Curves A and B (isothermal) consistently overestimate the pressure, whereas curves E and F (adiabatic) underestimate it by approximately the same amount. It was already stated that curves C-F have a theoretical upper limit on their validity (h max ). No such thing exists for curves A and B. Nevertheless, they become practically useless above 30 km. Unsurprisingly, the best way to describe the observed data is using Eq. 23 with the real value of α (0.00649 K m −1 = 6.49 K km −1 ). This is also shown in Fig. 2 by curve G. The curve underestimates the real pressure somewhat, but the deviation never exceeds 5% at altitudes lower than 15 km. That means this formula is very useful for the commercial airline industry or human hiking. At 30 km, the formula gives only one fourth of the actual pressure (the theoretical validity limit is h max = 44 km in this case).
It should be noted that the primary reason for the general failure of the forms displayed in Table 1 above 20 km is the inability to account for the variation in temperature. However, this is irrelevant for the differential form shown in Eq. 47, which can be tested independently. In the US standard atmosphere, it is possible to determine the observed pressure gradient at each altitude, which is denoted π (Greek letter pi): The validity check of Eq. 47 uses these pressure gradients directly through calculating the relative difference, Δ (Greek uppercase letter delta) between the observed gradient and the right-hand side of Eq. 47: Figure 3 displays Δ as a function of altitude h. It can be seen that the deviations are really minor below 60 km, and these are most likely caused by the error of the numerical differentiation necessary in calculating π from data of the US (59) (h) = dp observed dh (60)

Fig. 3
Altitude dependence of the relative difference between the observed pressure gradient and that calculated by Eq. 4. The definition of Δ is given in Eq. 59 standard atmosphere. However, major differences (up to a multiplying factor of 6) occur above this. These cannot be caused by the imprecision of the temperature as the calculations use those given in the standard US atmosphere itself. Also, the derivation of Eq. 47 relies on a simple mechanical sequence of thought; there is no known source of conceptual error in it.
However, at this point, it should be remembered that air is not a single ideal gas but a mixture of different gases. Quantities h, p, T, and π are observed data. R E , g 0 , and R are natural constants. With this knowledge, it is possible to rearrange Eq. 47 so that the only remaining quantity, the molar mass, is expressed: Figure 4 displays the values of M as a function of altitude h. In the beginning, M = 29 g/mol is in perfect agreement with the known composition of air. At 1000 km, however, M = 4 g/mol is identical to the molar mass of helium. This clearly hints that the composition of air changes drastically with altitude. In fact, this is in full agreement with observations: at 1000 km, with an overall pressure of 7.5 nPa, more than 90 mol% of the atmosphere is helium gas. Therefore, the closing section of this article will deal with altitudedependent composition changes.

Composition changes in the atmosphere
For most practical purposes, mixtures of ideal gases behave like a single ideal gas. Thus far, we have assumed that the fact that air is a mixture of gases is sufficiently taken into account by using the average molar mass. Yet, it is a well-known observation that the relative abundance of a lighter gas increases with altitude.
As a first approach, we might remark that if the use of Eq. 4 is attempted separately for the components of a mixture, the pressure of those with lower molar masses decreases with increasing altitude less as the relative pressure gradient is smaller. However, the mechanical thinking that yielded Eqs. 4 or 47 is not easily extended in this case: the weight of the air column has the same pressure contribution irrespective of the composition of the gas below. Only the overall weight matters and it is not possible to divide this into contributions for mixtures of gases. Yet, it may seem rather obvious that the pressure increase balancing the weight must be distributed between the components in the proportion that they cause the overall pressure. For a component X with a partial pressure of p X , the following equation is obtained in this way: Substituting this back into Eq. 47 gives: Here, it must be strongly emphasized that M is the average molar mass of the mixture, and not the molar mass of X. Using this equation for two different components, X and Y, and considering p X as function of p Y rather than h yields the following, very simple differential equation: This differential equation has the unexpected consequence that the ratio of the two partial pressures does not change with altitude, which means that the composition would not change, either. Based on the mixed thermodynamical-mechanical thinking, the forces acting upon a single molecule were taken into account. The chemical potential of an ideal gas in an ideal mixture (μ X ) is given as [11]: Here, μ X * is the chemical potential in the standard state and p° is the standard pressure (10 5 Pa by convention). As μ X * is usually taken to be identical to μ X° (see Eq. 8), μ X is identical to the chemical potential of a pure sample of X gas at the pressure p X . In other words, the chemical potential of an ideal gas does not depend on what other ideal gases are present in a mixture. So, Eqs. 39-43 can be used for the components of a mixture directly: the only modification needed is to use partial pressures and the molar masses of the individual components: (62) dp X dh = p X p dp dh Most unfortunately, this formula contradicts the one in Eq. 63, which was the result of the mechanical way of thinking. On a conceptual level, Eq. 66 implies that the increase in the pressure of component X balances in its own weight only.
Both Eqs. 63 and 66 have potential problems. As already remarked, the implication in Eq. 63 is that the total pressure increase balancing the weight of a layer with a thickness of dh is distributed between the components in the proportion that they cause the overall pressure. This seems logical but in fact not required by mechanics. The potential problem with the derivation of Eq. 66 is even less obvious: it is the use of Eq. 65 for obtaining the chemical potentials, which is valid for an ideal mixture of ideal gases. As pointed out by Robinson [24], the constant μ X * is the chemical potential of component X in a mixture of such total pressure p that p X is 10 5 Pa, and this (often hypothetical) mixture has the same composition and temperature as the one for which the chemical potential is calculated. This cannot be equated, without further argument, to the standard chemical potential of the pure component X (μ X°) . This is especially problematic for the minor components of a mixture.
For example, the partial pressure of He in air at sea level pressure is about 0.5 Pa. So, in this case, μ He * would be the chemical potential of helium at the partial pressure 10 5 Pa in the presence of other gases so that the total pressure is 20 GPa, which clearly lies outside the usual validity range of ideal gas behavior.
The contradiction between Eqs. 63 and 66 does not submit itself to an easy resolution. When problems like this arise, it is a standard strategy to turn to experimental data. Fortunately, the composition of air as a function of altitude is readily available from some public databases: NRLM-SISE-00 will be used here [25,26] (side note: this database generates data that takes both the geographic location and the exact time into account). Figure 5 shows a typical composition-altitude diagram for those components that are handled within the NRLM-SIS-00 model. These are N 2 , O 2 , Ar, and He as well as the somewhat less expected species of O, N, and H (atoms!). Even the identity of the species in this list indicates that gravity is most likely not the dominant force shaping the altitude dependence of the composition of the atmosphere. Photochemical processes are very important in the region above 100 km; this is nicely illustrated by the fact that atomic oxygen is the most important gas in the atmosphere between 200 and 600 km. Yet, the usefulness of the barometric formula(s) can certainly be tested on the unreactive gases helium and argon, and the partial pressures of molecular oxygen and nitrogen are also worth testing.
This test can be done very similarly to that already outlined in Eqs. 59 and 61. First, the gradient of the partial pressure of component X is calculated by numerical differentiation of the data obtained from the NRLMSIS-00 model [26]: Then this quantity is used to calculate the gradient-equivalent molar mass η X (Greek letter eta):

Fig. 5
Partial pressures and molar concentrations of selected atmospheric gases at different altitudes. NRLMSISE-00 model input parameters [22]: year = 2000, month = 1, day = 1, hour = 12.00, Time_ type = Universal, Coordinate_type = Geographic, latitude = 55.00, longitude = 45.00, height = 100.00 Fig. 6 Calculated η X values of selected atmospheric gases as a function of altitude If Eq. 63 is valid, then η X should be equal to the average molar mass of the mixture and should not depend on which gas is used in the calculation. On the other hand, if Eq. 66 is valid, then η X should be identical to the molar mass for each of the components. The calculated η X values are shown as a function of altitude for argon, molecular oxygen, molecular nitrogen, and helium in Fig. 6. The emerging picture may be unexpected at first sight. The η X values below 100 km are, indeed, independent of the identity of the gas and agree very well with the average molar mass of air (29 g/mol), which shows that Eq. 63 is valid in this region. The pattern of change seems complex between 100 and 200 km. Above 200 km, however, full adherence to Eq. 66 is evident as η X values are equal to the individual molar masses of the components.
It is also notable that some of the η X values are negative for helium in the intermediate region between 100 and 200 km. This arises from the fact that there is a minor increase in the partial pressure of helium in this region. It must be noted that the source of the anomaly is the steep increase in temperature in this region (Fig. 2): the molar concentrations of helium (magenta curve in Fig. 5) actually never increase with an increase in altitude.
It is worth returning to the issue of the escape of atmospheric gases to space at this point. As seen from Fig. 5, the second most abundant component of the atmosphere is the hydrogen atom (H) at 1000 km, closely followed by the oxygen atom (O). For the hydrogen atom (m = 1.66 × 10 −27 kg) at this altitude, the energy necessary to escape the gravity of Earth can still be calculated from Eq. 46 by the difference E gr (h → ∞) − E gr (h = 1000 km) = 8.97 × 10 −20 J. The average kinetic energy of the hydrogen atom at 1000 K (the temperature at altitude 1000 km in the US standard atmosphere) is 1.5kT = 2.07 × 10 −20 J. This is still more than a factor of 4 lower than the escape limit. However, from the kinetic molecular theory of gases, it must also be remembered that the velocities are described by the Maxwell-Boltzmann distribution [11], so values much larger than the average are possible. Calculating the numerical values shows that about 0.5% of hydrogen atoms have speeds larger than the escape velocity. Also, it must be remembered that temperatures may show large variations (e.g., between day and night) at this high altitude.

Conclusion
Through the example of the barometric formula, the derivations included in this text show that there are multiple different theoretical ways to arrive at the same result. It is also illustrated how refinement of scientific ideas by considering additional factors may lead to improved conceptual understanding of natural phenomena. However, as this example also shows, the improvement does not necessarily yield a spectacularly better numerical agreement between theoretical predictions and observed data. For barometric formulas, the main reason for the deviations from measured data is that the vertical temperature change within the atmosphere is difficult to describe by simple theories. The reason for this difficulty is recognized: radiative effects are also very important in maintaining the temperature profile, but they cannot be described with formulas as simple as the barometric equations. A standard scientific strategy to handle this problem is to use the hard-to-predict variable (in this case, temperature) as an external parameter, whose value is taken directly from observations rather than obtained from the model. With this method, it could be proven that the differential form of the barometric formula is valid for the atmosphere of the Earth for the entire studied region between sea level and 1000 km of altitude.