1 16300 

 1 16400 

 1 1S500 

 1 16600 

 1 16700 

 1 16800 

 1 16900 

 1 1 7000 

 1 17100 

 1 17200 

 1 17300 

 1 17400 

 1 17500 

 1 17600 

 1 17700 

 1 17800 

 1 17900 

 1 1 8000 

 1 18100 

 1 18200 

 1 18300 

 1 18400 

 1 18500 

 1 18600 

 1 18700 

 1 18800 

 1 18900 

 1 1 9000 

 1 1 9 1 00 

 1 19200 

 1 19300 

 1 19400 

 1 19500 

 1 19G00 

 1 19700 

 1 19800 

 1 19900 

 1 20000 

 120100 

 120200 

 120300 

 120400 

 120500 



1 2oeoo 



120700 

 120800 

 1 20900 

 121000 

 12 1 100 

 12 1200 

 121300 

 121400 

 1 2 1 500 

 12 1600 

 12 1700 

 121800 

 121900 

 122000 

 122100 

 122200 

 122300 

 122400 

 122500 

 122600 

 122700 

 122800 

 122900 

 123000 

 123100 

 123200 

 123300 

 123400 

 123500 



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



IF(I .EO. IJET(M)+1 ) ALPHAS (I , J) =ATAN( (0 . 5* ( Y( 1 + 1 , d ) + Y (1 + 1 , J+ 1 ) ) -O . 5* 



* (Y(I .d)+Y( I .d+1 ) ) )/DX) 

 DALPHA^ANGRAD- ALPHAS (I .d) 



THETA( I ,d)=ARSIN((C(I , d )/CTI P ) *S IN( DALPHA ) ) 



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



H(I ,d)=HINC*AMP 

 C*MUST CHECK TO SEE IF WAVE WOULD HAVE BROKEN. 



IF(HB(I ,d) .LE.Hd ,d) .AND.HBd , d+ 1 ) . GT . H( I . d+ 1 ))IBREAK(I ) = J 



IF(HB(I.d).LT.H(I.d)) H(I ,d)=HB(I .d) 

 1 14 CONTINUE 



GO TO 113 

 1 15 JIREFd )=d 

 1 13 CONTINUE 

 C*NOW MUST DO REFRAC FOR REGION 4. 



NPTS=0 



DO 116 I=IdET(M)+1 , IDUMR 



DO 1 16 d = d1REF(I ) .d2(I )-1 

 116 NPTS=NPTS+1 



IMAXT=IDUMR 



IDUMLL=IDUML 



IdETT=IdET(M) 



IdETP1=IdET(M)+1 



CALL REFRAC(d1REF,d2,NPTS, IdETPI , IMAXT, IMAXT.M) 



IMAXT=IDUMR 



IdETT=IdET(M) 



IdETP1=IdET(M)+1 



IDUMLL=IDUML 

 13 CONTINUE 

 200 CONTINUE 



RETURN 



END 



SUBROUTINE LOG ( IM , dd . dOIM , dS IM , YBAR , IDUM) 



COMMON/ A/ C(60,20) ,RK(60,20) , Y(60,20) . DEEP ( 60, 20) . ALPHAS ( 60. 20) 



C0MM0N/AA/YZER0(6O) 



COMMON/B/ THETA(6O.2O),0XTOT(6O) , OLDANG( 60, 20) , DY(60,20) 



COMMON/C/ H(60,20) .CG(60,20) . H0LD(60. 20) . HB(60. 20) , YB(60) 



COMMON/N USED/dUSE,T.CO,CGEN,CGGEN,ANGGEN,DX,BERM.THETAO( 10) ,MMAX 



COMMON/D/SIGMA,G,ELO,dMAX, IMAX,PI ,TWOPI ,PI02,HGEN, IdET( 10) , SdETTY 

 C*SUBROUTINE LOC FINDS d-VALUES WHICH ARE GREATER AND LESS THAN YBAR. 



dOIM=2 

 2 AA=0.5*(Y(IM,dOIM)+Y(IM,dOIM-1 )) 



IF(AA .GT. YBAR) GO TO 4 



dOIM=dOIM+1 

 C*THE FOLLOWING IS REO'D SO THAT DY/DX>0.5 

 C*WILL DTERMINE K SIN THETA ON IM-LINE AT A DIST YBAR. 

 C*WILL CALL THIS POINT dUSE+1 



IF(dOIM.LE.dUSE) GO TO 2 



dOIM=dUSE+1 



Y( IM,dOIM)=YBAR 

 C* DEPTH AT THIS POINT WILL BE COMP ASSUMING CONST BEACH SLOPE ON I=IM 



DEL=.5*(Y(IM,dOIM-1)+Y(IM,dOIM-2))-.5*(Y(IM,dOIM-2)+Y(IM.dOIM-3)) 



BSLOPE=(DEEP(IM,dOIM-2)-DEEP(IM,dOIM-3))/DEL- 



DEEP(IM,dOIM-1 )=DEEP(IM,dOIM-2)+BSLOPE*(Y(IM,dOIM)-Y(IM,dOIM-1 )) 



DEPTH=DEEP(IM,dOIM-1 ) 



CALL WVNUM(DEPTH,T,DUMK) 



RK( IM.dOIM-1 )=DUMK 



C( IM.dOIM-1 )=CO*TANH(RK(IM,dOIM-1)*DEEP(IM,dOIM-1 ) ) 



EN=0.5*( 1 .0+( (2.0*RK(IM,dOIM-1 )*DEEP(IM.dOIM-1 ))/SINH( 

 * 2. *RK(IM,dOIM-1 )*DEEP(IM,dOIM-1 )) )) 



CG( IM,dOIM-1 )=C(IM,dOIM-1 )*EN 

 C*WILL USE SNELL'S LAW TO DETERMINE THE WAVE ANGLE HERE 

 C*ANGLE OF CONTOUR WILL BE ASSUME TO BE THE SAME AS THE dMAX+1 CONTOUR 



IF( IDUM. EO. 1 )ALPH=ATAN( ( Y (I M . dOIM- 1 ) - Y (IM- 1 , dOIM- 1 ) )/DX) 



IFdDUM.EO. -1 )ALPH = ATAN( ( Y ( IM+ 1 . dOIM- 1 ) -V (IM . dOIM- 1 ))/DX) 



DALPHA =ANGGEN-ALPH 



THETA(IM,dOIM-1 ) =ARS I N( (C( IM , dOIM- 1 )/CGEN) *SIN( DALPHA ) ) 



THETA(IM,dOIM-1 ) =THETAdM, dOIM- 1 ) + ALPH 

 4 dSIM=dMAX-1 

 6 AA=0.5*(Y(IM,dSIM)+(Y(IM,dSIM+1))) 



IF(AA.LT. YBAR) GO TO 8 



dSIM=dSIM-1 



82 



