STORMY seas can wreak havoc on ships and oil rigs, but the damage they do pales beside that which a rogue wave can dole out. These behemoths, which may be up to 30 metres (100 feet) high, can badly damage, and even sink, all but the largest merchant vessels. They form when smaller, harmless waves meld into one. Until now, predicting them has proved impossible. But Will Cousins and Themistoklis Sapsis, two mechanical engineers at the Massachusetts Institute of Technology, think they have cracked the problem.

Most ocean waves move independently of one another. Sometimes, though, they travel in groups. Waves within a group have the potential to share energy via a phenomenon called modulation instability, in which one wave grows at the expense of the others and all of the group’s power is thus concentrated into it.

Past teams of researchers who have attempted to predict such rogues have tried monitoring every wave in a region using radar, and then forecasting the behaviour of each of them. This needs a lot of processing power—far more than is carried on board an average merchant vessel. Moreover, it can take hours to run the calculation, which rather diminishes its value. Yet Dr Cousins and Dr Sapsis suspected they could bypass these problems by ignoring most of the waves in an area and homing in on only a tiny, relevant subset of them.

Their system starts by tapping into statistics collected over the years by instruments such as buoys about a particular part of the ocean surface. Using these data, it works out how that sea area normally behaves. It then analyses this behaviour alongside data on wave heights and movements collected in real time by ships’ radar, looking for groups of waves that might possibly end up forming a rogue. Only when it has identified these does it bring the full power of the computer to bear on them. It thus conserves its resources for those analyses that actually matter.

The two researchers report in the Journal of Fluid Mechanics this week that because their algorithm is so parsimonious, it runs well on the sorts of laptops skippers often take to sea. They also report that when they tested it on 100 simulations containing 336 rogue waves, it was able to run all of the calculations needed to predict such waves in a matter of seconds. There were false alarms—91 of them. But, crucially, the algorithm successfully flagged up all 336 “real” rogues, and did so an average of 153 seconds before a putative wave would have struck. That is not enough time to get out of a wave’s path. Nor, in the researchers’ view, is reorienting the vessel so that it meets a wave bow first (which would be a natural response to stop a ship rolling and capsizing when hit) of much value in the face of rogues of this magnitude. The system does provide enough time, though, for a crew to batten down the hatches, both literally and metaphorically, and to brace for impact before they are hit, thus increasing the chance that both they and the vessel will survive.