Scientists are deploying underwater drones to prepare for New Zealand's next marine disaster.
As the Rena disaster dramatically showed, one of the biggest challenges for response teams was trying to work out how - and where - oil spills would travel in the sea.
And, while the 2011 calamity resulted in 350 tonnes of heavy fuel oil entering the Bay of Plenty and bringing a black tide to postcard beaches, a large-scale event out on New Zealand's vast marine estate would be a much greater nightmare.
Even trying to forecast the effects of such a disaster was a tough ask.
Niwa scientist Dr Helen Macdonald said there was generally little data to build models.
But Macdonald and fellow scientists have found a way to develop a sophisticated forecasting tool, by using Niwa computer models that describe ocean currents and state-of-the-art ocean gliders.
"The real-time observations from ocean gliders that map ocean weather are the best way to increase the shortage of observations in the New Zealand coastal ocean," she explained.
"Ocean gliders provide a higher resolution view for a relatively small part of the ocean, but as they are movable, we intend to have the high-resolution data where and when we need it."
These sea-going robots were specifically designed to observe sub-surface changes in temperature and salinity that vary over hours, days and weeks.
To scientists, this so-called "ocean weather" remained one of the big unknowns in understanding how the ocean transported and spread material like nutrients, sediments and pollution around.
"To overcome this challenge, we will develop smarter ocean models to make sure they are as close to the real world as possible."
As even satellites couldn't peer below the surface of the water, the team would also need to ensure the gliders were sent to those key sites that could make a difference to improving the model.
Next, once they had a working forecast tool in place, they'd test it against a hypothetical marine disaster.
"Hopefully, we never have to use this tool for another Rena-like disaster but there are many other benefits that will come from this project," she said.
"The tools that we are building can help understand the spread of marine disease, the evolution of marine heatwaves in the coastal zone, the fate of plastic pollution, and the dispersal of larvae, leading to smart planning of marine protected areas."
The study, supported with a million-dollar grant from the Ministry of Business, Innovation and Employment's Endeavour Fund, wasn't the first time Niwa has used to underwater robots to learn more about our oceans.
Gliders have been used in experiments simulating the effects of seabed mining off our coasts, along with another Cook Strait-based study that could make a vital contribution to our understanding how oceans were warming with climate change.