The structure and distribution of coral reefs