Scientists have created a new tool that can give 5 minutes advance warning of a dangerous rogue wave in the ocean.