Skip to content

Commit 9371bb0

Browse files
herrwang0Hallberg-NOAA
authored andcommitted
Recover diagnostic "SSH_inst"
Fix a bug that sea surface height averaged over every dynamic time step (SSH_inst) is not outputted correctly.
1 parent 8062d20 commit 9371bb0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/core/MOM.F90

+5-1
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,11 @@ subroutine step_MOM(forces_in, fluxes_in, sfc_state, Time_start, time_int_in, CS
986986
do j=js,je ; do i=is,ie
987987
CS%ssh_rint(i,j) = CS%ssh_rint(i,j) + dt*ssh(i,j)
988988
enddo ; enddo
989-
if (CS%IDs%id_ssh_inst > 0) call post_data(CS%IDs%id_ssh_inst, ssh, CS%diag)
989+
if (CS%IDs%id_ssh_inst > 0) then
990+
call enable_averages(dt, Time_local, CS%diag)
991+
call post_data(CS%IDs%id_ssh_inst, ssh, CS%diag)
992+
call disable_averaging(CS%diag)
993+
endif
990994
call cpu_clock_end(id_clock_dynamics)
991995
endif
992996

0 commit comments

Comments
 (0)