Global Index (short | long) | Local contents | Local Index (short | long)
save gu_philand.mat vbtp wbtp vptb wptb ubtp uptb lims tim lags
This script calls | |
---|---|
clear cd ~/matlab/CSIRO/Thesis/Data load LP9_detrend_L1-7_EOF_yr101-1000.mat; pcs = 1*pcs; lims = [150 205 -44 44]; tim = 101:1000; lags = -15:15; if 0; cd ~/matlab/CSIRO/Thesis/Chap5 [vbtp, wbtp] = ... vert_vdtdy_wdtdz(pcs, lims, lags); [vptb, wptb] = ... vert_vptb_wptb(pcs, lims, lags); [ubtp, uptb] = vert_ubtp_uptb(pcs, lims, lags); cd ~/matlab/CSIRO/Thesis/Data end; cd ~/matlab/CSIRO/Thesis/Data load gu_philand.mat temp = getnc('temp', lims, 1:10, [min(tim-1) tim]); ntim = length(tim)+1; dtdt = (temp(3:ntim,:,:,:) - temp(1:(ntim-2),:,:,:)) ./ (2*3600*24*365); dtdt = detrend(dtdt); [dtreg, dtcoef] = regress_eof(dtdt, -1*pcs(1:(ntim-2),1), lags); [treg, tcoef] = regress_eof(temp(2:ntim,:,:,:), -1*pcs, lags); [latt, lont, deptht] = getll('temp', lims); [latv, lonv, depthv] = getll('v', lims); [latw, lonw, depthw] = getll('wl', lims); [latu, lonu, depthu] = getll('u', lims); ubtp = squeeze(mean2(shiftdim(ubtp, 3))); vbtp = squeeze(mean2(shiftdim(vbtp, 3))); wbtp = squeeze(mean2(shiftdim(wbtp, 3))); uptb = squeeze(mean2(shiftdim(uptb, 3))); vptb = squeeze(mean2(shiftdim(vptb, 3))); wptb = squeeze(mean2(shiftdim(wptb, 3))); dtreg = squeeze(mean2(shiftdim(dtreg, 3))); treg = squeeze(mean2(shiftdim(treg, 3))); dtcoef = squeeze(mean2(shiftdim(dtcoef, 3))); tcoef = squeeze(mean2(shiftdim(tcoef, 3))); [nlag, nlev, nlat, nlon] = size(vbtp); for i=1:nlag; ubtp2(i,:,:) = interp2(latu, depthu, squeeze(ubtp(i,:,:)), latw', depthw); vbtp2(i,:,:) = interp2(latv, depthv, squeeze(vbtp(i,:,:)), latw', depthw); uptb2(i,:,:) = interp2(latu, depthu, squeeze(uptb(i,:,:)), latw', depthw); vptb2(i,:,:) = interp2(latv, depthv, squeeze(vptb(i,:,:)), latw', depthw); treg2(i,:,:) = interp2(latt, deptht, squeeze(dtreg(i,:,:)), latw', depthw); end uptb3 = uptb2 + vptb2 + wptb; ubtp3 = ubtp2 + vbtp2 + wbtp; tem1 = 1e9*(treg2-uptb3-ubtp3); tit1 = 'Resid'; tem2 = 1e9*ubtp3; tit2 = 'UBTP'; lat1 = latw; depth1 = depthw; biff = 5; tem1 = 1e9*ubtp3; tit1 = ['\bfU\rm\nabla\cdotT''']; tem2 = 1e9*uptb3; tit2 = ['\bfu\rm''\nabla\cdotT']; lat1 = latw; depth1 = depthw; tem1 = 4*dtcoef; tit1 = 'T''_t'; tem2 = 4*tcoef; tit2 = 'T'''; lat1 = latt; depth1 = deptht; tem2 = 1e9*(treg2 - uptb3 - ubtp3); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% lagplot = -8:1:-4; lp = length(lagplot); for biff = 1:1; if biff == 1; tem1 = 1e9*dtreg; tit1 = 'T''_t'; cint1 = 10; unit1 = 'x 10^-^8 K s^-^1 std^-^1'; tem2 = 20*treg; tit2 = 'T'''; cint2 = 0.05; unit2 = 'K std^-^1'; lat1 = latt; depth1 = deptht; elseif biff == 2; tem1 = 1e9*ubtp; tit1 = 'UT''_x'; cint1 = 10; unit1 = 'x 10^-^8 K s^-^1 std^-^1'; tem2 = 1e9*uptb; tit2 = 'u''T_x'; cint2 = 10; unit2 = 'x 10^-^8 K s^-^1 std^-^1'; lat1 = latu; depth1 = depthu; elseif biff == 3; tem1 = 1e9*vbtp; tit1 = 'VT''_y'; cint1 = 10; unit1 = 'x 10^-^8 K s^-^1 std^-^1'; tem2 = 1e9*vptb; tit2 = 'v''T_y'; cint2 = 10; unit2 = 'x 10^-^8 K s^-^1 std^-^1'; lat1 = latu; depth1 = depthu; elseif biff == 4; tem1 = 1e9*wbtp; tit1 = 'WT''_z'; cint1 = 10; unit1 = 'x 10^-^8 K s^-^1 std^-^1'; tem2 = 1e9*wptb; tit2 = 'w''T_z'; cint2 = 10; unit2 = 'x 10^-^8 K s^-^1 std^-^1'; lat1 = latw; depth1 = depthw; elseif biff == 5; tem1 = 1e9*ubtp3; tit1 = ['\bfU\rm\nabla\cdotT''']; cint1 = 10; unit1 = 'x 10^-^8 K s^-^1 std^-^1'; tem2 = 1e9*uptb3; tit2 = ['\bfu\rm''\nabla\cdotT']; cint2 = 10; unit2 = 'x 10^-^8 K s^-^1 std^-^1'; lat1 = latw; depth1 = depthw; end % Plot the data; figure(biff); fo(1); clf; for i = 1:lp; if lagplot(i) < -4; cint = 0.2; clev = sort([-cint:-cint:min(min(min([tem1; tem2]))) ... cint:cint:max(max(max([tem1; tem2])))]); else cint = 0.2; clev = sort([-cint:-cint:min(min(min([tem1; tem2]))) ... cint:cint:max(max(max([tem1; tem2])))]); end sptalk(6, 2, 2*i-1); tind = find(lags == lagplot(i)); tem = squeeze(1*tem1(tind,:,:)); % tem(abs(tem) < cint) = NaN; % contourf(lat1, -1*depth1, tem, clev); % caxis([-2 2]); pncont(lat1, -1*depth1, tem, clev, 0, 'k'); set(gca, 'YTick', -500:125:0, 'YTickLabel', 500:-125:0, ... 'XTick', -40:10:40); axis([-40 40 -545 0]); % shading flat ylabel(['Lag = ' num2str(lagplot(i))]); hold on; vline(-40:10:40, ':k'); hline(-500:125:-125, ':k'); hold off; if i == 1; title(tit1); elseif i == lp; xlabel(['Contour Interval: ' num2str(cint*cint1) ' ' unit1]); end end for i = 1:lp; if lagplot(i) < -4; cint = 0.2; clev = sort([-cint:-cint:min(min(min([tem1; tem2]))) ... cint:cint:max(max(max([tem1; tem2])))]); else cint = 0.2; clev = sort([-cint:-cint:min(min(min([tem1; tem2]))) ... cint:cint:max(max(max([tem1; tem2])))]); end sptalk(6, 2, 2*i); tind = find(lags == lagplot(i)); tem = squeeze(1*tem2(tind,:,:)); % tem(abs(tem) < cint) = NaN; % contourf(lat1, -1*depth1, tem, clev); % caxis([-2 2]); pncont(lat1, -1*depth1, tem, clev, 0, 'k'); set(gca, 'YTick', -500:125:0, 'YTickLabel', 500:-125:0, ... 'XTick', -40:10:40); axis([-40 40 -545 0]); % shading flat hold on; vline(-40:10:40, ':k'); hline(-500:125:-125, ':k'); hold off; if i == 1; title(tit2); elseif i == lp; xlabel(['Contour Interval: ' num2str(cint*cint2) ' ' unit2]); end end end; % biff loop cd ~/matlab/CSIRO/Thesis/Chap5/Plots figure(1); print -dps2 GP_ttend_temp_neglag.ps figure(2); print -dps2 GP_uterms_neglag.ps figure(3); print -dps2 GP_vterms_neglag.ps figure(4); print -dps2 GP_wterms_neglag.ps figure(5); print -dps2 GP_ubtp_uptb_neglag.ps