The composition of calcium carbonate in fossilised coral can provide information on historic sea surface temperatures and salinities.
Oxygen commonly occurs in two stable isotopes, 16° and 18°, of which 16° is much more abundant.
There is a correlation between the 18°/16° ratio of the carbonate in the coral and past environments, as relatively less 18° is incorporated in the skeleton at higher temperatures and lower salinities.
In addition, minor amounts of metallic elements are contained in corals. Less magnesium and more strontium are incorporated into the skeletal carbonate at lower temperatures.
So by integrating these records of past salinities and temperatures in coral skeletons from various ages (as confirmed by carbon dating) and locations, scientists can reconstruct the palae-oceanographic evolution of the tropics.