Researchers have just figured out which cities across the globe face the highest risk from coastal flooding.

To do so, they compiled data on 136 coastal cities with more than 1 million residents, looking at the elevation of the cities, the population distribution and the types of flood protection they had, such as levees or storm-surge barriers.

They then combined that data with forecasts of sea level rise, ground sinking due to groundwater depletion, as well as population growth projections and economic forecasts of gross domestic product (GDP). From there, they used the depth of water flooding a city to estimate the cost of the damage. [Read full story on coastal flooding]

In both their best- and worst-case projections of sea level rise, the yearly global cost reached higher than $1 trillion. The most vulnerable city was Guangzhou, China, followed by Mumbai and Kolkata in India, Guayaquil, Ecuador and Shenzen, China. Almost all cities at the highest risk of flooding damage were in North America or Asia.

Here are the top 20 most vulnerable cities:

1. Guangzhou, China

2. Mumbai, India

3. Kolkata, India

4. Guayaquil, Ecuador

5. Shenzen, China

6. Miami, Fla.

7. Tianjin, China

8. New York, N.Y.—Newark, N.J.

9. Ho Chi Minh City, Vietnam

10. New Orleans, La.

11. Jakarta, Indonesia

12. Abidjan, Ivory Coast

13. Chennai, India

14. Surat, India

15. Zhanjiang, China

16. Tampa—St. Petersburg, Fla.

17. Boston, Mass.

18. Bangkok, Thailand

19. Xiamen, China

20. Nagoya, Japan

Follow Tia Ghose on Twitter and Google+. Follow LiveScience @livescience, Facebook & Google+.