% CT25_daily_process
% NTAS 2009 :: 2009-06-12 :: LB
% This is the main level program to be run daily on Vaisala ceilometer
% CT25 data. It calls:
%
% read_daily_rawceilo_CT25_WHOTS09.m
%       load_CT25_2009
% ceilo_daily_plot_program_WHOTS09
% filecat to concatenate daily cloudbase into cloudbase_all.txt

clear all;
fclose('all');

%%%%%%%%%%%  Read parameters  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% addpath('G:\WHOTS_2009\Kilo_Moana\WHOTS09_programs\') %add path for the read_parameters function
read_parameters_WHOTS09;

ls([way_raw_data_ceilo 'R*.DAT'])
fname=input('Input file name to evaluate Aymmddhh.DAT (ex: A7031600.DAT): ', 's');
yyyy=['200' fname(2)];  year=str2double(yyyy);
mm=fname(3:4);          month=str2double(mm);
dd=fname(5:6);          monthday=str2double(dd);
yearday=datenum(year,month,monthday)-datenum(year,1,0);
ddd=sprintf('%03i',yearday);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% read raw CL31 files
read_daily_rawceilo_CT25_WHOTS09; % writes intermediate ascii files
ceilo_daily_plot_program_WHOTS09;
% END of DAILY processing

% concatenate all cloud base files into one:
filecat([way_proc_data_ceilo 'cloudbase' yyyy '*.txt'],[way_proc_data_ceilo 'cloudbase' yyyy '_all.txt']);



