Electric demand for heat across the state was soaring, as expected, but green dots on the corner state map started flipping to red. Each was a regional power generator, and they were spontaneously shutting down — three coal plants followed quickly by a gas plant in Corpus Christi.

Then another metric began to flash: frequency, a measure of electricity flow on the grid. The 60 hertz needed for stability fell to 59.93.

Bill Magness, chief executive officer of the grid operator, was watching intently and understood instantly what was at stake. Below 59 and the state’s electrical system would face cascading blackouts that would take weeks or months to restore. In India in 2012, 700 million people were plunged into darkness in such a moment.