function archive_mblt(dataDirectory); % % archive_mblt(dataDirectory); % % Function to archive the files in the MBLT dataDirectory. %Soupy Alexander, 10/27/03 dataDirectory = 'C:\SCHTUFF\MASS_BAY\MBLT_REPORT\DATAFILES'; expName = 'MBLT'; archiveName = fullfile(dataDirectory, 'mbltArchive'); %Create an archive of the data files (or load it in) [mbltArchive] = archiveDirectory(dataDirectory, expName, archiveName); siteA = struct([]); siteB = struct([]); %Sort the archive by site and eliminate the concatenated sites/non-hourly %averaged data for indexFile = 1:length(mbltArchive) theFile = mbltArchive(indexFile).fileList; firstChars = theFile(1:4); theTimeStep = mbltArchive(indexFile).timeStep; if isempty(str2num(firstChars)) | ... (theTimeStep < 59) | (theTimeStep > 61); continue end theLat = mbltArchive(indexFile).theLat; theLon = -1*abs(mbltArchive(indexFile).theLon); %Insure longitude is negative if theLon <= -70.7 siteA = [siteA mbltArchive(indexFile)]; else siteB = [siteB mbltArchive(indexFile)]; end end save(archiveName, 'siteA', 'siteB', 'mbltArchive')