Coral reefs aren't just spectacular, but they are also the 'smell of the ocean'.

A new study has found that coral animals produce a sulfur compound that gives the water body its typical smell and protects them from global warming. This sulfur also influences local cloud formation.

The study, conducted by researchers at Australian Institute of Marine Science and colleagues, found that the coral animals produces dimethylsulphoniopropionate, which gives the characteristic oceanic smell. DMSP even changes the local climate.

Coral reefs provide food and shelter to many marine organisms, which is why they are sometimes called the "rainforests of the ocean". The reefs are made by certain algae and coral polyps. Although they account for less than 1 percent of the entire ocean floor, they harbor about 25 percent of all marine life.

AIMS chemist Cherie Motti, and co-author of the paper said that they could smell the compound even in a single baby coral.

"This is the first time that an animal has been identified as a DMSP producer. Previously it was assumed that the large concentrations of DMSP emitted from coral reefs came solely from their symbiotic algae," says Jean-Baptiste Raina, of AIMS and lead author of the study, according to a news release.

The study team found that corals produced higher levels of DMSP when they were exposed to heat stress. The compound and its derivatives protect the corals from the harmful effects of heat.

The compound even acts as a seed for cloud formation. Thus, the decline of DSMP producers could result in a decrease of clouds.

"Cloud production, especially in the tropics, is an important regulator of climate - because clouds shade the Earth and reflect much of the sun's heat back into space. If fewer clouds are produced, less heat will be reflected - which ultimately will lead to warmer sea surface temperatures," Dr Raina explained.

According to the National Geographic, pollution, global warming and sedimentation can destroy about 30 percent of the coral reefs in the world in the next three decades.

The study paper," DMSP biosynthesis by an animal and its role in coral thermal stress response," is published in the journal Nature.

Intact coral reefs are a sign of ocean's health. These reefs protect shores from storms, provide shelter and food for millions of organisms and are even a source for new medicine.

In the U.S., one can find coral reefs along the waters of Western Atlantic and Caribbean (Florida, Puerto Rico, and the US Virgin Islands) and the Pacific Islands, according to The National Oceanic and Atmospheric Administration.