♦CALL PftRAM 



CQKHON/CONST/M, Ni H2, N2, DX, DY 



CaW!ON/COOR/XX<IQ),YY<JQ) 



C0MH0N/C00R2/XX2(IQ2) , YY2( JQ2) 



CQMMGN/C00R3/X0WRTN ( 19, JQ) , YOWRTN ( IQ, JQ) 



C0JTON/DEPTHS/D(IQ2,JQ2),DD(IQ,J9> 



DIMENSION R(KQ) , IVAL(KQ) , JVALtKQ) ,DIST(KQ) 



INTEGER HD2,ND2 



Ml 10 1=1, fl 



READ(1,11) (DD(I,J),J=1,N) 



10 CONTINUE 



11 FORMAT (10F8.2) 



CALL P0UT(1,M,1,1,N,'0LD DEPTHS (X,1)',DD,1.0,IQ, JQ) 

 DO 1 1=1. M2 

 DO 1 J=1,N2 

 XD=XX2(I) 

 YD=YY2(J) 

 K=0 



IF(I.EQ.l.AND.J.EQ.l) GO TO 601 

 IFU.NE.l) 60 TO 550 

 IlFP=IlFM+30 

 DO 599 II=I1FM,I1FP 

 IF(II.LE.O.QR.II.ST.M) 60 TO 599 

 DO 5 JJ=1,N 

 K=K+1 



DIST(K)=SQRT((XCWRTN(II,JJ)-XD)**2+(YC»ffiTN(II,JJ)- 

 1YD)»*2) 



CS=XOWRTN(II,JJ)-XD 

 SN=YOMRTN(II,JJ)-YD 

 IF<CS.6E.0.0.AND.SN.6E.0.0)R(K)=1.0 

 IF(CS.LT.0.0.AND.SN.6£.0.0)R(K)=2.0 

 IF(CS.LT.0.0.AND.SN.LT.0.0)R(K)=3.0 

 IF(CS.SE.0.0.AND.SN.LT.0.0)R(K)=4.0 

 IF(CS.EQ.O.O.AND.SN.EQ.O.O) 60 TO 603 

 IVAL(K)=II 

 JVAL(K)=JJ 



IF(K.GT.l) SO TO 565 

 DMIN=DIST(1) 

 I1=IVAL(1) 

 J1=JVAL(1) 

 Kl=l 



IF(DIST(K).GE.DMN) SO TO 5 

 DHIN=DIST(K) 

 K1=K 



CONTINUE 

 CONTINUE 

 I1=IVAL(K1) 

 J1=JVAL(K1) 

 R1=R(K1) 

 I1FM=I1-15 

 60 TO 552 

 601 MD2=(M»1.0) 

 ND2=(N*1.0) 



565 



5 

 599 



INTERPO 



6 



INTERPO 



7 



INTERPO 



8 



INTERPO 



9 



INTERPO 



10 



INTERPO 



11 



INTERPO 



12 



INTERPO 



13 



INTERPO 



14 



INTERPO 



15 



INTERPO 



16 



INTERPO 



17 



INTERPO 



18 



INTERPO 



19 



INTERPO 



20 



INTERPO 



21 



INTERPO 



22 



INTERPO 



23 



INTERPO 



24 



INTERPO 



25 



INTERPO 



26 



INTERPO 



27 



INTERPO 



28 



INTERPO 



29 



INTERPO 



30 



INTERPO 



31 



INTERPO 



32 



INTERPO 



33 



INTERPO 



34 



INTERPO 



35 



INTERPO 



36 



INTERPO 



37 



INTERPO 



38 



INTERPO 



39 



INTERPO 



40 



INTERPO 



41 



INTERPO 



42 



INTERPO 



43 



INTERPO 



44 



INTERPO 



45 



INTERPO 



46 



INTERPO 



47 



INTERPO 



48 



INTERPO 



49 



INTERPO 



50 



INTERPO 



51 



INTERPO 



52 



INTERPO 



53 



INTERPO 



54 



INTERPO 



55 



INTERPO 



56 



INTERPO 



57 



INTERPO 



58 



INTERPO 



59 



17 



