Global Index (short | long) | Local contents | Local Index (short | long)
Perform EOF
This script calls | |
---|---|
clean cd /home/disk/tao/data/nmc.reanalysis/monthly filin = 'slp.mon.mean.48jun01.nc'; varn = 'slp'; aolim = [0 360 20 90]; lev = 1; tim = 1:636; [sst, lat, lon] = getnc2(filin, varn, aolim, lev, tim); sst = annave(sst); sst = cosweight(sst, lat); [ntim, nlat, nlon] = size(sst); sst = reshape(sst, ntim, nlat*nlon); [lam, lds, pcs, per] = eof_dan(sst); % Load data for regression maps cd /home/disk/tao/data/nmc.reanalysis/monthly filin = 'slp.mon.mean.48jun01.nc'; varn = 'slp'; lims = [0 360 -90 90]; lev = 1; tim = 1:636; [sst, lat, lon] = getnc2(filin, varn, lims, lev, tim); sst = annave(sst); [ntim, nlat, nlon] = size(sst); sst = reshape(sst, ntim, nlat*nlon); % Regression on standardized CT index regmap1 = pcs(:,1)'*sst/(ntim-1); % Correlation map sst2 = standardize(sst); cormap1 = pcs(:,1)'*sst2/(ntim-1); % Do surface temperature cd /home/disk/tao/data/nmc.reanalysis/monthly filin = 'air.mon.mean.sfc.48mar01.nc'; varn = 'air'; lims = [0 360 -90 90]; lev = 1; tim = 1:636; [sst, lat, lon] = getnc2(filin, varn, lims, lev, tim); sst = annave(sst); [ntim, nlat, nlon] = size(sst); sst = reshape(sst, ntim, nlat*nlon); % Regression on standardized CT index regmap2 = pcs(:,1)'*sst/(ntim-1); % Correlation map sst2 = standardize(sst); cormap2 = pcs(:,1)'*sst2/(ntim-1); % For kicks, get landmask cd /home/disk/tao/data/nmc.reanalysis load landmask.mat lm(lm==-1)=NaN; % Reshape regmap1 = reshape(regmap1, nlat, nlon); cormap1 = reshape(cormap1, nlat, nlon); regmap2 = reshape(regmap2, nlat, nlon); cormap2 = reshape(cormap2, nlat, nlon); % Save data and indices cd ~/matlab/Wallace save AO_regmaps.mat lims tim pcs per regmap1 cormap1 lat lon lm ... regmap2 cormap2 % Plot data clear cd ~/matlab/Wallace load AO_regmaps.mat figure(1); fo(1); clf; get_global; global_figs(6, 6, 0, 0, 3); dg(lat, lon); FRAME = [0 360 -90 90]; % Start by plotting regmap2 figure(1); fo(1); clf; color_trans; colormap(cmap); FRAME = [0 360 20 90]; sp(1,1); cla; maxes('stereo', [90 0]); % Define map axis [c, h] = contorm(YAX, [XAX; 360], [regmap1 regmap1(:,1)], ... [-5:.5-.5], '-k'); hold on; [c2, h2] = contorm(YAX, [XAX; 360], [regmap1 regmap1(:,1)], ... [.5:.5:5], '--k'); hold off; gridm on; % Shade temperature underneath [xk, yk] = keep_var(FRAME, lon, lat); hh = surfacem2(YAX3(yk,:), XAX3(yk,:), ... -[regmap2(yk,xk) regmap2(yk,1)], -1.1); caxis([-2 2]); axis_limits(100); h2 = displaym(worldlo('oceanmask')); set(h2, 'facecolor', [1 1 1]); drawmapm set(gca, 'visible', 'off'); ll = linem(20*ones(1, 361), 0:360, 'k'); set(ll, 'linewidth', 2); % Make variance maps of SST, and climatological maps for SST too clear % Do surface temperature cd /home/disk/tao/data/nmc.reanalysis/monthly filin = 'air.mon.mean.sfc.48mar01.nc'; varn = 'air'; lims = [0 360 -90 90]; lev = 1; tim = 1:636; [sst, lat, lon] = getnc2(filin, varn, lims, lev, tim); [sst, clim] = remove_anncyc(sst); [ntim, nlat, nlon] = size(sst); % Generate climatology maps sfct_win = mean(clim([11:12 1:4],:,:)); sfct_sum = mean(clim([5:10],:,:)); % Generate variance maps ind1 = sort([1:12:ntim 2:12:ntim 3:12:ntim 4:12:ntim ... 11:12:ntim 12:12:ntim]); ind2 = sort([5:12:ntim 6:12:ntim 7:12:ntim 8:12:ntim ... 9:12:ntim 10:12:ntim]); sst = reshape(sst, ntim, nlat*nlon); varsfct_win = var(sst(ind1,:)); varsfct_sum = var(sst(ind2,:)); varsfct_win = reshape(varsfct_win, nlat, nlon); varsfct_sum = reshape(varsfct_sum, nlat, nlon); % Save data cd ~/matlab/Wallace save SFCT_mean_var.mat sfct_win sfct_sum lat lon ... varsfct_win varsfct_sum