Groton - From his post at the top of the submarine's sail, Lt. Andrew Pyle looked out Wednesday at the buoys that mark the entrance to New London Harbor. He saw New London Ledge Light to his right.

Sailboats darted in front of the submarine, and Pyle had to react. It began to snow, and the sea grew rougher.

But Pyle was not in a submarine returning to the Naval Submarine Base. He was in a building at the Naval Submarine School.

The school now has a full-size replica of a submarine bridge so officers can train to stand at the top of the sail and navigate during the transit in and out of ports.

The trainer can simulate U.S. ports and foreign ports where submarines are likely to stop during a deployment. If the submarine was supposed to be in the Gulf, Pyle would have seen traditional sailing vessels, or dhows.

A prototype is at the Naval Undersea Warfare Center in Newport, R.I. This is the first in the fleet; a ribbon-cutting will be held Friday.

On Wednesday, students in the Submarine Officer Advanced Course practiced pulling into Groton.

The trainer is inside a dome where fans mimic the wind and 16 projectors produce a 360-degree image of the world's harbors and oceans. The students use binoculars to zoom in on the image.

The trainer doesn't move, but the rolling waves are so realistic that even experienced submariners sometimes feel a little queasy.

Pyle said he's not prone to seasickness, but he holds onto the railings even though he knows there's no need to. He's getting ready for his next assignment on the blue crew of the USS Wyoming. After more than two years at an assignment on shore in Naples, Italy, Pyle said he needed to hone his skills.

"Being able to do this over and over boosts my confidence about going back to sea and stepping into a position where I'll have more responsibility," he said.

In another room that was set up like the control room of a submarine, the rest of the students gathered data, looked at charts and performed the jobs that any piloting team would be doing in a control room when pulling into port.

Lt. Cmdr. Angel Rodriguez, the course director, said the instructors do try to surprise the students with unexpected problems to see how they react. There could be a man overboard or malfunctioning navigation equipment.

"It's not a gloom-and-doom scenario, but close to it," he said. "We want to build their confidence that they don't need computers. They can look at raw data to safely navigate the ship. We prove that by taking away a lot of their equipment."

Most of the time, submariners are submerged, so there aren't a lot of opportunities to handle the ship on the surface, Rodriguez said. And, he said, the "seas are getting more congested, so it's more incumbent on us to make sure we're proficient on the surface."

Students used to train by looking at the ocean through a headset. Now, they can manipulate the equipment and an entire team can work together on the bridge, Rodriguez said. When they graduate in March, these students will become navigators, weapons officers and engineers on submarines.

Lt. Will Villarreal, a student, said the training is the best he has ever had. He said "submarining is a perishable skill" and the school is where "the growing pains happen."

"It is stressful," Villarreal said. "But we learn how to function under that stress because, quite literally, we're going to be in the same boat as everyone we're supposed to be keeping safe."

The USS Hartford collided with a Navy amphibious ship in the Strait of Hormuz in 2009, and the Navy paid about $120 million to repair the Los Angeles-class submarine.

The Navy bought the equipment for the school's trainer while the state, through the unique partnership it has with the Navy to upgrade the base, paid for the addition to Nimitz Hall to house the trainer. The state legislature authorized $40 million in 2007 to strengthen the base's military value in order to guarantee its future.

Before the ribbon-cutting, there will be a brief ceremony to transfer money from the state to Groton and Ledyard. The towns will buy land around the base to prevent development from encroaching on base operations.