Q: What’s that smell in the air (some people like it, others don't) right before it rains? I’ve lived all over the country and there’s no variation … when you smell it, you know rain is on its way.
A: The smell is called petrichor, the scent of rain falling on dry earth. It’s caused by a couple of compounds in the soil, one of them known as geosmin, “earth-smell,” a term I found wonderfully Tolkienesque. (O geosmin! O earth-smell! A Elbereth Gilthoniel!) However, the Straight Dope copy desk recoiled, noting that any such reading would necessitate a vulgar conjunction of Elvish, pseudo-Anglo-Saxon, and Greek. We’ll therefore refrain from literary commentary and proceed in strict accord with science.
The human nose, not normally considered a particularly acute instrument, is extraordinarily sensitive to geosmin; we can detect it at a level of just ten parts in a trillion. Today this is mostly an annoyance, since in our supercilious age many prefer the fragrance of machine oil and ozone to the sweet smell of the planet. But I’ll venture to suggest it was important in an era long past.
Geosmin is produced by several types of bacteria and algae, which manufacture a volatile compound that can be kicked up when soil is disturbed, such as by gardening, plowing, or a hard rain. When a storm threatens and a few molecules of geosmin waft your way, that signifies rain is falling to windward, and in the fullness of time will fall on you.
Because we’re so attuned to it, a little geosmin goes a long way, and a lot can be decidedly unpleasant. Geosmin and another fragrant soil-borne compound, 2-methylisoborneol or 2-MIB, can make wine taste earthy, water yucky, and fish foul. (Catfish are especially susceptible.) The scent of geosmin may tell farmers their soil is healthy, but this is one area where a lot of non-farmers would be content to leave their ignorance intact.
Info on this video here.