Most of the mass of the atmosphere is confined to the first 15 kilometers above sea level, yet the small amount above this level is responsible for filtering out the deadly high energy radiation from the sun which would otherwise destroy life. The interaction of the atmosphere with sunlight helps to maintain the earth's surface temperature above that of an airless planet, like the moon . The motion of the atmosphere that we observe around us is driven by the diurnal pattern of heating by the sun and cooling by radiation to outer space. An intimate part of this process is the evaporation of water from the earth's surface, the formation of clouds from this water at high elevations and its precipitation back to the surface. This distillation of ocean water, moved to land by winds, provides the sweet water that maintains terrestrial life.
Local weather provides a variety of wind motions.
Sometimes the wind speed is quite small, especially at night when radiative cooling stabilizes the atmosphere. But storms driven by precipitation of water vapor, such as thunderstorms and hurricanes, can have very high wind speeds. Cold air is more dense than warm air, so that a cold air mass tends to flow under a warm air mass, forming a cold front. Large scale weather patterns drift past our locality, bringing changes that are not greatly affected by local conditions. As we can see from watching the daily television weathercast, the main features of the weather pattern extend over many thousands of kilometers, a distance hundreds of times the atmospheric height.