disp('strip_cam')
fclose('all');
clear st1;clear st2;clear st3;clear jadson;
jd=input('julian day, ddd','s');

hr='00';%input('gmt hr','s');
jhold=0; 
jax=1;
jaxx=1;
backchk=0;
st1=zeros(13,1);
st2=zeros(13,72000);
for jam=0:23,%cycle thru 24 hourly stats files
   if jam<10,
      hr=['0'num2str(jam)];
   else
      hr=num2str(jam);
   end;
   
   e=['D:\hp_data\P1_' jd hr];
   f=['E:\hpdata\P1_s' jd hr];
   flist=fopen(e,'r');
   fid=fopen(f,'w');
   if flist>0,   %if the file exists, 
            
      dmp=fgets(flist);%read header lines and skip blanks
      dmp2=fgets(flist);%read header lines and skip blanks
		
      while feof(flist)==0,%go until you run out of 10-min sections
			st1=fscanf(flist,'%g%*c%g%*c%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g',[13,inf]);
			%                1    2    3    4    5    6   
       
      	[nr1,nl1]=size(st1);      
         if nr1==13
            st2(:,jax:jax+nl1-1)=st1; 
      		jax=jax+nl1;
			else
   			x=fgets(flist);
      	end;%end if            
   	end;%end while
	end;%end flist             complete 1 hour of data
   jam  
    [nr2,nl2]=size(st2);      
    %nl2=10;
    %fid=1;
    if nl2>1
       fprintf(fid,'%10.0f,%5.f,%5.3f,%5.3f,%5.3f,%5.3f,%5.3f,%5.3f \n',st2(1:8,1:nl2));
    end;
    clear st2;clear st1;
   jax=1;
end;%end jam


