58100 C*IF THE OFFSHORE WAVE HT IS ZERO, NEVER GET TO HERE. 



58200 C*HOWEVER IF THE H IS SUCH THAT IT WOULD BREAK INSHORE OF Y(I,2) 



58300 C*DEEPB(I) WOULD STILL BE ZERO AND DISTR(I,J) WOULD BLOW-UP. 



58400 DO 20 1=1 , IMAX 



58500 IF(DEEPB(I ) .GT.0.0) GO TO 20 



58600 DEEPBd ) = (H(I , 1 )*DEEP(I , 1 ) **0 . 25/CAPPA ) * *0 . 8 



58700 HBO( I )=CAPPA*DEEPB(I) 



58800 20 CONTINUE 



58900 HBO( 1 )=HB0(2) 



59000 HBO( IMAX+1 )=HBO( IMAX) 



59100 DEEPB( 1 )=DEEPB(2) 



59200 DEEPB(IMAX+1)=DEEPB(IMAX) 



59300 RETURN 



59400 END 



59500 Q*********+****************+**************************+***************** 



59600 SUBROUTINE BREAK( IMAX , dMAX ) 



59700 C*ROUTINE WILL DETERMINE HB AND DEEPB ON THE GRID LINES RATHER 



59800 C* THAN BETWEEN THEM. REO'D FOR COFF BEYOND SURF ZONE. 



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



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



60100 COMMON/MP/ RKB( 60 ) , HBI ( 60) , DEEPBI ( 60) 



60200 CAPPA=0.78 



60300 DO 1 1=2, IMAX 



60400 DO 2 JJ=1 ,dMAX 



60500 lI = JMAX-JJ+1 



60600 IF(H(I , J) .LT.HBd ,d)) GO TO 2 



60700 DEEPBId ) = ((H(I , J+1 )*DEEP(I . J+1 ) **0 . 25 )/CAPPA ) **0 . 8 



60800 HBK I )=CAPPA*DEEPBI ( I ) 



60900 C***ONCE THE HEIGHT & DEPTH AT BREAKING ARE FOUND, GO TO NEXT GRID-LINE. 



61000 GO TO 1 



61100 2 CONTINUE 



61200 1 CONTINUE 



6 1300 DO 20 1=1 , IMAX 



61400 IF(DEEPBI(I ) .GT.0.0) GO TO 20 



61500 DEEPBI(I) = (H(I , 1 )*DEEP(I , 1 ) **0. 25/CAPPA ) **0 . 8 



61600 HBId )=CAPPA*DEEPBI(I) 



61700 20 CONTINUE 



61800 DEEPBK 1 )=DEEPBI(2) 



6 1900 DEEPBI ( IMAX+ 1 )=DEEPBI( IMAX) 



62000 HBI( 1 )=HBI(2) 



62100 HBK IMAX+1 )=HBIdMAX) 



62200 RETURN 



62300 END 



62400 (-«*** + ♦**** + + + **♦** + ************ + ******* + ******************************** 



62500 SUBROUTINE REFRAC ( JBEGIN , JEND , NPTS , IBEGIN , lEND , ISTART , M) 



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



62700 C0MM0N/AA/YZER0(6O) 



62800 COMMON/B/ THETA ( 60, 20) , 0XTOT( 60) , 0LDANG(60, 20) , DY(60,20) 



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



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



63100 COMMON/D/SIGMA.G,ELO, JMAX, I MAX, PI ,TWOPI ,PI02,HGEN, I JET ( 10) ,S JETTY 



63200 C0MM0N/G/IBREAK(6O) .HN0NBR(20) 



63300 COMMON/ZZZ/NTIME 



63400 DIMENSION JBEGI N( 60 ) , JEND( 60 ) 



63500 c**************** THIS SUBROUTINE WILL DETERMINE H AND 



63600 c**************** THETA AT THE MID PT OF Y VALUES. 



63700 C***TAU IS THE FACTOR WHICH RECOUPLES THE REFRACTION EOS. SEE ABBOTT 



63800 TAU=0.25 



63900 C*MUST PRESCRIBE THE WAVE ANGLE AT THE OUTERMOSTCONTOUR BOX 



64000 C*SNELL'S LAW WILL BE USED TO START THINGS OFF. 



64100 C*THETA(I,J) WILL BE AT AREA'S CENTER AND WILL USE Y(I,J) IN NEG Y-DIR 



64200 C*WILL INITIALIZE ALL THETA ' S USING SNELL'S LAW. 



64300 DO 206 I = IBEGIN , I END 



64400 C*INITIALIZE TWO J-VALUES BEYOND JMAX, IF IN REGION 1. 



64500 IF( JEND( I ) EO. JMAX) JINIT = 2 



64600 IF( JENDd ) NE . JMAX ) JINIT = 



64700 DO 206 J= JBEGINd ) , JEND( I )+JINIT 



64800 C*MUST CORRECT FOR THE CONTOUR ORIENTATION, ALPHAS. 



64900 IF(I .NE . IBEGIN) GO TO 960 



65000 ALPHAS ( I , J ) = AT AN( (O . 5* ( Y (1+ 1 , J )+Y ( 1+ 1 , J+ 1 ) ) -O . 5* ( Y ( L, J ) 



65100 * +Y(I , J+1 ) ) )/DX) 



65200 GO TO 962 



74 



