MANY Chinese cities offer “sea views”, but of a kind that arouse fear and anger rather than raise spirits. The term is often used scornfully by Chinese media to describe the floods that render roads impassable and sometimes kill people during heavy downpours. They are largely the product of woefully inadequate drains. Urban areas have more than doubled in size since 1998, but officials have scrimped on arrangements for keeping them dry.

During the summer rainy season, the complaints of urban residents swell as fast as the foul water in the streets. They are targeted at the government. Even the state-controlled press joins in. On July 28th China Youth Daily said it was “beyond understanding” that city planners should give priority to high-profile “vanity projects” while ignoring the need for storm drains and the like. “Money doesn’t seem to be a problem,” it said. Residents of Beijing still harbour bitter memories of flooding in 2012 that killed 79 people (mostly outside the urban core) and caused 12 billion yuan ($1.9 billion) in damage. Much of the mayhem was caused by the flooding of underpasses with inadequate drains. Beijingers vented their fury online when the city government tried to raise money to help victims, calling the charity drive an attempt to cover up officials’ failings.

That disaster focused a bit more government attention on the problem. But improvements have not been obvious. In June a downpour in Shanghai inspired Uber, a taxi service, to change the images on its app for the city from cars to boats. Most drains are still unable to cope with even a moderate storm of a kind that can be expected once a year or so. Cheng Xiaotao of the China Institute of Water Resources and Hydropower Research in Beijing says that between 2006 and last year the number of cities with inadequate flood-control measures rose from 170 to 284. He blames a failure to build drains fast enough to cope with urban sprawl.

Fixing this will be costly and disruptive: expanded drains have to compete for underground space with other necessities such as power lines, heating pipes and internet cables. But the government is eager to boost economic growth by spending more money on public-works projects. On July 28th the prime minister, Li Keqiang, said that poor underground pipes were a “big dragging force” on urbanisation. He called for greater effort to improve them. Ten cities have been chosen as pioneers: they are due to spend more than 35 billion yuan over the next three years on upgrades of all kinds of pipes, including drainage ones. In Beijing there are plans to build underground storage tanks to capture rainwater—each at a cost of about 100m yuan.

Another approach was suggested by President Xi Jinping in 2013, when he said cities should be built like “sponges”: capable of absorbing rainwater rather than causing it all to pour into drains and overwhelm them. This year a “sponge city” pilot programme was rolled out in 16 cities. The idea is to enable them to soak up 70% of rainwater; methods include the use of permeable material in paving and the creation of storage ponds and areas of wetland. It is intended that water thus stored could be used for purposes such as street-cleaning and firefighting. Many of the cities affected by flooding—including Beijing—are desperately short of water.