Close open NetCDF files properly in tsunami scenario