function [c]=SoundSpeed_DelGrosso(tem,sal,pr)

%UPDATED VERSION BY D BARCLAY 2013
%
% P in bars
% T in C
% sal in PSU
% Reference: " New equation for the speed of sound in natural waters"
%   V. A. Del Grosso,  J.Acoust.Soc.Am., V56,N4,Oct74

%Salinity=ConductivityToSalinity(Sin,Tin,Pin);

% pr, dbar
% tem, IN DEGREES CELSIUS
% sal IN PARTS PER THOUSAND.
% SOUND SPEED IN METERS/SECOND


  pr=pr/9.80665; %convert pressure to kg/cm**2;

  c0=1402.392;
  vt=(0.501109398873e01-(0.550946843172e-01...
      - 0.221535969240e-03*tem).*tem).*tem;
  vs=(0.132952290781e01 + 0.128955756844e-03*sal).*sal;
  vp=(0.156059257041e00 + (0.244998688441e-04...
      - 0.883392332513e-08*pr).*pr).*pr;
  vstp=-0.127562783426e-01*tem.*sal + 0.635191613389e-02*tem.*pr...
       +0.265484716608e-07*tem.*tem.*pr.*pr...
       - 0.159349479045e-05*tem.*pr.*pr...
       +0.522116437235e-09*tem.*pr.*pr.*pr...
       - 0.438031096213e-06*tem.*tem.*tem.*pr...
       -0.161674495909e-08*sal.*sal.*pr.*pr...
       + 0.968403156410e-04*tem.*tem.*sal...
       +0.485639620015e-05*tem.*sal.*sal.*pr...
       - 0.340597039004e-03*tem.*sal.*pr;
  c=c0+vt+vs+vp+vstp;
return

