Skip to content

Commit

Permalink
update w3wave for restarts
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaMeixner-NOAA committed Jun 5, 2024
1 parent f66b6d4 commit 3c0eb43
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions model/src/w3wavemd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT &
SKIP_O, FLAG_O, FLDDIR, READBC, &
FLAG0 = .FALSE., FLOUTG, FLPFLD, &
FLPART, LOCAL, FLOUTG2
LOGICAL :: WRITE_RST
!
#ifdef W3_MPI
LOGICAL :: FLGMPI(0:8)
Expand Down Expand Up @@ -2538,6 +2539,7 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT &
!
TOFRST(1) = -1
TOFRST(2) = 0
WRITE_RST=.FALSE.
!
DO J=1, NOTYPE

Expand Down Expand Up @@ -2614,8 +2616,13 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT &
!
CALL W3IOTR ( NDS(11), NDS(12), VA, IMOD )
ELSE IF ( J .EQ. 4 ) THEN
CALL W3IORS ('HOT', NDS(6), XXX, IMOD, FLOUT(8) )
ITEST = RSTYPE
IF ( FLOUT(8) ) THEN
!FLOUT(8) Then only have 1 call per time-step to W3IORS
WRITE_RST=.TRUE.
ELSE
CALL W3IORS ('HOT', NDS(6), XXX, IMOD, FLOUT(8) )
ITEST = RSTYPE
END IF
ELSE IF ( J .EQ. 5 ) THEN
IF ( IAPROC .EQ. NAPBPT ) THEN
#ifdef W3_MPI
Expand Down Expand Up @@ -2701,7 +2708,7 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT &
TOUT(:) = TONEXT(:,J)
DTTST = DSEC21 ( TIME, TOUT )
IF ( DTTST .EQ. 0. ) THEN
CALL W3IORS ('HOT', NDS(6), XXX, IMOD, FLOUT(8) )
WRITE_RST=.TRUE.
ITEST = RSTYPE
CALL TICK21 ( TOUT, DTOUT(J) )
TONEXT(:,J) = TOUT
Expand Down Expand Up @@ -2733,6 +2740,9 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT &
END IF
END IF
END IF
IF ( WRITE_RST ) THEN
CALL W3IORS ('HOT', NDS(6), XXX, IMOD, .TRUE. )
END IF
! END OF CHECKPOINT
!
call print_memcheck(memunit, 'memcheck_____:'//' WW3_WAVE AFTER TIME LOOP 3')
Expand Down

0 comments on commit 3c0eb43

Please sign in to comment.