This is Berlin at night, and if you look at the horizon line, you'll notice that it's a gray-brown smudge of cloud instead of a line of ground. The lights from the city, and a heavy layer of smog, let us see the planetary boundary layer. It's why planes have a rough time flying low, and why we occasionally need spare the air days.

The main lower layer of the Earth's atmosphere is called the troposphere, and within that, extending like a sheet over the ground, is the planetary boundary layer. It gets its own name because, while the thickness of it varies with atmospheric conditions and temperature, it's the part of the atmosphere that directly interacts with the Earth. The layer is filled with particles of dust and water that are kicked up from the ground. The wind is more violent, because it gets pushed into eddies and vortexes by ground structures and topography. This is one of the reasons why planes can never safely fly close to the ground. It's too likely that a small burst of air will push them downward.

Most importantly, the temperature varies dramatically. Light can stream through air without much interacting with it. When it hits the ground, though, it gets absorbed and then re-radiated as heat. The planetary boundary layer is the part that most heats up during the day. It's also the part that cools down most during the night. This cooling radically cools the air close to it, leading to what's called a temperature inversion - a hot layer of air sitting just above the section of atmosphere that's being affected by the ground. The hot air above the planetary boundary layer acts like a cap, keeping the denser cooler air inside. It can lead to a dangerous build-up of pollution that has, on occasion, killed people. On the other hand, because the particulates of smog catch the light from cities, it lets us see clearly the planetary boundary layer, and the clear sky above it.