This paper presents an algorithm to generate the irrigation policies and crop management configuration files for the agroclimatic risk model AquaCrop. The software determines the parameters to be modified by a stochastic method. The AG-CASU algorithm takes account of the limits determined for each variable. The algorithm can be configured to determine the number of scenarios, the number of simulations, the feasibility of each of the parameters, the initial seed file and the compliance with the AquaCrop agroclimatic risk model. In general