114 70 TEIV!P = 5457ar. *FREQ 



115 TEMDI=DPK( I )*C( I ) 



116 TEMDR=TEMP**2+TEMDI**2 



117 CI( I)=TEMDI*TEMP*C( I )/TEMDR 



118 C( I)=TEMP**2*C( I )/TEMDR 



119 80 IF (GAMIVIA( I ) .NE. 0. ) GO TO 100 



120 IF (1 .EO.N) GO TO 90 



121 C** COMPUTE GRADIENT IF NOT GIVEN. 



122 GAMMA! I)=(C( 1+1 )**2-C(I )**2)*C(I)/(2.*C(I+1)**2*(Z(I+1)-Z(I))) 



123 IF { 1 . EO.N) GO TO 90 



124 GO TO 100 



125 C** REDUCE LAYERS BY ONE IF FINAL POINT ONLY DEFINES GRADIENT IN LAST LAYER. 



126 90 N=N-1 



127 100 CONTINUE 

 128 



129 C** COMPUTE USEFULL QUANTIES *+ 



130 OMEGA=6.283185307"FREO 



131 DO 120 1 = 1 ,N 



132 TEMP=C( I )+*2+CI( I )**2 



133 CAY(I )=OMEGA*C{ I )/TEMP 



134 CAYI( I )=-OMEGAtCI ( I )/TEMP 



135 CAYSO( I )=:CAY( I )* + 2-CAYI (I )**2 



136 CAYSOI( I )=2. *CAY(I )*CAYI( I ) 



137 TEMDR=-2.+GAMMA( I )*CAYSQ( I ) 



138 TEMDI=-2.+GAMMA( I ) *CAYSOI ( I ) 



139 GCU(I ) = (TEMDR*C( I )+TEMDI*CI{ I ) )/TEMP 



140 GCUK I )=(TEMDI*C( I )-TEMDR*CI( I ) )/TEMP 



141 TEMP = EXP(ALOG(GCU( I )**2+GCUI (I )**2)/6. ) 



142 GI( I )=TEMP*SIN(ATAN2(GCUI ( I ) ,ABS(GCU( I) ) )/3. ) 



143 G(I )=S0RT(TEMP*+2-GI( I )**2) 



144 IF (GAMMA( I ) . LT.O. ) GO TO 110 



145 G(I)=-G(I) 



146 110 GI(I)=-GI(I) 



147 C** y.'.: IS A LAVC'; STRENGH parameter USED ONLY TO COmPA^E WITn CTiiE?; W,ZZZ 



148 XMI=-GI(I)*(Z(I + 1 )-Z(I) ) 



149 XM = -G( I )*(Z( 1 + 1 )-Z(I) ) 



150 GSQK I)=2. *G( I )+GI( I ) 



151 120 GSO( I )=G( I )**2-GI { I)**2 



152 IF (JX .GT. 0) GO TO 113 



153 C** GO TO INITIAL 3 STEPS OR TO THE STANDARD STEP. 



154 IF (NUMBER - 4) 71,111,122 



155 71 CALL SETUP 



156 CALL DETNT(N,DET,DETI) 



157 VEL=DET 



158 VELI=DETI 



159 DELTA=STEP 



160 DELTI^STEPI 



161 IF(DELTA.NE.O. )G0 TO 250 



162 IF(DELTI .EQ.O. )DELTA=.01 



163 250 SIZE2=100. 



164 IF (K6.LT.3) PRINT 1320, V , VI , DET , DETI , A ( 21 , 4) , 0(21 , 4 ) 



165 C** ITERATE FOR MODE UP TO 7 STEPS. 



166 DO 310 J=1 , 12 



167 V=V+DELTA 



168 VI=VI+DELTI 



169 C** DO NOT PERMIT IMAGINARY PART TO BECOME NEGATIVE. 



170 IF (VI) 260,270,280 



96 



