From 9371bb02c0702b3c522ea57da175524213975f34 Mon Sep 17 00:00:00 2001 From: He Wang Date: Fri, 20 Dec 2024 22:22:41 -0500 Subject: [PATCH] Recover diagnostic "SSH_inst" Fix a bug that sea surface height averaged over every dynamic time step (SSH_inst) is not outputted correctly. --- src/core/MOM.F90 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/MOM.F90 b/src/core/MOM.F90 index 8716fe6cd8..e5d1f46086 100644 --- a/src/core/MOM.F90 +++ b/src/core/MOM.F90 @@ -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