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


dust_198012=0;
file=importdata('/Users/yang146/Aerosol_Variaiton/OBS/dat/china_dust/SURF_CLI_CHN_WEP_DAY_DSS-1980.TXT');
site=file(:,1);
month=file(:,5);
for i=1:length(site)
    if month(i)==12
        for j=1:n
            if site(i)==site_Gobi(j)
                dust_198012=dust_198012+1;
            end
        end
    end
end

dust_198101=0;
file=importdata('/Users/yang146/Aerosol_Variaiton/OBS/dat/china_dust/SURF_CLI_CHN_WEP_DAY_DSS-1981.TXT');
site=file(:,1);
month=file(:,5);
for i=1:length(site)
    if month(i)==1
        for j=1:n
            if site(i)==site_Gobi(j)
                dust_198101=dust_198101+1;
            end
        end
    end
end

dust_198102=0;
file=importdata('/Users/yang146/Aerosol_Variaiton/OBS/dat/china_dust/SURF_CLI_CHN_WEP_DAY_DSS-1981.TXT');
site=file(:,1);
month=file(:,5);
for i=1:length(site)
    if month(i)==2
        for j=1:n
            if site(i)==site_Gobi(j)
                dust_198102=dust_198102+1;
            end
        end
    end
end

year=1981:2007;

dust_1981_2007=zeros(length(year),1);
%dust_1981_2007(1)=dust_198012+dust_198101+dust_198102;
dust_1981_2007(1)=dust_198102;

for yearID=2:length(year)
    
    file=importdata(['/Users/yang146/Aerosol_Variaiton/OBS/dat/china_dust/SURF_CLI_CHN_WEP_DAY_DSS-',num2str(year(yearID)-1),'.TXT']);
    site=file(:,1);
    month=file(:,5);
    for i=1:length(site)
        if month(i)==12
            for j=1:n
                if site(i)==site_Gobi(j)
%                    dust_1981_2007(yearID)=dust_1981_2007(yearID)+1;
                end
            end
        end
    end
    
    file=importdata(['/Users/yang146/Aerosol_Variaiton/OBS/dat/china_dust/SURF_CLI_CHN_WEP_DAY_DSS-',num2str(year(yearID)),'.TXT']);
    site=file(:,1);
    month=file(:,5);
    for i=1:length(site)
        if month(i)==1
            for j=1:n
                if site(i)==site_Gobi(j)
%                    dust_1981_2007(yearID)=dust_1981_2007(yearID)+1;
                end
            end
        end
    end
    
    file=importdata(['/Users/yang146/Aerosol_Variaiton/OBS/dat/china_dust/SURF_CLI_CHN_WEP_DAY_DSS-',num2str(year(yearID)),'.TXT']);
    site=file(:,1);
    month=file(:,5);
    for i=1:length(site)
        if month(i)==2
            for j=1:n
                if site(i)==site_Gobi(j)
                    dust_1981_2007(yearID)=dust_1981_2007(yearID)+1;
                end
            end
        end
    end
    
end

dust_1981_2007_02=dust_1981_2007';










                
    