function basemap(colors, isobaths, gnome)
%
% the function basemap(colors, isobaths, gnome) is used by the ARPRO
% software to plot a base map on which later to overlay float
% tracks.  The input parameters should be as follows:
%        colors :   'yes', if we want a color map, with cyan
%                          sea and yellow land, and (if we 
%                          choose so,) blue isobaths, or
%                   'no',  for black sea and white land and
%                          isobaths (if we print it, it's 
%                          reversed).
%        isobaths:  'yes' for isobath plotting, or
%                   'no'  for isobath omission.
%
%        gnome:      'big' for normal plot, or
%     (size of map)  'wee' for summary plot.
% -------------------------------------------------------------
%  Written by Vassilis Zervakis, in February 1996,
%  Modified by Mike Sparrow in June 1997,
%             for AINCO - Interocean, Madrid, Spain
%--------------------------------------------------------------
%
global mapfigure sumfigure bathon
global minlon maxlon minlat maxlat
global COASTPATH BATHYPATH isobathy
%
datafound = 'no ';
% check whether the desired coordinates are within the ----
% existing capabilities -----------------------------------
% ----check whether we'll plot N.E. Atlantic map ---------
if (minlon>=-30)&(maxlon<=0)&(minlat>=20)&(maxlat<=60),
   dx = 0.1;
   dy = 0.1;
   coastfile=[COASTPATH 'neatlant.map'];
   bathyfile=[BATHYPATH 'neatlant.iso'];
   datafound = 'yes';
end
% ----check whether we'll plot N.W. Atlantic map ---------
if (minlon>=-100)&(maxlon<=-30)&(minlat>=0)&(maxlat<=65),
   dx = 0.1;
   dy = 0.1;
   coastfile=[COASTPATH 'nwatlant.map'];
   bathyfile=[BATHYPATH 'nwatlant.iso'];
   datafound = 'yes';
end
% ----check whether we'll plot S. Atlantic map ---------
if (minlon>=-70)&(maxlon<=20)&(minlat>=-60)&(maxlat<=0),
   dx = 0.0;
   dy = 0.0;
   coastfile=[COASTPATH 'satlant.map'];
   bathyfile=[BATHYPATH 'satlant.iso'];
   datafound = 'yes';
end
% ----check whether we'll plot Mediterranean map ---------
if (minlon>=-10)&(maxlon<=45)&(minlat>=+30)&(maxlat<=+50),
   dx = 0.1;
   dy = 0.1;
   coastfile=[COASTPATH 'mediterr.map'];
   bathyfile=[BATHYPATH 'mediterr.iso'];
   datafound = 'yes';
end
% ----check whether we'll plot Hellenic Seas map --------------
if (minlon>=+19)&(maxlon<=+29)&(minlat>=+34)&(maxlat<=+41),
   dx = 0.1;
   dy = 0.1;
   coastfile=[COASTPATH 'shoregr.bln'];
   bathyfile=[BATHYPATH 'mediterr.iso'];
   datafound = 'yes';
end
if (datafound =='yes') & (gnome =='big'),
   if (colors == 'yes') & (isobaths == 'yes'), 
      global mapfigure 
      mapfigure = figure('name','Map',...
                         'Resize','on',...
                         'NumberTitle','off');
      geoplot2(minlon,maxlon,minlat,maxlat,coastfile,bathyfile,isobathy,dx,dy);
   end
   if (colors == 'yes') & (isobaths == 'no '), 
      global mapfigure
      mapfigure = figure('name','Map',...
                         'Resize','on',...
                         'NumberTitle','off');
      map2(minlon,maxlon,minlat,maxlat,coastfile);
   end
   if (colors == 'no ') & (isobaths == 'yes'), 
      global mapfigure
      mapfigure = figure('name','Map',...
                         'Resize','on',...
                         'NumberTitle','off');
      axes('Box','on');
      bwgeopl2(minlon,maxlon,minlat,maxlat,coastfile,bathyfile,isobathy,dx,dy,gnome);
   end
   if (colors == 'no ') & (isobaths == 'no '), 
      global mapfigure
      mapfigure = figure('name','Map',...
                         'Resize','on',...
                         'NumberTitle','off');
      axes('Box','on');
      bwmap2(minlon,maxlon,minlat,maxlat,coastfile,gnome);
   end
end
 if (datafound =='yes') & (gnome =='wee'),
   if (colors == 'no ') & (isobaths == 'yes'), 
      global sumfigure
      sumfigure = figure('name','Summary',...
                         'Resize','on',...
                         'NumberTitle','off',...
                         'Units','cent',...
                         'Position',[0,1,20,19],...
                         'Scrolled','off',...
                         'PaperUnits','cent',...
                         'PaperPosition',[1,6,19,21]);
                         
      bathon = 1 ;
      bwgeopl2(minlon,maxlon,minlat,maxlat,coastfile,bathyfile,isobathy,dx,dy,gnome);
   end
   if (colors == 'no ') & (isobaths == 'no '), 
      global sumfigure
      sumfigure = figure('name','Summary',...
                         'Resize','on',...
                         'NumberTitle','off',...
                         'Units','cent',...
                         'Position',[0,1,20,19],...
                         'Scrolled','off',...
                         'PaperUnits','cent',...
                         'PaperPosition',[1,6,19,21]);
      bathon = 0 ;
      bwmap2(minlon,maxlon,minlat,maxlat,coastfile,gnome);
   end


 end

if (datafound =='no '),
   mbox('OK','Coordinates out of currently',...
             'available range')
end
