Function Sndspd(S,T,Z) ' DESCRIPTION: ' ' Sndspd(S,T,D) returns the sound speed (m/sec) given vectors ' of salinity (ppt), temperature (deg C) and DEPTH (m) using ' the formula of Mackenzie (1981). ' ' USAGE: Sndspd = Sndspd(S,T,Z) ' ' INPUT: (all must have same dimensions) ' S = salinity [psu (PSS-78)] ' T = temperature [degree C (IPTS-68)] ' Z = depth [m] ' ' OUTPUT: ' Sndspd = sound velocity [m/s] ' ' DISCLAIMER: ' This software is provided "as is" without warranty of any kind. ' ' REFERENCES: ' Mackenzie, K.V. "Nine-term Equation for Sound Speed in the Oceans", ' J. Acoust. Soc. Am. 70 (1981), 807-812. ' ' CHECKVALUE: SVEL=1718.774 M/S @ S=40, T=40 DEG C, Z=10000 m c0 = 1.44896e3 t1 = 4.591e0 t2 =-5.304e-2 t3 = 2.374e-4 s0 = 1.340e0 z1 = 1.630e-2 z2 = 1.675e-7 ts1=-1.025e-2 tz3=-7.139e-13 Sndspd=c0+t1*T+t2*T*T+t3*T*T*T+s0*(S-35.0)+z1*Z+z2*Z*Z+ts1*T*(S-35.0)+tz3*T*Z*Z*Z End Function