

fid = fopen('./OSCAHR/CTD/20151105_ctd0268_oscahr_station11_PI_new.asc', 'r');

CTD_deep = textscan(fid, '%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s', 'Delimiter', ' ', 'HeaderLines', 1,'CollectOutput',1);

fclose(fid);

for i=1:length(CTD_deep{1,1}(:,1))

    CTD_pres_up_down(i) = str2double(cell2mat(CTD_deep{1,1}(i,1)));

end

ii = find(CTD_pres_up_down == max(CTD_pres_up_down));

for i=1:ii
    
    CTD_pres(i) = str2double(cell2mat(CTD_deep{1,1}(i,1)));
    
    CTD_temp(i) = str2double(cell2mat(CTD_deep{1,1}(i,11)));

    CTD_sal(i) = str2double(cell2mat(CTD_deep{1,1}(i,10)));

    CTD_lat(i) = str2double(cell2mat(CTD_deep{1,1}(i,7)));

    CTD_lon(i) = str2double(cell2mat(CTD_deep{1,1}(i,8)));

end
