Skip to content
Snippets Groups Projects
Commit dcc1544e authored by gael.alory_legos.obs-mip.fr's avatar gael.alory_legos.obs-mip.fr
Browse files

replace seawater functions from outdated EOS-80 toolbox with equivalent...

replace seawater functions from outdated EOS-80 toolbox with equivalent functions from TEOS-10 toolbox
parent 7636b98c
No related branches found
No related tags found
No related merge requests found
......@@ -7,12 +7,6 @@ function calibration( hMainFig )
%
% Compute salinity from calibrated conductivity and jacket temperature
%
% Bug :
% 1 - tsg.SSPS_CAL = sw_salt( cond/sw_c3515(),t90TOt68(temp),zeros(size(cond)));
% replaced by
% tsg.SSPS_CAL = sw_salt( cond/sw_c3515(),temp,zeros(size(cond)));
%
% CSIRO toolbox modified sw_salt modified to use temprature ITS90
%
% $Id$
......@@ -88,11 +82,7 @@ if ~isempty( indC ) || ~isempty( indT )
end
if ~isempty( temp ) && ~isempty( cond )
% Modification du 13/02/2009
% tsg.SSPS_CAL = sw_salt( ...
% cond/sw_c3515(), t90TOt68(temp), zeros(size(cond)));
tsg.SSPS_CAL = sw_salt( cond/sw_c3515(), temp, zeros(size(cond)));
tsg.SSPS_CAL = gsw_SP_from_R( cond/gsw_C3515, temp, zeros(size(cond)));
end
else
......
......@@ -66,25 +66,27 @@ if strcmp( PARA, 'SSPS')
if (~isempty( T) & ~isempty( C))
c68 = 1.00024;
c0 = 0.6766097;
c1 = 2.00564e-2;
c2 = 1.104259e-4;
c3 = -6.9698e-7;
c4 = 1.0031e-9;
% salinity error is computed from temperature/conductivity errors
% by error propagation in the salinity equation
% see Emery and Thomson, Data analysis methods in phys. oceano., p.273
R=C/sw_c3515();
rt = sw_salrt(T);
Rt=R./rt;
R = C/gsw_C3515;
T68 = T * c68;
rt = c0 + (c1 + (c2 + (c3 + c4.*T68).*T68).*T68).*T68;
Rt = R./rt;
%Rt is a function of C,T
%error on Rt : err(Rt)^2=(d(Rt)/dC*errC)^2+(d(Rt)/dT*errT)^2
dRtdC=1./(rt*sw_c3515());
dRtdC=1./(rt*gsw_C3515);
c68 = 1.00024;
c0 = 0.6766097;
c1 = 2.00564e-2;
c2 = 1.104259e-4;
c3 = -6.9698e-7;
c4 = 1.0031e-9;
dRtdT=c68*R.*(c1+(2*c2+(3*c3+4*c4*T).*T*c68).*T*c68)./(rt.^2);
errRt=sqrt((dRtdC*errC).^2+(dRtdT*errT).^2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment