load ~/NC/grid
day=1:92;

AOD_temp=ncread('~/Aerosol_Variaiton/IRUN/read_nc/ncfile/read_nc_AOD_daily_145.nc','AOD');
AOD_DAILY=AOD_temp(:,:,152:243);

save('AOD_daily_145.mat','AOD_DAILY')

nccreate('AOD_daily_145.nc','Day','Dimensions',{'time',Inf},'Format','classic')
ncwrite('AOD_daily_145.nc','Day', day)
ncwriteatt('AOD_daily_145.nc','Day','long_name','Day')
nccreate('AOD_daily_145.nc','lat','Dimensions',{'lat',96},'Format','classic')
ncwrite('AOD_daily_145.nc','lat', lat)
ncwriteatt('AOD_daily_145.nc','lat','units','degrees_north')
ncwriteatt('AOD_daily_145.nc','lat','long_name','Latitude')
nccreate('AOD_daily_145.nc','lon','Dimensions',{'lon',144},'Format','classic')
ncwrite('AOD_daily_145.nc','lon', lon)
ncwriteatt('AOD_daily_145.nc','lon','units','degrees_east')
ncwriteatt('AOD_daily_145.nc','lon','long_name','Longitude')
nccreate('AOD_daily_145.nc','AOD_DAILY','Dimensions',{'lon',144,'lat',96,'day',length(day)},'Format','classic')
ncwrite('AOD_daily_145.nc','AOD_DAILY', AOD_DAILY)
ncdisp('AOD_daily_145.nc')