The day of the 2016 Olympic opening ceremony in Rio de Janeiro, Brazil, the mood is jittery.
In the teeth of a recession and political crisis, the carnival city faces protests and health fears over the zika virus outbreak and polluted water.
It won’t stop half a million people showing up for two weeks of world class sporting drama.
Meanwhile, as part of a drive to get cities involved in climate action, Rio has filed a report on the threats posed by global warming.
Disclosed under the CDP cities programme, it makes for grim reading. Between the mountains and the coast, Rio is exposed to impacts from sea level rise and weather extremes that will intensify social and environmental pressures.
Zika, a mosquito-borne virus that causes birth defects, is the latest health threat to cause alarm.
Cases of dengue fever, chikungunya, leptospirosis and leishmaniosis are also expected to increase, as longer summers and more rainy days create the conditions for disease to spread.
Favelas clinging to steep hillsides or erected in wetlands on the outskirts of Rio are vulnerable to landslides or flooding.
In 2010, some 200 people were killed in a landslide following the heaviest rain in decades. The authorities estimate 20,000 families were living in high risk areas, of which they have since resettled 4,000.
Slum clearance brings its own tensions: “Resettling is a sensitive political issue because people are relocated to distant areas they are not familiar with and lose ties with their communities.”
And, the document warns, “larger and more frequent storms might increase the probability of landslides in areas already under risk”.
Rio’s famous beaches, too, are endangered. The sea level is rising at 3mm a year. It might not sound like much, but is expected to accelerate as ice caps and glaciers melt, while the ocean expands as it warms.
Planners are looking at a 0.5-1.5m rise by the end of the century, putting up to 125 square kilometres and 80,000 people at risk of coastal flooding. Urban beaches will lose sand and the non-urban beaches be reshaped by erosion.
“If the sea level rises 1 meter,” says the document, “which could happen in the next decades, it will threaten the lowlands of the West Zone, which concentrates most of the industries of the city.”
Olympic sailing venue Guanabara Bay is already polluted with sewage, prompting warnings to athletes not to swallow the water. Rising seas and intense rainfall will put further pressure on the sewerage system.
That is not an exhaustive list of the expected impacts of climate change. Drought and heatwaves also get a look-in.
It is the fifth year Rio has taken part in the CDP cities programme, so there are some coping strategies.
After the 2010 floods, it got nearly US$200 million from the federal government to protect the favelas from landslides.
The city is putting $5-10m of its own funds into early warning systems and around $10m apiece on flood defences and tree planting.
Last year, it contributed to heat mapping and sea level rise modelling projects through the C40 network of megacities.
As for reducing its contribution to the problem, Rio aims to go carbon neutral by 2065. Various energy efficiency, transport and waste policies aim to cut emissions 20% from 2005 levels by 2020.
Incidentally, the document criticises the national government for energy policies that reduce oil prices, which it says worsens congestion, air pollution and transport emissions.
What is clear is that one way and another, global warming will have a big impact in how Rio develops over the next few decades.