109000 DO 120 I=IDUML, IdET(M) 



109100 J2(I)=d1(I) 



109200 120 d1(I ) = 1 



109300 DO 121 I=IDUML. IJET(M) 



109400 DO 121 J = U1( I ) . J2( I )-1 



109500 121 NPTS=NPTS+1 



109G00 IMAXT=IDUMR 



109700 IDUMLL=IDUML 



109800 IJETT=IJET(M) 



109900 IJETP1=IJET(M)+1 



10000 CALL REFRAC( Ji , J2,NPTS. IDUMLL, IJETT. IDUMLL.M) 



M0100 IMAXT=IDUMR 



10200 IdETT=IdET(M) 



10300 IdETP1=IJET(M)+1 



10400 IDUMLL^IDUML 



10500 DO 122 I=IdET(M)+1 .IDUMR 



10600 d2(I)=J1(I) 



10700 122 J1(I)=1 



10800 NPTS=0 



10900 DO 123 I=IJET(M)+1 , IDUMR 



ilOOO DO 123 d=d1( I ) ,02(1 )-1 



11 100 123 NPTS=NPTS+1 



11200 IMAXT=IDUMR 



11300 IDUMLL=IDUML 



11400 IdETT=IdET(M) 



11500 IJETP1=IJET(M)+1 



11600 CALL REFRAC(J1 ,d2,NPTS. IJETP1 , IMAXT. IMAXT.M) 



11700 IMAXT=IDUMR 



11800 IiJETT = IJET(M) 



11900 I>JETP1 = IJET(M)+1 



12000 IDUMLL-IDUML 



12100 GO TO 13 



12200 C*THIS SECTION HANDLES REFRACT/DIFF IF THETAO>0.0 



12300 12 CONTINUE 



12400 C*FIRST, REGION 2- ALL REFRACTION. 



12500 NPT5=0 



12600 DO 110 I=IDUML, IJET(M) 



12700 J2(I)=d1(I) 



12800 1 10 d1( I )=1 



12900 DO 111 I=IDUML, IJET(M) 



13000 DO 111 J=d1(I ), J2(I )-1 



113100 111 NPTS=NPTS+1 



I13200 IMAXT=IDUMR 



13300 IDUMLL^IDUML 



13400 IdETT=IdET(M) 



13500 IdETP1=IJET(M)+1 



113600 CALL REFRAC( J1 ,d2,NPTS, IDUMLL. IJETT, IDUMLL.M) 



13700 IMAXT=IDUMR 



13800 IUETT=IJET(M) 



13900 IJETP1=IJET(M)+1 



114000 IDUMLL^IDUML 



114 100 C*NOW WILL DO REGION 3 OF THE POS THETAO CASE. 



14200 DO 112 I=IdET(M)+1 , IDUMR 



14300 J2(I)=J1(I) 



14400 112 J1( I )= 1 



14500 DO 113 I = IdET(M) + 1 , IDUMR 



14600 d1REF(I)=1 



14700 C*WILL GO ONE PT . BEYOND J2(I) TO MAKE SURE OUTOF DIFF ZONE, 



14800 DO 114 d=d1(I) ,d2(I)+1 



14900 XC00R=(I-1 .0)*DX 



15000 YC00R=O.5*(Y(I , d )+Y ( I , d+ 1 ) ) 



15100 ANGLE = ATAN( ( XCOOR-XDI STN ) / ( SdETTY - YCOOR ) ) 



115200 IF(YCOOR.GT. SdETTY) ANGLE=PI+ANGLE 



115300 C*IF LEAST d-VALUE IS OUT OF SHAD ZONE , SO ARE OTHER d'S.(FOR EACH I) 



115400 IF(ANGLE.GT. ABS(THETAO(M) ) ) GO TO 115 



I 15500 RAD=SORT( ( XCOOR-XDI STN) **2+( SdETTY-YCOOR ) **2 ) 



15500 RHOND=RAD*TWOPI/ELTIP 



15700 THE=THETAO(M) 



15800 CALL DIFF(RHOND. THE, ANGLE. AMP) 



15900 ANGRAD=ANGLE 



16000 C*WILL NOW REFRACT DIFFRACTED WAVES IN SHAD ZONE USING SNELL"S. 



1G100 CTIP=ELTIP/T 



16200 ALPHAS (I , d ) =ATAN( (0 . 5* ( Y (1+ 1 . d)+Y ( 1+ 1 , d+ 1 ) ) -0 . 5* 



81 



