Root Zone Water Quality Model 2 (RZWQM2) is a whole-system model for studying crop production and environmental quality under current and changing climate conditions. It emphasizes the effects of agricultural management practices on physical, chemical and biological processes. RZWQM2 is a one-dimensional model with a pseudo 2-dimensional drainage flow. Crop simulation options include the generic plant growth model, DSSAT-CSM 4.0 and HERMES SUCROS models. It also can simulate surface energy balance with components from the SHAW model and water erosion from the GLEAMS model. An automated parameter estimation algorithm (PEST) was added to RZWQM2 for objective model calibration and uncertainty analysis.