You ask (may God illuminate your pathway to the truth) what causes some places to get hardly any rain. If the cause for abundance of rain in some places were to be made plain to you (may God guide you aright), you might also appreciate (may God reveal to you all that is hidden) the cause for a prevailing lack of rain in other places, since it is in combination that contrarieties become known.
[...] All bodies undergo contraction when chilled, after which they need a smaller place than the one they occupied before their chilling. When heated, they undergo expansion, and need a larger place than the one they occupied before their heating. Therefore does air flow from a hot, expanded location toward one that is cold and contracted, and this flow is what we call the wind (for our usage gives the name of "wind" to the flow of air and "wave" to the flow of water). This explains why the wind is greatest when the sun's heat is shed along its southern inclination: expanded by that heat, air from the south flows north to where the air has been chilled by its remoteness from the sun.
When the sun is in its northern inclination it heats the areas to the north, and those in the south become chilled. The northern air then expands and flows in the direction of the south, due to the cold-induced contraction of the air there. For this reason, most summer winds are northerly winds, and most winter winds come from the south – except for winds which arise (in some cases all at once, in others little by little) from such sublunar factors as the course of rivers, the occurrence of floods, [and the influence of] stagnant waters, open meadows, the sun’s reflection on the tops of stony mountains, irrigation, agriculture, woods and wetlands. These factors (and others like them) contribute to the flow of vapor in different directions, which the various winds distribute according to the disposition of the earth’s territories (high places and low, caverns and open places), the influence of any fires burning therein, and so on.
The vapor made to flow across the face of the earth by the sun’s alternation between north and south was likened by ancient Greek sages to a freshwater sea of alternating tides, and they called it Okeanos, the earth-encircling sea.
When vapor ends up in a place whose distance from the sun’s path chills the air to the point that the vapor’s volume is reduced, the vapor becomes thick and dense and is converted into water by the air around it, which releases it in the form of rain upon the earth (along with any particles of earth taken up as earth-vapor). Meanwhile, these vapors crowd the air with their weight and set it moving, turning it into wind (which is the flow of air).
Vapor attains its maximum degree of density when it flows into caves or between mountains where its flow is hampered by the cold, or checked by an opposing flow of air, in the way that vapors have of being redirected by sublunar factors (as we have already described). But if vapor winds up in a location devoid of what reduces its volume and chills it, it spreads beyond that location until it encounters what we have defined as cold, condensing factors -- whether or not the land itself accumulates much standing water. For vapor is raised from the earth every day the sun casts it heat, and after it sets even more moisture may be released in the form of dew, having been attracted in the form of vapor that flows in from elsewhere, as happens daily in all forests.
As for those locations (be they in the south or elsewhere) whose moisture falls short, devoid as they are of any means of containing the vapor flowing into them from the south (due to the lack of high encircling mountains to the north) and furnished as they are with continual air currents (either by the influence of great quantities of moving water or the nearness of a body of water at its northern end), – locations in which the flow of vapor is diverted elsewhere due to some stronger flow prevailing against its wonted northward course – the presence of rain in those locations is very small. So it is in the country of Egypt, whose air on the north side lacks high mountains, and where most of the vapor flowing south to north (from the Sea of Abyssinia) is deflected by the mountains of the Beja (such as al-Muqattam and the mountains near it), so that the Sea of Abyssinia’s vapors flow towards Iraq.
From the treatise On why some places almost never get any rain