cdf_names=[
           'u204ent2.cdf'   % 1) North Channel U2 (4 m)
           '3591-a1h.cdf'   % 2) USGS Boston LNB (5 m)
           'u304ent2.cdf'   % 3) Stellwagen Bank U3  (4 m)
           'mb3-f.cdf   '   % 4) Scituate (4 m)
           '3521-a1h.cdf'   % 5) Race Pt (5 m)
           '3551-a1h.cdf'   % 6) Manomet (5 m)
           'u704ent2.cdf'   % 7) Cape Cod Bay U7 (4 m)
           ];
[w,jd]=getv(cdf_names);
start=gregorian(jd(1));
stop=gregorian(jd(length(jd)));
runoff=getrunoff('runoff.cdf',start,stop);
wind_str=getwind('logantau-a.cdf',start,stop);
%  do eof
[wlp,jdlp]=plfilt(w,jd);
[eig_vec,d,z]=eof(wlp);
%  plot 1st two eofs
[m,n]=size(cdf_names);
for i=1:m
  cdf=cdf_names(i,:);
  lat0(i)=mcagt(cdf,'NC_GLOBAL','latitude');
  lon0(i)=mcagt(cdf,'NC_GLOBAL','longitude');
end
load harry.ll
load bath.50.ll
axis('square');
lat_mid=42.3;
lat_max=42.6;
lon_mid=-70.4;
dlon=1.4;
lat_fac=cos(lat_mid*pi/180);
dlat=dlon*lat_fac;
hold off
axis([lon_mid-.5*dlon lon_mid+.5*dlon lat_mid-.5*dlat lat_mid+.5*dlat]);
plot(harry(:,1),harry(:,2));
title(date_lbl(start,stop));
hold on
plot(bath(:,2),bath(:,1),'r.')
uu=real(eig_vec(:,2));
vv=imag(eig_vec(:,2));
%
% factor for arrows
%
xfac=.2;
yfac=xfac*lat_fac;
arrows(lon0,lat0,uu,vv,xfac,yfac,'g-');

