function data = readFilenames(files)
% Read filenames for collocation
% AIRS, MODIS level1b, MODIS level03 and AIRS-MODIS collocation
%

if nargin == 0
  [fileName, dataPath]=uigetfile('../*.txt','Filenames File');
  fid = fopen([dataPath fileName], 'r');
else
  fid = fopen(files, 'r');
end

% AIRS-MODIS collocation
data.colloc = fscanf(fid, '%s', 1);

% atmospheric profiles at AIRS footprints
data.profiles = fscanf(fid, '%s', 1);

% AIRS data set
data.airs = fscanf(fid, '%s', 1);
% AIRS channel quality file
data.airs_flag = fscanf(fid, '%s', 1);
% AIRS cloud mask got from MODIS
data.airs_cmask = fscanf(fid, '%s', 1);
% AIRS layered cloud mask got from MODIS
data.airs_cmask_layer = fscanf(fid, '%s', 1);
% AIRS layered cloud phase got from MODIS
data.airs_cphase_layer = fscanf(fid, '%s', 1);

% No. of MODIS granules
ngranule = fscanf(fid, '%d', 1);
% MODIS Level1b data set
for n = 1:ngranule
  data.modis1b{n} = fscanf(fid, '%s', 1);
end
% MODIS Level1 geographic data set
for n = 1:ngranule
  data.modis03{n} = fscanf(fid, '%s', 1);
end
% MODIS Level2 cloud mask data set
for n = 1:ngranule
  data.modis35{n} = fscanf(fid, '%s', 1);
end
% MODIS Level2 cloud product data set
for n = 1:ngranule
  data.modis06{n} = fscanf(fid, '%s', 1);
end
% MODIS classification cloud mask
data.modis_cmask = fscanf(fid, '%s', 1);
% MODIS cloud mask
% data.modis_cloudmask = fscanf(fid, '%s', 1);
% MODIS total precipitable water
data.modis_tpw = fscanf(fid, '%s', 1);

while 0
% MODIS cloud phase
data.modis_cphase = fscanf(fid, '%s', 1);
% MODIS water path
data.modis_wpath = fscanf(fid, '%s', 1);
% MODIS cloud top pressure
data.modis_ctp = fscanf(fid, '%s', 1);
% MODIS effective cloud amount or cloud effective emissivity
data.modis_eca = fscanf(fid, '%s', 1);
% MODIS cloud optical thickness
data.modis_cthick = fscanf(fid, '%s', 1);
% MODIS effective Particale radius
data.modis_pradius = fscanf(fid, '%s', 1);
% MODIS cirrus cloud reflectance Particale radius
data.modis_creflectance = fscanf(fid, '%s', 1);
end

data.ngranule = ngranule;

fclose(fid);
