1 | function potT=theta(S,T,P) |
---|
2 | % |
---|
3 | % potT=theta(S,T,P) |
---|
4 | % |
---|
5 | % Description: Compute potential temperature of seawater. |
---|
6 | % |
---|
7 | % This routine is derived from Dan Kelley's program : oce.theta.c |
---|
8 | % http://www.phys.ocean.dal.ca/~kelley/ |
---|
9 | % |
---|
10 | % Usage: potT=theta(S,T,P) |
---|
11 | % |
---|
12 | % Arguments: |
---|
13 | % S in-situ salinity [PSU] |
---|
14 | % T in-situ temperature [degC] |
---|
15 | % P in-situ pressure [dbar] |
---|
16 | % |
---|
17 | % Details: |
---|
18 | % The potential temperature is defined to be the temperature that a |
---|
19 | % water parcel of the indicated properties would achieve if it were |
---|
20 | % moved adiabatically to the surface of the ocean. |
---|
21 | % |
---|
22 | % Value: Potential temperature [degC] referenced to the surface. |
---|
23 | % |
---|
24 | % References: |
---|
25 | % Fofonoff , P. and R. C. Millard Jr, 1983. Algorithms for |
---|
26 | % computation of fundamental properties of seawater. |
---|
27 | % Unesco Technical Papers in Marine Science, 44, 53 pp |
---|
28 | % |
---|
29 | % Gill, A.E., 1982. Atmosphere-ocean Dynamics, Academic Press, |
---|
30 | % New York, 662 pp. |
---|
31 | % |
---|
32 | % Example: theta(35, 13, 1000)=12.858 |
---|
33 | % |
---|
34 | % |
---|
35 | % Further Information: |
---|
36 | % http://www.brest.ird.fr/Roms_tools/ |
---|
37 | % |
---|
38 | % This file is part of ROMSTOOLS |
---|
39 | % |
---|
40 | % ROMSTOOLS is free software; you can redistribute it and/or modify |
---|
41 | % it under the terms of the GNU General Public License as published |
---|
42 | % by the Free Software Foundation; either version 2 of the License, |
---|
43 | % or (at your option) any later version. |
---|
44 | % |
---|
45 | % ROMSTOOLS is distributed in the hope that it will be useful, but |
---|
46 | % WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
47 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
48 | % GNU General Public License for more details. |
---|
49 | % |
---|
50 | % You should have received a copy of the GNU General Public License |
---|
51 | % along with this program; if not, write to the Free Software |
---|
52 | % Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
---|
53 | % MA 02111-1307 USA |
---|
54 | % |
---|
55 | % Copyright (c) 2001-2006 by Pierrick Penven |
---|
56 | % e-mail:Pierrick.Penven@ird.fr |
---|
57 | % |
---|
58 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
59 | |
---|
60 | S = S-35.0; |
---|
61 | T = T; |
---|
62 | P = P./10.0; |
---|
63 | potT = T ... |
---|
64 | -P .* (((3.6504e-4+T.*(8.3198e-5+T.*(-5.4065e-7+T.*4.0274e-9)))... |
---|
65 | +S.*(1.7439e-5-T.*2.9778e-7))... |
---|
66 | +P.*((8.9309e-7+T.*(-3.1628e-8+T.*2.1987e-10)-S.*4.1057e-9)... |
---|
67 | +P.*(-1.6056e-10+T.*5.0484e-12))); |
---|
68 | return |
---|