Twice a year the equatorial rain belt sweeps across the tropics. Where it passes, the chance of a wet day jumps. Random wet and dry days then fill a soil bucket that the crop drinks from, and a long dry spell shows up as water stress and lost yield.
Relative yield against site latitude, averaged over 30 random weather years (carried soil moisture), with the 10th-percentile bad year. Everything else stays as set above.
The science
Rain belt. The latitude of the belt is φb(d) = φc + A cos(2π(d − dpeak)/365). The probability that a day is wet at the site is a Gaussian bump around the belt: p(d) = pmin + (pmax − pmin) exp(−½((φsite − φb)/σ)²). A site near the centre latitude sees the belt pass twice and gets two rainy seasons; a site near the edge of the swing gets one; beyond it, almost none.
Wet-day Markov chain. Rain comes in spells, so today depends on yesterday: P(wet|dry) = p(1−ρ) and P(wet|wet) = p(1−ρ) + ρ, which keeps the long-run wet fraction equal to p and the day-to-day correlation equal to ρ. Wet-day depth is exponential with mean μ, a standard simple weather generator.
Soil bucket (Manabe style). Each day S → S + P − ET − R. Evapotranspiration is ET = PET·min(1, S/(fw Sfc)) (full rate while the bucket is above fraction fw of capacity) and any water above capacity Sfc leaves as runoff or drainage R. Mass is conserved exactly.
Yield. Relative yield follows the FAO-33 form Y/Ymax = 1 − Ky(1 − ΣET/ΣPET) over the growing season, with Ky = 1.25 for maize over the whole season (a typical textbook value).
Simplifications, stated honestly. One site, one soil layer, no infiltration limit, interception, snow or irrigation, no sub-seasonal drivers such as monsoon breaks or El Niño, a Gaussian belt of fixed width, and a single crop with no growth stages. The belt latitude range, pmax, depths, PET, bucket size and Ky are illustrative or typical values, not data for a real location.