# 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?