

31 



C 





HEIGHT 



30 





32 





DO 200 J=2 T NM1 



HEIGHT 



31 





33 





JP=J+1 



HEIGHT 



32 





34 





3M-J-1 



HEIGHT 



33 





35 





DM1=CCG(IM,JP)AGRDK<IM.JP)ASI(IM,JP) 



HEIGHT 



34 





36 





DM2=CCG( IM, JM)AGRDK( IM, JM)*SI( IM, JM) 



HEIGHT 



35 





37 





DH3=CCG(I,JP)AGRDK(I,JP)ASI(I.JP) 



HEIGHI 



36 





38 





DM4=CCG(I,JM)AGRDK(I,JH)ASI(I,JH> 



HEIGHT 



'7 





39 





DM6=(UTA(DM1AH( IM, JP)AA2-DM2AH< IN, JM)AA2) 



HEIGHI 



38 





40 





/(DY2AYMUC(J)))+((1.0-WT)A(BH3AH(I,JP)AA2-DH4A 



HEIGHI 



39 





41 





H(I,JH)AA2)/(DY2AYHUC(J))) 



HEIGHI 



40 





42 



C 





HEIGHI 



41 





43 





DHl=(CCG(I,J)AGRDK(I,J)ACO(I,J))A(H(I f J)AH(I,J») 



HEIGHI 



42 





44 





DM2=(CCG( I, JH)AGRDK( I, JH)ACO< I, JM) )A(H( I, JM)AH( I, JH) ) 



HEIGHT 



43 





45 





DM3=<CCG< I, JP)AGRDK( I, JP)ACO( I,JP> )A(H( I, JP)AH( I. JP) i 



HEIGHT 



44 





46 





DH4=CCG(IM.J)AGRDK(IH,J)AC0(IN,J) 



HEIGHI 



45 





47 





DM5= ( ( DM6 ) A ( DXAXHUS ( IN ) ) +ALPHAADH2+ 



HEIGHI 



46 





48 





(1.0-2.0AALPHA)ADM1+ALPHAADM3)/DM4 



HEIGHI 



47 





49 



c 





HEIGHT 



48 





50 



CAAAAAAAA CONVERT AMPLITUDE FUNCTION 10 WAVE HEIGHT 



HEIGHT 



49 





51 



C 





HEIGHT 



50 





52 





DH7=DM5A(HEACIAHFACT) 



HEIGHI 



51 





53 



C 





HEIGHI 



52 





54 



CAAAAAAAA CHECK FOR WAVE HEIGHTS LESS THAN ZERO 



HEIGHI 



53 





55 



C 





HEIGHT 



54 





56 





IF1DH7. LI. 0.00001) DM7=0. 00001 



HEIGHT 



55 





57 





DM7=S0RT(DM7) 



HEIGHT 



56 





58 



C 





HEIGHI 



57 





59 



CAAAAAAAA CHECK FOR WAVE BREAKING OR WAVE TRANSFORMATION 



HEIGHI 



58 





60 



C 





HEIGHI 



59 





61 





IF(DM7.GI.STABLAD(IM,J)) THEN 



HEIGHI 



60 





62 



C 





HEIGHI 



61 





63 



Ckkkkkkkk CALCULATE ANGLES AND CELLS OF INFLUENCE 



HEIGHT 



62 





64 



C 





HEIGHT 



63 



1 



65 





THEIA=Z(IM,J)-PI 



HEIGHT 



64 



1 



66 





IFdHEIA.GE.O.) THEN 



HEIGHI 



65 



3 



67 





X1=0.5A(XX( IM)+XX( I) )-XX< IM) 



HEIGHI 



66 



2 



68 





X2=XX(I)-XXCIM) 



HEIGHT 



67 



2 



69 





Y1=YY(J+1)-YY(J) 



HEIGHI 



68 



2 



70 





Y2=0.5A(YY(J)+YY(J+1)>-YY(J> 



HEIGHT 



69 



2 



71 





ANG1=ATAN2(Y1,X1) 



HEIGHT 



70 



2 



72 





ANG2=AIAN2(Y2,X2) 



HEIGHT 



71 



2 



73 



C 





HEIGHI 



T) 



2 



74 





IF(THEIA.GT.ANGl) THEN 



HEIGHI 



73 



3 



75 





KEY=IBRK(J+1) 



HEIGHI 



"4 



3 



76 





IKEY=IM 



HEIGHI 



75 



3 



77 





JKEY=J+1 



HEIGHI 



76 



3 



78 





ELSE IF(IHEIA.GI.ANG2) THEN 



HEIGHI 



77 



3 



79 





KEY=IBRKM(J+1) 



HEIGHI 



78 



3 



80 





IKEY=I 



HEIGHI 



79 



3 



31 





JKEY=J+1 



HEIGHI 



80 



3 



82 





ELSE 



HEIGHT 



81 



3 



83 





KEY=IBRKM(J) 



HEIGHI 



82 



3 



84 





IKEY=I 



HEIGHI 



83 



3 



85 





JKEY=J 



HEIGHI 



84 



3 



86 





END IF 



HEIGHT 



85 



3 



87 



C 





HEIGHI 



86 



2 



88 





ELSE 



HEIGHT 



87 



2 



89 





X3=XX(I)-XX(IM) 



HEIGHI 



88 



F12 



