The four R codes listed allow conducting the simulations respectively described as the Fixed pattern, the random pattern, the La Nina pattern (proportional) and the La Nina pattern (arid) in the main text. Scripts allow the extraction of the data for the last 25 steps (years) of the simulation, out of 100.