%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%PURPOSE: Function to created structure array with .HDF file variables
%INPUT: filename.HDF
%
%OUTPUT: structure array with 35 variables
% Variables: 
% 1 = geolocation
% 2 = scLocalZenith
% 3 = rain
% 4 = reliab
% 5 = correctZFactor
% 6 = attenParmAlpha
% 7 = attenParmBeta
% 8 = parmNode
% 9 = precipWaterParmA
% 10 = precipWaterParmB
% 11 = ZRParmA
% 12 = ZRParmB
% 13 = zmmax
% 14 = rainFlag
% 15 = rangeBinNum
% 16 = rainAve
% 17 = precipWaterSum
% 18 = epsilon_0
% 19 = method
% 20 = epsilon
% 21 = zeta
% 22 = zeta_mn
% 23 = zeta_sd
% 24 = sigmaZero
% 25 = freezH
% 26 = nubfCorrectFactor
% 27 = qualityFlag
% 28 = nearSurfRain
% 29 = nearSurfZ
% 30 = e_SurfRain
% 31 = pia
% 32 = errorRain
% 33 = errorZ
% 34 = spare
% 35 = rainType
%
% Created: March 20, 2007 KMV
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function datascan=sdsread(filename);

info=hdfinfo(filename);

sdata=info.Vgroup.Vgroup.SDS;

datascan=struct(sdata(1).Name,(hdfread(filename,sdata(1).Name)),...
                sdata(2).Name,(hdfread(filename,sdata(2).Name)),...
                sdata(3).Name,(hdfread(filename,sdata(3).Name)),...
                sdata(4).Name,(hdfread(filename,sdata(4).Name)),...
                sdata(5).Name,(hdfread(filename,sdata(5).Name)),...
                sdata(6).Name,(hdfread(filename,sdata(6).Name)),...
                sdata(7).Name,(hdfread(filename,sdata(7).Name)),...
                sdata(8).Name,(hdfread(filename,sdata(8).Name)),...
                sdata(9).Name,(hdfread(filename,sdata(9).Name)),...
                sdata(10).Name,(hdfread(filename,sdata(10).Name)),...
                sdata(11).Name,(hdfread(filename,sdata(11).Name)),...
                sdata(12).Name,(hdfread(filename,sdata(12).Name)),...
                sdata(13).Name,(hdfread(filename,sdata(13).Name)),...
                sdata(14).Name,(hdfread(filename,sdata(14).Name)),...
                sdata(15).Name,(hdfread(filename,sdata(15).Name)),...
                sdata(16).Name,(hdfread(filename,sdata(16).Name)),...
                sdata(17).Name,(hdfread(filename,sdata(17).Name)),...
                sdata(18).Name,(hdfread(filename,sdata(18).Name)),...
                sdata(19).Name,(hdfread(filename,sdata(19).Name)),...
                sdata(20).Name,(hdfread(filename,sdata(20).Name)),...
                sdata(21).Name,(hdfread(filename,sdata(21).Name)),...
                sdata(22).Name,(hdfread(filename,sdata(22).Name)),...
                sdata(23).Name,(hdfread(filename,sdata(23).Name)),...
                sdata(24).Name,(hdfread(filename,sdata(24).Name)),...
                sdata(25).Name,(hdfread(filename,sdata(25).Name)),...
                sdata(26).Name,(hdfread(filename,sdata(26).Name)),...
                sdata(27).Name,(hdfread(filename,sdata(27).Name)),...
                sdata(28).Name,(hdfread(filename,sdata(28).Name)),...
                sdata(29).Name,(hdfread(filename,sdata(29).Name)),...
                sdata(30).Name,(hdfread(filename,sdata(30).Name)),...
                sdata(31).Name,(hdfread(filename,sdata(31).Name)),...
                sdata(32).Name,(hdfread(filename,sdata(32).Name)),...
                sdata(33).Name,(hdfread(filename,sdata(33).Name)),...
                sdata(34).Name,(hdfread(filename,sdata(34).Name)),...
                sdata(35).Name,(hdfread(filename,sdata(35).Name)));