%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%This program is designed to merge data collected by multiple instruments with the DH-4
%All data is merged to CTD data, the slowest sampling instrument.

clear all

fnam='001';

%determine starting and end time of digital instruments
[dat]=rd_TimeStp(['Timestp.',fnam]);
start_port1=dat(1);
end_port1=dat(2);
start_port2=dat(3);
end_port2=dat(4);
start_port3=dat(5);
end_port3=dat(6);
start_port4=dat(7);
end_port4=dat(8);


dat