From a3e143cba7929c8321aabe73365d4b500af903a7 Mon Sep 17 00:00:00 2001 From: Aron Roland Date: Mon, 23 Oct 2023 22:42:30 +0200 Subject: [PATCH] init_bugs2: solve neuman on boundary --- model/src/w3srcemd.F90 | 13 +++++++++---- model/src/w3wavemd.F90 | 11 +++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/model/src/w3srcemd.F90 b/model/src/w3srcemd.F90 index a846605d8..592d141c5 100644 --- a/model/src/w3srcemd.F90 +++ b/model/src/w3srcemd.F90 @@ -1530,8 +1530,13 @@ SUBROUTINE W3SRCE ( srce_call, IT, ISEA, JSEA, IX, IY, IMOD, & DVS = SIGN(MIN(MAXDAC,ABS(DVS)),DVS) ENDIF PreVS = DVS / FAKS - eVS = PreVS / CG1(IK) * CLATSL - eVD = MIN(0.,VD(ISP)) + IF (IOBP_LOC(JSEA) .EQ. 3) THEN + eVS = 0 + eVD = 0 + ELSE + eVS = PreVS / CG1(IK) * CLATSL + eVD = MIN(0.,VD(ISP)) + ENDIF B_JAC(ISP,JSEA) = B_JAC(ISP,JSEA) + SIDT * (eVS - eVD*SPEC(ISP)*JAC) ASPAR_JAC(ISP,PDLIB_I_DIAG(JSEA)) = ASPAR_JAC(ISP,PDLIB_I_DIAG(JSEA)) - SIDT * eVD #ifdef W3_DB1 @@ -1544,9 +1549,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 @@ -1558,9 +1563,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 diff --git a/model/src/w3wavemd.F90 b/model/src/w3wavemd.F90 index 44c80964d..c0c3195f9 100644 --- a/model/src/w3wavemd.F90 +++ b/model/src/w3wavemd.F90 @@ -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 @@ -1484,6 +1490,10 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT & CALL INIT_GET_ISEA(ISEA, JSEA) + IF ((IOBP_LOC(JSEA).eq.1..or.IOBP_LOC(JSEA).eq. 3).and.IOBDP_LOC(JSEA).eq.1.and.IOBPA_LOC(JSEA).eq.0) THEN + + + IX = MAPSF(ISEA,1) IY = MAPSF(ISEA,2) DELA=1. @@ -1556,6 +1566,7 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT & WRITE(740+IAPROC,*) ' SHAVETOT=', SHAVETOT(JSEA) FLUSH(740+IAPROC) #endif + ENDIF END DO ! JSEA END IF ! PDLIB #endif