Two astronaut-aquanauts - one high above Earth and the other beneath the sea - exchanged greetings Saturday in a rare linking of the two frontiers. Mercury astronaut Scott Carpenter called space shuttle Endeavour from an underwater laboratory and spent 15 minutes comparing notes with fellow deep-sea diver and spaceman Michael Gernhardt. ''You read in all the books that the earth is three-quarters ocean and you accept it intellectually,'' Mr. Gernhardt said from Endeavour. ''But it takes getting up in space and looking out the window and seeing just how beautiful, magnificent these oceans are to really, fully appreciate it.'' Mr. Carpenter, who became the fourth American in space in 1962, said he was envious of Gernhardt's view. More than a week remains in Gernhardt's first space flight, an 11-day science mission. Carpenter's single space flight lasted only five hours. ''You see the big picture,'' Carpenter told Gernhardt. ''That's very important if we're to protect the ocean.'' Carpenter was in Jules's Undersea Lodge at the bottom of a lagoon in the Florida Keys, where he founded a marine-education program this year.