function georbat(lw,i80,al,is,ifil)

% function georbat(lw,i80,al,is,ifil)
% 
% function to plot coastline and bathymetry of Georges Bank,
% plots coastline, 60, 100, and 200 m isobaths in default mode.
% This function can be called before other stuff to be superposed or after
%
%                         Julio Candela VII/93
%
%  Warning: longtitude to distance scale is set to a
%           constant value good only for about 40 deg north..
%           More accurate digitized bathymetry is possible.
%           -JiM.
%
%  parameter lw = linewidth (default=2)
%           i80 = 0 to not include 80m isobath (default)
%                 1 to include
%            al = 0 to not include labels (default)
%                 1 to include labels
%            is = 0 for Candela isobaths (default)
%               = 1 for Limeburner shades
%               = 2 for Candela shades
%               = 3 for Signell details
%          ifil = 0 for nofill
%               = 1 for fill shades (default)

%default settings
 if nargin==0;
  lw=2;
  i80=0;
  al=0;
  is=0;
 end;
 if nargin==1;
  i80=0;
  al=0;
  is=0;
 end;

%global al 

% choose between Candela isobath or Limeburner shades
if nargin<4;is=0;end;
if is==0;
  sa = ['georbat'];
  eval(['load ',sa]);
  x=D(:,1); y=D(:,2);
  deg=0;
  if deg;
    ylaesc=0.111052 ; xloesc=0.084137;
    xloref=-71.0; ylaref=39.0;
    x = (x./xloesc) + xloref.*ones(size(x));
    y = (y./ylaesc) + ylaref.*ones(size(y));
% x=(x-xloref.*ones(size(x))).*xloesc;
% y=(y-ylaref.*ones(size(y))).*ylaesc;
  end

% color set to a brown default 
  plot(x,y,'color',[1 .62 .4],'linewidth',lw),hold on

%fill
if nargin<5; ifil=1;end;
if ifil==1;
  na=isnan(D(:,1)); n=find(na);

% color is defined by variable "c"
  c='w';fill(D(1:n(1)-1,1),D(1:n(1)-1,2),c);
  fill(D(n(1)+1:n(2)-1,1),D(n(1)+1:n(2)-1,2),c);
  fill(D(n(2)+1:n(3)-1,1),D(n(2)+1:n(3)-1,2),c);
  fill(D(n(3)+1:n(4)-1,1),D(n(3)+1:n(4)-1,2),c);
  fill(D(n(4)+1:n(5)-1,1),D(n(4)+1:n(5)-1,2),c);
end;

%plot(x,y,'w','linewidth',2)
%set(gca,'xlim',[-71 -65],'ylim',[39.5 43],'position',[.15 .15 .7 .6861])
%m=length(x); for k=1:m; plot(x(k),y(k),'g.'),end
% jk=find(x==99);n=length(jk);plot(x(k(1)),y(k(1)));hold on;
% for ik=1:2:n-1,kk=jk(ik)+1:jk(ik+1)-1;plot(x(kk),y(kk)),end
%set(gca,'xlim',[-52 -45],'ylim',[-2 6],'position',[.15 .2 .7 .6216]) 
% hold off

% Limeburner option
elseif is==1;
  gbmapbw;

% Candela SHade option
elseif is==2;
  gbmap;

% Signell details
elseif is==3;
  pltmb;
end;



% add labels
if nargin<10;
%  al=menu('Include labels on bathy?','yes','no');
end;

if al==1;
  al
  text(-68.6,40.35,'100m','rotation',30,'color',[1 .62 .4])
  text(-67.45,40.56,'100m','rotation',10,'color',[1 .62 .4])
  text(-67.48,41.07,'60m','rotation',10,'color',[1 .62 .4])
  text(-67.2456,40.49,'200m','rotation',40,'color',[1 .62 .4])
end;


% add 80m
%if nargin<2;
%  i80=menu('Include 80m isobath?','yes','no');
%end;

  if i80==1;
    load gc80m.bty
    id=find(gc80m(:,1)<0);
    plot(gc80m(id,1),gc80m(id,2),'w.','markersize',lw*4);
  end;

set(gca,'box','on','aspectratio',[1 .78]);
%Fix up the axis labels

%lllabel;
xlabel(' ');
ylabel(' ');