From 568c54c5a79078f34779002bf301f5787bfa932a Mon Sep 17 00:00:00 2001 From: Nicholas Hannah Date: Fri, 1 May 2015 07:13:54 -0700 Subject: [PATCH] Call diag_mediator_end to close open files. Closes #156 --- config_src/coupled_driver/ocean_model_MOM.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config_src/coupled_driver/ocean_model_MOM.F90 b/config_src/coupled_driver/ocean_model_MOM.F90 index 7b65986ade..2e317fc09f 100644 --- a/config_src/coupled_driver/ocean_model_MOM.F90 +++ b/config_src/coupled_driver/ocean_model_MOM.F90 @@ -38,7 +38,7 @@ module ocean_model_mod use MOM, only : calculate_surface_state use MOM_constants, only : CELSIUS_KELVIN_OFFSET use MOM_diag_mediator, only : enable_averaging, disable_averaging -use MOM_diag_mediator, only : diag_mediator_close_registration +use MOM_diag_mediator, only : diag_mediator_close_registration, diag_mediator_end use MOM_domains, only : pass_vector, AGRID, BGRID_NE, CGRID_NE use MOM_error_handler, only : MOM_error, FATAL, WARNING, is_root_pe use MOM_error_handler, only : callTree_enter, callTree_leave @@ -504,6 +504,7 @@ subroutine ocean_model_end(Ocean_sfc, Ocean_state, Time) ! (in) Time - The model time, used for writing restarts. call ocean_model_save_restart(Ocean_state, Time) + call diag_mediator_end(Time) call MOM_end(Ocean_state%MOM_CSp) if (Ocean_state%use_ice_shelf) call ice_shelf_end(Ocean_state%Ice_shelf_CSp) end subroutine ocean_model_end