function [times, pass_times, url] = gmup1c(CatalogServer, Time, ranges)
%----------------------------------------------------------------------------
%
% Consult the nscat30 catalog server to find images that fall within the time
% range given by the user.
%
% Formal parameters:
% catalog_server: URL of the catalog server.
% time: The time range of the data set.
%
% The return values are:
% times: The time in years (and fractions, see note below) for all hits.
% pass_times: This is a matrix of time with the year and day
% url: dummy return value to satisfy cat function type signature.
%
%
%   2 May 1999, pdh
%----------------------------------------------------------------------------

% The preceeding blank line is important for cvs.
% $Id: gmup1c.m,v 1.2 1999/05/27 13:37:36 paul Exp $
%

% $Log: gmup1c.m,v $
% Revision 1.2  1999/05/27 13:37:36  paul
% initialize urlmat dodsdates (global variables)
%
% Revision 1.1  1999/05/21 16:54:40  paul
% Initial version...phemenway
%


global urlmat;
global dodsdates;


% Initialize variables.

More = 1;
times = [];
tmptimes = [];
cs = [];
urlmat = [];
dodsdates = [];


[times, pass_times] = monthly(Time,ranges);

% Get beginning and ending of time interval.

BeginTime = max(Time(1), ranges(4,1));
LastTime = min(Time(2), ranges(4,2));


% Process the beginning year and day
bdate=yr2ymd(BeginTime);


% Process the ending year and day
ldate=yr2ymd(LastTime);


  Constraint = [ 'DODS_URL,DODS_Date(sa_precip)&date("' ...
               bdate '","' ldate '")' ];

  cs=[CatalogServer '?' Constraint];

  loaddods(cs)

  url=mkstrmat(DODS_URL);
  urlmat=url;

dodsdates=pass_times;

return
