function salinity = pss1978(cond,temp,pres) % pss1978 -- Salinity from 1978 Practical Salinity Scale. % Calculate salinity from conductivity, temperature, and % pressure using the 1978 Practical Salinity Scale % (IEEE Journal of Ocean Engineering, Vol. OE-5, No. 1, % January 1980, page 14.). % % cond is conductivity in mmho/cm (a factor of 10 greater % greater than conductivity in Siemens/meter). % temp is temperature in degrees Celsius. % pres is pressure in dbars relative to the sea surface. % salinity is in practical salinity units, which are often % considered the same as ppt. % % Fran Hotchkiss, December 19, 1997. % Use Seabird standard for Ro = Cond (35 ppt, 15 deg Cel, 0 dbar). Ro = 42.914; A = [3.989e-15 -6.370e-10 2.070e-5]; B1 = 3.426e-2; B2 = 4.464e-4; B3 = 4.215e-1; B4 = -3.107e-3; a = [ 2.7081 -7.0261 14.0941 25.3851 -0.1692 0.0080]; b = [-0.0144 0.0636 -0.0375 -0.0066 -0.0056 0.0005]; c = [ 1.0031e-9 -6.9698e-7 1.104259e-4 2.00564e-2 6.766097e-1]; k = 0.0162; R = cond ./ Ro; rT = polyval(c,temp); RPnum = pres .* polyval(A,pres); RPden = 1 + B1*temp + B2.*temp.*temp + B3*R + B4.*R.*temp; RP = 1 + RPnum ./ RPden; RT = R ./ (RP .* rT); rootRT = sqrt(RT); tfac = (temp - 15) ./ (1 + k .* (temp - 15)); salinity = polyval(a,rootRT) + tfac .* polyval(b,rootRT);