G5300 

 65400 

 e5500 

 65600 

 65700 

 65800 

 65900 

 66000 

 66100 

 66200 

 66300 

 66400 

 66500 

 66600 

 66700 

 66800 

 66900 

 67000 



67 100 

 67200 

 67300 

 67400 

 67500 

 67600 

 67700 

 67800 

 67900 

 68000 



68 100 

 68200 

 68300 

 68400 

 68500 

 68600 

 68700 

 G8800 

 68900 

 69000 



69 100 

 69200 

 69300 

 69400 

 69500 

 69600 

 69700 

 69800 

 69900 

 70000 

 70100 

 70200 

 70300 

 70400 

 70500 

 70600 

 70700 

 70800 

 70900 

 7 1000 

 71 100 

 7 1200 

 71300 

 71400 

 7 1500 

 7 1600 

 7 1700 

 71800 

 7 1900 

 72000 

 72100 

 72200 

 72300 

 72400 

 72500 



960 IF(I NE . lEND) GO TO 961 



ALPHAS (I , J)=ATAN( (0.5*(Y(I.J)+Y(I,J+1))-0.5*(Y(I-1,J) 



♦ +Y( 1-1 , J+1 ) ) )/DX) 

 GO TO 962 



961 ALPHAS ( I . J)=ATAN((0.5*(Y(I + 1 . J ) + Y( 1+ 1 , J+ 1 ) ) -0 . 5* 



* (Y(I-1,d)+Y(I-1,J+1)))/(2.*DX)) 



962 DALPHA=ANGGEN-ALPHAS(I . J) 



THETAd.J )=ARSIN( (C(I ,d )/CGEN ) *SIN(DALPHA ) ) 

 C*MUST GET THETA WRT THE X-AXIS. 



THETA( I . J)=THETA( I , J)+ALPHAS(I ,d) 

 206 CONTINUE 

 C*NOW, WE MUST COMP THE BOUN WAVE HTS SO THE HTS CAN BE COMPUTED. 

 C*WILL USE THE EO. ****** DEL DOT (E*CG)=0.0 



C*N0W WE WILL CORRECT THE HT FOR SHOALING AND REFRACTION TO THE B.C. 

 C*WILL ALSO INITIALIZE H'S WITH THESE EQUATIONS FOR ENTIRE ARRAY. 



DO 500 I=IBEGIN. lEND 

 C*INITIALIZE TWO J-VALUES BEYOND dMAX IF IN REGION 1. 



IF(dEND(I) EO.JMAX) dINIT=2 



IF(JEND(I ) .NE. JMAX) JINIT=0 



DO 500 d=JBEGIN(I ) , JEND(I)+JINIT 



H(I,d)=HGEN*SORT(CGGEN/CG(I, J))*SORT(COS(ANGGEN)/COS(THETA(I, 



J))) 

 IF(HB(I , J) .LT.Hd, J)) H(I,J)=HB(I ,J) 

 500 CONTINUE 



LET'S FILL THE DY ARRAY. 



DY WILL BE INDEXED AS THE THETA TO WHICH WE ARE GOING. 



DO 209 I=IBEGIN, lEND 



DO 209 J=JBEGIN(I )+1 ,dEND(I ) 



DY( I ,0-1 )=0.5*(Y(I . J-1 ) + Y(I , J) )-0.5*(Y(I , J)+Y( I , J+1 ).) 



CONTINUE 



NITERS=100 



DO 100 NITER=1 .NITERS 



SUMANG=0.0 



60 LOOP" GOES FROM 2 TO IMAX IF ISTART =IBEGIN 



60 LOOP" GOES FROM IMAX-1 TO 1 IF ISTART=IEND 



DO 60 II=IBEGIN, lEND 

 C*MUST HAVE IT SET UP SO THAT THE KNOWN BOUNDARIES ANGLES AREN'" 



IFdSTART.EO. IBEGIN) I = II 



IFdSTART.EO. IBEGIN .AND. I. EO. IBEGIN) GO TO 60 



IF( ISTART. EO. I END) I = IEND- I I + IBEGIN 



IFdSTART.EO. lEND AND. I.EO.IEND) GO TO GO 

 C*ADX EQUALS ACTUAL DELTA X ACROSS SPACE STEP. 

 C*ONLY ON BOUNDARIES WHERE FORWARD OR BACKWARD DIFFERENCING. 



IF( I .NE . IBEGIN) GO TO G 



ADX=DX 



IP=I+1 



IM=I 



GO TO 12 

 6 IF( I .NE . I END) GO TO 10 



ADX=DX 



IP = I 



IM=I-1 



GO TO 12 



ADX=2 .0*DX 



IP=I+1 



IM=I-1 

 CONTINUE 



DO 40 J = UBEGIN( I ) . JENDd )-1 

 C*WILL GO FROM (JMAX-1) TO 1 BECAUSE THAT'S THE DIR WAVE COMES IT 



JJ=JEND(I )-1-J+JBEGIN(I ) 



OLDANGd , JJ) = THETA(I , JJ) 

 C*LOCATE MIDPOINT BETWEEN TWO ADJACENT BLOCK CENTERS 

 C*BECAUSE THETA'S JJ-VALUE IS THE SAME AS THE FIRST SHOREWARD Y \ 

 C*MUST USE JJ, JJ+1, AND JJ+2 TO COMPUTE YBAR . 



YBAR=0.25*(Y(I , Jd) + 2.0*Y(I , JJ+ 1 ) + Y(I .JJ + 2) ) 

 C*L0CATE APPROPRIATE INDICES ON IP AND IM GRID LINES. 



IMINUS=-1 



IPLUS=+1 



CALL LOCdM, JJ. JOIM. JSIM.YBAR, I MINUS) 



CALL LOCdP. JJ, JOIP, JSIP. YBAR. I PLUS) 

 C*NOW USE THE CONSERVATION OF WAVES EQUATION 



209 



C*DO 

 C*DO 



10 



12 



75 



