LOS ANGELES (AP) — Californians tried to weather the extremes of a changing climate Friday, as a punishing heat wave that has helped fuel deadly wildfires had the state teetering on the edge of blackouts for a 10th consecutive day while a tropical storm barreled ashore with the promise of cooler temperatures but also possible flooding.

The abrupt swing in conditions even whipsawed weather junkies.

“This is perhaps the singularly most unusual and extreme weather week in quite some time in California — and that is saying something. Whew,” Daniel Swain, a climate scientist at the University of California, Los Angeles, wrote on his western weather blog.

While the rains may be welcome in the drought-plagued state and will bring relief with more normal temperatures, deluges and more brutal heat waves are forecast to become regular fixtures as climate change warms the planet and weather-related disasters become more extreme.

“We’ll see these heat waves continue to get hotter and hotter, longer and longer, more wildfire-plagued,” said Jonathan Overpeck, dean of the University of Michigan School for Environment and Sustainability. “The odds of really intense precipitation are going up. And so that’s why we are worried about flooding associated with this remnant hurricane.”

California is just the latest casualty in a year of sometimes deadly heat waves that began in Pakistan and India this spring and swept across parts of the Northern Hemisphere, including China, Europe and others areas of the U.S.

Climate change also has exacerbated droughts, dried up rivers, made wildfires more intense and — conversely — led to massive flooding around the globe as moisture evaporating from land and water is held in the atmosphere and then redeposited by intense rains.

Scientists are reluctant to attribute any specific weather event, such as Hurricane Kay, now downgraded to a tropical storm as it heads into California, to global warming. But they say heat waves are exactly the type of change that will become more common.

The so-called heat dome that cooked California was stuck in place by an exceptional high pressure region over Greenland, of all places, that essentially created a meteorological traffic jam, said Paul Ullrich, a professor of regional climate modeling at the University of California, Davis. That prevented the high-pressure system that was forcing hot air over California from moving along.

A marquee outside a former theater in LA’s Chinatown said: “Satan called. He wants his weather back.”

Temperatures hit an all-time high in Sacramento of 116 degrees (46.7 C) on Tuesday. Many other locations hit record highs for September and even more set daily high marks.

The heat that colored weather maps dark red for more than a week in California is only a preview of coming attractions.

Sacramento, the state capital, has about 10 “extreme heat” days per year and that will double again by the middle of the century. In the 1970s, the city had five, Ullrich said.

“That’s pretty much going to be the story for much of the Central Valley and much of Southern California,” Ullrich said. “This kind of exponential growth in the number of extreme heat days. If you tie those all together, then you end up with heat waves like we’ve experienced.”

For nine days through Thursday, the vast energy network that includes power plants, solar farms and a web of transmission lines strained under record-setting demand driven by air conditioners.

“If we’re going to build a statue to anybody in the West, it will be a Willis Carrier,” said Bill Patzert, retired climatologist at NASA’s Jet Propulsion Laboratory, about the inventor of the air conditioner. “Really large areas of Southern California would essentially be unlivable without air conditioning.”

Air conditioning puts the biggest strain on power sources during a heat wave and operators of the electrical grid called for conservation and warned of the threat of power outages as usage hit an all-time high Tuesday, surpassing a record set in 2006.

The state may have averted a repeat of rolling outages two summers ago by sending a first-ever text alert that blared on 27 million phones urging Californians to “take action” and turn off nonessential power. Enough turned up thermostats, turned off lights or pulled the plug on appliances to avoid power cuts, though thousands of customers did lose power at various times for other reasons.

The West is in the throes of a 23-year megadrought that has nearly drained reservoirs and put water supplies in jeopardy. That, in turn, led to a sharp decrease in hydropower that California relies on when power is in peak demand.

“Part of the country that’s getting hit worst is the Southwest and Western United States,” Overpeck said. “It is a global poster child for the climate crisis. And this year, this summer, it’s really the Northern Hemisphere has been just an unusually hot and wildfire-plagued hemisphere.”

The extreme heat helped fuel deadly wildfires at both ends of the state as flames fed on grass, brush and timber already “preconditioned to burn” by drought and then pushed over the edge by the heatwave, Overpeck said.

Firefighters struggled to control major wildfires in Southern California and the Sierra Nevada that exploded in growth, forced thousands to evacuate and produced smoke that could interfere with solar power and further hamper electricity supplies.

Two people were killed in the fire that erupted last Friday in the Northern California community of Weed at the base of Mount Shasta. Two others died trying to flee in their car from a fire in Riverside County that was threatening 18,000 homes.

What remains of the hurricane is expected to bring heavy rains and even flash floods to Southern California from Friday night through Saturday. Strong winds could initially make it difficult and dangerous for firefighters trying to corral blazes, Patzert said.

Heavy downpours could also unleash mudslides on mountainsides charred by recent fires. While several inches of rain could fall, much of it will run off the arid landscape and will not make a dent in the drought.

“It comes at you like a firehose and you’re trying to fill your champagne glass,” Patzert said. “Everybody’s sort of excited, but on Saturday night a lot of people will be saying, ‘Yeah, we could have done without that.’”