72600 

 72700 

 72800 

 72900 

 73000 

 73100 

 73200 

 73300 

 73400 

 73500 

 73G00 

 73700 

 73800 

 73900 

 74000 

 74 100 

 74200 

 74300 

 74400 

 74500 

 74600 

 74700 

 74800 

 74900 

 75000 

 75100 

 75200 

 75300 

 75400 

 75500 

 75600 

 75700 

 75800 

 75900 

 76000 

 7G100 

 76200 

 76300 

 76400 

 76500 

 76600 

 76700 

 76800 

 76900 

 77000 



77 100 

 77200 

 77300 

 77400 

 77500 

 77600 

 77700 

 77800 

 77900 

 78000 



78 100 

 78200 

 78300 

 78400 

 78500 

 78600 

 78700 

 78800 

 78900 

 7 9000 

 79100 

 79200 

 79300 

 79400 

 79500 

 79600 

 79700 

 79800 



PART1C=RK(I , JJ+1 )*SIN(THETA(I . JJ+ 1 )) ^ 



PART2 = -DY(I ,lIJ)/ADX 

 C*WILL LINEARLY INTERPOLATE TO DETERMINE RK*COS( THETA ) AT 1+1 AND 1-1. 

 C*IF NO ADJ SHOREWARD PT EXISTS, PUT IN ZERO FOR TERMS IN GOV. EO. 



IF(dSIM.NE.O) GO TO 301 



PART3B=0.0 



GO TO 302 



301 T0PIM=RK(IM, JOIM-1 ) *COS( THETA ( IM , JOIM- 1 )) 

 B0TIM=RK(IM, JSIM)*COS( THETA (IM.JSIM)) 



T0TALB=O.5*(Y(IM,a0IM)+Y(IM, JOIM- i ) ) -0 . 5* ( Y ( IM. dSIM+ 1 )+Y(IM, JSIM) ) 

 DUMB=0.5*(Y(IM, J0IM)+Y(IM,d0IM-1 ))-YBAR 

 PART3B=((T0TALB-DUMB)*(T0PIM-B0TIM)/T0TALB)+B0TIM 



302 IF( JSIP.NE .0) GO TO 303 

 PART3A=0.0 



GO TO 304 



303 T0PIP = RK(IP,iJ0IP-1 )*C0S(THETA(IP, JOIP-D) 

 BOTIP=RK(IP,dSIP)*COS(THETA(IP, JSIP)) 



T0TALA=O.5*(Y(IP, JOIP)+Y(IP, JOIP-1 ) ) -0 . 5* ( Y ( IP . dSIP+ 1 )+Y ( IP , JSIP ) ) 

 DUMA=0.5*(Y(IP, JOIP)+Y(IP, J0IP-1))-YBAR 

 PART3A=((T0TALA-DUMA)*(T0PIP-B0TIP)/T0TALA)+BaTIP 



304 PART3=PART3A-PART3B 



C*N0W MUST FIND RK*SIN( THETA ) FOR 1+1 AND 1-1 AT J+1 

 YBARP=0.25*(Y( I .JJ+1 )+2. *Y( I , JJ+2 )+Y( I , JJ+3)) 

 CALL L0C(IM, JJ+1 , JPOIM, JPSIM.YBARP. IMINUS) 

 CALL LOCdP, JJ+1 . JPOIP. JPSIP.YBARP. I PLUS) 

 IF(JPSIM.NE.O) GO TO 305 

 PART1B=0.0 

 GO TO 306 



305 TaPM=RK(IM. JPOIM-1 ) *5IN( THETA( IM, JPOIM- 1 )) 

 B0TM=RK(1M. JPSIM)*SIN( THETA (IM.JPSIM) ) 

 T0TB=0.5*(Y(IM,JP0IM)+Y(IM, JPOIM- 1))-0.5*(Y(IM,JPSIM+1)+ 



* Y(IM,JPSIM)) 

 DUMPB=0.5*(Y(IM, JPOIM )+Y(IM, JPOIM-1 ))-YBARP 

 PART1B=( (TOTB-DUMPB)*(TOPM-BOTM)/TOTB)+BOTM 



306 IF( JPSIP.NE.O) GO TO 307 

 PART1A=0.0 



GO TO 308 



307 T0PP = RK( IP, JPOIP- 1 ) *S I N( THETA (I P. JPO I P-D) 

 BOTP=RK(IP, JPSIP)*SIN(THETA(IP, JPSIP)) 



T0TA=0.5*(Y(IP. JPOIP)+Y(IP, JPOIP-1 ) )-0 . 5* ( Y (IP , JPSIP+ 1 )+Y( IP , JPSIP 



)) 

 DUMPA=^0.5*( Y( IP. JPOIP ) + Y( IP, JPOIP-1 ) )-YBARP 

 PART1A=((T0TA-DUMPA)*(T0PP-B0TP)/T0TA)+B0TP 



308 PART1=TAU*PART1B+( 1.-2. *TAU ) *PART 1C+TAU*PART 1 A 

 IF( JPSIM.E0.O)PART1 = ( 1 . -TAU)*PART1C+TAU*PART1A 

 IF(JPSIP.E0.O)PART1=TAU*PART1B+( 1 . -TAU)*PART1C 

 ARG=((PART1+PART2*PART3)/RK(I , JJ)) 



C*IF THE ROUTINE IS TO BLOWUP, USE SNELLS LAW. 

 IF(ABS(ARG) .LE . 1 O) GO TO 41 

 ARG=(C(I,JJ)/C(I,JJ+1))*SIN(THETA(I.dJ+1)) 

 IF(ARG.GT. 1 .0) ARG=1.0 

 THETA ( I . JJ)=ARSIN(ARG) 

 GO TO 42 



41 THETA( I . JJ)=ARSIN(ARG) 



42 THETA (I . JJ ) =0 . 5* ( THETA( I . JJ )+OLDANG( I . JJ ) ) 

 SUMANG=SUMANG+(ABS(THETA( I . JJ)-OLDANG( I . J J ) ) ) 



40 CONTINUE 

 60 CONTINUE 

 C*MUST EJECT IF WE HAVE REACHED AN ACCEPTABLE ITERATION ERROR 

 C*IF THE SUM OF THE ABSOLUTE VALUE OF ANGLE CHANGES DURING AN ITERATION 

 C* AVERAGES LESS THAN 0.02 DEGREES PER GRID ITS CLOSE ENOUGH. 

 IF(SUMANG.LT.(NPTS*0.0035)) GO TO 215 

 IF(NITER.GE .50) GO TO 215 

 1O0 CONTINUE 



WRITE(6,803) 

 2 15 CONTINUE 

 C*ITERATION LOOP FOR THE WAVE HEIGHT. 

 DO 501 NITER=1 .NITERS 

 SUMH=0.0 



DO 510 II=IBEGIN. lEND 

 C*MUST HAVE IT SET UP SO THAT THE KNOWN BOUNDARIES HTS. AREN'T RECOMP 

 IFdSTART.EQ. IBEGIN) I = II 

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



76 



