Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve MOM_surface_chksum #687

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4028,7 +4028,7 @@ subroutine extract_surface_state(CS, sfc_state_in)
endif
endif

if (CS%debug) call MOM_surface_chksum("Post extract_sfc", sfc_state, G, US, haloshift=0)
if (CS%debug) call MOM_surface_chksum("Post extract_sfc", sfc_state, G, US, haloshift=0, symmetric=.true.)

! Rotate sfc_state back onto the input grid, sfc_state_in
if (CS%rotate_index) then
Expand Down
10 changes: 9 additions & 1 deletion src/core/MOM_checksum_packages.F90
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ subroutine MOM_surface_chksum(mesg, sfc_state, G, US, haloshift, symmetric)
logical :: sym

sym = .false. ; if (present(symmetric)) sym = symmetric
hs = 1 ; if (present(haloshift)) hs = haloshift
hs = 0 ; if (present(haloshift)) hs = haloshift

if (allocated(sfc_state%SST)) call hchksum(sfc_state%SST, mesg//" SST", G%HI, haloshift=hs, &
scale=US%C_to_degC)
Expand All @@ -182,6 +182,14 @@ subroutine MOM_surface_chksum(mesg, sfc_state, G, US, haloshift, symmetric)
scale=US%L_T_to_m_s)
if (allocated(sfc_state%frazil)) call hchksum(sfc_state%frazil, mesg//" frazil", G%HI, &
haloshift=hs, scale=US%Q_to_J_kg*US%RZ_to_kg_m2)
if (allocated(sfc_state%melt_potential)) call hchksum(sfc_state%melt_potential, mesg//" melt_potential", &
G%HI, haloshift=hs, scale=US%Q_to_J_kg*US%RZ_to_kg_m2)
if (allocated(sfc_state%ocean_mass)) call hchksum(sfc_state%ocean_mass, mesg//" ocean_mass", &
G%HI, haloshift=hs, scale=US%RZ_to_kg_m2)
if (allocated(sfc_state%ocean_heat)) call hchksum(sfc_state%ocean_heat, mesg//" ocean_heat", &
G%HI, haloshift=hs, scale=US%C_to_degC*US%RZ_to_kg_m2)
if (allocated(sfc_state%ocean_salt)) call hchksum(sfc_state%ocean_salt, mesg//" ocean_salt", &
G%HI, haloshift=hs, scale=US%S_to_ppt*US%RZ_to_kg_m2)

end subroutine MOM_surface_chksum

Expand Down
Loading