0001 function [bot,prop,units] = std_bot(bot,prop,units)
0002
0003
0004
0005
0006
0007
0008
0009
0010 units = upper(units);
0011 prop = upper(prop);
0012
0013
0014 for i = 1:size(units,1)
0015 if strcmp(units(i,:),' DBARS')
0016 units(i,:) = ' DBAR';
0017 end
0018 if strcmp(units(i,:),' PM/KG')
0019 units(i,:) = 'PMOL/KG';
0020 end
0021 end
0022
0023 itheta = 0; isalt = 0;
0024
0025 for i = 1:size(prop,1)
0026 if strcmp(prop(i,:),' THETA')
0027 itheta = i;
0028 end
0029 if strcmp(prop(i,:),'SALNTY')
0030 isalt = i;
0031 end
0032 end
0033
0034 if itheta == 0 | isalt == 0
0035 disp(['Unable to locate Theta and Salt for nutrient conversions'])
0036 else
0037
0038 for i = 1:size(units,1)
0039 if strcmp(units(i,:),' ML/L')
0040 xx = ox_units(bot(:,i),bot(:,isalt),bot(:,itheta));
0041 bot(:,i) = xx;
0042 units(i,:) = 'UMOL/KG';
0043 disp([' Converted ',prop(i,:),' from ml/l to umol/kg'])
0044 end
0045 if strcmp(units(i,:),' UMOL/L') | strcmp(units(i,:),'UMOL/L ')
0046 xx = nut_units(bot(:,i),bot(:,isalt));
0047 bot(:,i) = xx;
0048 units(i,:) = 'UMOL/KG';
0049 disp([' Converted ',prop(i,:),' from umol/l to umol/kg'])
0050 end
0051 end
0052 end
0053
0054