Twentieth-century writer Virginia Garland didn’t have a name for the smell of the rain, though she easily described its components: “Earth and rain—dust and desire—what mingled odor of these is not sweet?”

Long before Garland, people have been smelling, if not so eloquently describing, rain. The scent of rain is embedded in our psyche. Human senses evolved in ways that would offer protection, knowledge and even survival. Hearing became acute to detect predators, sight was quickened to detect both movement and food, and the sense of smell developed the ability to perceive even the subtlest odors. These odors could indicate the presence of danger, nourishment or even approaching rain.

Rain really does have a scent, and our ability to smell it might be a holdover from times when rain could mean survival. While necessary for agriculture and for nourishment, rain can also be quite destructive when accompanied by storms and lightning. Naturally, the ability to smell it coming became a huge adaptive advantage.

Our ability to smell rain so easily is impressive when you understand that we can detect the scent even if only five ppt (parts per trillion) of one of its causative compounds is present in the air. That amount is comparable to a teaspoon in 200 Olympic-sized swimming pools.

People often say that they can smell the “ozone” of an approaching rainstorm, but that’s not the most recent story that scientists have unearthed. The particular stinky compound that produces the unique smell of rain is called geosmin, and is actually created by soil-dwelling bacteria called actinomycetes. Scientists have also learned that geosmin is the responsible for the earthy taste of beets and the muddy taste of carp and catfish.

Geosmin is only one of the factors that create the smell we associate with rain. The others are the actual presence of humidity and/or rain, plant oils and atmospheric chemicals. The right combination of these produces that rainy scent, which even has its own name: petrichor.

Australian researchers coined the word petrichor in 1964. It is derived from the Greek root ‘petra,’ meaning stone, and ‘ichor,’ which describes the fluid that flows like blood in the veins of the gods. Since petrichor occurs when stone or dirt is pounded by liquid rain, its name certainly makes sense.

MIT scientists recently determined the mechanism of the emergence of petrichor. Using high-speed cameras, they observed that when rain (or even humidity) interacts with the dirt on the ground, tiny air bubbles are created and spring upward (like champagne) through the drop. These bubbles produce a fizz that launches airborne aerosols. These aerosols carry the scent of the oils, geosmin and other compounds on the ground — which could also, unfortunately, include viruses and bacteria — to our noses. Again, it is easy to see how being alerted to this situation is helpful for survival.

The smell of ozone, by contrast, can be confused with petrichor. Ozone is produced from lightning and electrical discharge in the atmosphere, and can occur before the rain arrives, giving us that sharp, acrid pre-rain smell. Petrichor is usually detected after a rainfall and has a more appealing aroma.

The severity of the rainfall also determines the strength of the rainy smell. Heavy rains produce less scent than lighter rains (possibly because they force the scent-carrying molecules down to the ground’s level), and the type of soil will also have an effect. Silica, iron oxides and metal silicates are exceptional in their ability to yield petrichor, so soils that contain these will be smellier after a rain shower. So will leafy green areas of forests, as any hiker will attest. And, interestingly enough, summer rains produce more scent than rains that fall during other seasons.

Since it has been quite dry here lately, there is a longing among many of us for the petrichor and the rain that accompanies it. Reverend John Richard Vernon understood this desire, explaining: “A true lover of rain . . . has a deep inner enjoyment of the rain, as rain, and his sense of its beauty drinks it in as thirstily as does the drinking earth. It refreshes and cools his heart and brain; he longs to go forth into the fields, to feel its steady stream, to scent its fragrance; to stand under some heavy-foliaged chestnut-tree, and hear the rushing music on the crowded leaves.”

Suzan Bellincampi is director of the Felix Neck Wildlife Sanctuary in Edgartown, and author of Martha’s Vineyard: A Field Guide to Island Nature.