Minimizing the impacts of agriculture on water resources