Skip to content

Commit

Permalink
Ensured that checksums of climatology streams are only computed and o…
Browse files Browse the repository at this point in the history
…utput when checksum diagnostics are requested.
  • Loading branch information
matsbn committed Aug 21, 2024
1 parent 65e0b3e commit fd52d10
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
9 changes: 7 additions & 2 deletions drivers/nuopc/ocn_stream_sss.F90
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ subroutine ocn_stream_sss_interp(model_clock, rc)
use dshr_strdata_mod , only : shr_strdata_advance
use dshr_methods_mod , only : dshr_fldbun_getfldptr
use mod_forcing , only : sss_stream
use mod_checksum , only : chksummsk
use mod_checksum , only : csdiag, chksummsk

! input/output variables
type(ESMF_Clock), intent(in) :: model_clock
Expand Down Expand Up @@ -252,7 +252,12 @@ subroutine ocn_stream_sss_interp(model_clock, rc)

call fill_global(mval, fval, halo_ps, sss_stream(1-nbdy,1-nbdy))

call chksummsk(sss_stream(1-nbdy,1-nbdy),ip,1,'sst_stream')
if (csdiag) then
if (mnproc == 1) then
write(lp,*) 'ocn_stream_sss_interp:'
end if
call chksummsk(sss_stream(1-nbdy,1-nbdy),ip,1,'sss_stream')
end if

end subroutine ocn_stream_sss_interp

Expand Down
11 changes: 8 additions & 3 deletions drivers/nuopc/ocn_stream_sst.F90
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ subroutine ocn_stream_sst_interp(model_clock, rc)
use dshr_strdata_mod , only : shr_strdata_advance
use dshr_methods_mod , only : dshr_fldbun_getfldptr
use mod_forcing , only : sst_stream, ice_stream
use mod_checksum , only : chksummsk
use mod_checksum , only : csdiag, chksummsk

! input/output variables
type(ESMF_Clock), intent(in) :: model_clock
Expand Down Expand Up @@ -264,8 +264,13 @@ subroutine ocn_stream_sst_interp(model_clock, rc)
call fill_global(mval, fval, halo_ps, sst_stream(1-nbdy,1-nbdy))
call fill_global(mval, fval, halo_ps, ice_stream(1-nbdy,1-nbdy))

call chksummsk(sst_stream(1-nbdy,1-nbdy),ip,1,'sst_stream')
call chksummsk(ice_stream(1-nbdy,1-nbdy),ip,1,'ice_stream')
if (csdiag) then
if (mnproc == 1) then
write(lp,*) 'ocn_stream_sst_interp:'
end if
call chksummsk(sst_stream(1-nbdy,1-nbdy),ip,1,'sst_stream')
call chksummsk(ice_stream(1-nbdy,1-nbdy),ip,1,'ice_stream')
end if

end subroutine ocn_stream_sst_interp

Expand Down

0 comments on commit fd52d10

Please sign in to comment.