It’s not the rain itself that you smell, but just about everything else. Almost everything smells a little stronger when it’s about to rain.
Stormy weather is usually preceded by a drop in atmospheric pressure, or what the TV weather people like to call “barometric pressure.” (Is that what you feel when you’re struck by a falling barometer?) That is, before it rains the pressure exerted by the air drops, and it presses down less heavily on the countryside.
Meanwhile, all the trees, grass, flowers, crops and, yes, even livestock are emitting their characteristic odors. Odors are tiny amounts of vapors emitted by substances, and we smell them when the vapor molecules happen to migrate through the air to our noses. When the air pressure is low and isn’t pressing down so hard, it allows more of these vapors to escape into the air, and everything smells a little bit stronger.
Also, when the rain-bearing low-pressure front moves in, it is accompanied by a wind that carries along distant smells that are not ordinarily detected.
Of course, a farmer gets to be pretty good at reading weather clues, so he might be cheating a bit by consulting the sky, the winds, and even his arthritis.
By the way, doctors used to believe that people with arthritic joints could feel rain coming on because there are tiny gas bubbles in the joints, and when the air pressure decreases, those bubbles expand and cause internal joint pressure.
Nice theory, but I understand that it’s no longer in vogue.