Texas continues to battle the ravages of Hurricane Harvey, which has dumped more than 30 inches of rain across the greater Houston area. The record-setting rains have caused devastating floods for the third straight year in the area, following the Tax Day Flood of 2016 and the Memorial Day Flood of 2015.

Houston keeps flooding, but local authorities have long tried to mitigate the risks of living in the Bayou City. Houston is located inside Harris County, and after a series of floods in the 1930s, the county created a flood-control district to regionally manage the area’s flood-preparedness system. Over the years, the Harris County Flood-Control District worked with the Army Corps of Engineers to make the entire city of Houston into a hydraulic machine that can direct water into a series of bayous, canals, and reservoirs, then on into the Gulf of Mexico. There are now 2,500 miles of channels for moving water and a total of $4 billion of flood-mitigation infrastructure.

As bad as things are in Houston right now, they’d be much worse without all this infrastructure in the ground. So, to keep these mitigation measures working, the Harris County Flood Control District spends roughly $100 million per year.

That sounds like a lot, but Houston is now a metropolitan powerhouse. The fourth-largest city in the country, it’s also the primary home of the nation’s oil and gas industry. The area’s real GDP is approaching half a trillion dollars a year.

And consider what some other agencies spend. The South Florida Water Management District spends $664 million per year on its operations. The California Department of Water Resources, which operates the state’s dams and canals, spends more than $500 million per year on “public safety and prevention of damages.”

Or compare to road-infrastructure spending: In Houston itself, the public-works budget is $2 billion this year. In California, the state spends $1.9 billion on highway maintenance alone.

Infrastructure is expensive, which is one reason that even an additional $1 trillion would only be a down payment on what the United States needs to maintain its functioning basic systems. But it’s expensive because it serves the needs of whole populations. Multiply anything by 350 million (or 7 million or 1 million) and you get a pretty big number.

In 2016, the Harris County Water District’s former chief estimated that $26 billion would be necessary to really harden the city against flooding. That would be done by, among other things, widening existing channels to increase the throughput of the water-moving machine.

At the same time, however, the city has continued to pave away the land’s natural capacity to absorb rainwater. One study found that over the last four decades, rainfall had increased 26 percent in the Brays Bayou watershed, but “runoff has skyrocketed by 204 percent.”

The city’s human inhabitants must race to protect themselves from ... themselves. The system was designed for a much smaller city with fewer people and much less runoff.

The system was also designed for a Houston climate that featured less extreme rains. The Texas state climatologist John Nielsen-Gammon has shown that rains have gotten more extreme in the city. “Heavy precipitation of any particular magnitude are twice as likely to fall in the Bayou City today as they were in the early 20th century,” the Houston Chronicle reported.

And though improvements to planning and mitigation would be actual improvements, it’s not clear that even a system with a $26 billion upgrade—or more—could have handled what Harvey brought to the area. The 2016 Tax Day Flood dumped 240 billion gallons of water on the county. Already, Harvey has sent 734 billion gallons to the ground in the same area; according to Flood District calculations, there have been 23.7 inches of rainfall on average across the whole county in the 48 hours since the storm made landfall.

Tropical Storm Allison, which struck in 2001, also brought tremendous rainfall, but only a tiny portion of the county crossed 25 inches of precipitation over the five days of that event.

Harvey will be remembered for the breadth of its rainfall, a burden which shows the cracks in Houston’s infrastructure. To survive on the Gulf Coast in the coming century, the city and its surrounding county are going to have to make the kinds of huge investments in flood mitigation that their forbears did after previous disasters.