Ozone is formed when heat and sunlight cause chemical reactions between oxides of nitrogen (NOX ) and Volatile Organic Compounds (VOC), which are also known as Hydrocarbons. This reaction can occur both near the ground and high in the atmosphere. The decrease in temperature with height is due to the decrease in solar heating from the stratosphere. Just below the mesopause the temperature is the coldest on Earth. The reason for this temperature fluctuation is that ozone absorbs the uvb radiation in the lower atmosphere. Higher in the atmosphere, however, normal diatomic oxygen absorbs the uvc radiation. Once it is absorbed, it is reradiated at different wavelengths, thereby warming the stratosphere.
Heat is produced in the process of the formation of Ozone and this heat is responsible for temperature increases from an average -60°F (-51°C) at tropopause to a maximum of about 5°F (-15°C) at the top of the stratosphere. This increase in temperature with height means warmer air is located above cooler air. The decrease in temperature with height is due to the decrease in solar heating from the stratosphere. Just below the mesopause the temperature is the coldest on Earth. Temperature decreases with altitude because the troposphere is warmed from below, through absorption and re-emission of incoming solar radiation by the Earth's surface, rather than being warmed from above by incoming solar radiation. In the troposphere, the temperature generally decreases with altitude. The reason is that the troposphere's gases absorb very little of the incoming solar radiation. Instead, the ground absorbs this radiation and then heats the tropospheric air by conduction and convection.Temperature within the mesosphere, temperature decreases with increasing height, due to decreasing absorption of solar radiation by the rarefied atmosphere and increasing cooling by CO2 radiative emission. The top of the mesosphere, called the mesopause, is the coldest part of Earth's atmosphere. The temperature increases in the stratosphere due to the ozone layer being there that captures radiation. The temperature decreases in the next layer, the mesosphere, because there is no ozone layer there for protection + the amount of air in this layer decreases. Ozone, an unusual type of oxygen molecule that is relatively abundant in the stratosphere, heats this layer as it absorbs energy from incoming ultraviolet radiation from the Sun. Temperatures rise as one move upward through the stratosphere. Stratospheric ozone is formed naturally through the interaction of solar ultraviolet (UV) radiation with molecular oxygen (O2). The "ozone layer," approximately 6 through 30 miles above the Earth's surface, reduces the amount of harmful UV radiation reaching the Earth's surface.