load ~/NC/grid.mat
load ~/Aerosol_Variaiton/IRUN/SST/ncfile/SST.mat
year=1:150;

OCNFRAC=ncread('/Users/yangyang/Aerosol_Variaiton/IRUN/read_nc/ncfile/cesm.nc','OCNFRAC');

SST_AMO_temp=zeros(150,1);
temp=zeros(150,1);
m=0;
for i=113:144
    for j=49:80
        if OCNFRAC(i,j)==1
            m=m+1;
            temp(:)=SST_ANN(i,j,:);
            SST_AMO_temp=SST_AMO_temp+temp;
        end
    end
end

SST_AMO_temp=SST_AMO_temp/m;

SST_AMO=SST_AMO_temp-mean(SST_AMO_temp);

SST_AMO=smooth(SST_AMO,9);
