Global Index (short | long) | Local contents | Local Index (short | long)
Note: In producing plots on 20 OCT, 1998, I accidently subtracted temu(l,:,:) instead of clim(l,:,:). This resulted in an error for the pattern printed. However, the maximum amplitude of the error is only 0.1 m/s, and is centered in the stratosphere. So, I don't think the error should matter.
This script calls | |
---|---|
cd /home/disk/hayes2/dvimont/ccm/ccm3.6/data load ct_gr.mat cd /home/disk/tao/dvimont/matlab/CCM/NMC_dat load u_zonal_time.mat %load u_zonal_np_time.mat %load u_zonal_eq_time.mat cd /home/disk/tao/data/nmc.reanalysis/monthly filin = 'uwnd.mon.mean.nc'; nc = netcdf(filin, 'nowrite'); lat = nc{'lat'}(:); lon = nc{'lon'}(:); levs = nc{'level'}(:); add_offset = nc{'uwnd'}.add_offset(:); scale_factor = nc{'uwnd'}.scale_factor(:); nc = close(nc); u = u * scale_factor + add_offset; [ntim, nlev, nlat] = size(u); kp = sort([1:12:408 2:12:408 12:12:408]); temu = u(kp,:,:); [ntimw, nlev, nlat] = size(temu); i = 0; clear clim for m = 1:3; i = i+1; clim(i,:,:) = mean(temu(m:3:ntimw,:,:)); end x = zeros(ntimw,nlev,nlat); for m = 1:ntimw; l=rem(m-1,3)+1; temu(m,:,:) = temu(m,:,:) - temu(l,:,:); end; temct = ctstar(kp); temct = (temct-mean(temct))/std(temct); pat = reshape((temct' * reshape(temu, ntimw, nlev*nlat)/ntimw),nlev,nlat); %[temu, clim] = annave(u); %temct = -1*gr(kp); %temct = (temct-mean(temct))/std(temct); %pat = reshape((temct' * reshape(temu, ntimw, nlev*nlat)/ntimw),nlev,nlat); figure(1) subplot(2,1,1) pncont(lat, -1*levs, squeeze(mean(clim([1 2 3],:,:))), [-50:5:50]); set(gca, 'XTick', [-80:20:80], 'YTickLabel', [1000:-100:0]); axis([-90 90 -1000 0]) title('NMC DJF Zonal Wind (120E to 120W) climatology') xlabel('Contour Interval 5 m/s') subplot(2,1,2) pncont(lat, -1*levs, pat, [-10:.25:10]) set(gca, 'XTick', [-80:20:80], 'YTickLabel', [1000:-100:0]); axis([-90 90 -1000 0]) title('NMC DJF Zonal Wind (120E to 120W) regressed on DJF CT*') xlabel('Contour Interval 0.25 m/s') cd /home/disk/tao/dvimont/matlab/CCM/CT/CT_Plots % Compare with CCM cd /home/disk/hayes2/dvimont/ccm/ccm3.6/run/sun/ct/data range = [60 120 -90 90]; filin = 'cct.nc'; nc = netcdf(filin, 'nowrite'); latct = nc{'lat'}(:); lonct = nc{'lon'}(:); [xk, yk] = keep_var(range, lonct, latct); uc = nc{'U'}(1:3,:,yk,xk); psc = nc{'PS'}(1:3,yk,xk); hybm = nc{'hybm'}(:); hyam = nc{'hyam'}(:); levsct = nc{'lev'}(:); P0 = nc{'P0'}(:); nc = close(nc); filin = 'wct.nc'; nc = netcdf(filin, 'nowrite'); uw = nc{'U'}(1:3,:,yk,xk); psw = nc{'PS'}(1:3,yk,xk); nc = close(nc); uwm = atlev(squeeze(mean(uw)), flipud(levs), squeeze(mean(psw)), hyam, hybm, P0); ucm = atlev(squeeze(mean(uc)), flipud(levs), squeeze(mean(psc)), hyam, hybm, P0); uave = squeeze(mean2(shiftdim(ucm,2)+shiftdim(uwm,2))); udif = squeeze(mean2(shiftdim(uwm,2)-shiftdim(ucm,2))); figure(2) subplot(2,1,1) pncont(latct, -1*flipud(levs), uave/2, [-80:5:80]); set(gca, 'XTick', [-80:20:80], 'YTickLabel', [1000:-100:0]); axis([-90 90 -1000 0]) title('CT run, DJF Zonal Wind climatology') xlabel('Contour Interval 5 m/s') subplot(2,1,2) pncont(latct, -1*flipud(levs), udif/(2*1.4), [-1:.05:1]) set(gca, 'XTick', [-80:20:80], 'YTickLabel', [1000:-100:0]); axis([-90 90 -1000 0]) title('CT run, DJF Zonal Wind difference (WARM - COLD) / (2*1.4)') xlabel('Contour Interval 0.5 m/s') cd /home/disk/tao/dvimont/matlab/CCM/CT/CT_Plots % Try the same for different regions.