NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

root/gliderproc/trunk/MATLAB/seawater/sw_smow.m

Revision 495 (checked in by cbc, 11 years ago)

Initial import of Stark code.

Line 
1
2 function dens = sw_smow(T)
3
4 % SW_SMOW    Denisty of standard mean ocean water (pure water)
5 %=========================================================================
6 % SW_SMOW  $Id: sw_smow.m,v 1.1 2003/12/12 04:23:22 pen078 Exp $
7 %          Copyright (C) CSIRO, Phil Morgan 1992.
8 %
9 % USAGE:  dens = sw_smow(T)
10 %
11 % DESCRIPTION:
12 %    Denisty of Standard Mean Ocean Water (Pure Water) using EOS 1980.
13 %
14 % INPUT:
15 %   T = temperature [degree C (ITS-90)]
16 %
17 % OUTPUT:
18 %   dens = density  [kg/m^3]
19 %
20 % AUTHOR:  Phil Morgan 92-11-05, Lindsay Pender (Lindsay.Pender@csiro.au)
21 %
22 % DISCLAIMER:
23 %   This software is provided "as is" without warranty of any kind.
24 %   See the file sw_copy.m for conditions of use and licence.
25 %
26 % REFERENCES:
27 %     Unesco 1983. Algorithms for computation of fundamental properties of
28 %     seawater, 1983. _Unesco Tech. Pap. in Mar. Sci._, No. 44, 53 pp.
29 %     UNESCO 1983 p17  Eqn(14)
30 %
31 %     Millero, F.J & Poisson, A.
32 %     INternational one-atmosphere equation of state for seawater.
33 %     Deep-Sea Research Vol28A No.6. 1981 625-629.    Eqn (6)
34 %=========================================================================
35
36 % Modifications
37 % 99-06-25. Lindsay Pender, Fixed transpose of row vectors.
38 % 03-12-12. Lindsay Pender, Converted to ITS-90.
39
40 %----------------------
41 % CHECK INPUT ARGUMENTS
42 %----------------------
43 % TEST INPUTS
44 if nargin ~= 1
45    error('sw_smow.m: Only one input argument allowed')
46 end %if
47
48 %----------------------
49 % DEFINE CONSTANTS
50 %----------------------
51 a0 = 999.842594;
52 a1 =   6.793952e-2;
53 a2 =  -9.095290e-3;
54 a3 =   1.001685e-4;
55 a4 =  -1.120083e-6;
56 a5 =   6.536332e-9;
57
58 T68 = T * 1.00024;
59 dens = a0 + (a1 + (a2 + (a3 + (a4 + a5*T68).*T68).*T68).*T68).*T68;
60 return
61 %--------------------------------------------------------------------
62
63
Note: See TracBrowser for help on using the browser.