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

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

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

Initial import of Stark code.

Line 
1
2 function PT = sw_temp(S,T,P,PR)
3
4 % SW_TEMP    Temperature from potential temperature
5 %===========================================================================
6 % TEMP  $Id: sw_temp.m,v 1.1 2003/12/12 04:23:22 pen078 Exp $
7 %       Copyright (C) CSIRO, Phil Morgan  1992.
8 %
9 % USAGE:  temp = sw_temp(S,PTMP,P,PR)
10 %
11 % DESCRIPTION:
12 %    Calculates temperature from potential temperature at the reference
13 %    pressure PR and in-situ pressure P.
14 %
15 % INPUT:  (all must have same dimensions)
16 %   S     = salinity              [psu      (PSS-78) ]
17 %   PTMP  = potential temperature [degree C (ITS-90)]
18 %   P     = pressure              [db]
19 %   PR    = Reference pressure    [db]
20 %           (P may have dims 1x1, mx1, 1xn or mxn for S(mxn) )
21 %
22 % OUTPUT:
23 %   temp = temperature [degree C (ITS-90)]
24 %
25 % AUTHOR:  Phil Morgan 92-04-06, Lindsay Pender (Lindsay.Pender@csiro.au)
26 %
27 % DISCLAIMER:
28 %   This software is provided "as is" without warranty of any kind.
29 %   See the file sw_copy.m for conditions of use and licence.
30 %
31 % REFERENCES:
32 %    Fofonoff, P. and Millard, R.C. Jr
33 %    Unesco 1983. Algorithms for computation of fundamental properties of
34 %    seawater, 1983. _Unesco Tech. Pap. in Mar. Sci._, No. 44, 53 pp.
35 %    Eqn.(31) p.39
36 %
37 %    Bryden, H. 1973.
38 %    "New Polynomials for thermal expansion, adiabatic temperature gradient
39 %    and potential temperature of sea water."
40 %    DEEP-SEA RES., 1973, Vol20,401-408.
41 %=========================================================================
42
43 % Modifications
44 % 03-12-12. Lindsay Pender, Converted to ITS-90.
45
46 % CALLER:  general purpose
47 % CALLEE:  sw_ptmp.m
48
49 %-------------
50 % CHECK INPUTS
51 %-------------
52 if nargin ~= 4
53    error('sw_temp.m: Must pass 4 parameters ')
54 end %if
55 % LET sw_ptmp.m DO DIMENSION CHECKING
56
57 % CARRY OUT INVERSE CALCULATION BY SWAPPING P0 & PR.
58 PT = sw_ptmp(S,T,PR,P);
59
Note: See TracBrowser for help on using the browser.