From b2f04527e07e3ec12c98c8eb7b7da0482602be86 Mon Sep 17 00:00:00 2001 From: Matthew Masarik Date: Tue, 30 Jan 2024 22:40:35 +0000 Subject: [PATCH] ww3_prnc.F90: IY out-of-range fix --- model/src/ww3_prnc.F90 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/model/src/ww3_prnc.F90 b/model/src/ww3_prnc.F90 index e77bbd918..59747d32a 100644 --- a/model/src/ww3_prnc.F90 +++ b/model/src/ww3_prnc.F90 @@ -1059,7 +1059,7 @@ PROGRAM W3PRNC ! Manages the simple closure of the grid ! IF (ICLO.EQ.ICLOSE_NONE) THEN - IF (IX21(IX,1).LT.1.OR.IX21(IX,1).GT.NXI-1) WRITE(NDSO,1042) IX, IY, X, Y + IF (IX21(IX,1).LT.1.OR.IX21(IX,1).GT.NXI-1) WRITE(NDSO,1041) IX, X, Y IX21(IX,1) = MAX ( 1 , MIN(IX21(IX,1),NXI-1) ) IX22(IX,1) = IX21(IX,1) + 1 ELSE @@ -1067,7 +1067,7 @@ PROGRAM W3PRNC IX22(IX,1) = MOD(IX21(IX,1),NXI)+1 END IF IY21(IX,1) = 1 + INT((Y-Y0I)/SYI) - IF (IY21(IX,1).LT.1.OR.IY21(IX,1).GT.NYI-1) WRITE(NDSO,1042) IX, IY, X, Y + IF (IY21(IX,1).LT.1.OR.IY21(IX,1).GT.NYI-1) WRITE(NDSO,1041) IX, X, Y IY21(IX,1) = MAX ( 1 , MIN(IY21(IX,1),NYI-1) ) IY22(IX,1) = IY21(IX,1) + 1 ! @@ -2438,6 +2438,9 @@ PROGRAM W3PRNC ' 2MS2 2MN2 2NK2 MNS2 MSN2 2SM2 3MSN2 ' & ' M4 MS4 MN4 M6 2MS6 2MN6'/) ! +1041 FORMAT (/' *** WAVEWATCH-III WARNING W3PRNC : '/ & + ' GRID POINT ',I6,2F7.2,/ & + ' NOT COVERED BY INPUT GRID.'/) 1042 FORMAT (/' *** WAVEWATCH-III WARNING W3PRNC : '/ & ' GRID POINT ',2I6,2F7.2,/ & ' NOT COVERED BY INPUT GRID.'/)