BERKELEY, California — California is cruising toward its 2020 goal for increasing renewable energy and is setting far more ambitious targets for the future. Its large-scale solar arrays produced more energy in 2014 than those in all other states combined. Half the nation’s solar home rooftops are in the state, and thousands more are added each week.

With its progressive politics, high-tech bent and abundant sunshine, California is fast ramping up its production of clean electricity, setting an example its leaders hope the rest of the country, and other nations, will follow as they seek to cut emissions of climate-warming carbon dioxide.

“It’s hard to overstate the importance of California in terms of renewables,” said William Nelson, head of North American analysis at Bloomberg New Energy Finance. “It’s like an experiment in terms of how quickly we can add solar to the grid.”

Fifteen years after an energy crisis, caused partly by deregulation and market manipulation, brought blackouts and price spikes, the shift has been remarkably smooth, many analysts say. Even without counting the big contribution from home solar generation, 26 percent of the state’s power this year will come from clean sources like the sun and wind, Bloomberg New Energy Finance estimates. The national average is about 10 percent.