% routine for plotting drifters
%

%wc=menu('Which cruise?','301','302','303');
wc=3;

% loop for multiple drifters
hm=input('How many? ');
for mm=1:hm;
  disp(' ');

  fn=input('input filename (w/out direc or extension): ','s');
  
  direc=['/data5/jmanning/drift/oc30',num2str(wc),'/'];
  disp(' ');
  inext='.jgf';
  disp(['Hardcoded to look in ',direc,fn,inext])
  fid=fopen([direc,fn,inext]);
  fgetl(fid);
  yy1=fscanf(fid,'%f');
  yy=reshape(yy1,4,length(yy1)/4);
  yy=yy';

% Now, make final plot with good data
  if mm==1;
%    georbat(1,1,0,2,1);
  end;
  mc=mm+1;
%  if mm==1|mm==8;mc=2;end;

%  pltdrft(yy(:,3),yy(:,2),mc,259200,97,yy(:,1));
  pltdrft(yy(:,3),yy(:,2),mc,0,97,yy(:,1));
%  pltdrft(yy(:,2),yy(:,3),-1*mm,1,yy(:,1),-1);
%  axis([min(yy(:,2)) max(yy(:,2)) min(yy(:,3)) max(yy(:,3))]);
%  lllabel;
% title([fn,' ',num2str(mth(1)),'/',num2str(day(1)),' ',num2str(hr(1)*100+mn(1)),'GMT to ',...
% num2str(mth(length(mth))),'/',num2str(day(length(day))),' ',num2str(hr(length(hr))*100+mn(length(mn))),'GMT']);


% end loop for mulitple drifters
end;
