California may be done waiting for everyone else to get their act together on climate change.

Earlier this week, by a vote of 44 to 33, the state Assembly passed a bill that would require California to get 100 percent of its electricity from renewables by 2045. An equivalent measure already passed the state Senate. A whopping 72 percent of Californians support the measure. All that's left is for Gov. Jerry Brown (D) to sign the bill. And he's expected to do so.

You only have to look at the news to see why. The biggest wildfire in state history has been burning for over a month, scorching some 400,000 acres, killing one firefighter, and clogging cities and towns with smoke. Meanwhile, sea level rise threatens the state's prosperous coastal communities even as skyrocketing temperatures dry up farmland in the Central Valley.

So assuming Brown signs the bill, can California actually pull it off?

"It's mostly a question of willpower," Mark Jacobson, a professor of civil and environmental engineering at Stanford University, told Scientific American last year. "From a technological, economic point of view it's possible to do it."

Jacobson is one of the lead authors of a 2014 paper that laid out an entire roadmap for how California could do just this.

The first step is building the power generation. Jacobson's roadmap envisions 1,200 new solar plants, 25,000 wind turbines, plus a smattering of geothermal, tidal, and wave energy generators.

The next step is to ensure this power supply is steady and reliable. California's average electricity demand fluctuates between 20,000 and 35,000 megawatts, but it can jump as high as 50,000 megawatts. Right now, traditional fossil fuel plants can be turned on and off to respond — particularly natural gas "peakers" in California. But renewables generate power on their own schedule; whenever the sun is shining, the wind is blowing, and the tides are moving. Thus, California would need to increase its energy storage capacity — i.e. batteries — around 200 fold. It would also have to repair and update its power grid, so it can move power that's either stored or generated in one place to where it needs to go.

Needless to say, such a massive infrastructure effort will cost a pretty penny. Under the 2045 mandate, the costs of all those solar plants and wind turbines and batteries and grid updates will fall on utility companies. They, in turn, will pass the costs onto consumers as much as they're able.

This is where the other big selling point of Jacobson's plan comes in. Renewable power has big installation costs, but virtually zero operating costs. As technology advances and the installation costs come down, the apples-to-apples price of things like solar and wind is pulling even with various fossil fuels. Looking over the 2020 to 2030 timeline, Jacobson's roadmap projected the price of energy under this effort would actually come out slightly lower than the price under business as usual — even before you factor in the social costs of fires and floods and other effects of climate change. On top of that, Californians would save money on medical bills thanks to less pollution. And the jobs created by the green energy buildout would be about 220,000 greater in number than the fossil fuel jobs that would be lost.

Initial signs are also encouraging: The state's big investor-owned utilities are already getting somewhere between 28 percent to 35 percent of their power from renewables. And they're on course to get 50 percent by 2030. That doesn't mean the utilities are comfortable with the new, more ambitious mandate. They worry it will come with higher costs for consumers than the bill's backers anticipate.

Obviously, there's a lot of raw self-interest and profit motive bound up in that worry. But they're not the only ones fretting.

A group of scientists released a critique of the roadmap by Jacobson's team, setting off a rather heated debate. Among other things, they questioned some of the roadmap's modeling assumptions, including its methods for projecting the costs of renewables versus fossil fuels over the long haul. Adjusting a few assumptions in what they felt was a more realistic direction, they argued the ultimate price of renewables could still outpace that of fossil fuels by a healthy margin.

They also noted the true enormity of the storage capacity California would have to construct: around 2,604 gigawatts, or more than twice the combined storage capacity of every power plant currently operating in the United States. The roadmap's cost projections bet heavily on significant advances in specific storage technologies like underground thermal energy storage (UTES). But they argue these technologies haven't yet been demonstrated at scale. They also critiqued the roadmap for ignoring the costs of pipes and distribution lines that would be needed for widespread use of UTES across the state.

The key point here isn't who's right. It's simply that there are plausible scenarios in which California's effort to reach 100 percent renewables by 2045 winds up costing its citizens considerably more than just sticking with business as usual. If that happens, the political willpower could dry up pretty quickly. "Anything's possible if we are willing to incur the cost to get us there," U.C. Davis economist James Bushnell told a local CBS affiliate.

This gets particularly complicated because as you get closer to 100 percent renewables, each percentage point increase becomes more expensive than the previous one. One of the authors of the critique suggested that getting California to 80 percent renewable generation by 2045 is challenging but doable. It's getting that final 20 percent where the ambition becomes truly sweeping.

The final twist is that California also has to decide whether to integrate itself into a multi-state western grid controlled by a central authority. On the plus side, the grid could allow a much wider and efficient movement of energy between states, coordinating a wider supply across all that demand. That could give California more options to reach its goal. On the other hand, integrating its energy grid into that of coal-heavy states like Wyoming could slow down efforts to squeeze fossil fuels out of California's energy mix.

Both the positive and negative scenarios require predicting how technologies will evolve, and how fast society could deploy them, over almost three decades. As Severin Borenstein, a U.C. Berkeley economics professor, pointed out to Scientific American, no one in 1988 could've predicted the existence of smartphones today, much less their sheer ubiquity. "It's very hard to predict technology 30 years in advance," he said.

In other words, it's a gamble.

The whole planet needs to decarbonize between 2050 and 2070. California has 39 million people and an economy that would be the fifth biggest on Earth if it was its own country. It isn't the world. But if California can pull this off, it would be one heck of a demonstration project.