Flush + close the NetCDF file. Idempotent.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ocean_diag_t), | intent(inout) | :: | diag |
subroutine close_stream(diag) !! Flush + close the NetCDF file. Idempotent. class(ocean_diag_t), intent(inout) :: diag if (.not. diag%nc_stream%is_open) return call nc_close(diag%nc_stream%ncid) diag%nc_stream%is_open = .false. diag%nc_stream%ncid = -1 if (allocated(diag%nc_stream%stage)) deallocate (diag%nc_stream%stage) nullify (diag%emit_post_fire) end subroutine close_stream