%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function drifter_composite(runid,idrog)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

runid = 'FCAST_1.1B1/EN324NF_FC.01'
idrog=13;

%
% Load model results
%

b=loadgrid('../MESH/bank150');
[la,lo]=xy2ll(b.x,b.y);
b.x=lo;b.y=la;

figure
hold on
hb=plotbnd(b);
axis('tight')
set(hb,'LineWidth',2)
title([runid,' Iter 1-3 Drifter Trajectories'])
hc=lcontour(b,'z',[30 45 60 75 90 120]);
grid

for iter=1:3

PTHFILE=['../fcast_archives/',runid,'/CRUISE_Q4.',...
          num2str(iter),'/DRIFTERS']

[gridname,ndrog,ndts,tsec,pth]=read_pth(PTHFILE,4);

[la,lo]=xy2ll(pth(:,1),pth(:,2));
pth(:,1)=lo;pth(:,2)=la;

size(pth);
ndts=ans(1)/ndrog;
xdr=pth(:,1);
xdr=reshape(xdr,ndrog,ndts);
xdr=xdr';
ydr=pth(:,2);
ydr=reshape(ydr,ndrog,ndts);
ydr=ydr';

hp = plot(xdr(:,idr),ydr(:,idr),'b-');

end


hold off
