As extremes of nature go, the marked contrast in temperature of a desert during the day and at night is one of the most impressive. Searing heat can torture human occupants. After dark, the problem is reversed, and a winter jacket might prove useful. On average, temperatures in Africa's Sahara Desert can swing an astounding 75 degrees in 24 hours, rising to an average 100°F with the sun out and plummeting to 25°F after it sets. What causes this?
Blame the sand.
When the sun is out, sand proves to be an effective distributor of heat, reflecting it back into the air. But it’s not very good at retaining heat. Once the sun goes down, heat from the sand is released quickly.
The thing that could help retain warm air overnight is humidity, but deserts don’t have much of that. Water vapor in the air traps heat: Think of it like an insulating blanket, preventing either heat or cold from dispersing into the air. When the heat source is taken away, that vapor will retain it for long periods. Without sun or humidity, daytime heat isn’t being held anywhere, and the desert will cool rapidly.
Humidity is also why deserts can feel hotter than other places even though the temperature is the same. The water vapor needs lots of solar energy to heat up, while a dry climate takes that energy head-on.
All of this happens quickly because of that lack of humidity. Just as warm air escapes when night falls, there’s no humidity to trap the chilly evening weather. When the sun rises, it’s back to scorching.
Other factors can come into play. Clouds that help moderate temperature and wind can both help keep temperatures from dropping. But generally, you’ll roast in a desert and then freeze because the combination of sand and low humidity isn’t really suited for comfortable and consistent climates.
[h/t Live Science]