% Reads in raw ceilometer .DAT files as written by the Vaisala logging program %Writes out the old stye cloud base height file and the backscatter file % This version is looking for data on E:\ %It ignores files smaller than 8k to avoid the log files %Uses LCload_1 adapted from Pavlos Kollias on Stratus 03 Revelle cruise % program written by C. Fairall. % on 8 Aug 2004. disp('Reading ceilo files') clear all; fclose('all'); s='e:\*.DAT'; dr=dir(s); %lists all files in directory [n m]=size(dr); nx=n;% %# of files in data directory (includes . and ..) %****************** setup read data loop ********** ss='E:\'; wrtit=1; jamx=1; for ibg = 119:nx %major read loop if dr(ibg).bytes>8000 ff=dr(ibg).name; %names of files ceil_filename=[ss ff]; mon=ff(3:4); %get month month=str2num(mon); %get month dy=ff(5:6); %get day day=str2num(dy); %get day yr=['0' ff(2:2)]; year=str2num(yr); data=[year month day];%get year LCload_1; if wrtit fn=[mon '_' dy '_' yr] sta=['d:\data\ceilo\ceiloraw\' fn '.txt'] save( sta, 'ceilo_30_sec', '-ascii','-tabs') stb=['d:\data\ceilo\ceiloraw\backscatter_' fn]; save(stb,'ceil_utc','ceil_b','-ascii','-tabs'); save(stb,'ceil_utc','height','ceil_b'); end; end;%end if end; % data line loop