If you like the smell of air during and after the rain, thank chemistry. This unmistakable smell is the result of the formation of chemicals following the contact of rainwater with the earth.
Soil bacteria called Streptomyces begin to remove geosmin molecules. When the water drops reach the ground, the drops merge with the air bubbles containing geosmin. Bubbles react with the droplets and form natural “aerosols”, that is, small particles that spill into the air. As soon as the geosmines rise from the ground into the air we will feel the typical fresh and pleasant smell.
Another reason for the formation of the smell is the presence of vegetable oils. Richard Thomas and Isabel Bear have come to the conclusion that some of the plants produce oil during drought. When it rains, these oils escape into the air in the same way as geosmines.
Sometimes after a storm the smell can be especially intense and fresh, and for this you can thank the ozone. Lightning scatters nitrogen and oxygen, and the resultant nitrogen oxide produces ozone.
So, even if the air smells fresh, there is nothing romantic in the causes at all. Who would have thought that we actually loved the smell of bacteria and lightning?