Salinity spiking in CTD data is caused by non-simultaneous sampling of conductivity and temperature.
find_cond_advance.m finds the best advance of conductivity relative to temperature to compensate for non-simultaneous sampling and thus minimise salinity spiking. The salinity calculated using this best advance value is also returned.
A .mat file of sample data is included in the package.
[bestAdv,bestSal,advances,goodness,binIndex] = find_cond_advance(t,c,p,-4,4);
Kevin Bartlett (2020). find_cond_advance (https://www.mathworks.com/matlabcentral/fileexchange/21660-find_cond_advance), MATLAB Central File Exchange. Retrieved .
Cecilia, I never got an email notification that someone had commented on this submission. Were you able to solve your issue with the program?
Hi, think this function is a great idea. but I tried it and gave me error messages, I have no NaN´s in my data, and have the required input units.. any idea ?
??? Error using ==> interp1 at 172
NaN is not an appropriate value for X.
Error in ==> find_cond_advance>advance_conductivity at 773
Error in ==> find_cond_advance at 345
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!