% read Turbomap data

clear

% turbomap variables

nshear=1;     % Shear (first, /s)
nFP07=2;      % FP07 (degC)
ntemp=3;      % Temperature (degC)
ncond=4;      % Conductivity (S/m)
npres=5;      % Pressure (dbar)
naccX=6;      % Acceleration-X (g)
naccY=7;      % Acceleration-Y (g)
naccZ=8;      % Acceleration-Z (g)
nchl =9;      % Chlorophyll-a (ppb)
nturb=10;     % Turbidity (FTU)
nms  =11;     % Mean Speed (m/s)
ndT  =12;     % dT (degC)
nshear2=13;   % Shear (second, 1/s)
nlchl=14;     % Laser Chlorophyll (ppb)


tmfile='S16_C001-1.tmb';
A=loadTMB(tmfile);

p=A(:,npres);
tf=A(:,nFP07);
t=A(:,ntemp);
c=A(:,ncond);
s=A(:,nsctd);

c3515=sw_c3515;

cr=c/c3515;

st=sw_salt(cr,t,p); % salinity calculated using the "slow" temperature
stf=sw_salt(cr,tf,p); % salinity calculated using the "fast" temperature



