lon=ncread('/Users/yangyang/Aerosol_Variaiton/IRUN/UWND/dat/wind850_ECMWF.nc','longitude');
lat=ncread('/Users/yangyang/Aerosol_Variaiton/IRUN/UWND/dat/wind850_ECMWF.nc','latitude');
year=1979:2014;

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

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


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

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