Mike Kelly points me to Spain's Photovoltaic Revolution, a learned tome by Pedro Prieto and Charles Hall that I think you are going to want to look at.

The book covers the development of the Spanish solar PV industry from its boom years after 2006 to the bust in 2008 and is mostly devoted to an analysis of the economics of PV in that country. As the authors point out, the nature of the Spanish grid and the history of its PV industry mean that the data is particularly clean and simple to analyse. In essence, this is where we can truly understand the economic usefulness of PV technology.

The chapter analysing the history of the industry in Spain is laugh-a-minute stuff, a tale of incompetent politicians and civil servants bumbling from one disaster to another and fraudulent investors cheating their way to a slice of public funds. We learn how the Spanish government decreed a feed-in-tariff system that guaranteed six times market rates to PV businesses, before a belated realisation that this was going to lead to astonishing surges of investment. They then put in place a series of only partially successful measures in an attempt to stop the expansion, as the whole farrago quickly became unaffordable and ultimately disastrous. We hear about the diesel generators generating "solar power" at night and that at one point the authorities estimated that half of new solar PV connections to the grid were fraudulent.

But the guts of the story is a detailed analysis of the "energy return on investment" (EROI) for solar PV, a measure of how much energy you get out for each unit of energy you put in. As the opening chapter explains, you need an EROI of around 5 to sustain agriculture, 10 to sustain an education system, 12 for a healthcare system, and 14 if you want to splash out on fripperies like high culture.

So what is the EROI for solar PV in Spain?

Two point four five.

That's 2.45.

You can see why the revolution led to disaster. I leave you with this apposite quote from the text:

Modern renewable energies, supposedly born to support a sustainable world, became one jewel of the most unsustainable of human activities, financial greed.

You can buy the book here, (although it isn't cheap).