Hey guys! I'm currently working on writing a computer program that procedurally generates geographical features (i.e. landmasses, tectonic plates, bodies of water, etc.) and I'm looking to expand the program such that it determines, in a way that approximates reality, which regions ought to have which kind of climate (I've simplified climate as being a function of humidity and temperature). Absolute realism isn't the goal, but I'd like for the program to be reasonably realistic, at least to the eyes of non-specialists.
The problem is, I've realized I actually don't know that much about why certain regions develop the climates they do. I used to believe that deserts were all formed by rainshadow effect, but there are major regions (much of the Sahara, the Kalahari, the middle east) that are extremely arid and yet contain coastal regions not obviously blocked off by mountains. Also, there are other regions, such as the Sichuan basin, which, despite being completely walled off by mountains, are also extremely fertile and humid. So there goes that idea.
I was wondering, then, whether anyone could point me to some useful resources for non-meteorologists and non-climatologists for understanding how geography affects/determines the revailing climate of a region. Oddly, Google has been almost entirely useless in this area. I know human activity has an impact as well, especially in desertification, but I'm only looking into the natural factors for the moment, especially how terrain elevation impacts wind, precipitation, humidity and temperature.
In particular, I want to understand the formation of deserts, why some regions develop rainforests while others develop "regular" forests, how geography affects precipitation, why bogs, swamps and marshes form rather than forests in some humid regions, and how proximity to the coast regulates temperature and humidity, i.e. why continental climates are so much more extreme than coastal climates. If anyone here could give me a run-down of the basics in these areas, I'd be very grateful!