They build a reservoir and use solar or wind power to run the pumps and fill the reservoir and empty it thru turbine generators. That way when the wind is slack or the sun is obscured they just use the dam. The UK is already using it. First I every heard of it. I wonder if you could do something like that on a residential level.
Chile to build a hydropower plant in the world's driest DESERT | Daily Mail Online