They also hold back routine rising tides. Their effect becomes very clear when they are removed. Since mangroves have been replaced by prawn ponds on the northern shore of Java, the sea has washed inland for several kilometers in places, swamping ponds and villages and filling inland rice paddies with salty water.
Away from the tropics, where it is too cold for mangroves, shallow coastlines are often populated by waterlogged masses of grasses and herbs, known as salt marshes. Just as farmers in the tropics have in recent times taken over mangroves for prawn and fish ponds, so landowners have often drained salt marshes to create grazing land.
But salt marshes are almost as good as mangroves as natural coastal defences. So they are changing tack. Faced with the inordinate cost of raising ever higher sea walls, governments in the Netherlands, UK and elsewhere are now starting to restore salt marshes by tearing down dykes and plugging up drains.
Flowering submerged marine plants known as seagrasses are found below low-water mark around all continents except Antarctica. The seagrass meadows they inhabit may cover some 30-60 million hectares, according to the National Academy of Sciences. They are, by some assessments, the most carbon-rich coastal ecosystems of all. Yet there have been no thorough surveys of their global extent. While they escape the ravages of coastal development, they are susceptible to pollution from rivers.
Similarly unmapped are the lush underwater expanses of kelp forests. Kelp is giant seaweed. It is among the fastest growing of all plants, capable of growing by more than half a meter a day and reaching up to 45 meters high, spreading a canopy of foliage just below the water surface.
Kelp forests are widely found in Mediterranean and cold waters from California to Alaska and Australia to the Russian Far East. Some studies suggest they may flank a quarter of the world’s coastlines. As the oceans warm, they are expanding into the Arctic, while disappearing from warmer temperate waters.
Besides changing ocean temperatures, coastal ecosystems are potentially vulnerable to rising sea levels. But the evidence is that they are good colonists. Provided they have sufficient sediment to rebuild, they are generally capable of climbing up beaches as fast as the current rate of rising tides.
These days that adaptability is often compromised. As they head inland, they often find their way barred by sea walls, highways or other infrastructure, leaving them squeezed and with nowhere to go. Studies suggest that a 50cm rise in sea levels by 2100 would result in the loss of more than half of current coastal wetlands.