function [t,dat,T1,T2,wl]=rd_wetview_acs(fnam)
%
%  Program to read WetView ac-a data files
%
%  INPUTS
%    FNAM = file name to read in.
%
%  OUTPUTS
%    
%  	t1-time for acs data
%    dat = ACs data
%    T=temp. P=pressure
%
%
%  Written by Emmanuel Boss, UMAINE, 2005.
%   

fid=fopen(fnam,'r')

%fid=fopen('C:\Documents and Settings\Emmanuel Boss\Desktop\cals_2_2005\acs_16drops.dat','r')
%skip first 96 lines
for i=1:96   
   line=fgetl(fid);
end
i=1;
wl=[400.0 404.3 409.1 413.4 418.0 422.8	427.8 432.4	437.0 441.6	446.3 451.1	455.9 460.4	465.4 470.3	475.2 480.1	484.8 489.5	494.1 498.8	503.5 508.5	513.2 518.0	522.9 527.7	532.3 537.0	541.8 546.4	551.2 555.7	560.1 564.9	569.1 573.5	577.8 582.2	586.8 591.3	595.7 600.4	605.0 609.8	614.3 619.4	624.0 628.4	633.0 637.8	642.5 647.1	651.9 656.5	661.1 665.5	670.1 674.5	678.8 683.2	687.2 691.8	695.8 699.7	703.6 707.5	711.0 714.8	718.2 721.9	725.1 728.4	731.6 734.8	737.8 741.1	744.0 746.8	749.5 752.0];
junk=fscanf(fid,'%e',[1]);
while(feof(fid)==0)
   t(i)=junk/1000;
   junk=fscanf(fid,'%e',[172]);
   if size(junk)<172
       break
   end
   dat(i,:)=junk(1:164)';
   T1(i)=junk(165);
   T2(i)=junk(168);
   i=i+1;
   junk=fscanf(fid,'%e',[1]);
end
fclose(fid);
