I've played both and as best I can recall, Carnoustie is flatter. But what does "flatter" mean. Elevation change is one thing. Fairway humps, bumps, swales, etc. are another. My recollection is that Troon had more of the humps, bumps, swales, etc. Though both had little elevation change, I believe Troon had somewhat more. I'm remembering now from one round at each course 20+ years ago on different visits to Scotland from the USA. These are "must play" courses, obviously, although as recreational golfer I'd have no interest in playing either course day in and day out. Carnoustie was a slog from the back tees (not the championship tees) at about 6,900 yards, which we were required to play the day of our visit.