It looked like a nail-biting scene out of a Hollywood movie when monster waves tossed two U.S. Coast Guard boats at San Francisco's Ocean Beach last week.

Photos taken by Dave Rogers of Pacifica show the turbulent surf crashing over the 47-foot-long motor lifeboats.

"One of the boats was completely on its side," said Rogers, an aspiring professional photographer. "It was pretty incredible to watch."

A glance at the photos going viral on social media would make most anyone queasy, but not Rogers, who served in the U.S. Navy.

"I've been in a typhoon out by Thailand," he said. "I actually was one of the people who did not get seasick at all. In rough conditions, I often had to stand on other people's watches because they were too seasick."

ALSO: 'Don't go to the beach': Waves up to 6 stories forecast for Bay Area beaches

The training session was conducted by the U.S. Coast Guard's Golden Gate Station on Dec. 13 and Chief Boatswain's Mate Robert Paulino, who led the training, says the waves topped 15 feet that day.

"I was out there, and it was a good day," Boatswain's Mate first class Matthew Whitlow, who was also on the boat, says. "We're used to training conditions like that. It's one of those things where we're experienced with it, but you're never fully experienced because every wave is different."

Whitlow says six people were aboard each boat and a tethering system and connection points on the boats prevent them from being swept into the ocean. The boats are designed to operate in seas up to 30 feet and breaking waves up to 20 feet.

"Our cap for training is 15 feet sustained," says Whitlow. "Anything over 15 feet, we don't expose our crews to because it gets dangerous."