1 |
|
---|
2 |
function Rp = sw_salrp(R,T,P) |
---|
3 |
|
---|
4 |
% SW_SALRP Conductivity ratio Rp(S,T,P) = C(S,T,P)/C(S,T,0) |
---|
5 |
%========================================================================= |
---|
6 |
% SW_SALRP $Id: sw_salrp.m,v 1.1 2003/12/12 04:23:22 pen078 Exp $ |
---|
7 |
% Copyright (C) CSIRO, Phil Morgan 1993. |
---|
8 |
% |
---|
9 |
% USAGE: Rp = sw_salrp(R,T,P) |
---|
10 |
% |
---|
11 |
% DESCRIPTION: |
---|
12 |
% Equation Rp(S,T,P) = C(S,T,P)/C(S,T,0) used in calculating salinity. |
---|
13 |
% UNESCO 1983 polynomial. |
---|
14 |
% |
---|
15 |
% INPUT: (All must have same shape) |
---|
16 |
% R = Conductivity ratio R = C(S,T,P)/C(35,15(IPTS-68),0) [no units] |
---|
17 |
% T = temperature [degree C (ITS-90)] |
---|
18 |
% P = pressure [db] |
---|
19 |
% |
---|
20 |
% OUTPUT: |
---|
21 |
% Rp = conductivity ratio Rp(S,T,P) = C(S,T,P)/C(S,T,0) [no units] |
---|
22 |
% |
---|
23 |
% AUTHOR: Phil Morgan 93-04-17, Lindsay Pender (Lindsay.Pender@csiro.au) |
---|
24 |
% |
---|
25 |
% DISCLAIMER: |
---|
26 |
% This software is provided "as is" without warranty of any kind. |
---|
27 |
% See the file sw_copy.m for conditions of use and licence. |
---|
28 |
% |
---|
29 |
% REFERENCES: |
---|
30 |
% Fofonoff, P. and Millard, R.C. Jr |
---|
31 |
% Unesco 1983. Algorithms for computation of fundamental properties of |
---|
32 |
% seawater, 1983. _Unesco Tech. Pap. in Mar. Sci._, No. 44, 53 pp. |
---|
33 |
%========================================================================= |
---|
34 |
|
---|
35 |
% Modifications |
---|
36 |
% 03-12-12. Lindsay Pender, Converted to ITS-90. |
---|
37 |
|
---|
38 |
% CALLER: sw_salt |
---|
39 |
% CALLEE: none |
---|
40 |
|
---|
41 |
%------------------- |
---|
42 |
% CHECK INPUTS |
---|
43 |
%------------------- |
---|
44 |
if nargin~=3 |
---|
45 |
error('sw_salrp.m: requires 3 input arguments') |
---|
46 |
end %if |
---|
47 |
|
---|
48 |
[mr,nr] = size(R); |
---|
49 |
[mp,np] = size(P); |
---|
50 |
[mt,nt] = size(T); |
---|
51 |
if ~(mr==mp | mr==mt | nr==np | nr==nt) |
---|
52 |
error('sw_salrp.m: R,T,P must all have the same shape') |
---|
53 |
end %if |
---|
54 |
|
---|
55 |
%------------------- |
---|
56 |
% eqn (4) p.8 unesco. |
---|
57 |
%------------------- |
---|
58 |
|
---|
59 |
T68 = T * 1.00024; |
---|
60 |
|
---|
61 |
d1 = 3.426e-2; |
---|
62 |
d2 = 4.464e-4; |
---|
63 |
d3 = 4.215e-1; |
---|
64 |
d4 = -3.107e-3; |
---|
65 |
|
---|
66 |
e1 = 2.070e-5; |
---|
67 |
e2 = -6.370e-10; |
---|
68 |
e3 = 3.989e-15; |
---|
69 |
|
---|
70 |
Rp = 1 + ( P.*(e1 + e2.*P + e3.*P.^2) ) ... |
---|
71 |
./ (1 + d1.*T68 + d2.*T68.^2 +(d3 + d4.*T68).*R); |
---|
72 |
|
---|
73 |
|
---|