%function dummy = rico_aerosol_kr(filename,date_str)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Project Name: RICO 2005 
%Purpose: Reads the aerosol text files and plots data
%
%Input Data: aerosol text files
%
%Last Modified: Kristen Rasmussen 6/22/05
%
%%%%%%%%%%READS THE TXT FILES %%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clear all;
fclose all;

addpath 'C:\rico'
addpath 'C:\rico\aerosol\data'

pathdata = 'C:\rico\aerosol\data';
outpath  = 'C:\rico\aerosol\results';
eval(['cd ', pathdata]);

aa = ('aerosol_nohds.txt');
k = length(aa);
%%%%%%%%%%%%%START READING AND LOADING TXT FILES %%%%%%%%%%%%%%%%%%%%%%

x = load('C:\rico\aerosol\data\aerosol_nohds.txt')

%%%%%%%%%%%%%%%%%Read Variables from the first input file%%%%%%%%%%%%%%%%%%%%%

%        conv         = 0.028*10.^5
%        
%        %time        = x(:,3);
%        jd           = x(:,4);
%        sample_vol   = x(:,5);
%        tot_cts      = x(:,6);
%        sz1          = x(:,7);
%        cts1         = x(:,8);
%        sz2          = x(:,9);
%        cts2         = x(:,10);
%        sz3          = x(:,11);
%        cts3         = x(:,12);
%        sz4          = x(:,13);
%        cts4         = x(:,14);
%        sz5          = x(:,15);
%        cts5         = x(:,16);
%        sz6          = x(:,17);
%        cts6         = x(:,18);

jd=x(:,1)+x(:,2)-38354+1;
[jdav,y,yvar]=timave_2_nonan(jd,10,x);

%%%%%%%%%%%%%%%%%Graphs%%%%%%%%%%%%%%%%%%%%%%%%

%qw = length(fname)

%for u=1:qw;
%figure(1)
 %set(gcf,'DefaultAxesFonts',10)
 %plot(jd,x(:,6)*10/.028/1e6,'.',jdav,y(:,6)*10/.028/1e6,'o')
 plot(jdav,y(:,6)*10/.028/1e6,'.')
 titlestr = sprintf('RICO 05 R/V Seward Johnson Total Aerosol Counts');
 title(titlestr,'FontName','times','FontSize',14);               
 %xlim([0 1])            
 hold on
 ylabel('Total Aerosol Counts');
 xlabel('Julian Day Fraction');
 %grid on
 

