주요 콘텐츠

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. The allowable range for temperature depends on the equation.

    When specified as a column vector or matrix, D must equal the number of elements in depth. L must equal the number of elements in latitude when latitude is specified as a vector. temperature and salinity must have the same dimensions when both are nonscalar.

    EquationAllowable Range in Celsius
    Mackenzie–2 to 30 degrees Celsius
    Coppens0 to 35 degrees Celsius
    UNESCO0 to 40 degrees Celsius
    Del Grosso0 to 30 degrees Celsius

    Data Types: double | single

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

    When specified as a column vector or matrix, D must equal the number of elements in depth. L must equal the number of elements in latitude when latitude is specified as a vector. salinity and temperature must have the same dimensions when both are nonscalar.

    EquationAllowable Range in ppt
    Mackenzie25–40 ppt
    Coppens0–40 ppt
    UNESCO0–40 ppt
    Del Grosso30–40 ppt

    Data Types: double | single

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

    The length of depth must match the first dimension of temperature and salinity if you specify those arguments as column vectors or matrices.

    EquationAllowable Range in Depth
    Mackenzie0–8000 meters
    Coppens0–4000 meters
    UNESCOdepth and latitude are used to compute the underwater pressure. The pressure must be between 0 and 1000 bar.
    Del Grossodepth and latitude are used 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.

    When you specify latitude as a row vector, the number of elements must match the second dimension of temperature and salinity if they are nonscalar. You must specify latitude when using the UNESCO or Del Grosso equations. latitude has no effect when using the Mackenzie or Coppens equations.

    Data Types: double | single

    Output Arguments

    collapse all

    Underwater sound speed in m/s, returned as a scalar, vector, or matrix.

    The dimensions of soundspeed are D-by-L, where D is the number of rows in depth. L is the number of columns in temperature and salinity when you specify those arguments as row vectors or matrices. When you specify latitude as a vector, L is the number of columns in latitude.

    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, IWG. "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 (JPOTS) 25 (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