87100 

 87200 

 87300 

 87400 

 87500 

 87G00 

 87700 

 87800 

 87900 

 88000 

 88100 

 88200 

 88300 

 88400 

 88500 

 88600 

 88700 

 88800 

 88900 

 89000 

 89100 

 89200 

 89300 

 89400 

 89500 

 89600 

 89700 

 89800 

 89900 

 90000 

 90100 

 90200 

 90300 

 90400 

 90500 

 90600 

 90700 

 90800 

 90900 

 91000 



91 100 

 9 1200 

 91300 

 91400 

 91500 

 91600 

 91700 

 91800 

 9 1900 

 92000 



92 100 

 92200 

 92300 

 92400 

 92500 

 92600 

 92700 

 92800 

 92900 

 93000 

 93100 

 93200 

 93300 

 93400 

 93500 

 93600 

 93700 

 93800 

 93900 

 94000 

 94100 

 94 200 

 94300 



44 H( I , JJ)=SORT(ARG) 



45 H(I , JJ)=0.5*(H(I ,dd)+HOLD(I . JJ)) 

 HNONBR(Jd)=H(I ,dJ) 



C*IBREAK(I ) = dJ, THEREFORE dd WILL BE LEEWARD SIDE OF GRID AT INIT BREAK 

 IF(HB(I,dd) .LT. H(I,dd) .AND. HB( I , dd+ 1 ) . GE . HNONBR( dd+ 1 ) ) 

 * IBREAK(I)=Jd 

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

 SUMH=SUMH+ABS(H(I .dd)-HOLD(I , dd ) ) 

 502 CONTINUE 

 510 CONTINUE 



IBREAK( IEND)=IBREAK(IEND-1 ) 

 IBREAK(IBEGIN)=IBREAK(IBEGIN+1 ) 

 IF(SUMH.LT. (NPTS*0.01) ) GO TO 507 

 IF(NITER.GE.50) GO TO 507 

 501 CONTINUE 



WRITE(6.803) 

 507 CONTINUE 



802 F0RMAT(2X,4(F 15.5) ,////) 



803 F0RMAT(2X. "AFTER NITERS ITERATIONS, CONVERGENCE WAS NOT REACHED") 



804 F0RMAT(2X, "THE WAVE HT . ROUTINE CONVERGED IN, NITER= ",I5.//) 



805 F0RMAT(2X, "THIS IS MY CHECKING WRITE STATEMENT") 



80S F0RMAT(2X, "THE WAVE ANGLE ROUTINE CONVERGED IN, NITER= ",I5,//) 

 RETURN 

 END 



SUBROUTINE DI FF ( RHOND , THETAO , ANGLE , AMP ) 

 C****DIFFRACTION ABOUT SEMI INFINITE BREAKWATER ( PENNE Y -PR I CE ) 

 PI=3. 14159265 



ABSS = S I N( 0.5* (ANGLE -THETAO) ) 

 ABSP=SIN(O.5*(ANGLE+THETA0) ) 

 ABC =COS( ANGLE -THETAO) 

 ABC 1 =COS( ANGLE + THETAO) 

 XX=RHOND*ABC 

 XXC=COS(XX) 

 XXS=SIN(XX) 

 XX1=RH0ND*ABC1 

 XXC1=C0S(XX1 ) 

 XXS1=SIN(XX1 ) 

 AL^SORT(RHOND/PI ) 

 SIG=2.0*AL*ABSS 

 SIGP=-2 .0*AL*ABSP 

 CALL FRES(SIG,C,S,FR,FI ) 

 CALL FRES(SIGP,CP,SP,FRP.FIP) 

 SUM1=XXC*FR+XXS*FI+XXC1*FRP+XXS1*FIP 

 SUM2=XXC*FI-XXS*FR+XXC1*FIP-XXS1*FRP 

 AMP=SQRT(SUM1**2+SUM2**2) 

 RETURN 



END 



Q************+*********************++**********************************- 



SUBROUTINE FRES( A , C , S , FR , F I ) 

 C*FRESNEL INTEGRAL SUBROUT I NE * * * * AFTER ABROMOWITZ AND STEGUN. 

 Z=ABS(A) 

 P02=1 .5707963 



FZ=( 1 .0+0.926*2)/ (2. 0+1 .792*Z+3. 104*Z*Z) 

 GZ=1 .0/(2.0+4. 142*Z+3.492*Z*Z+6.670*Z*Z*Z) 

 XX=P02*Z*Z 

 CZ=C0S(XX) 

 SZ-SIN(XX) 

 C=0.5-GZ*CZ+FZ*SZ 

 S=0.5-FZ*CZ-GZ*SZ 

 IF( A GT .0.0) GO TO 50 



c=-c 



S=-5 

 50 FR=0.5*( 1 .0+C+S) 

 FI=-0.5*(S-C) 

 RETURN 

 END 



Q******************+*******************+****+************************** 



SUBROUTINE PREDIF 



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



COMMON/ AA/Y ZERO (60) 



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



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



78 



