fclose('all');
%clear all;
%****
sgb=5.67e-8;
%Find the flux_file data 
f=['E:\ascii\main_file2_hd.txt'];

flist=fopen(f,'r');
flx_lab1=fgets(flist);
flx_lab2=fgets(flist);

datz=fscanf(flist,'%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g%g',[30,8600]);

[a,cnt_mx]=size(datz);

%(1)=decimal JD
%(2)=Press(mb)
%(3:4)=wind speed (m/s)at 2m, 10m
%(5:6)wind direction at 2m, 10 m
%(7:8)=temp(C) at 2 m, 10 m
%(9:10)=mixing ratio (g/kg) at 2 m, 10 m
%(11:12)=rhi at 2 10 m
%(13)General Eastern 12 cm temp (C)
%(14)= Eppley radiative surface temp (C)
%(15)= Barnes radiative surface temp (C)
%(16)= snow/ice interface temp (C)
%(17)= longwave down
%(18)= longwave up
%(19)= solar down (as if there was any)
%(20)= solar up
%(21)=orgx(i);%optical raingauge, mm/h
%(22)=ncrx(i);%ncar weighing raingauge, mm/h
%(23)=tower orientation
%(24)=w variance
%(25)=us_md(j);%ustar (m/s)
%(26)=hs_md(j);%sensible heat flux (W/m2)
%(27)=hl latent heat flux



jdm=datz(1,:);
pressm=datz(2,:);
ws2m=datz(3,:);
ws10m=datz(4,:);
wd2m=datz(5,:);
wd10m=datz(6,:);
Th2m=datz(7,:)+0.025;
Th10m=datz(8,:)+0.1;
q2m=datz(9,:)+0.025;
q10m=datz(10,:)+0.1;
rh2m=datz(11,:)+0.025;
rh10m=datz(12,:)+0.1;
Tgem=datz(13,:);
Tsem=datz(14,:);%eplley ts
Tsbm=datz(15,:);%barnes ts
Tsim=datz(16,:);%snow-ice interface t
Rldm=datz(17,:);
Rlum=datz(18,:);
Rsdm=datz(19,:);
Rsum=datz(20,:);
usm=datz(25,:);
hsm=datz(26,:);
hlm=datz(27,:);
usbm=datz(28,:);
hsbm=datz(29,:);
hlbm=datz(30,:);

%Tse=((Rlu-.01*Rld)/.99/sgb).^0.25-273.16;
%Ts=(Tsb+Tse)/2;


