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.
%   Modified for 007 - Nov 6 2013

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;
%not 82 wavelengths
wla=[401.8	406.8	410.9	415	419.8	424.9	429.5	434	438	442.6	447.6	452.3	457.1	461.5	466.1	470.8	475.7	480.8	485.7	490	494.6	498.8	503.6	508.5	513.5	518.7	523.5	528	532.5	537	541.5	546.1	550.5	555.3	559.8	564.4	569	573.2	577.5	581.5	585.8	590.1	594.7	599.2	604.1	608.8	613.2	618	622.7	627.2	631.7	636	640.8	645.5	650.1	654.9	659.5	663.9	668.7	673.1	677.6	682	685.9	690.2	694.1	698.1	702	705.8	709.5	713.1	716.6	720.3	723.8	727.3	730.5	734	737.2	740.2	743.4	746.2	748.9	751.6];
wlc=[400.7	405.1	410	413.9	418.3	423.7	428.5	433.1	437.7	442.1	447	452	456.9	461.5	465.9	471.2	476.2	481.3	486	490.7	494.9	499.6	504.3	509.5	514.7	519.9	524.8	529.6	534.1	538.7	543.2	547.8	552.8	557.5	562.2	566.1	570.5	574.9	579.2	583.4	587.8	592.3	596.9	601.6	606.5	611.2	615.9	620.7	625.4	630	634.4	639.2	643.6	648.4	653	658	662.8	667	671.6	676.2	680.6	684.8	689	693.1	697.3	701	704.9	709.1	712.4	716.1	719.8	723.3	726.7	730.2	733.5	736.7	739.9	742.9	746.2	748.7	751.6	753.9];
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:172)';
   i=i+1;
   junk=fscanf(fid,'%e',[1]);
end
fclose(fid);
