lon=ncread('/Users/yangyang/Aerosol_Variaiton/IRUN/UWND/dat/uwnd.mon.mean.nc','lon');
lat=ncread('/Users/yangyang/Aerosol_Variaiton/IRUN/UWND/dat/uwnd.mon.mean.nc','lat');
year=1978:1992;

UWND_DJF=ncread('/Users/yangyang/Aerosol_Variaiton/IRUN/UWND/ncfile/UWND_NCEP_1978_1992.nc','UWND_DJF');
VWND_DJF=ncread('/Users/yangyang/Aerosol_Variaiton/IRUN/VWND/ncfile/VWND_NCEP_1978_1992.nc','VWND_DJF');

WIND_DJF=sqrt(UWND_DJF.*UWND_DJF+VWND_DJF.*VWND_DJF);


save('WIND_NCEP_1978_1992.mat','WIND_DJF')

nccreate('WIND_NCEP_1978_1992.nc','Year','Dimensions',{'time',Inf},'Format','classic')
ncwrite('WIND_NCEP_1978_1992.nc','Year', year)
ncwriteatt('WIND_NCEP_1978_1992.nc','Year','long_name','Year')
nccreate('WIND_NCEP_1978_1992.nc','lat','Dimensions',{'lat',length(lat)},'Format','classic')
ncwrite('WIND_NCEP_1978_1992.nc','lat', lat)
ncwriteatt('WIND_NCEP_1978_1992.nc','lat','units','degrees_north')
ncwriteatt('WIND_NCEP_1978_1992.nc','lat','long_name','Latitude')
nccreate('WIND_NCEP_1978_1992.nc','lon','Dimensions',{'lon',length(lon)},'Format','classic')
ncwrite('WIND_NCEP_1978_1992.nc','lon', lon)
ncwriteatt('WIND_NCEP_1978_1992.nc','lon','units','degrees_east')
ncwriteatt('WIND_NCEP_1978_1992.nc','lon','long_name','Longitude')
nccreate('WIND_NCEP_1978_1992.nc','WIND_DJF','Dimensions',{'lon',length(lon),'lat',length(lat),'year',length(year)},'Format','classic')
ncwrite('WIND_NCEP_1978_1992.nc','WIND_DJF', WIND_DJF)
ncdisp('WIND_NCEP_1978_1992.nc')