Global Index (short | long) | Local contents | Local Index (short | long)
ct = getheat(lims, 1:7, tim, 'temp');
This script calls | This script is called by |
---|---|
clear cd /home/disk/hayes2/dvimont/csiro/matlab_data/Heat_Content cd /home/disk/tao/dvimont/matlab/CSIRO/Thesis/Data load RAW_detrend_L1-7_EOF_yr101-550.mat; pcs1 = pcs; load RAW_detrend_L1-7_EOF_yr550-1000.mat; pcs2 = pcs; load RAW_detrend_2_L1-7_EOF_yr101-1000.mat; pcs3 = pcs; load RAW_NOdetrend_L1-7_EOF_yr101-1000.mat; pcs3 = pcs; load LP10_detrend_L1-7_yr101-1000.mat; pcs3 = pcs; lims = [180 270 -6 6]; tim = 101:1000; ct = squeeze(getnc('temp', lims, 1, tim)); ct = squeeze(mean(mean(ct, 2), 3)); ntim = length(ct); pcs1 = ct(1:(ntim/2)); pcs1 = (pcs1 - mean(pcs1))./std(pcs1); pcs2 = ct(ntim/2+[1:ntim/2]); pcs2 = (pcs2 - mean(pcs2))./std(pcs2); pcs3 = ct; pcs3 = (pcs3 - mean(pcs3))./std(pcs3); num = 1; for i = 1:3; if i == 2; ctann = pcs1(:,num); tit = ['Years 101 to 550']; elseif i == 3; ctann = pcs2(:,num); tit = ['Years 551 to 1000']; elseif i == 1; ctann = pcs3(:,num); tit = ['Years 101 to 1000']; end nx = length(ctann); nfft = 512; noverlap = 0.5*nfft; [p, f] = spectrum(ctann, nfft, noverlap, hanning(nfft));%, boxcar(128));%, wind); n2 = nfft/2; f2 = 0.5 * (0:n2)/n2; rho = (corr(ctann, ctann, 1) + sqrt(corr(ctann, ctann, 2))) / 2 ;% + ... rn = (1-rho^2) ./ (1-2*rho*cos((pi/n2)*(0:n2))+rho^2); rn = rn / mean(rn); rn = rn * mean(p(:,1)); % rn = ones(size(p, 1), 1); if i == 1; rner1 = rn * 3.58; rner5 = rn * 2.5; % rner1 = rn * 2.55; % rner5 = rn * 1.96; else rner1 = rn * 3.58; rner5 = rn * 2.5; % rner1 = rn * 2.03; % rner5 = rn * 1.65; end dofx = nx / n2; ind = 2:(n2+1); xdat = log(f2(ind)); ydat = f2(ind).*p(ind,1)'; % rn = f2(ind).*rn(ind); % rner1 = f2(ind).*rner1(ind); % rner5 = f2(ind).*rner5(ind); figure(num); figure_orient; subplot(3,1,i) yr = [120 80 40 20 10 5 2.5]; h1 = semilogy(f2, p(:,1), 'b-', f2, rn, 'b-', ... f2, rner5, 'b--', f2, rner1, 'b-.'); % plot(xdat, ydat, 'b-', xdat, rn, 'b-', ... % xdat, rner5, 'b--', xdat, rner1, 'b-.'); % set(gca, 'XTick', log(1./yr), 'XTickLabel', yr); % axis([log(1/128) log(0.5) 0 0.45]) grid on axis([1/450 0.25 .05 20]); set(gca, 'YTick', [.1 1 10], 'XTick', 0:.02:.5); title(['CT index ( SST averaged over [180 90W 6S 6N] ): ' tit]); % legend(h1, ['CT, ' tit], 'Red Noise', '95% Confidence', '99% Confidence'); end xlabel(['Period in Years']); cd /home/disk/tao/dvimont/matlab/CSIRO/Thesis/Chap1/Plots cd /home/disk/tao/dvimont/matlab/CSIRO/Heat/GRL_Figs % Plot HP and LP filtered EOF's of SST next to this clear lims = [100 300 -65 65]; tim = 101:1000; lev = 1; sst = getnc('temp', lims, lev, tim); [lat, lon] = getll('temp', lims); cd /home/disk/tao/dvimont/matlab/CSIRO/Thesis/Data load LP10_detrend_L1-7_yr101-1000.mat; pcs3 = pcs; load HP10_detrend_L1-7_EOF_yr101-1000.mat; pcs3 = pcs; [treg, ccoef] = regress_eof(sst, pcs, 0); tem = zeros(size(ccoef)); tem(ccoef.^2 >= 0.25) = NaN; cint = 0.05; clev = [-1:cint:-cint cint:cint:1]; default_global; FRAME = [105 290 -60 60]; subplot(3,2,2); gcont(-1*treg, clev); dc2(treg); shade_ccoef(tem); title('HP10: 12.5m Temp'); subplot(3,2,4); gcont(-1*treg, clev); dc2(treg); shade_ccoef(tem); title('LP10: 12.5m Temp'); xlabel(['Contour Interval: ' num2str(cint) ' K std^-^1']); cd /home/disk/tao/dvimont/matlab/CSIRO/Heat/GRL_Figs print -dps2 figure1.ps cd /home/disk/tao/data/coads/sstanom4by6 nc = netcdf('sstcoadsanom4by6.18541995.nc', 'nowrite'); lat = nc{'lat'}(:); lon = nc{'lon'}(:); [xk, yk] = keep_var(lims, lon, lat); ct2 = nc{'data'}(:,yk,xk); mv = nc{'data'}.missing_value(:); sf = nc{'data'}.scale_factor(:); nc = close(nc); ct2(ct2 == mv) = NaN; ct2 = mean2(mean2(shiftdim(ct2, 1))); ct2 = squeeze(ct2); ct3 = []; for i = 1:142; ind = 12*(i-1) + [1:12]; ct3 = [ct3; mean2(ct2(ind))]; end ct3 = ct3(15:142);