B = readtable("O2_TCO2_ALK_pH_loadcheck.xlsm");
%% Best time match
prof = 30;

spraytime = s.sdn(prof);
bogtime = datenum(B.DATE_TIME);
timediffs = spraytime - bogtime;
[m, midx] = min(abs(timediffs));

cruise = B.CRUISE(midx);
siteID = B.SITE_ID(midx);

idx = contains(B.CRUISE,cruise) & contains(B.SITE_ID,siteID);

BOGcast_closest_time = B(idx,:);
%%
[BOGcast_closest_time, BOGtime, spraytime] = findClosestBOGcast(s, B, 580);