function [t,dat,wla,wlc]=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, 2009 for TARA.
%   

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:93   
   line=fgetl(fid);
end
i=1;
wla=[399.4	403.7	408.2	412.3	416.6	421	426.3	430.9	435	439.4	444.4	449	453.8	458.2	462.9	467.5	472.2	477.5	482.4	487.1	491.8	496.5	500.8	505.5	510.4	515.6	520.4	525.3	529.9	534.6	539	543.7	548.1	552.6	557.4	561.6	566.1	570.7	574.7	579	583.2	587.5	591.8	596.4	600.9	605.5	610.2	614.7	619.2	623.9	628.2	632.5	636.7	641	645.6	649.8	654.5	658.8	663.4	667.7	672.1	676.2	680.4	684.3	688.4	692.3	696.2	700	703.4	706.8	710.5	713.7	717.1	720.3	723.5	726.7	729.7	732.7	735.1	737.5	740	742.7	744.8	747];
wlc=[400.5	404.8	409.3	413.2	417.6	422.8	427.6	432	436.3	440.5	445.3	450.4	455	459.7	464.1	469.1	474	479	483.9	488.5	492.8	497.5	502.1	506.9	512	517	521.8	526.5	531.1	535.4	540.1	544.7	549.2	553.6	558.4	562.8	566.9	571.7	575.8	579.8	584.1	588.5	592.8	597.4	602.1	606.5	611.2	615.7	620.4	624.9	629.2	633.4	637.7	642.1	646.5	650.7	655.2	659.6	663.9	668.3	672.7	677	680.9	685.1	688.9	692.8	696.5	700.2	703.9	707.3	710.5	714.2	717.4	720.5	723.8	726.8	729.7	732.6	735.3	737.8	740.4	742.7	745	746.8];
junk=fscanf(fid,'%e',[1]);
while(feof(fid)==0)
   t(i)=junk/1000;
   junk=fscanf(fid,'%e',[158]);
   if size(junk)<158
       break
   end
   dat(i,:)=junk(1:158)';
   i=i+1;
   junk=fscanf(fid,'%e',[1]);
end
fclose(fid);
