# How can you calculate the atmospheric layers on another planet?

I'm working on a program that procedurally generates planets, and I'd like to make a realistic atmosphere with realistic pressures at different altitudes. I know that for earth we have 7 layers to our atmosphere, each with a different static pressure, standard temperature, temperature lapse rate and height, and I know the values on earth are as follows (from https://en.wikipedia.org/wiki/Barometric_formula):

[
{
name: "Troposphere",
staticPressure: 101325,
standardTemperature: 288.15,
temperatureLapseRate: -0.0065,
heightAtBottomOfLayer: 0
},
{
name: "Tropopause",
staticPressure: 22632.1,
standardTemperature: 216.65,
temperatureLapseRate: 0,
heightAtBottomOfLayer: 11000
},
{
name: "Stratosphere",
staticPressure: 5474.89,
standardTemperature: 216.65,
temperatureLapseRate: 0.001,
heightAtBottomOfLayer: 20000
},
{
name: "Stratopause",
staticPressure: 868.02,
standardTemperature: 228.65,
temperatureLapseRate: 0.0028,
heightAtBottomOfLayer: 32000
},
{
name: "Mesosphere",
staticPressure: 110.91,
standardTemperature: 270.65,
temperatureLapseRate: 0,
heightAtBottomOfLayer: 47000
},
{
name: "Mesopause",
staticPressure: 66.94,
standardTemperature: 270.65,
temperatureLapseRate: -0.0028,
heightAtBottomOfLayer: 51000
},
{
name: "Mesopause",
staticPressure: 3.96,
standardTemperature: 214.65,
temperatureLapseRate: -0.002,
heightAtBottomOfLayer: 71000
},
]


Is there a formula to derive these layers on another planet with a different atmosphere, gravitational acceleration and temperature?

The pressure at any given altitude can be derived from the surface pressure, the average molecular weight and the temperature. Look up "scale height" for more information.

I can't help you on identifying the layers, I wouldn't be surprised if not all worlds have exactly the same layers anyway.

The same procedure as the one for deriving the barometric equation could be followed. Most important is that you should know (if you are working on some knownw plants) some details of (the atmpsphere of) the planet, such as density (for pressure estimation/calculation), mass of the planet (for calculating the gravitational acceleration) and so on. Now the divisiton of Earth's atmosphere is based on the peculiar change of temperature along the vertical axis, in contrary that pressure changes are rather linear. Thus, one should know how the temperature changes over a planet to formulate the different atmospheric layers of the planet. This (most probably) non-linear behaviour is a function of multiple factors which should be measured and not assumed for real planets. But since you are trying to generate a program for planets produced by you, you can nicely assume such factors as mass of the planet and density of the atmosphere and so on. For realistic assumption you can look into these factors of the solar system planets for example. All in all, using the barometric equation is a good start after assumptions. The barometric equation and its thermodynamic variables are presented in Air Pressure in a Mine

• This doesn't seem to answer the question asked, it seems to just say "you should know these things for your program" Commented Jan 25, 2019 at 17:10
• As I had mentioned in the first sentence, the barometric equation is the way to calculate and divide the layers. Commented Jan 25, 2019 at 17:17
• Okay, so rather than the rest of the post where you say "you should know these for your program", you could make a more concerted effort to show how the barometric equation is used to obtain the values OP gives. Commented Jan 25, 2019 at 17:18
• I appreciate you taking the time to try and answer my question, but as I stated in my question, I already know the molar mass of the atmosphere (because I'm making up the atmospheric composition and it will be based off the atomic weights of the gasses) I'm making up the mass of the planet (more importantly i know the gravitational acceleration) and i already know the temperature as i'm making it up too. What I was asking, is given these variables, is there a way to calculate the pressure "zones" given different values for these variables.
– Mike
Commented Jan 25, 2019 at 23:59
• I should also state that in the few months since I've asked this question I've learned that earth's unique layers are largely based on the amount of water in the atmosphere, and that it may be very complicated to calculate this because it depends on how the various elements in the atmosphere interact with each other. For my purposes I've decided to just use a simple inaccurate linear pressure reduction function assuming a consistent molar mass (kinda like how depth pressure is calculated in the ocean), but I'm still curious if it's possible to do this calculation.
– Mike
Commented Jan 26, 2019 at 0:04