data = readtable("C:\Users\bwerb\Downloads\RBR-205880.csv");
data.Salinity = gsw_SP_from_C(data.Conductivity_mS_cm_/10, data.Temperature__C_, data.Pressure_dbar_);
k2 = -0.001081;
k0 = -1.48321167902191;
data.pHin = calc_pHext(data.pH_V_,data.Temperature__C_,data.Salinity,k0,k2);

%

figure
scatter(data.pHin,data.Pressure_dbar_,'.')
set(gca,'Ydir','reverse')

%

data = readtable('\\atlas.shore.mbari.org\ProjectLibrary\901805_Coastal_Biogeochemical_Sensing\WireWalker\MBARI\data\WW_data_composite_2025-04-28.csv');
data.pH(data.pH < 7.5) = NaN; % QC

%

x = 1:max(data.Station);
y = 1:max(data.Depth);
z = data.pH

%

scatter(data.pH,data.Depth,ColorVariable=data.Station)
set(gca,'Ydir','reverse')