Skip to content

Commit 9ca3027

Browse files
committed
Fixed logic for masking of source calculations using PDLIB
1 parent 1190918 commit 9ca3027

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

model/src/w3srcemd.F90

+15-9
Original file line numberDiff line numberDiff line change
@@ -1294,18 +1294,24 @@ SUBROUTINE W3SRCE ( srce_call, IT, IMOD, &
12941294
END DO
12951295
END DO
12961296

1297-
! Set mask for computation of source terms based on MAPSTA
1298-
! and FLAGST. This originally is done in w3wavemd as a
1299-
! conditional statement around the W3SRCE call
1300-
SRC_MASK(I) = .NOT. (MAPSTA(IY(I),IX(I)) .EQ. 1 .AND. FLAGST(ISEA))
13011297

1298+
! Set SRC_MASK depednind on type of call:
1299+
IF(srce_call .EQ. srce_imp_pre) THEN
13021300
#ifdef W3_PDLIB
1303-
! This was originally in w3wavemd
1304-
IF( (IOBP_LOC(JSEA) .EQ. 1 .OR. IOBP_LOC(JSEA) .EQ. 3) &
1305-
.AND. IOBDP_LOC(JSEA) .EQ. 1 .AND. IOBPA_LOC(JSEA) .EQ. 0) THEN
1306-
SRC_MASK(I) = .TRUE.
1307-
ENDIF
1301+
! This was originally in w3wavemd
1302+
IF( (IOBP_LOC(JSEA) .EQ. 1 .OR. IOBP_LOC(JSEA) .EQ. 3) &
1303+
.AND. IOBDP_LOC(JSEA) .EQ. 1 .AND. IOBPA_LOC(JSEA) .EQ. 0) THEN
1304+
SRC_MASK(I) = .FALSE.
1305+
ELSE
1306+
SRC_MASK(I) = .TRUE.
1307+
ENDIF
13081308
#endif
1309+
ELSE ! srce_call = scre_imp_post or scre_direct
1310+
! Set mask for computation of source terms based on MAPSTA
1311+
! and FLAGST. This originally is done in w3wavemd as a
1312+
! conditional statement around the W3SRCE call
1313+
SRC_MASK(I) = .NOT. (MAPSTA(IY(I),IX(I)) .EQ. 1 .AND. FLAGST(ISEA))
1314+
ENDIF
13091315

13101316
I = I + 1
13111317
ENDDO ! Gather to local grid loop

0 commit comments

Comments
 (0)