Contenu principal

underwaterSoundSpeed

R2026b

Calculate speed of sound underwater based on temperature, salinity, and depth

Since R2026b

    Description

    Add-On Required: This feature requires the Underwater Acoustic Channels add-on.

    soundspeed = underwaterSoundSpeed(temperature,salinity,depth) returns the underwater sound speed based on temperature, salinity, and depth using the Mackenzie equation [1].

    example

    soundspeed = underwaterSoundSpeed(temperature,salinity,depth,"coppens") returns the underwater sound speed using the Coppens equation [2].

    soundspeed = underwaterSoundSpeed(temperature,salinity,depth,"unesco",latitude) returns the underwater sound speed using the UNESCO equation [3].

    soundspeed = underwaterSoundSpeed(temperature,salinity,depth,"delgrosso",latitude) returns the underwater sound speed using the Del Grosso equation [3].

    Examples

    collapse all

    Calculate the speed of sound for water with a temperature of 11 degrees C, salinity of 35 ppt, and a depth of 1000 m.

    ssMK = underwaterSoundSpeed(11,35,1000)
    ssMK = 
    1.5098e+03
    

    By default, underwaterSoundSpeed uses the Mackenzie equation. Instead, use the Coppens equation.

    ssC = underwaterSoundSpeed(11,35,1000,"coppens")
    ssC = 
    1.5099e+03
    

    Provide a latitude value of 37.2 degrees to calculate underwater sound speed using the UNESCO and Del Grosso equations.

    ssU = underwaterSoundSpeed(11,35,1000,"unesco",37.2)
    ssU = 
    1.5100e+03
    
    ssDG = underwaterSoundSpeed(11,35,1000,"delgrosso",37.2)
    ssDG = 
    1.5098e+03
    

    Estimate the speed of sound underwater from a depth of 1000 m to 4000 m. Specify a starting temperature of 30 degrees C, an ending temperature of 10 degrees C, a constant salinity of 35 ppt, and a latitude of 37 degrees.

    depth = (1000:10:4000)';
    temp = linspace(30,10,length(depth))';
    salinity = 35;
    lat = 37;

    Use the underwaterSoundSpeed function to calculate speeds using the Mackenzie, Coppens, UNESCO, and Del Grosso equations.

    speedMack = underwaterSoundSpeed(temp,salinity,depth);
    speedCoppens = underwaterSoundSpeed(temp,salinity,depth,"coppens");
    speedUNESCO = underwaterSoundSpeed(temp,salinity,depth,"unesco",lat);
    speedDG = underwaterSoundSpeed(temp,salinity,depth,"delgrosso",lat);

    Compare the results in a plot.

    figure
    plot(depth,[speedMack speedCoppens speedUNESCO speedDG]);
    xlabel("Depth (m)");
    ylabel("Speed of sound (m/s)");
    title("Underwater Sound Speed by Depth")
    legend(["Mackenzie","Coppens","UNESCO","Del Grosso"],Location="northeast")

    Figure contains an axes object. The axes object with title Underwater Sound Speed by Depth, xlabel Depth (m), ylabel Speed of sound (m/s) contains 4 objects of type line. These objects represent Mackenzie, Coppens, UNESCO, Del Grosso.

    Input Arguments

    collapse all

    Water temperature in Celsius, specified as a scalar, D-by-1 column vector, 1-by-L row vector, or D-by-L matrix, where rows represent variation over depth and columns represent variation over range. The allowable range for temperature depends on the equation.

    If you specify temperature as a column vector or matrix, D must equal the number of elements in depth. If you specify temperature as a row vector or matrix, L must equal the number of columns of any nonscalar salinity and latitude arguments.

    EquationAllowable Range in Celsius
    Mackenzie2–30 degrees Celsius
    Coppens0–35 degrees Celsius
    UNESCO0–40 degrees Celsius
    Del Grosso0–30 degrees Celsius

    Data Types: double | single

    Practical salinity, specified as a scalar, D-by-1 column vector, 1-by-L row vector, or D-by-L matrix. Practical salinity is defined either in parts per thousand (ppt) or in practical salinity units (PSU) by the Practical Salinity Scale (PSS-78) [4]. The units and allowable range for salinity depend on the equation used.

    If you specify salinity as a column vector or matrix, D must equal the number of elements in depth. If you specify salinity as a row vector or matrix, L must equal the number of columns of any nonscalar temperature and latitude arguments.

    EquationAllowable Range
    Mackenzie25–40 ppt
    Coppens0–45 ppt
    UNESCO0–40 PSU
    Del Grosso30–40 PSU

    Data Types: double | single

    Depth below sea surface in meters, specified as a D-by-1 column vector. If you specify the UNESCO or Del Grosso equation, the function uses depth and latitude to calculate pressure using equations from Leroy and Parthiot [5]. The allowable range for depth depends on the equation used.

    If you specify temperature or salinity as a column vector or matrix, D must equal the number of rows of temperature and salinity.

    EquationAllowable Range in Meters
    Mackenzie0–8000 meters
    Coppens0–4000 meters
    UNESCOThe function uses depth and latitude to compute the underwater pressure. The pressure must be between 0 and 1000 bar.
    Del GrossoThe function uses depth and latitude to compute the underwater pressure. The pressure must be between 0 and 1000 kg/cm2.

    Data Types: double | single

    Latitude in degrees, specified as a scalar or 1-by-L row vector. All values must be in the range [–90, 90]. The function uses latitude in combination with depth to determine the underwater pressure.

    If you specify latitude as a row vector, L must equal the number of columns of temperature and salinity. If you use the UNESCO or Del Grosso equation, you must specify latitude. latitude has no effect if you use the Mackenzie or Coppens equation.

    Data Types: double | single

    Output Arguments

    collapse all

    Underwater sound speed in meters per second, returned as a scalar, vector, or matrix.

    The dimensions of soundspeed are D-by-L, where D is the number of depth points (elements in depth) and L is the number of range points. The number of range points is the number of columns of any nonscalar temperature, salinity, and latitude arguments. The function expands scalar and column vector inputs over the range dimension to match other inputs.

    Data Types: double | single

    References

    [1] Mackenzie, Kenneth V. “Nine-Term Equation for Sound Speed in the Oceans.” The Journal of the Acoustical Society of America 70, no. 3 (1981): 807–12. https://doi.org/10.1121/1.386920.

    [2] Coppens, Alan B. “Simple Equations for the Speed of Sound in Neptunian Waters.” The Journal of the Acoustical Society of America 69, no. 3 (1981): 862–63. https://doi.org/10.1121/1.385486.

    [3] Wong, George S. K., and Shi-ming Zhu. “Speed of Sound in Seawater as a Function of Salinity, Temperature, and Pressure.” The Journal of the Acoustical Society of America 97, no. 3 (1995): 1732–36. https://doi.org/10.1121/1.413048.

    [4] UNESCO. The Practical Salinity Scale 1978 and the International Equation of State of Seawater 1980: Tenth Report of the Joint Panel on Oceanographic Tables and Standards. UNESCO Technical Papers in Marine Science 36. UNESCO, 1981.

    [5] Leroy, Claude C., and François Parthiot. “Depth-Pressure Relationships in the Oceans and Seas.” The Journal of the Acoustical Society of America 103, no. 3 (1998): 1346–52. https://doi.org/10.1121/1.421275.

    Version History

    Introduced in R2026b