      REAL FUNCTION SVEL(SELECT,PRESS,TEMP,SALTY)
C
C     TITLE:
C     *****
C
C       SVEL   -- CALCULATE SOUND VELOCITY FROM PRESSURE, TEMPERATURE
C                 AND SALINTY.
C
C     METHOD:
C     ******
C
C       PARAMETER SELECT 'SELECTS' ONE OF THREE POSSIBLE COMPUTATIONS
C       OF SOUND VELOCITY:
C
C       0 = CHEN & MILLERO (CHEN AND MILLERO 1977,JASA,62,1129-1135)
C       1 = DEL GROSSO (NLR II, NAVEL RESEARCH LAB 1974)
C       2 = WILSON (TOLSTOY & CLAY, OCEAN ACOUSTICS 1966, PG. 6)
C
C     PARAMETERS:
C     **********
C
C       SELECT  -> COMPUTATION SELECTION:
C                  0 = CHEN & MILLERO
C                  1 = DEL GROSSO
C                  2 = WILSON
C       PRESS   -> PRESSURE IN DECIBARS
C       TEMP    -> INSITU TEMPERATURE DEG CELSIUS
C       SALTY   -> INSITU SALINITY PSS78
C       SVEL    <- SOUND VELOCITY METERS/SECOND
C
        INTEGER SELECT
        REAL PRESS,TEMP,SALTY
C
C     VARIABLES:
C     *********
C
        REAL D,SR
        REAL A,B,C,A0,B0,C0,A1,B1,C1,A2,C2,A3,C3
        REAL P,T,S
        REAL DLTACS,DLTACP,DLTACT,DCSTP
        REAL VS,VT,VP,VSTP
C
C     CODE:
C     ****
C
C     SELECT
C       (CHEN & MILLERO):
          IF(SELECT.GT.0.AND.SELECT.LE.2) GO TO 10
          P = PRESS/10.
C           /* PRESSURE IN BARS */
          T = TEMP
          S = SALTY
          SR = SQRT(ABS(S))
C           /* S**2 TERM */
          D  = 1.727E-3 - 7.9836E-6*P
C
C         /* S**(3/2) TERM */
C
          B1 = 7.3637E-5 + 1.7945E-7*T
          B0 = -1.922E-2 - 4.42E-5*T
          B  = B0 + B1*P
C
C         /* S**1 TERM */
C
          A3 = (-3.389E-13*T+6.649E-12)*T+1.10E-10
          A2 = ((7.988E-12*T-1.6002E-10)*T+9.1041E-9)*T-3.9064E-7
          A1 = (((-2.0122E-10*T+1.0507E-8)*T-6.4885E-8)*T-1.258E-5)
     1         *T+9.4742E-5
          A0 = (((-3.21E-8*T+2.006E-6)*T+7.164E-5)*T-1.262E-2)
     1         *T+1.389
C
          A  = ((A3*P + A2)*P + A1)*P + A0
C
C         /* S**0 TERM */
C
          C3 = (-2.3643E-12*T + 3.8504E-10)*T - 9.7729E-9
          C2 = (((1.0405E-12*T-2.5335E-10)*T+2.5974E-8)*T-1.7107E-6)
     1         *T+3.1260E-5
          C1 = (((-6.1185E-10*T+1.3621E-7)*T-8.1788E-6)*T+6.8982E-4)
     1         *T+0.153563
          C0 = ((((3.1464E-9*T-1.47800E-6)*T+3.3420E-4)*T-5.80852E-2)
     1         *T+5.03711)*T+1.402388E3
C
          C  = ((C3*P + C2)*P + C1)*P + C0
C
C         /* SOUND VELOCITY M/SEC */
C
          SVEL = C + (A + B*SR + D*S)*S
          GO TO 999
C       (DEL GROSSO):
   10     CONTINUE
          IF(SELECT.NE.1) GO TO 20
          P = PRESS*0.1019716
C           /* PRESSURE IN KG/CM**2 GAUGE */
          C0= 1402.392
          T = TEMP
          S = SALTY
C
          DLTACT  = 0.501109398873E1*T-0.550946843172E-1*T*T
     1             +0.221535969240E-3*T*T*T
C
          DLTACS  = 0.132952290781E1*S+0.128955756844E-3*S*S
C
          DLTACP  = 0.156059257041E0*P+0.24499868841E-4 *P*P
     1             -0.883392332513E-8*P*P*P
          DCSTP   =-0.127562783426E-1*T*S+0.635191613389E-2*T*P
     1             +0.265484716608E-7*T*T*P*P-0.159349479045E-5*T*P*P
     2             +0.522116437235E-9*T*P*P*P-0.438031096213E-6*T*T*T*P
     3             -0.161674495909E-8*S*S*P*P+0.968403156410E-4*T*T*S
     4             +0.485639620015E-5*T*S*S*P-0.340597039004E-3*T*S*P
C
          SVEL    = C0 + DLTACT + DLTACS + DLTACP + DCSTP
          GO TO 999
C       (WILSON'S):
   20     CONTINUE
          P = (PRESS+10.13)*0.1019716
          T = TEMP
          S = SALTY-35.0
          C0= 1449.14
          VT= T*(4.5721+T*(-4.4532E-2+T*(-2.6045E-4+T*7.9851E-6)))
          VP= P*(0.160272+P*(1.0268E-5+P*(3.5216E-9-P*3.3603E-12)))
          VS= S*(1.39799+S*1.69202E-3)
          VSTP=S*(T*(-1.1244E-2+P*3.158E-8+T*(7.7711E-7+P*1.579E-9))
     1        +P*(7.7016E-5-P*1.2943E-7))
     2        +P*T*(-1.8607E-4+T*(7.4812E-6+T*4.5283E-8)
     3        +P*(-2.5294E-7+T*1.8563E-9-P*1.9646E-10))
C
          SVEL = C0 + VT + VP + VS + VSTP
C     END SELECT
C
C     /* RETURN */
C
  999 CONTINUE
      RETURN
C
C     END SVEL
C
      END
