HMNZS Manawanui, the Royal New Zealand Navy's specialist dive and hydrographic vessel was conducting a reef survey off the Samoan island of Upolu's southern coast before it ran aground .