Gravity Shock Waves and Stratification in the Upper Atmosphere