function readData(DataFolder,location)
%Imports SuperDarn files to matlab, makes Histogrames of raw and cleaned/filtered data, cleans and filters the meridional wind. 
% Data is also plotted
%and saved as "location" and "location"Clean 
% at C:\Users\kleinkne\Documents\PHD\DATA\"location"
%
%
%INPUT:Location = Name of Radar
%
%OUTPUT: Location.Year    = Year in Kalender[yyyy]
%        Location.Month   = Month in Kalender [mm]
%        Location.Day     = Day in Kalender [dd]
%        Location.Hour    = Hour of day [hh (0-23)]
%        Location.NMeteor = Number of Meteors detected in Hour
%        Location.Frang   = First Range Gate [km]
%        Location.Rsep    = Range gate seperation [km]
%        Location.Vx      = meridional wind (+ = northward) [m/s] 
%                           (average over all range gates)
%        Location.Vy      = zonal wind(- = eastward) [m/s]
%                           (average over all range gates)
%        Location.Lat     = Latitude of averaged wind
%        Location.Lon     = Longitude of averaged Wind
%        Location.Vm      = meridional wind [m/s] (+ = northward);(line of side;the range gate, pointing most in merionla direction)
%        Location.Vm_lat  = Latitude of Vm
%        Location.Vm_lon  = Longitude of Vm
%        Location.SD_Vx   = Standard Diviation zonal Wind (Vx) [m/s]
%        Location.SD_Vy   = Standard Diviation merional wind (Vy) [m/s]  
%%



%
BinSize=0.01;
filter=100;
%%
%for i=1:length(location)
    load(fullfile(DataFolder,location,[location,'.mat']));
    
Location.Name    = location;

Location.Year    = Data(:,1);
Location.Month   = Data(:,2);
Location.Day     = Data(:,3);
Location.Hour    = Data(:,4);
Location.NMeteor = Data(:,5);
Location.Frang   = Data(:,6);
Location.Rsep    = Data(:,7);
Location.Vx      = Data(:,8);

Location.Vy      = Data(:,9);

Location.Lat     = Data(:,10);
Location.Lon     = Data(:,11);
Location.Vm      = -Data(:,12);
Location.Vm_lat  = Data(:,13);
Location.Vm_lon  = Data(:,14);
Location.SD_Vx   = Data(:,15);
Location.SD_Vy   = Data(:,16);
  
clear Data
Data=Location;
clear Location

   fprintf('Histogram \n')
   [N1,Stop1]=Histogram_SDVx(Data,BinSize);
   
   oldVx=Data.Vx;
   oldVm=Data.Vm;
%%   
   fprintf('ThrowWrongTimesOut \n')
   Data=ThrowWrongTimesOut(Data);
%% 
   fprintf(['FilterData: Filter=',int2str(filter) '\n'])
   Data=FilterVx(location,Data,filter);
%%   
   fprintf('CleanData \n')
   Data=CleanData(DataFolder,Data);
%%   
   fprintf('Histogram CleanData \n')
  [N2,Stop2]=Histogram_SDVx(Data,BinSize);
%%   
   fprintf('Plot \n')
   DataPlot(DataFolder,location,Data.Name,0:BinSize:Stop1+BinSize,N1,oldVx,oldVm,0:BinSize:Stop2+BinSize,N2,Data.Vx,Data.Vm,datenum(Data.Year,Data.Month,Data.Day,Data.Hour,0,0),Data.Vx)
   fprintf([Data.Name,'\n'])
   
end
