function [URL] = nscat30url(archive, pass_times, StartColumn, ...
    EndColumn, StartRow, EndRow, dset_stride, ranges, variablelist, server)
%
% This function will build the NSCAT Level 3.0 specific file name.
%
% $Id: nscat30url.m,v 1.8 1998/11/09 20:26:57 dbyrne Exp $

% $Log: nscat30url.m,v $
% Revision 1.8  1998/11/09 20:26:57  dbyrne
% *** empty log message ***
%
% Revision 1.5  1998/10/23 15:26:07  root
% updating NSCAT 3.0
%
% Revision 1.4  1998/10/22 18:29:54  root
% updating.
%
% Revision 1.3  1998/09/13 15:44:16  root
% Meshed James' changes.
%
% Revision 1.2  1998/09/09 15:04:30  dbyrne
% Eliminating all global variables.
%
% Revision 1.1  1998/05/17 14:18:08  dbyrne
% *** empty log message ***
%
% Revision 1.2  1997/12/11 06:20:46  jimg
% Switched to full archive of data. Added catalog server.
%
% Revision 1.1.1.1  1997/09/22 14:13:55  tom
% Imported Matlab GUI sources to CVS
%

Year = pass_times(1) - 1900;
Day = pass_times(2);
SubDirectory = num2str(pass_times(3));
time_stamp = sprintf('%2.2i%3.3i%0.0i', Year, Day);
% these images are now stored in compressed format:
%ImgName = sprintf('%s', 'S30', time_stamp, '.HDF');
ImgName = sprintf('%s', 'S30', time_stamp, '.HDF.Z');
Constraint = '';
for i = 1:size(variablelist,1)
  if i > 1
    Constraint = [Constraint ','];
  end
  Constraint = [Constraint sprintf('%s', deblank(variablelist(i,:)),'[', ...
      num2str(StartRow), ':', num2str(dset_stride), ':', ...
      num2str(EndRow),'][', num2str(StartColumn), ':', ...
      num2str(dset_stride), ':', num2str(EndColumn), ']')];
end

URL = sprintf('%s', deblank(server), 'S', SubDirectory, '/', ImgName, ...
    '?', Constraint);

return;
