Crop production functions and the allocation and use of irrigation water