Skip to content

Commit

Permalink
insure we do not try to calculate a date on an uninitialized value
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaMeixner-NOAA committed Oct 25, 2023
1 parent 8eb3596 commit 7149c97
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion model/src/w3wavemd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT &
!
#ifdef W3_MPI
LOGICAL :: SBSED
LOGICAL :: CPLWRTFLG
#endif
#ifdef W3_SEC1
INTEGER :: ISEC1
Expand Down Expand Up @@ -2409,8 +2410,14 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT &
#endif
!
#ifdef W3_MPI
CPLWRTFLG=.FALSE.
IF ( FLOUT(7) .AND. SBSED ) THEN
IF (DSEC21(TIME,TONEXT(:,7)).EQ.0.) THEN
CPLWRTFLG=.TRUE.
END IF
END IF
IF ( ( (DSEC21(TIME,TONEXT(:,1)).EQ.0.) .AND. FLOUT(1) ) .OR. &
( (DSEC21(TIME,TONEXT(:,7)).EQ.0.) .AND. FLOUT(7) .AND. SBSED ) ) THEN
( CPLWRTFLG ) THEN
IF (.NOT. LPDLIB) THEN
IF (NRQGO.NE.0 ) THEN
#endif
Expand Down

0 comments on commit 7149c97

Please sign in to comment.