jadelamlam said:
We all know that denser substance sink,while less dense substance float on the denser substance.
Thus,air with lower density should float on air with higher density.
That means hot air at higher altitude,cold air at lower altitude.
In fact,temperature decreases with increasing altitude,why?
Correction, temperature decreases with increasing atmosphere only in the troposphere. The troposphere is a layer of atmosphere that extends from the ground to the point at which the temperature does not change with height. The temperature of the troposphere decreases with height.
Most sunlight passes through the atmosphere without absorption. Very little sunlight directly heats the atmosphere.
Most of the sunlight that hits the ground is absorbed and turned into the internal energy of the ground. Therefore, sunlight directly heats the ground. Therefore, the ground is usually hotter than the atmosphere immediately above it.
The ground has a higher temperature than the troposphere. Thermal convection carries heat energy from the ground into the troposphere because of buoyancy, which you just mentioned.
There are some caveats to this explanation.
The troposphere does not extend forever. The point at which the temperature doesn't change with height is called the tropopause. Above this is the stratosphere. The stratosphere is defined as that layer of atmosphere where there is a locally defined temperature that increases with height. The stratosphere is being warmed more by the direct sunlight than the ground.
The troposphere varies in thickness all over the earth. The thickness of the troposphere at the equator is many miles. This is because the sunlight is hitting the ground directly. However, there is no troposphere at the poles. The sunlight "misses" the ground at the poles. At the poles, sunlight directly heating the atmosphere. So at the poles, the temperature increases from the ground up. At the poles, the stratosphere starts at the ground.
Even near the equator, there are certain weather conditions where the troposphere effectively disappears. There is a condition called the temperature inversion. The temperature inversion is the condition where the temperature of the ground is lower than the temperature of the atmosphere just above it.
The rule that you just stated is fully reliable at the equator during the day. At the equator during the day, the temperature decreases with height for a couple of miles upward. However, that rule becomes less reliable at night as one approaches the poles.