Skip to content

Commit

Permalink
Recover diagnostic "SSH_inst"
Browse files Browse the repository at this point in the history
Fix a bug that sea surface height averaged over every dynamic time step
(SSH_inst) is not outputted correctly.
  • Loading branch information
herrwang0 authored and Hallberg-NOAA committed Dec 30, 2024
1 parent 8062d20 commit 9371bb0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,11 @@ subroutine step_MOM(forces_in, fluxes_in, sfc_state, Time_start, time_int_in, CS
do j=js,je ; do i=is,ie
CS%ssh_rint(i,j) = CS%ssh_rint(i,j) + dt*ssh(i,j)
enddo ; enddo
if (CS%IDs%id_ssh_inst > 0) call post_data(CS%IDs%id_ssh_inst, ssh, CS%diag)
if (CS%IDs%id_ssh_inst > 0) then
call enable_averages(dt, Time_local, CS%diag)
call post_data(CS%IDs%id_ssh_inst, ssh, CS%diag)
call disable_averaging(CS%diag)
endif
call cpu_clock_end(id_clock_dynamics)
endif

Expand Down

0 comments on commit 9371bb0

Please sign in to comment.