The beach at Agucadoura, just north of Porto, is where electricity from the world's first wave farm is being cabled ashore. Five kilometres out to sea a Pelamis wave machine is gently riding the Atlantic swell, generating power for the Portuguese grid.
The wave farm has just been officially launched after a frustrating delay of more than a year. "We had an issue with the underwater connections", explains engineering manager, Ross Henderson. He is sitting with me in the beachfront substation which takes in the power. "I can't believe such a small thing cost the project a whole year."
To understand the engineering problem, you have to appreciate how the wave machines work. Pelamis is an ancient word for sea snake. And it is true that the machines look like giant metal snakes floating in the water.
Each one has four long sections with three "power modules" hinged between them. There are large hydraulic rams sticking into the modules. As the long sections twist and turn in the waves they pull the rams in and out of the modules like pistons.
The huge force of the rams is harnessed to run generators in the power modules. But tethering the snakes to the seabed is a major challenge. The system has to be able to cope with the worst sea conditions.
Pelamis Wave Power developed an underwater plug, which floats 15 to 20 metres below the surface. The snakes can be attached in one movement without any help from divers. But when the system was installed off Portugal in slightly deeper water than engineers were used to, the plug wouldn't float properly. The foam keeping it buoyant couldn't stand the extra water pressure.
"We worked it out quickly, but it took a while to fix the problem," laments Ross. "Our buoyancy foam was fine when we tried it out off Orkney but it couldn't cope in Portugal."
The Pelamis engineers designed new floats, changing the foam. Then they had to wait through a stormy winter before they could install them.
Two more wave machines should soon be in position, making three in all. At full production the company says they will be able to generate enough power for 1,500 homes.
And 25 more machines are on order for Portugal. It's been an expensive wait, but Ross Henderson believes the company has built up the expertise to deal with a variety of sea conditions.
"We managed to do the changeover using much smaller boats than we're used to in the North Sea, where everything is geared up for the oil industry." So installations should be cheaper in future.
Pelamis is looking at new projects in Norway, Spain, France, South African and North America. Meanwhile, four machines are being installed off Orkney next year, with seven more due to go in north of Cornwall the year after.