function names = getspmrdirs
% GETSPMRDIRS  - Gets a listing of all spmr directories in Diatom\n9* directories
%
% Use as: names = getspmrdirs
%
% Output: names = a string array of the fullpaths to all the spmr directories
%                 located \Diatom\n9* directories

% Brian Schlining
% 16 Nov 1999

rootPath = '\\tornado\diatom\';
yearPath = {'n19*', 'n20*'};
for i = 1:length(yearPath)
   if i == 1
      cruiseDirs = getfname([rootPath yearPath{i}]);
   else
      cruiseDirs = strvcat(cruiseDirs, getfname([rootPath yearPath{i}]));
   end
   
end

[r c] = size(cruiseDirs);
k = 0;
for i = 1:r
   gpDirs{i} =  getfname([rootPath deblank(cruiseDirs(i,:)) filesep 'gp*']);
   [rr cc] = size(gpDirs{i});
   for j = 1:rr
      k = k + 1;
      fullName{k} = [rootPath deblank(cruiseDirs(i,:)) filesep deblank(gpDirs{i}(j,:)) filesep 'spmr']; 
   end
   
end

gpDirs = strvcat(fullName{:});
[r c] = size(gpDirs);
j = 0;
for i = 1:r
   if exist(deblank(gpDirs(i,:))) == 7
      j = j + 1;
      names{j} = gpDirs(i,:);
   end
end

names = strvcat(names{:});
