While Superstorm Sandy was crashing down on the New Jersey coast, an underwater glider was miles offshore, sending back data to oceanographers at Rutgers University.

It all started on Oct. 25, a few days before Sandy made landfall, with Travis Miles and Greg Seroka. The two oceanography Ph.D. students were on a boat, heading out from Belmar, N.J., under calm and sunny skies.

"You're staring at the water and you know it's just going to be insane in a couple hours," said Miles. "And that feeling is — eerie."

They were 13 miles off the coast, on a mission to drop off a 6-foot long underwater glider.

"It looks a lot like a torpedo, essentially," said Miles. "A big yellow torpedo with wings on the side."

That glider would spend the next 12 days sending back information from before, during and after one of the most devastating storms to ever hit the New Jersey coast, offering a dramatic snapshot of how the ocean interacted with Superstorm Sandy.

"When these storms come through, they can change everything in an hour, two hours, three hours," said Miles.

The glider dove up and down every few minutes in about 150 feet of water, measuring water temperature, salinity and oxygen levels. Every hour, the unmanned sub, which is self-propelled by buoyancy, would return to the surface to send back data via satellite phone.

Miles went out to retrieve the glider on Monday, boating past beach after beach of demolished property. Researchers are now analyzing every bit of data in an effort to build smarter forecasting models.

"The ocean's a big player in storms like Hurricane Sandy and Hurricane Irene," said Ph.D. student Seroka. "We need to look at better observations — and more observations — to make sure that our models are performing correctly."

With almost all other vessels docked during the storm, the underwater glider was an especially valuable tool.

"We're able to learn in a very new way how the ocean and atmosphere are linked," said Josh Kohut, a faculty adviser at Rutgers' Coastal Ocean Observation Lab. "The technology allows us to make measurements out in the ocean during storms that we could not get otherwise."

Last year a glider happened to be out at sea during Hurricane Irene. The research by Miles and Seroka will now basically constrast the ocean's role in the two storms, Kohut says.

The hope is that more information will lead to better forecasts and, ultimately, less destruction.