Skip to content

Commit c8dc42e

Browse files
author
Henri Drake
committed
Check if seaice_melt is associated before the checksum
1 parent 202ff90 commit c8dc42e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

config_src/drivers/FMS_cap/MOM_surface_forcing_gfdl.F90

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,8 +1796,9 @@ subroutine ice_ocn_bnd_type_chksum(id, timestep, iobt)
17961796
chks = field_chksum( iobt%sw_flux_nir_dif) ; if (root) write(outunit,100) 'iobt%sw_flux_nir_dif', chks
17971797
chks = field_chksum( iobt%lprec ) ; if (root) write(outunit,100) 'iobt%lprec ', chks
17981798
chks = field_chksum( iobt%fprec ) ; if (root) write(outunit,100) 'iobt%fprec ', chks
1799-
! hfd/Gives error: "Program received signal SIGSEGV: Segmentation fault - invalid memory reference."
1800-
chks = field_chksum( iobt%seaice_melt ) ; if (root) write(outunit,100) 'iobt%seaice_melt ', chks
1799+
if (associated(iobt%seaice_melt)) then
1800+
chks = field_chksum( iobt%seaice_melt ) ; if (root) write(outunit,100) 'iobt%seaice_melt ', chks
1801+
endif
18011802
chks = field_chksum( iobt%runoff ) ; if (root) write(outunit,100) 'iobt%runoff ', chks
18021803
chks = field_chksum( iobt%calving ) ; if (root) write(outunit,100) 'iobt%calving ', chks
18031804
chks = field_chksum( iobt%p ) ; if (root) write(outunit,100) 'iobt%p ', chks

0 commit comments

Comments
 (0)