Halfway between Los Angeles and San Francisco, on a former cattle ranch and gypsum mine, NRG Energy is building an engineering marvel: a compound of nearly a million solar panels that will produce enough electricity to power about 100,000 homes.

The project is also a marvel in another, less obvious way: Taxpayers and ratepayers are providing subsidies worth almost as much as the entire $1.6 billion cost of the project. Similar subsidy packages have been given to 15 other solar- and wind-power electric plants since 2009.