57 IF (DP) 108,999,109 



58 C** CHECK IF DESIRED LIMIT OF VARIABLE HAS BEEN REACHED. 



59 108 IF (PK .LT. VALL) GO TO 3 



60 GO TO 133 



61 109 IF (PK .GT. VALL) GO TO 3 



62 133 GO TO ( 1 31 , 1 01 , 102 , 1 03, 104 , 1 05) ,NX 



63 131 FREO = PK 



64 GO TO 106 



65 101 C(NY) = PK 



66 IF (NZ .NE. 0) GO TO 106 



67 134 IF (NY .EO- N) GO TO 135 



68 GAIVIIVIA(NY) = 0. 



69 IF (NY .LT. 2) GO TO 106 



70 135 GAMIVIA(NY-1 ) = 0. 



71 GO TO 106 



72 102 Z(NY) = PK 



73 IF (NZ .EQ. 1 ) GO TO 106 



74 IF (NY . LT. N) GO TO 134 



75 IF (NUMBER .EQ. 1) GO TO 106 



76 C(NY) = 0. 



77 GO TO 106 



78 103 GAMMA (NY) = PK 



79 IF (NZ .NE.O) GO TO 106 



80 d = NY + 1 



81 DO 121 I = J,N 



82 C(I) = 0. 



83 121 CONTINUE 



84 104 DPK(NY) = PK 



85 GO TO 106 



86 105 RHO(NY) = PK 



87 106 CONTINUE 

 88 



89 C** CCV.FLETE PROFILE ** 



90 DO 100 1 = 1 ,N 



91 C** SET UNSPECIFIED DENSITIES TO 1.02 (SEA WATER). 



92 IF (RHO( I ) .NE.O. ) GO TO 40 



93 RHO(I)=1.02 



94 40 IF (I .E0.1 ) GO TO 50 



95 C** COMPUTE VELOCITY AT BOTTOM OF PREVIOUS LAYER. 



96 TEMP=CI( 1-1 )**2 



97 TEMDR = C( 1-1 )**2 



98 TEMDI=(TEMDR+TEMDR+TEMDR-TEMP)*CI( 1-1 ) 



99 TEMDR = (TEMDR-TEMP-TEMP-TEMP)*C( 1-1 ) 



100 TEMP=( GAMMA ( 1-1 )+GAMMA( 1-1 ) ) * ( Z( I )-Z ( 1-1 ) )-C( 1-1 ) 



101 TEMDEN=TEMP**2+CI( 1-1 )*+2 



102 TEM1=(TEMDI*CI( 1-1 ) -TEMDR*TEMP ) /TEMDEN 



103 TEM1 I=(-TEMDI*TEMP-TEMDR*CI( 1-1 ) ) /TEMDEN 



104 CB(I )=SORT( .5*(TEM1+S0RT(TEM1**2+TEM1 I**2) ) ) 



105 CBI(I )=TEM1 I/(CB( I)+CB( I)) 



106 50 IF (C(I).NE.O) GO TO 60 



107 C** IF VELOCITY WAS UNSPECIFIED USE VELOCITY AT BOTTOM OF PREVIOUS LAYER 



108 C(I)=CB(I) 



109 60 IF (DPKfn .NE.O. ) GO TO 70 



110 CI(I)=0. 



111 GO TO 80 



112 C** IF ATTENUATION IS TO BE APPLIED TO A LAYER, COMPUTE COMPLEX VELOCITY 



113 C** KEEP ABSOLUTE C EQUAL TO GIVEN REAL C FOR SIMPLICITY. 



95 



