Origin And Evolution
When the terrestrial planets formed 4.6 billion years ago, they did so within the solar nebula (a giant disk of gas and dust). The solar nebula's rocky solids, ice, and nebulan gas aggregated into larger solid bodies over time, eventually becoming the four terrestrial planets. They grew by the accretion (formation by sweeping up smaller bodies) of planetesimals (smaller, pre-planet bodies); their atmospheres formed by heating, outgassing (releasing), and reprocessing volatiles (volatiles are substances that readily vaporize at relatively low temperature). The terrestrial planets probably obtained equal amounts of volatiles, water, carbon, and nitrogen from planetesimals located in the solar system or the asteroid belt. The cratering process and a high ultraviolet flux from the early Sun probably drove large amounts of light atmospheric gases into space. Once formed, the atmospheres have changed in oxidation, total mass, and gaseous amount, as the Sun and its intensity has changed.
The giant planets' atmospheres may have similar starting points to the terrestrials', but they did not evolve in the same manner over time, nor is much known about this transformation. Jupiter and Saturn grew with the addition of icy solids and the collapse of nebular gas around them. Uranus and Neptune grew too late to capture nebular gas so the icy dominates. Because these planets have no solid surfaces and strong gravitational fields, their atmosphere only resembles the terrestrial planets by having a complex atmospheric chemistry.
For all planets, the escape of some gases and the retention of others due to temperature and surface gravity played an important role in how their atmosphere's evolved. Distance from the Sun affected what could be retained. The transient heat and pressure generated during planetisimals' impacts drove chemical reactions between the volatile elements and the rock-forming minerals that determined the chemical composition of the gases released. Released gases did not always remain—some were lost to space because of the initial impact and the Sun's ultraviolet radiation.
Science EncyclopediaScience & Philosophy: Planck mass to PositPlanetary Atmospheres - Origin And Evolution, General Principles, The Terrestrial Planets, Atmospheric Circulation Patterns, The Giant Planets