Modeling Agricultural Production Considering Water Quality and Risk