function x=plotatoc(linetype,col,flag);
% PLOTATOC ( LINETYPE, COL, FLAG )    plot ATOC paths in North Pacific
%            LINETYPE      defaults to ':'
%            COL           land shading defaults to .8*[1 1 1]
%            FLAG          0: plot all paths (the default)
%                          1: plot paths l, k, n, o, v1 only

if nargin < 3, flag=0; end
if nargin < 2, col=.8*[1 1 1]; end
if nargin < 1, linetype=':'; end

plotland(col), axis([138 244 0 64])

if flag==0

  % add California paths
  load /usr/people/dimitri/global/atoc/Calif_grid
  for i=1:length(rcv)
    ix=find(drx==i);
    if ~strcmp(rcv_id(i,:),'g ')
      plot(dlon(ix),dlat(ix),linetype)
    end
  end
  
  % add Hawaii paths
  load /usr/people/dimitri/global/atoc/Hawaii_grid
  for i=1:length(rcv)
    ix=find(drx==i);
    if ~strcmp(rcv_id(i,:),'nz') & ~strcmp(rcv_id(i,:),'r2') & ...
          ~strcmp(rcv_id(i,:),'g ') & ~strcmp(rcv_id(i,:),'r1')
      plot(dlon(ix),dlat(ix),linetype)
    end
  end
  
elseif flag==1
  
  % add California paths
  load /usr/people/dimitri/global/atoc/Calif_grid
  for i=1:length(rcv)
    ix=find(drx==i);
    if any(i==[8 9 11])
      plot(dlon(ix),dlat(ix),linetype)
      h=text(dlon(max(ix)),dlat(max(ix)),deblank(rcv_id(i,1)), ...
          'verticalalignment','middle','horizontalalignment','right');
    elseif i==1
      plot(dlon(ix),dlat(ix),linetype)
      text(dlon(max(ix)),dlat(max(ix)),'v1', ...
          'verticalalignment','top','horizontalalignment','center');
    elseif i==12
      plot(dlon(ix),dlat(ix),linetype)
      text(dlon(max(ix)),dlat(max(ix)),deblank(rcv_id(i,1)), ...
          'verticalalignment','top','horizontalalignment','center');
    end
  end

end
