function [url,loaddodsbool,infotext,times,Pass_Times,depths,Pass_Depths,lats,lons,num_url] = wvsu ...
         (getarchive, getranges, getmode, ...
          getvariablelist, getserverlist,passtimes,passdepths,whichurl)
%
%    This function will build WVS file name and return url to the browser
%

% The preceding empty line is important
% $Log: wvsu.m,v $
% Revision 1.1  1999/11/29 17:28:24  kwoklin
% Adding World Vector Shoreline as a data set.  klee
%

% $Id: wvsu.m,v 1.1 1999/11/29 17:28:24 kwoklin Exp $
% klee 11/24/99

% initiate
  loaddodsbool = 0;
  infotext = []; times = []; Pass_Times = []; url = [];
  depths = []; Pass_Depths = []; lats = []; lons = [];
  Constraint = []; URL = [];
% To prevent named file conflict, force variable names to be appeared as variables.  
  lat=[]; lon=[]; 

% reading selected ranges

  if exist(getarchive) == 2
    eval(getarchive)
  else
    dodsmsg('Metadata not found!')
    return
  end

  Llat = getranges(2,1);   Ulat = getranges(2,2);
  URLlat = sprintf('%s','&lat<=',num2str(Ulat,7));

  Llon = getranges(1,1);   Rlon = getranges(1,2); 
  URLlon = sprintf('%s','&lon<=',num2str(Rlon,7));

  % builds constraints 
  returned_var = [];
  infotext = [];
  if strcmp(getmode, 'get')
    Constraint = sprintf('%s', 'lat,lon', URLlat, URLlon);
    loaddodsbool = 1;
  end

  URL = sprintf( '%s', Server, '?', Constraint);
  url = URL;

  return

  

  
