function bwgeopl2(minlon,maxlon,minlat,maxlat,coastfile,bathyfile,isobathy,dx,dy,gnome)
%
%    The function bwgeopl2(minlon, maxlon, minlat, maxlat, 
%                         coastfile,bathyfile, isobathy, dx, dy, gnome)
%    makes a plot of black (filled-in) land and isobaths between the
%    coordinates minlon < x < maxlon, minlat < y < maxlat. The variables
%    dx and dy define how much the bathymetry should be shifted to
%    fit the coastline, as the files are independent.  The coast
%    line data should be read from the file 'coastfile', while the
%    bathymetric data (isobaths) from the file 'bathyfile', which 
%    if it doesn't exist, can be created by running my MATLAB sub-
%    routine 'geomake'.  This subroutine is MUCH faster than geosurf,
%    or geocont, and (on the contrary to the forementioned) can be
%    superimposed by float tracks.
%    the vector isobathy should contain the depths of isobaths to
%    be plotted (out of 200, 500, 1000, 2000, 3000, and 4000)
%    dx and dy define (in degrees) the shift of bathymetry to fit
%    coastline
%
%    See also geocont, geosurf, geomake, geoplot
%
%---------------------------------------------------------------- 
%    Written by Vassilis Zervakis, in January 1996,
%    and modified by Mike Sparrow in June 1997  whilest at
%               AINCO - Interocean, Madrid, Spain.
%----------------------------------------------------------------
% 
%----read and plot the coastline file ----------
global temp pres bathon lon lat
coastfile ;
     eval('bwmap2(minlon, maxlon, minlat, maxlat, coastfile, gnome)');
     hold on;
%----read the bathymetry file ----------
filenm = num2str(bathyfile);
n = findstr('.',filenm);
dirs = findstr('\',filenm);
nn = length(dirs);
m = dirs(nn);
filebody = filenm(m+1:n-1);
eval(['load ',filenm]);
data = eval(filebody);
depth = data(1,1);
points= data(1,2);
x = data(2:points+1,1) + dx;
y = data(2:points+1,2) + dy;
for kk = 1:length(isobathy),
  if abs(depth) == isobathy(kk),
    if (gnome == 'wee'),
    plot(x,y,'w');
    else,
    plot(x,y);
    end
  end
end
hold on;
clear x;
clear y;
points_read = points + 1;
while points_read < length(data(:,1)),
 m = points_read+1;
 depth = data(m,1);
 points = data(m,2);
 points_read = points_read + points + 1;
 x = data(m+1:points_read,1) + dx;
 y = data(m+1:points_read,2) + dy;
 for kk = 1:length(isobathy),
  if abs(depth) == isobathy(kk),
if (gnome == 'wee'),
    plot(x,y,'w')
    else,
    plot(x,y);
end
  end
 end
 hold on;
 clear x;
 clear y;
end
if (gnome =='wee'),
  summary(lon,lat) ;
end
