function [K_1]=bulkmod(S,T,P,k) % % W J Schulz 22 Dec 2009 % SO 513 Lab 1 % % Purpose: Computes the secant bulk modulus for sea water per % Pond and Pickard's "Introductory Dynamical Oceanography", 2nd Ed. % % Variables: % k = array of coefficients for the secant bulk modulus computation % K = secant bulk modulus % input: % S= salinity in practical salinity units % T = Temperature in degrees Celsius % P = pressure in bars (where 1000 bars ~ 100 meter depth) %calculate the secant bulk modulus K_1 = k(1) + k(2).*T + k(3).*T.^2 ... +k(4).*T.^3 + k(5).*T.^4 ... +k(6).*P + k(7).*T.*P ... +k(8).*T.^2.*P + k(9).*T.^3.*P ... +k(10).*P.^2 + k(11).*T.*P.^2 ... +k(12).*T.^2.*P.^2 ... +k(13).*S+k(14).*T.*S ... +k(15).*T.^2.*S+k(16).*T.^3.*S ... +k(17).*S.^(3/2)+k(18).*T.*S.^(3/2) ... +k(19).*T.^2.*S.^(3/2)+k(20).*P.*S ... +k(21).*T.*P.*S+k(22).*T.^2.*P.*S ... +k(23).*P.*S.^(3/2)+k(24).*P.^2.*S ... +k(25).*T.*P.^2.*S+k(26).*T.^2.*P.^2.*S; %end function