load /Users/yang146/Aerosol_Variaiton/OBS/ncfile/sites.mat
n=0;
for i=1:length(siteID)
    if lon_site(i)>10000 && lon_site(i)<11000 && lat_site(i)>3000 && lat_site(i)<4500
        n=n+1;
        site_Gobi(n)=siteID(i);
        lon_Gobi(n)=lon_site(i);
        lat_Gobi(n)=lat_site(i);
    end
end

year=2008:2015;
temp=importdata('/Users/yangyang/Aerosol_Variaiton/OBS/dat/2007-2015DJF_DustStorms/stationID.txt');
stationID=temp(:,1);

Gobi_temp=zeros(length(stationID),1);
for i=1:length(stationID)
    for j=1:n
        if stationID(i)==site_Gobi(j)
            Gobi_temp(i)=1;
        end
    end
end
   
        
Gobi=(Gobi_temp==1);


dust=zeros(2513,90,length(year));
load /Users/yangyang/Aerosol_Variaiton/OBS/dat/2007-2015DJF_DustStorms/DustStorm_2008DJF.mat
dust(:,:,1)=sum(dust_storm_events(:,1:90,:),3);
load /Users/yangyang/Aerosol_Variaiton/OBS/dat/2007-2015DJF_DustStorms/DustStorm_2009DJF.mat
dust(:,:,2)=sum(dust_storm_events(:,1:90,:),3);
load /Users/yangyang/Aerosol_Variaiton/OBS/dat/2007-2015DJF_DustStorms/DustStorm_2010DJF.mat
dust(:,:,3)=sum(dust_storm_events(:,1:90,:),3);
load /Users/yangyang/Aerosol_Variaiton/OBS/dat/2007-2015DJF_DustStorms/DustStorm_2011DJF.mat
dust(:,:,4)=sum(dust_storm_events(:,1:90,:),3);
load /Users/yangyang/Aerosol_Variaiton/OBS/dat/2007-2015DJF_DustStorms/DustStorm_2012DJF.mat
dust(:,:,5)=sum(dust_storm_events(:,1:90,:),3);
load /Users/yangyang/Aerosol_Variaiton/OBS/dat/2007-2015DJF_DustStorms/DustStorm_2013DJF.mat
dust(:,:,6)=sum(dust_storm_events(:,1:90,:),3);
load /Users/yangyang/Aerosol_Variaiton/OBS/dat/2007-2015DJF_DustStorms/DustStorm_2014DJF.mat
dust(:,:,7)=sum(dust_storm_events(:,1:90,:),3);
load /Users/yangyang/Aerosol_Variaiton/OBS/dat/2007-2015DJF_DustStorms/DustStorm_2015DJF.mat
dust(:,:,8)=sum(dust_storm_events(:,1:90,:),3);

dust_temp=dust;
dust=zeros(2513,length(year));
dust(:,:)=sum(dust_temp,2);

dust_Gobi=sum(sum(dust_temp(Gobi,:,:),2),1);

lon_site=Lon;
lat_site=Lat;

save('Dust_2008_2015','dust','lon_site','lat_site')










                
    