% mk_tow_list.m - list of sample tows (time and pos)

fid = fopen('sam_list.txt','w');
fprintf(fid,['     Tow  Start       End          Start  ' ...
	     '                  End\n']);
fprintf(fid,['      #   Time        Time         Lat/Lon' ...
	     '                  Lat/Lon\n']);

for ii = 1:11
  if ii < 5
    eval(['load SAM_00',int2str(ii),'_fl'])
    fprintf(fid,'      %d   %f  %f   %f  %f    %f %f\n', ...
	    ii,yearday(1),yearday(end),lat(1),lon(1),lat(end),lon(end));
  else
    if ii < 9
      eval(['load SAM_00',int2str(ii+1),'_fl'])
      fprintf(fid,'      %d   %f  %f   %f  %f    %f %f\n', ...
	      ii,yearday(1),yearday(end),lat(1),lon(1),lat(end),lon(end));
    else
      eval(['load SAM_0',int2str(ii+1),'_fl'])
      hh=(yearday-floor(yearday))*24;
      minit=(yearday-floor(yearday)-hh*24)*24*60;
      fprintf(fid,'     %d   %f  %f   %f  %f    %f %f\n', ...
	      ii,yearday(1),yearday(end),lat(1),lon(1),lat(end),lon(end));
    end
  end
  
  
end

fclose(fid);