Global Index (short | long) | Local contents | Local Index (short | long)
Define ENSO years somehow here.
This script calls | |
---|---|
clear cd ~/matlab/NMC/Data load cti2.mat ct = standardize(ct2); yr = [(1948+1/24):1/12:(2002+5/24)]; ctlp = rave(ct, 5); %ctlp = standardize(ctlp); figure_tall(1); cla; for i = 1:4; subplot(4,1,i); cla; tind = 180*(i-1)+[1:180]; if i == 4; tind = tind(tind <= 651); end hh = plot(yr(tind), ct(tind), 'k', yr(tind), ctlp(tind), 'r'); set(hh, 'linewidth', 2); axis([min(yr(tind))-1/12 min(yr(tind))+15+1/12 -3 3]); hold on; hline([-1 1], '--k'); hold off; set(gca, 'XTick', 1940:2020); grid on; end % Define El Nino and La Nina years warmyr = yr(find(ctlp > 1)); unique(floor(warmyr)) % Evaluate individual years to determine which % are El Nino years. Make sure there are at % least 3 months of continuous positive (>1std) % ctlp, to define. warmyr = [1957 1963 1965 1968 1969 1972 1976 1982 1986 1987 1991 1994 ... 1997]; coldyr = yr(find(ctlp < -1)); unique(floor(coldyr)) % as above coldyr = [1949 1955 1964 1970 1973 1975 1984 1988 1998 1999]; % Now, plot CTI for these years. nwy = length(warmyr); warmind = repmat(NaN, nwy, 25); for i = 1:nwy; warmind(i,:) = 12*(warmyr(i)-1948+1)+1+[-12:12]; end ctwarm = ct(warmind); ncy = length(coldyr); coldind = repmat(NaN, ncy, 25); for i = 1:ncy; coldind(i,:) = 12*(coldyr(i)-1948+1)+1+[-12:12]; end ctcold = ct(coldind); figure_tall(2); clf; global_axes(6.5, 4, 0.7, 0.5, 1.3); subplot2(1,1); cla hh = plot(-12:12, ctwarm', '-', -12:12, mean(ctwarm), '--k'); set(hh(nwy+1), 'linewidth', 3); axis([-15 15 -3 4]); for i = 1:nwy; t1 = text(-12.2, ctwarm(i,1), num2str(warmyr(i))); set(t1, 'horizontalalignment', 'right', 'fontsize', 8); t2 = text(12.2, ctwarm(i,end), num2str(warmyr(i)+1)); set(t2, 'horizontalalignment', 'left', 'fontsize', 8); end t3 = title('\bf CTI for El Nino Events', 'fontsize', 12); set(gca, 'XTick', -13:3:11, 'YTick', -3:4); hold on; vline([-10:3:11], ':k'); hline([-2:3], ':k', [-12 12]); hold off; subplot2(1,2); cla hh = plot(-12:12, ctcold', '-', -12:12, mean(ctcold), '--k'); set(hh(ncy+1), 'linewidth', 3); axis([-15 15 -3 4]); for i = 1:nwy; t1 = text(-12.2, ctcold(i,1), num2str(coldyr(i))); set(t1, 'horizontalalignment', 'right', 'fontsize', 8); t2 = text(12.2, ctcold(i,end), num2str(coldyr(i)+1)); set(t2, 'horizontalalignment', 'left', 'fontsize', 8); end t3 = title('\bf CTI for La Nina Events', 'fontsize', 12); set(gca, 'XTick', -13:3:11, 'YTick', -3:4); hold on; vline([-10:3:11], ':k'); hline([-2:3], ':k', [-12 12]); hold off; % Now, have a look at some composites % Start with SST tim = 1:648; lims = [0 360 -75 75]; cd /home/disk/tao/data/nmc.reanalysis/monthly [dat, lat, lon] = getnc2('skt.mon.mean.nc', 'skt', lims, 1, tim); [ntim, nlat, nlon] = size(dat); dat = annave(dat); % Just assume grand mean is deleted if 0; dat2 = repmat(NaN, size(dat)); for i = 1:12; ind = i-1+[1:12:ntim]; dat2(ind,:,:) = lin_remove(dat(ind,:,:), ct(ind)); dat2(ind,:,:) = standardize(dat2(ind,:,:)); end end dat2 = standardize(dat); datw1 = repmat(NaN, [8 nlat nlon]); datw2 = datw1; datc1 = datw1; datc2 = datw1; for i = 1:8; ind = 3*(i-1)+[2:4]; tind = warmind(:,ind); tind = tind(:); datw1(i,:,:) = mean(dat(tind,:,:)); datw2(i,:,:) = mean(dat2(tind,:,:)); tind = coldind(:,ind); tind = tind(:); datc1(i,:,:) = mean(dat(tind,:,:)); datc2(i,:,:) = mean(dat2(tind,:,:)); end % Now, plot the data figure_tall(3); clf global_axes(6.5, 3.75, 1, 0.5, 1.5); global_latlon(lat, lon, lims); seas = cell(8,1); [seas{1}, seas{2}, seas{3}] = deal('FMA (-1)', 'MJJ (-1)', 'ASO (-1)'); [seas{4}, seas{5}, seas{6}] = deal('NDJ (-1)', 'FMA (0)', 'MJJ (0)'); [seas{7}, seas{8}] = deal('ASO (0)', 'NDJ (0)'); cint = 0.5; for num = 1:8; figure_tall(num); clf; subplot2(1,1); cla; map_axis('giso'); [cc1, hh1] = map_contour_pn(datw1(num,:,:), 0.5); tem = squeeze(datw2(num,:,:)); tem(abs(tem) < 0.2) = NaN; hold on; map_surface(tem, -0.5); hold off; caxis([-1 1]); fill_landmap(-1); gridm on; tightmap; framem on; set(gca, 'visible', 'off'); colorbar2; t1 = title(['\bf El Nino Composite: Months ' char(seas{num})]); set(t1, 'visible', 'on', 'fontsize', 12); xl = xlabel(['Contour Interval: ' num2str(cint) '^oC']); set(xl, 'visible', 'on', 'fontsize', 10); subplot2(1,2); cla; map_axis('giso'); [cc1, hh1] = map_contour_pn(datc1(num,:,:), 0.5); tem = squeeze(datc2(num,:,:)); tem(abs(tem) < 0.2) = NaN; hold on; map_surface(tem, -0.5); hold off; caxis([-1 1]); fill_landmap(-1); gridm on; tightmap; framem on; set(gca, 'visible', 'off'); colorbar2; t1 = title(['\bf La Nina Composite: Months ' char(seas{num})]); set(t1, 'visible', 'on', 'fontsize', 12); xl = xlabel(['Contour Interval: ' num2str(cint) '^oC']); set(xl, 'visible', 'on', 'fontsize', 10); % cd /home/disk/tao/dvimont/matlab/NMC/ENSO_Composite_Plots % eval(['print -dpsc2 -painters SST_num_' num2str(num) '_comp.ps']); end % SLP tim = 1:648; lims = [0 360 -75 75]; cd /home/disk/tao/data/nmc.reanalysis/monthly [dat, lat, lon] = getnc2('slp.mon.mean.nc', 'slp', lims, 1, tim); [ntim, nlat, nlon] = size(dat); dat = annave(dat); % Just assume grand mean is deleted if 0; dat2 = repmat(NaN, size(dat)); for i = 1:12; ind = i-1+[1:12:ntim]; dat2(ind,:,:) = lin_remove(dat(ind,:,:), ct(ind)); dat2(ind,:,:) = standardize(dat2(ind,:,:)); end end dat2 = standardize(dat); datw1 = repmat(NaN, [8 nlat nlon]); datw2 = datw1; datc1 = datw1; datc2 = datw1; for i = 1:8; ind = 3*(i-1)+[2:4]; tind = warmind(:,ind); tind = tind(:); datw1(i,:,:) = mean(dat(tind,:,:)); datw2(i,:,:) = mean(dat2(tind,:,:)); tind = coldind(:,ind); tind = tind(:); datc1(i,:,:) = mean(dat(tind,:,:)); datc2(i,:,:) = mean(dat2(tind,:,:)); end % Now, plot the data figure_tall(3); clf global_axes(6.5, 3.75, 1, 0.5, 1.5); global_latlon(lat, lon, lims); seas = cell(8,1); [seas{1}, seas{2}, seas{3}] = deal('FMA (-1)', 'MJJ (-1)', 'ASO (-1)'); [seas{4}, seas{5}, seas{6}] = deal('NDJ (-1)', 'FMA (0)', 'MJJ (0)'); [seas{7}, seas{8}] = deal('ASO (0)', 'NDJ (0)'); cint = 0.5; for num = 1:8; figure_tall(num); clf; subplot2(1,1); cla; map_axis('giso'); [cc1, hh1] = map_contour_pn(datw1(num,:,:), 0.5); tem = squeeze(datw2(num,:,:)); tem(abs(tem) < 0.2) = NaN; hold on; map_surface(tem, -0.5); hold off; caxis([-1 1]); fill_landmap(-1); gridm on; tightmap; framem on; set(gca, 'visible', 'off'); colorbar2; t1 = title(['\bf El Nino Composite: Months ' char(seas{num})]); set(t1, 'visible', 'on', 'fontsize', 12); xl = xlabel(['Contour Interval: ' num2str(cint) '^oC']); set(xl, 'visible', 'on', 'fontsize', 10); subplot2(1,2); cla; map_axis('giso'); [cc1, hh1] = map_contour_pn(datc1(num,:,:), 0.5); tem = squeeze(datc2(num,:,:)); tem(abs(tem) < 0.2) = NaN; hold on; map_surface(tem, -0.5); hold off; caxis([-1 1]); fill_landmap(-1); gridm on; tightmap; framem on; set(gca, 'visible', 'off'); colorbar2; t1 = title(['\bf La Nina Composite: Months ' char(seas{num})]); set(t1, 'visible', 'on', 'fontsize', 12); xl = xlabel(['Contour Interval: ' num2str(cint) '^oC']); set(xl, 'visible', 'on', 'fontsize', 10); % cd /home/disk/tao/dvimont/matlab/NMC/ENSO_Composite_Plots % eval(['print -dpsc2 -painters SLP_num_' num2str(num) '_comp.ps']); end % OLR tim = 1:327; lims = [0 360 -75 75]; cd /home/disk/tao/data/olr/interpolated [dat, lat, lon] = getnc2('olrint.monthly.jun74aug01.nc', 'olr', ... lims, 1, tim); [ntim, nlat, nlon] = size(dat); dat = annave(dat); % Just assume grand mean is deleted if 1; dat2 = repmat(NaN, size(dat)); for i = 1:12; disp(['Iteration ' num2str(i) ' of 12']) ind = [i:12:ntim]; tem = find(~isnan(dat(ind,1,1))); ind2 = ind(tem); dat2(ind2,:,:) = lin_remove(dat(ind2,:,:), ct(ind2+12*(1974-1948)+5)); dat2(ind2,:,:) = standardize(dat2(ind2,:,:)); end end % dat2 = standardize_NaN(dat); datw1 = repmat(NaN, [8 nlat nlon]); datw2 = datw1; datc1 = datw1; datc2 = datw1; olrtim = tim+12*(1974-1948)+5; for i = 1:8; ind = 3*(i-1)+[2:4]; tind = warmind(:,ind); tind = tind(:); tind = intersect(tind, olrtim)-(12*(1974-1948)+5); datw1(i,:,:) = mean2(dat(tind,:,:)); datw2(i,:,:) = mean2(dat2(tind,:,:)); tind = coldind(:,ind); tind = tind(:); tind = intersect(tind, olrtim)-(12*(1974-1948)+5); datc1(i,:,:) = mean2(dat(tind,:,:)); datc2(i,:,:) = mean2(dat2(tind,:,:)); end % Now, plot the data figure_tall(3); clf global_axes(6.5, 3.75, 1, 0.5, 1.5); global_latlon(lat, lon, lims); seas = cell(8,1); [seas{1}, seas{2}, seas{3}] = deal('FMA (-1)', 'MJJ (-1)', 'ASO (-1)'); [seas{4}, seas{5}, seas{6}] = deal('NDJ (-1)', 'FMA (0)', 'MJJ (0)'); [seas{7}, seas{8}] = deal('ASO (0)', 'NDJ (0)'); cint = 2.5; for num = 1:8; figure_tall(num); clf; subplot2(1,1); cla; map_axis('giso'); tem = squeeze(datw1(num,:,:)); tem = smooth([1 2 1], tem')'; [cc1, hh1] = map_contour_pn(tem, cint); tem = squeeze(datw2(num,:,:)); tem(abs(tem) < 0.2) = NaN; hold on; map_surface(tem, -0.5); hold off; caxis([-1 1]); fill_landmap(-1); gridm on; tightmap; framem on; set(gca, 'visible', 'off'); colorbar2; t1 = title(['\bf El Nino Composite: Months ' char(seas{num})]); set(t1, 'visible', 'on', 'fontsize', 12); xl = xlabel(['Contour Interval: ' num2str(cint) '^oC']); set(xl, 'visible', 'on', 'fontsize', 10); subplot2(1,2); cla; map_axis('giso'); tem = squeeze(datc1(num,:,:)); tem = smooth([1 2 1], tem')'; [cc1, hh1] = map_contour_pn(tem, cint); tem = squeeze(datc2(num,:,:)); tem(abs(tem) < 0.2) = NaN; hold on; map_surface(tem, -0.5); hold off; caxis([-1 1]); fill_landmap(-1); gridm on; tightmap; framem on; set(gca, 'visible', 'off'); colorbar2; t1 = title(['\bf La Nina Composite: Months ' char(seas{num})]); set(t1, 'visible', 'on', 'fontsize', 12); xl = xlabel(['Contour Interval: ' num2str(cint) '^oC']); set(xl, 'visible', 'on', 'fontsize', 10); % cd /home/disk/tao/dvimont/matlab/NMC/ENSO_Composite_Plots % eval(['print -dpsc2 -painters SLP_num_' num2str(num) '_comp.ps']); end