function prcout3(FileName) % PRCOUT3 - Process stor*.out file. Derive Chl, Fouling and additional data from Ed490 % % PRCOUT is a wrapper function for several data processing functions. % They are combined into this file to make sure that the data is always processed % in a consitent order. This function takes the original stor*.out file % and creates 2 processed files stor*.hourly and stor*.daily. % % Use as: prcout(FileName) % or prcout - A dialog box will appear to select the *.out file to process % % Inputs: FileName = The name of the file to be read % % Requires: READOUT, A_OC_C, PRC_ED490, PRC_LU0, WRITEOUT % Brian Schlining % 21 Jan 1999 % 17 Dec 1999; Modified PRCOUT to return hourly rather than 15min data. To get % 15 minute data use PRCOUT fprintf(1,'(PRCOUT): Begin processing\n'); % Read the stor*.out file into a structure if nargin == 1 %| isempty(FileName) IN = readout(FileName); else IN = readout; end if isempty(IN) return; end [trash INFile INExt] = fileparts(IN.Filename); Lon = str2num(INFile(12:14)); % Cut the longitude out of the name pm = lower(INFile(15)); if strcmp(pm,'w') Lon = Lon * -1; end % get the file name [d f e] = fileparts(IN.Filename); % Lu's here are Lu[1.5m] for i = [NaN Lon]; OUT = avgout3(IN,i); % Get an average (hourly or daily between 10am and 2pm) OUT.CHL_ugL = a_oc2_c(OUT.LU_490, OUT.LU_555); % Calculate chlorphyll using OC2 eqn. OUT.FOUL_none = OUT.LU_683./OUT.LU_555; % fouling ration descibes amount of biofouling OUT = prc_ed490(OUT); % Derive Ed[3m+]'s from Ed[3m+]490 OUT = prc_lu0(OUT); % Derive Lu0+ and Luwn(Normalized Water leaving radiance's 0m+) % Add the correct extension if isnan(i) ext = '.15min'; else ext = '.daily'; end writeout(OUT,[d f ext]); % Write structure to a tab delimited file end fprintf(1,'(PRCOUT): Finished processing \n');