idx =  539;
[B] = loadBOG();
BOG2Plot = filterBOG(B, psaloffset.s, idx, 10, 1, 10, 1, 1, 1); % typical M1 cast

%

idx500 = BOG2Plot.DEPTH > 300 & ~isnan(BOG2Plot.doxy);
BOG2Plot = BOG2Plot(idx500,:);

%

% sdn = ones(size(psaloffset.s.pres,1),1) * psaloffset.s.sdn(idx);
% lon = ones(size(psaloffset.s.pres,1),1) * psaloffset.s.lon(idx);
% lat = ones(size(psaloffset.s.pres,1),1) * psaloffset.s.lat(idx);
sdn = datenum(BOG2Plot.DATE_TIME);
lat = BOG2Plot.DEC_LAT;
lon = BOG2Plot.DEC_LONG;

canb = CANYONB(sdn, lat, lon, BOG2Plot.pres, BOG2Plot.tc, BOG2Plot.psal, BOG2Plot.doxy, {'pH'});
BOG2Plot.pHin_canB = canb.pH;

%

figure(1)
clf
scatter(BOG2Plot.DATE_TIME,BOG2Plot.pHin-BOG2Plot.pHin_canB)
grid on
yticks(-.1:.025:.3)
title('BOG pHin - CanyonB pHin')
% yticklabels((-.1:.05:.3))
% set(gca,'YDir','reverse')
% title(['prof ',num2str(idx),' pHin, typical M1 cast'])
% ylim([0 600])
% grid on
% xticks(7.45:.025:8)
% xtickangle(45)