function pond_0603(P,val,Din,Dind,tend)

val=val(1:P.ndrog);
[P.lat,P.lon]=xy2ll(P.x,P.y);

% Initiate drifter location file

tind=find(max(Din(1).t<=P.t(1))):P.tstp/Din(1).tstp:Din(1).ndts;
D.t = [];
D.x = [];
D.y = [];
D.z = [];
D.dstart= [];
D.ystart= [];

% Move all tracking drifter obs into one variable

D.t = Din(1).t(tind);
for in=1:length(Din)
  D.x =     [ D.x      ; Din(in).x(Dind,tind) ];
  D.y =     [ D.y      ; Din(in).y(Dind,tind) ];
  D.z =     [ D.z      ; Din(in).z(Dind,tind) ];
  D.dstart= [ D.dstart ; Din(in).dstart(Dind) ];
  D.ystart= [ D.ystart ; Din(in).ystart(Dind) ];
end
[D.lat,D.lon]=xy2ll(D.x,D.y);

% Start on the quarter day preceding the first observation

tvisstart=floor(min([P.dstart;D.dstart])*4)/4;

% Draw Domain

m=loadgrid('gbk1');
[m.y,m.x]=xy2ll(m.x,m.y);
clf
wfig

hc=lcontour(m,m.z,[40 60 80 100 120 140 160 180 200]);
set(hc,'linewidth',1,'color','k');
% hc=plotbnd(m);
% set(hc,'linewidth',2);

%cvlfig
grid on
% set(gca,'DataAspectRatio',[1 cos(42*pi/180) 1],...
set(gca,...
	'ytick',[41.8:.1:42.2],...
	'xtick',[-68.2:.1:-67.5],...
	'box','on',...
	'fontname','times',...
	'xlim',[-68.2 -67.5], ...
	'ylim',[41.8 42.2]);

% set(gca,'DataAspectRatio',[1 cos(42*pi/180) 1],...
%       'ytick',[40:.25:42.5],...
%       'xtick',[-69:.25:-66],...
%       'yticklabel',...
%       str2mat(['40' setstr(176)],'15''','30''','45''',...
%               ['41' setstr(176)],'15''','30''','45''',...
%               ['42' setstr(176)],'15''','30'''),...
%       'xticklabel',...
%       str2mat(['69' setstr(176)],...
%               '45''','30''','15''',['68' setstr(176)],...
%               '45''','30''','15''',['67' setstr(176)],...
%               '45''','30''','15''',['66' setstr(176)]),...
%       'box','on',...
%       'fontname','times',...
%       'xlim',[min(P.lon(:))-.1 max(P.lon(:))+.1], ...
%       'ylim',[min(P.lat(:))-.1 max(P.lat(:))+.1]);

xlabel(['longitude (',setstr(176),'W)']);
ylabel(['latitude (',setstr(176),'N)']);
hold on;

% Plot starting positions

plot(P.lon(:,1),P.lat(:,1),'.',...
	 'color',[1 1 1]*0.8);
hst=plot(P.lon(:,1),P.lat(:,2),'.',...
	 'color',[1 1 1]*0.5);

% Determine range of values for colormap

c2=10^( ceil( log10(max(val))-1 )-1);
cint=c2*ceil( max(val) / c2 )/10;
valrange=[0:10]*cint;
clrs=jet(length(valrange)-1)*0.9;

% Set plot handles and plot starting positions

mk=['^v<>osx+*dph.'];

for in=1:size(D.lat,1)
  hdrt(in)=plot(D.lon(1,1),D.lat(1,1),'k',...
                'markersize',3,...
                'marker',mk(in),...
                'color',[1 1 1]*0.4,...
                'linestyle','none');
 end

for in=1:length(valrange)-1
  h(in)=plot(nan,nan,'o', ...
	     'color',clrs(in,:),...
	     'linewidth',2,...
	     'markersize',4);
end

for in=1:size(D.lat,1)
  plot(D.lon(in,1),D.lat(in,1),'k',...
       'markersize',7,...
       'linewidth',2,...
       'marker',mk(in),...
       'color',[1 1 1]*0.4);
  hdrc(in)=plot(D.lon(1,1),D.lat(1,1),'k',...
		'markersize',7,...
		'linewidth',2,...
		'marker',mk(in));
end

% Create colorbar

ah=gca;
set(ah,'position',[.1 .1 .75 .82]);
hcb=axes('position',[.85 .1 .05 .82]);
xcb=1:2;
ycb=[1:length(valrange)];
[xcbg,ycbg]=meshgrid(xcb,ycb);
[outlines,hsbar]=contourf(xcb,ycb,ycbg,[1:length(valrange)]);
set(hsbar,'edgecolor','k')
set(hcb,'ticklength',[0 0],...
        'XTick',[],...
        'yTick',1:length(valrange),...
        'yticklabel',valrange,...
        'YAxisLocation','right',...
	'fontname','times',...
	'Tag','colorbar')
axes(ah);

% Cycle through time steps

print -depsc2 first_frame.ps
for in=max([find(P.t<=tvisstart) 1]):P.ndts

  yd=P.t(in);
  
  if (yd > tend) 
     break
    end

  % Identify unstarted bugs
  indd=find(P.dstart>yd);
  set(hst,'xdata',P.lon(indd,in),'ydata',P.lat(indd,in));

  % move drifter
  for jn=1:size(D.lat,1)
    set(hdrc(jn),'xdata',D.lon(jn,in),'ydata',D.lat(jn,in));
    set(hdrt(jn),'xdata',D.lon(jn,1:in-1),'ydata',D.lat(jn,1:in-1));
  end

  for jn=length(valrange)-1:-1:1
    ind = find(((yd-P.dstart) > 0)    & ...
	       (val > valrange(jn))  &  (val < valrange(jn+1)) );
    set(h(jn),'xdata',P.lon(ind,in),'ydata',P.lat(ind,in));
  end
  
  title([datestr(datenum(1999,1,1)+yd),' GMT'])

  jpegwrite(['movframes/IT',...
	     sprintf('%07i',in),'.jpg'],...
	    [640 480])
end
print -depsc2 last_frame.ps

