California lawmakers must decide by the end of the day Friday whether to approve the most ambitious clean energy goal in the country: 100 percent clean energy by 2045.

The state wouldn't be the first. Hawaii already has its own 100 percent goal. But California uses about 30 times more electricity than Hawaii and is the fifth largest economy in the world.

To some, it's a chance for the state to cement its environmental leadership as the Trump administration rolls back Obama-era climate change programs.

"We absolutely do not need natural gas or coal," says Mark Jacobson, a professor of civil and environmental engineering at Stanford University. "The costs of solar are so low. The costs of wind are very low."

To know where Jacobson is coming from, you only have to glimpse the license plates on his two electric cars.

"One is GHGFREE: greenhouse gas free," he says, inside the garage of his Palo Alto home. "And the other is WWSERA, which means wind-water-solar era."

Jacobson has authored study after study on a 100 percent renewable future, including one focusing on California. His work informed state lawmakers when earlier this year, they introduced SB 100, the clean energy bill. It doesn't specify exactly how California's electric utilities should meet the goal.

Solar power is already booming in the state, as utilities plan for the existing goal of 50 percent renewable by 2030.

That's already caused a few headaches. The sun and wind aren't always producing power when Californians need it most, namely, in the evening.

The state's other power plants, like natural gas and nuclear, aren't as flexible as they need to be to handle those ups and downs. Hydropower offers the most flexibility but is scarce during drought years.

Jacobson says there are plenty of strategies to overcome that. One is on display right in his garage: four large Tesla batteries mounted on the wall. The solar panels on his roof are charging them.

"At night, when there's no more sunlight, the batteries kick in and the electricity I use in my house is drawn from the batteries," he says.

California could do that on a massive scale, he says, either inside homes or buildings or by building very large energy storage projects.

On top of that, a better-connected transmission grid could bring power into the state when solar or wind is lacking. And during times of peak demand, homes and buildings could reduce their power use dynamically through more advanced software and a "smarter" grid.

"It's going to be a huge deal because other states will be inspired, other countries can be inspired," he says.

But some think the push to go completely green won't be quite so simple.

"If we wanted to have a 100 percent renewable energy system today, we could do it," says Ken Caldeira, a scientist at the Carnegie Institution for Science at Stanford. "It would just be very expensive."

California gets only about a quarter of its electricity from renewables today, so reaching 100 percent would be a wholesale transformation — one that Caldeira fundamentally supports.

"Each emission of carbon dioxide is another increment of warming and we need to have an energy system that doesn't rely on using the sky as a waste dump," he says.

Caldeira says studies show reaching 80 percent renewable energy is well within reach. Even hitting 100 percent is technically possible, he says, but could rely on technologies that are still relatively expensive today, like batteries.

On top of that, renewable energy projects need new transmission lines, which can be challenging to build. Solar farms have a large footprint on the ground, which has already been contentious in California's sensitive desert ecosystem.

"I think the key is to start down that path and keep our options open," says Caldeira, "so when we get to the point where we don't know what to do, hopefully by then we will know what to do."

California lawmakers seem to agree. They rewrote the bill, changing it from a 100 percent renewable regulatory requirement to a 100 percent greenhouse-gas-free energy goal.

That means it could include nuclear energy, large hydropower dams or even natural gas power plants, if they capture their carbon emissions. At least 60 percent of the electricity would still have to come from renewable sources.

That was a welcome change for California's electric utilities.

"I'd say flexibility is critical," says Lupe Jimenez, research and development manager at the Sacramento Municipal Utility District. "If we're looking for a low-carbon future, I don't think we want to narrow our options."

SMUD has built a handful of energy storage demonstration projects. In midtown Sacramento, more than 30 townhouses have both solar power and batteries.

"There's a ton of potential in storage technology," says Jimenez. "We understand the prices are going to continue to fall. We want to be nimble and prepared for when they do."

Sacramento's utility supports the 100 percent clean energy goal. But other major California utilities have come out against it, saying it could raise costs for their customers.

Copyright 2017 KQED Public Media. To see more, visit KQED Public Media.