123600 

 123700 

 123800 

 123900 

 124000 

 124 100 

 124200 

 124300 

 124400 

 124500 

 124600 

 124700 

 124800 

 124900 

 125000 

 125100 

 125200 

 125300 

 1^5400 

 125500 

 125600 

 125700 

 125800 

 125900 

 1 26000 

 126100 

 126200 

 126300 

 126400 

 126500 

 126600 

 126700 

 126800 

 126900 

 127000 

 127100 

 127200 

 127300 

 127400 

 127500 

 127600 

 127700 

 127800 

 127900 

 128000 

 128100 

 128200 

 128300 

 128400 

 128500 

 128600 

 128700 

 128800 

 128900 

 129000 

 129100 

 129200 

 129300 

 129400 

 129500 

 129600 

 129700 

 129800 

 129900 

 1 30000 

 1 30 1 00 

 130200 

 130300 

 130400 

 130500 

 1 30600 

 130700 

 130800 



:*IF dSIM=0, THERE IS NO AOJ PT , SUB REFRAC CAN HANDLE IT. 



IF(dSIM.EO.O) GO TO 8 



GO TO 6 

 8 RETURN 



END 



SUBROUTINE WVNUM( DEPTH , T , RK ) 



G = 32. 17 



EPS=0.001 



TW0PI=6. 283185307 



SIGMA=TWOPI/T 



RK=TWOPI/(T*S0RT(G*DEPTH)) 



DO 100 IT=1,20 



ARG=RK*DEPTH 



EK=(G*RK*TANH(ARG) )-(SIGMA**2) 



EKPR = G*(ARG*( ( SECH( ARG ) ) **2 )+TANH( ARG ) ) 



RKNEW=RK-EK/EKPR 



IF(ABS(RKNEW-RK) .LE . ABS(EPS*RKNEW) ) GO TO 120 



RK=RKNEW 

 100 CONTINUE 



WRITE(6. 1000) IT, DEPTH, RK 

 1000 FORMAT(///, 10X, "ITERATION FOR K FAILED TO CONVERGE AFTE 

 * . 3X, 13, "ITERATION" ,/. "OUTPUT: DEPTH, RK " , 3X . 2F 1 3 . 5 ) 



CALL EXIT 



120 



RK=RKNEW 



IF(RK.GT.O.O) 



WRITE(6. 1020) 

 020 FORMAT(///, 10X, 



CALL EXIT 

 40 RETURN 



END 



GO TO 140 

 DEPTH, RK 

 " RK IS NEG" 



OUTPUT DEPTH,RK",3X,2F13.5) 



k********^ 



t:**********:* 



k ***** * 



IFICIA 

 RELINE 



SUBROUTINE SMOOTH (THETA , I MAX , UMAX , I JET , S JETTY , MMAX , Y ) 

 THIS WILL SMOOTH THE WAVE ANGLE FIELD TO ACCT FOR DIFF(ART 



DIMENSION TEMP (60, 20) , Y (60, 20) , THETA(60, 20) , I JET ( 10) 

 (MMAX+1) IS REO'D BECAUSE M-GROINS HAVE M+ 1 REACHES OF SHO 



DO 10 M=1 , MMAX+1 



IF(M.NE . 1 ) GO TO 3 



ILEFT=2 



IRIGHT=IJET( 1 ) 



GO TO 5 



3 IF(M.NE.MMAX+1 ) GO TO 4 

 ILEFT=IJET(MMAX)+1 

 IRIGHT=IMAX-1 



GO TO 5 



4 ILEFT=IJET(M-1 )+1 

 IRIGHT=IJET(M) 



5 CONTINUE 



DO 1 J=1,JMAX-1 



DO 1 I^ILEFT, IRIGHT 



IF( I .NE . ILEFT. AND. I .NE. IRIGHT) GO TO 15 

 TO GET HERE, MUST BE ON BOUN OR ADJ TO A STRUCTURE. 



IF(I .E0.2.0R. I .EQ. IMAX-1 ) GO TO 15 

 TO GET HERE, ADJ TO A STRUCT AND CAN BE ILEFT OR IRIGHT. 



IF(Y(I , J) .GE .SJETTY) GO TO 15 

 IF HERE, WITHIN JETTY AND ADJ TO EITHER SIDE. 



IF(I .EO. I LEFT) TEMP (I , J ) =0 . 5* ( THETA( I , J ) + THETA( 1+ 1 , J)) 



IF(I .EO. IRIGHT )TEMP (I , J ) =0 . 5* ( THETA ( I . J ) + THET A ( I - 1 . J) ) 



GO TO 1 

 15 TEMP (I , j)=0.25*THETA(I-1 , J )+0. 50*THETA( I , J )+0 . 25*THETA( 1 + 1 , J) 



1 CONTINUE 

 10 CONTINUE 



DO 2 J=1,JMAX-1 

 DO 2 1=2, IMAX-1 



2 THETAd , J) = TEMP(I , J) 

 RETURN 



END 



FUNCTION SECH(A) 

 SECH=1 .O/C0SH(A) 

 RETURN 

 END 

 ■***HERE IS WHERE THE IMSL ROUTINES MUST GO I 



LLY) 



83 



