function []=plotv(jdlp,wlp,lonlat,icol,wind_stress_lp,ilab);
%function []=plotv(jdlp,wlp,lonlat,icol,wind_stress_lp,ilab);
% plotv (jdlp,wlp,lonlat,icol,wind_stress_lp,ilab);
% ilab=1 to label each stations with stats 
%   (start day relative to whole time period, followed by number
%    of days of good data)
%        % 
%----------- HARD-WIRED "REGION SPECIFIC STUFF"
%  coastline
%
if(nargin==5),
ilab==1
end
if(exist('coast')~=1),load coast.ll,end
[nc]=length(coast(:,1));
coast(nc+1:nc+4,1)=[-70 -71.2 -71.2 -70.71]';
coast(nc+1:nc+4,2)=[41.6127 41.6127 42.6273 42.6273]';
%
%  40 m isobath
%
if(exist('bath40_1')~=1),load bath40_1,end
if(exist('bath40_2')~=1),load bath40_2,end
%
%  plot limits
%
lat_mid=42.22;
lon_mid=-70.55;
%
%  longitude extent of plot
%
dlon=1.1;
%
%  size of station marker boxes  (km)
%
stasize=1;   % 1km boxes
%
% size of vectors and ellipses
%    EXAMPLE: sca=3600*24 plots vectors scaled such that they
%     correspond to the distance a particle would travel in a day
sca=3600*24;    %time in seconds
%
%  legend position
legx=-70.9;
legy=41.9;
%
%  location to plot wind mean and ellipse
lonwind=-70.9;
latwind=42.1;
%
%------------END OF HARD-WIRED STUFF-----
%
yfac=sca*1.e-5/111.;   % [cm/s] * [s/day] * [km/cm] * [deg/km];
lat_fac=cos(lat_mid*pi/180);
stasize=stasize/2;
boxx=[-stasize stasize stasize -stasize -stasize];
boxy=[-stasize -stasize stasize stasize -stasize];
%
[m,n]=size(wlp);
wlp(:,n+1)=wind_stress_lp*10;
icol(n+1)=1;
lonlat(n+1,1)=lonwind;
lonlat(n+1,2)=latwind;
n=n+1;
%
dlat=dlon*lat_fac;
% factor for roses
%
xfac=yfac/lat_fac;

plot(bath40_1(:,1),bath40_1(:,2),'w-');
patch(coast(:,1),coast(:,2),[.8 .6 .4]);
line(bath40_2(:,1),bath40_2(:,2),'color','white');
axis([lon_mid-.5*dlon lon_mid+.7*dlon lat_mid-.5*dlat lat_mid+.5*dlat]);
%
% legend 
ticint=5;
len=10;   % 10 cm/s
text(legx+.5*len*xfac,legy+.05,[int2str(len) 'cm/s'],'horiz','center');
line([legx legx+len*xfac],[legy legy]);
text(legx+.5*len*xfac,legy-.05,[int2str(len) 'm/s'],'horiz','center');
xtic=[legx:xfac*ticint:legx+len*xfac];
xtic(2,:)=xtic(1,:);
ytic=legy*ones(size(xtic));
ytic(2,:)=ytic(2,:)+.01;
line(xtic,ytic,'color','red','linestyle','-');
%
str1=greg2str(gregorian(jdlp));
c(1,:)=[0 1 0];
c(2,:)=[0 1 1];
c(3,:)=[1 0 1];
c(4,:)=[1 0 0];

for sta=1:n;
%  ----station location
   xr=boxx*xfac+lonlat(sta,1);
   yr=boxy*yfac+lonlat(sta,2);
   line(xr,yr)
%  ----mean vector
   if(~isnan(wlp(sta))),
     [z1]=arrow(wlp(sta));;
     xr=real(z1)*xfac+lonlat(sta,1);
     yr=imag(z1)*yfac+lonlat(sta,2);
     line(xr,yr,'color',c(icol(sta),:),'linestyle','-')
   end
end
title([str1]);
end
set(gca,'aspect',[nan cos(lonlat(1,2)*pi/180)])
