Skip to content

Commit

Permalink
init_bugs: fix initialization bugs for deactivated source and deactiv…
Browse files Browse the repository at this point in the history
…ated triads and wave breaking for the implicit unstructured scheme.
  • Loading branch information
aronroland committed Aug 27, 2023
1 parent 02cb72f commit a0fcf42
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions model/src/w3srcemd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1539,9 +1539,9 @@ SUBROUTINE W3SRCE ( srce_call, IT, ISEA, JSEA, IX, IY, IMOD, &
evS = -evS
evD = 2*evD
ENDIF
#endif
B_JAC(ISP,JSEA) = B_JAC(ISP,JSEA) + SIDT * eVS
ASPAR_JAC(ISP,PDLIB_I_DIAG(JSEA)) = ASPAR_JAC(ISP,PDLIB_I_DIAG(JSEA)) - SIDT * eVD
#endif

#ifdef W3_TR1
eVS = VSTR(ISP) * JAC
Expand All @@ -1553,9 +1553,9 @@ SUBROUTINE W3SRCE ( srce_call, IT, ISEA, JSEA, IX, IY, IMOD, &
evS = -evS
evD = 2*evD
ENDIF
#endif
B_JAC(ISP,JSEA) = B_JAC(ISP,JSEA) + SIDT * eVS
ASPAR_JAC(ISP,PDLIB_I_DIAG(JSEA)) = ASPAR_JAC(ISP,PDLIB_I_DIAG(JSEA)) - SIDT * eVD
#endif
END DO
END DO

Expand Down
6 changes: 6 additions & 0 deletions model/src/w3wavemd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1453,6 +1453,12 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT &
call print_memcheck(memunit, 'memcheck_____:'//' WW3_WAVE TIME LOOP 13')
!
#ifdef W3_PDLIB

IF (LPDLIB .and. .not. FLSOU .and. .not. FSSOURCE) THEN
B_JAC = 0.
ASPAR_JAC = 0.
ENDIF

IF (LPDLIB .and. FLSOU .and. FSSOURCE) THEN
#endif

Expand Down

0 comments on commit a0fcf42

Please sign in to comment.