Chief of Navy Rear Admiral David Proctor told Newstalk ZB the death had hit the navy hard.
"Zach was a young sailor, with so much potential. The navy is mourning alongside his fiance, family and friends."
All dive training had been ceased while investigations were carried out and the equipment used had been seized by police.
Yarwood joined the RNZN in 2013 and served on HMNZS Te Kaha and Philomel.
He had been looking to join HMNZS Matataua as a qualified diver.
A commemoration service for Yarwood would be held in Auckland today ahead of his funeral in Napier next week.
Yarwood's family were being supported by a family liaison officer, his shipmates and the RNZN.
Police, WorkSafe NZ and the Coroner were investigating the incident. The NZDF would be conducting a Court of Inquiry.