Skip to content

Commit

Permalink
Remove diag_send_complete from disable_averaging
Browse files Browse the repository at this point in the history
diag_send_complete() is removed from disable_averaging(), due to
potential performance costs over sweeping through files and variables
for synchronization across nodes or other thread-like backround
operations.

It also prevents potential errors in drivers where
diag_manager_set_time_end was unset.

We will come back to this issue and work out a better strategy for
diagnostic synchronization.
  • Loading branch information
marshallward committed Jun 8, 2024
1 parent d66adff commit 0578393
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/framework/MOM_diag_mediator.F90
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ module MOM_diag_mediator
use MOM_diag_manager_infra, only : send_data_infra, MOM_diag_field_add_attribute, EAST, NORTH
use MOM_diag_manager_infra, only : register_diag_field_infra, register_static_field_infra
use MOM_diag_manager_infra, only : get_MOM_diag_field_id, DIAG_FIELD_NOT_FOUND
use MOM_diag_manager_infra, only : diag_send_complete_infra
use MOM_diag_remap, only : diag_remap_ctrl, diag_remap_update, diag_remap_calc_hmask
use MOM_diag_remap, only : diag_remap_init, diag_remap_end, diag_remap_do_remap
use MOM_diag_remap, only : vertically_reintegrate_diag_field, vertically_interpolate_diag_field
Expand Down Expand Up @@ -2079,10 +2078,8 @@ end subroutine enable_averages
subroutine disable_averaging(diag_cs)
type(diag_ctrl), intent(inout) :: diag_CS !< Structure used to regulate diagnostic output

call diag_send_complete_infra()
diag_cs%time_int = 0.0
diag_cs%ave_enabled = .false.

end subroutine disable_averaging

!> Call this subroutine to determine whether the averaging is
Expand Down

0 comments on commit 0578393

Please sign in to comment.