The smell of earth after rain
is called Petrichor, and it is caused by Geosmin.
Geosmin is an organic compound with the formula C12H22O. It’s produced by several classes of microbes, including cyanobacteria (blue-green algae) and actinobacteria (especially Streptomyces), and released when these microbes die. The human nose is extremely sensitive to geosmin and is able to detect it at concentrations as low as 5 parts per trillion.