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

def/ufs: Bug fix to avoid accessing uninitialized date #1112

Merged
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
9 changes: 8 additions & 1 deletion model/src/w3wavemd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT &
REAL :: ICEDAVE
!
LOGICAL :: SBSED
LOGICAL :: CPLWRTFLG
#ifdef W3_SEC1
INTEGER :: ISEC1
#endif
Expand Down Expand Up @@ -2432,8 +2433,14 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT &
do_startall = .true.
end IF
else
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
do_startall = .true.
end IF
end if
Expand Down