%
whole=1
%whole=1
load rocky
load bath40
% add wind
cdf_groups(26,:)='bb_stress ';
wlp(:,26)=bb_strlp*10;
lonlat(26,2)=42.1; lonlat(26,1)=-70.9;
%
!rm rose.met
[m,n]=size(wlp);
nind=length(ind);
is=[1 3 6 12 14 16 19 21 24 26];   %surface 4-8 m
im=[2 4 7 13 15 17 20 22 25 26];   % mid 18-28 m
inb=[5 8 9  23 26];        %  33-60 m        % near bot 
ib=[10 11 18 26 ];           % > 60
ibb=[2  5  9 11 13 15  20  23 26]; % 10 m or less from  bottom
%
%  get coastline and 40 m isobath
load coast
load bath40
%  set up plot
%lat_mid=42.3;
%lon_mid=-70.4;
%dlon=1.4;   
lat_mid=42.22;
lon_mid=-70.5;
dlon=1.2;
lat_fac=cos(lat_mid*pi/180);

dlat=dlon*lat_fac;
% factor for roses
%
yfac=1./111.;   % km => deg
xfac=yfac/lat_fac;

if(whole==1),
  kind=1:1;
else,
  kind=4:6;    % fall 90- spring 91
end
for k=kind
hold off
axis('square')
axis([lon_mid-.5*dlon lon_mid+.5*dlon lat_mid-.5*dlat lat_mid+.5*dlat]);
plot(coast(:,1),coast(:,2));
hold on
mplot(bath40,'.')
%
% legend 
   ticint=5;
   len=10;
   legx=-70.9;
   legy=41.9;
%   text(legx+.5*len*xfac,legy+.03,[int2str(len) '%']);
   plot([legx legx+len*xfac],[legy legy]);
   xtic=[legx:xfac*ticint:legx+len*xfac];
   xtic(2,:)=xtic(1,:);
   ytic=legy*ones(xtic);
   ytic(2,:)=ytic(2,:)+.01;
   plot(xtic,ytic,'r-');
%
for i=ibb,
   if(whole==1),
     i1=1;
     i2=length(wlp(:,1));
   else,
     i1=ind(k);
     i2=ind(k+1);
   end
   ii=i1:i2;
   str1=date_lbl(gregorian(jdlp(i1)),gregorian(jdlp(i2)));
   z=denan(wlp(ii,i));
  if(length(z)>60),
   nl=int2str(length(z));
   [z]=shot(z,1,.5);
   xroze=real(z)*xfac+lonlat(i,1);
   yroze=imag(z)*yfac+lonlat(i,2);
   cdf_groups(i,:)
   plot(xroze,yroze,'g.')
   hold on
  end
end
title([str1 ' 4-8 m']);
%title([str1 ' 18-28 m']);
%title([str1 ' <= 10 mab']);
if (exist('rose.met')~=2)
  meta rose
else
  meta
end
hold off
pause
end
