I had a similar engine failure although a little less dramatic. The wind was 35 gusting to 50 and I was motor sailing into it, waves were about 4 to 6 feet, closely spaced. The engine was working fine, running about 1/4 power "just in case" but the headsail was doing most of the work. I entered the harbour and tied up to the fuel dock right by the entrance to pump out. When i went to start the engine it was just like you said. Started and idled (rough) but no power. In the harbour I managed to idle back to my slip so no real drama. It turned out to be water in the fuel. After cleaning everything out the engine ran fine. I figure the waves must have stirred the tank enough to get water into the intake. I managed to get about 2 cups of water out of the tank. This was a gas engine but could be the same with diesel.