Skip to content

Commit

Permalink
Report mean temperature from MOM_state_stats()
Browse files Browse the repository at this point in the history
  Actually calculate the mean temperature and salinity reported by
MOM_state_stats().  Due to an oversight, these means were always being reported
as 0.  This changes the output when the debugging flag DEBUG_CONSERVATION=True.
All answers are bitwise identical.
  • Loading branch information
Hallberg-NOAA authored and marshallward committed Feb 26, 2022
1 parent 2e72b88 commit d46dbc7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/MOM_checksum_packages.F90
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ subroutine MOM_state_stats(mesg, u, v, h, Temp, Salt, G, GV, US, allowChange, pe
real, dimension(G%isc:G%iec, G%jsc:G%jec) :: &
tmp_A, & ! The area per cell [m2] (unscaled to permit reproducing sum).
tmp_V, & ! The column-integrated volume [m3] (unscaled to permit reproducing sum)
tmp_T, & ! The column-integrated temperature [degC m3]
tmp_S ! The column-integrated salinity [ppt m3]
tmp_T, & ! The column-integrated temperature [degC m3] (unscaled to permit reproducing sum)
tmp_S ! The column-integrated salinity [ppt m3] (unscaled to permit reproducing sum)
real :: Vol, dV ! The total ocean volume and its change [m3] (unscaled to permit reproducing sum).
real :: Area ! The total ocean surface area [m2] (unscaled to permit reproducing sum).
real :: h_minimum ! The minimum layer thicknesses [H ~> m or kg m-2]
Expand Down Expand Up @@ -294,6 +294,8 @@ subroutine MOM_state_stats(mesg, u, v, h, Temp, Salt, G, GV, US, allowChange, pe
T%average = T%average + dV*Temp(i,j,k)
S%minimum = min( S%minimum, Salt(i,j,k) ) ; S%maximum = max( S%maximum, Salt(i,j,k) )
S%average = S%average + dV*Salt(i,j,k)
tmp_T(i,j) = tmp_T(i,j) + dV*Temp(i,j,k)
tmp_S(i,j) = tmp_S(i,j) + dV*Salt(i,j,k)
endif
if (h_minimum > h(i,j,k)) h_minimum = h(i,j,k)
endif
Expand Down

0 comments on commit d46dbc7

Please sign in to comment.