Nitrogen optimization for food production