Harvey, the hurricane-turned-tropical depression that’s devastated the Texas Gulf Coast, has also driven home the value of off-grid energy systems, from backup generators to microgrids -- and the dire results of failing to have them ready to prevent disasters.

The floodwaters have killed dozens of people and left tens of thousands homeless, and the storm has also knocked out power for more than 200,000 utility customers from Beaumont to Corpus Christi. While many residents have had power restored, many others are stuck in flooded areas where utility crews can’t even get to, let alone repair the damage.

That’s left many homes, businesses and industrial facilities no choice but to ride out the outage -- or, if they’ve got them, to turn on their own generators. Most of these distributed energy resources (DERs) are just diesel generators in the garage. In a handful of cases, they’re built into a building’s everyday operations, but can also kick on to keep the power in stores and hospitals running through blackouts.

But for facilities like oil refineries or chemical plants, on-site power generation and controls are not just convenient, they’re critical -- and their failure could spell catastrophe. That’s the unfortunate situation at the Arkema chemical plant in Crosby, Texas, where floods knocked out grid power and two separate backup power systems on Sunday. That’s left a storage site for volatile peroxides without the refrigeration they need to keep from breaking down, emitting noxious fumes, and eventually catching on fire or exploding.

The 11 Arkema employees left as a skeleton crew at the closed-down plant dealt with the breakdown by transferring the chemicals to nine diesel-powered refrigerated trailers, but eight of those have failed as well, the New York Times reported. Then the employees were forced to abandon their efforts, as the Harris County Fire Marshal's Office requested the evacuation of all people within a 1.5-mile radius of the plant.

Since then, the storage site has been emitting noxious fumes that sent a dozen sheriff’s deputies to the hospital with reports of respiratory irritation, though all have since been released. The EPA estimates that 4,000 people live within a 3-mile radius of the site. Arkema has 66,000 pounds of sulfur dioxide, a highly toxic chemical, and another substance, methylpropene, in large enough quantities to require an EPA risk management plan, the Wall Street Journal reported.

On Thursday morning came reports of explosions at the site, although county officials and Arkema executives downplayed the threat in a press conference later in the morning, saying that the loud sounds were more likely to be the “popping” of the vapor release valves on the containers holding the chemicals.

Still, "When they decompose, they will generate heat; and when they generate heat, there's a possibility of a fire and an explosion," company executive Richard Rennard told reporters. "This is a very serious issue, and we know that.” Houston-area Republican Congressman Ted Poe told CNBC that the site could be without power for up to six days.

It’s unclear how the plant’s multiple, redundant backup power systems failed. Arkema executives have cited the “unprecedented” nature of this week’s storm, with record-breaking rains and flooding that inundated the site, including its backup generators, in 6 feet of water.

Flooding has also lead to the closure of 16 hospitals across Texas, forcing the evacuation of more than 1,000 patients to facilities that remain open, according to the Department of State Health Services. But some of the state’s biggest hospitals remained open, thanks to multimillion-dollar investments designed to keep floodwaters out and power humming.

The Texas Medical Center in downtown Houston, for example, has invested $50 million in a network of floodgates that have kept its 50 million square feet of facilities dry and operating through Harvey. It’s also supplied by a combined heat and power and district energy system from Thermal Energy Corp.

That’s a significant investment, but it pales in comparison to the $2 billion in losses the hospital suffered when it was flooded during Tropical Storm Allison in 2001, the hospital’s president Bill McKeon told PBS.

Not all businesses face such a stark financial incentive to invest in backup power and storm resiliency. But there may be a broader market for distributed backup power systems that earn money and cut costs for customers when the majority of the time the grid isn’t down.

That’s the business model behind the natural-gas generators running at 63 H-E-B supermarkets across the greater Houston area. Installed and operated for a small fee by microgrid-as-a-service provider Enchanted Rock, these systems provide reduced utility bills for their stores, and offer opportunities for bidding their energy into markets run by Texas grid operator ERCOT.

But they’re also installed for the express purpose of being able to run in “island mode," disconnected from the grid. Since Friday, 18 of H-E-B’s stores have successfully kept themselves up and running in this mode, feeding their generators from underground natural gas pipelines that haven’t been destroyed by winds or floods.

This feature has made natural gas the fuel of choice for most of Texas’ microgrid systems, as compared to the diesel fuel that powers most backup generators. Enchanted Rock has built up a fleet of about 130 megawatts of these on-site generators, and has been able to run them in a way that makes them cost-competitive without subsidies, Thomas McAndrew, the company’s founding partner and managing director, said at Greentech Media’s Grid Edge World Forum 2017 conference in June.

Meanwhile, Texas has a few more advanced microgrids, designed to use on-site solar power, energy storage, and building energy controls in a way that reduces their reliance on fossil fuels. Dallas-area utility Oncor has built a showcase microgrid at its operating facility in Lancaster, and a Department of Energy-funded project at Group NIRE’s facility in Lubbock is seeking to control up to 100 devices, including batteries, electric vehicles, controllable HVAC systems, and binary-switched devices such as water heaters and LED lighting controls. These sites are well out of the way of Harvey’s fury, however.

As the response to Harvey continues, members of the New Jersey Board of Public Utilities highlighted the recent approval of Middletown Township’s application for a microgrid feasibility study.

“Superstorm Sandy and the incredible devastation that continues in the Gulf Coast by Hurricane Harvey should serve as solemn reminders that while we have advanced distribution automation, hardened...distribution systems and improved preparedness, we still need to address local energy resiliency systems like advanced microgrids to complete the resiliency circle to help us prepare for the next emergency,” said Board President Richard Mroz.