function sigma_t, t, s ; Uses the 1980 UNESCO International Equation of State (IES80) to ; derive the density of seawater at surface pressure, given the ; temperature and salinity. ; ; Inputs: ; ; t temperature (degrees Celsius) ; ; s salinity (psu) ; ; Output: ; ; sigma_t density(t, 0, s) - 1000 (kg/m^3) ; ; Written by: ; ; Steve Phipps 31 January 2002 ; Derive coefficients as a function of temperature a = 9.99842594d2 + 6.793952d-2*t - 9.095290d-3 * t^2 + $ 1.001685d-4 * t^3 - 1.120083d-6 * t^4 + 6.536332d-9 * t^5 b = 8.24493d-1 - 4.0899d-3 * t + 7.6438d-5 * t^2 - $ 8.2467d-7 * t^3 + 5.3875d-9 * t^4 c = -5.72466d-3 + 1.0227d-4 * t - 1.6546d-6 * t^2 d = 4.8314d-4 ; Derive density at surface pressure (p = 0) rho_zero = a + b * s + c * s^1.5 + d * s^2 ; Derive sigma_t sigma_t = rho_zero - 1000.0d return, sigma_t end