Documentation of plot_pac_terms


Global Index (short | long) | Local contents | Local Index (short | long)


Help text

prec = getflx('rnd', lims, tim);

Cross-Reference Information

This script calls

Listing of script plot_pac_terms


clear
cd /home/disk/tao/dvimont/matlab/CSIRO/Thesis/Data
load LP9_hctend_ALL.mat; pn = 1;
load LP9_hflx_terms.mat;

uptb17 = uptb47 + uptb13;
ubtp17 = ubtp47 + ubtp13; 
vptb17 = vptb47 + vptb13; 
vbtp17 = vbtp47 + vbtp13; 
wptb17 = wptb47 + wptb13; 
wbtp17 = wbtp47 + wbtp13;

cd /home/disk/tao/dvimont/matlab/CSIRO/Thesis/Data
load LP9_detrend_L1-7_EOF_yr101-1000.mat

%prec_reg = regress_eof(prec, pcs, nfrm);

[lat, lon, depth, lm] = getll('temp', lims);

[lat1, lon1] = getll('u', lims);
[lat2, lon2] = getll('wl', lims);

%order = ['ubtp'; 'vbtp'; 'wbtp'; 'uptb'; 'vptb'; 'wptb'];
%llord = num2str([1; 1; 2; 1; 1; 2]);
%tit = ['Ubar T''_X'; 'Vbar T''_Y'; 'Wbar T''_Z'; ...
%       'U'' Tbar_X'; 'V'' Tbar_Y'; 'W'' Tbar_Z'];
order = ['ubtp'; 'uptb'; 'vbtp'; 'vptb'; 'wbtp'; 'wptb'];
llord = num2str([1; 1; 1; 1; 2; 2]);
tit = ['UT\prime_X'; 'u\primeT_X'; 'VT\prime_Y'; ...
       'v\primeT_Y'; 'WT\prime_z'; 'w\primeT_Z'];


%%%%%%%%%%%%%%%%%  Plot dynamic heat content terms

figure(1); fo(1);
get_global; FRAME = [105 300 -60 60];

lag_plot = -4:3:2;

cint = 0.5; clev = [-10:cint:-cint cint:cint:10];

topbot = '13'; tit2 = ['0-80m'];
topbot = '47'; tit2 = ['80-270m'];

figure(1); fo(1); clf
for j = 1:2;
  for i = 1:3;
    pos = [.2+.38*(j-1) (9.8/11)-(i)*7/(3*11) ...
           .3 .18]; 
    lind = find(lags == lag_plot(i));
    eval(['tem = pn*' order(j,:) topbot '(lind, :, :);']);
    eval(['XAX = lon' llord(j) '; YAX = lat' llord(j) ';']);
%    subplot(3,3,3*(i-1)+j);
    subplot('position', pos);
    set(gca, 'FontSize', 10);
      gcont(tem, cint);
      XAX = lon; YAX = lat;
      dc2(lm);
      if j == 1;
        yl(i) = ylabel(['Lag = ' num2str(lags(lind))]);
      end
      if i == 1;
        title(['LP9:  ' tit2 ' ' tit(j,:)]);
      elseif i == 3;
%        xlabel(['Contour Interval:  ' num2str(cint) ' W m^-^2 std^-^2']);
      end
%    set(gca, 'FontSize', 9);
  end
end

cd /home/disk/tao/dvimont/Thesis/Chap4
print -dps2 lag-4to2_Uterm_80-270m.ps

figure(2); fo(1); clf
for j = 1:2;
  for i = 1:3;
    pos = [.2+.38*(j-1) (9.8/11)-(i)*7/(3*11) ...
           .3 .18]; 
    lind = find(lags == lag_plot(i));
    eval(['tem = pn*' order(j+2,:) topbot '(lind, :, :);']);
    eval(['XAX = lon' llord(j+2) '; YAX = lat' llord(j+2) ';']);
%    subplot(3,3,3*(i-1)+j);
    subplot('position', pos);
    set(gca, 'FontSize', 10);
      gcont(tem, cint);
      XAX = lon; YAX = lat;
      dc2(lm);
      if j == 1;
        yl(i) = ylabel(['Lag = ' num2str(lags(lind))]);
      end
      if i == 1;
        title(['LP9:  ' tit2 ' ' tit(j+2,:)]);
      elseif i == 3;
%        xlabel(['Contour Interval:  ' num2str(cint) ' W m^-^2 std^-^2']);
      end
%    set(gca, 'FontSize', 9);
  end
end

cd /home/disk/tao/dvimont/Thesis/Chap4
print -dps2 lag-4to2_Vterm_80-270m.ps

figure(3); fo(1); clf
for j = 1:2;
  for i = 1:3;
    pos = [.2+.38*(j-1) (9.8/11)-(i)*7/(3*11) ...
           .3 .18]; 
    lind = find(lags == lag_plot(i));
    eval(['tem = pn*' order(j+4,:) topbot '(lind, :, :);']);
    eval(['XAX = lon' llord(j+4) '; YAX = lat' llord(j+4) ';']);
%    subplot(3,3,3*(i-1)+j);
    subplot('position', pos);
    set(gca, 'FontSize', 10);
      gcont(tem, cint);
      XAX = lon; YAX = lat;
      dc2(lm);
      if j == 1;
        yl(i) = ylabel(['Lag = ' num2str(lags(lind))]);
      end
      if i == 1;
        title(['LP9:  ' tit2 ' ' tit(j+4,:)]);
      elseif i == 3;
%        xlabel(['Contour Interval:  ' num2str(cint) ' W m^-^2 std^-^2']);
      end
%    set(gca, 'FontSize', 9);
  end
end

cd /home/disk/tao/dvimont/Thesis/Chap4
print -dps2 lag-4to2_Wterm_80-270m.ps

%%%%%%%%%%%%%%%
%
%  Interpolate to get residual
%

for i = 1:3;
  lind = find(lags == lag_plot(i));
  temw1(i,:,:) = interp2(lon2, lat2, squeeze(wbtp13(lind,:,:)), lon1, lat1');
  temw2(i,:,:) = interp2(lon2, lat2, squeeze(wptb13(lind,:,:)), lon1, lat1');
  temh(i,:,:) = interp2(lon2, lat2, squeeze(hflx_reg(lind,:,:)), lon1, lat1');
  temd(i,:,:) = interp2(lon2, lat2, squeeze(dhcdt13(lind,:,:)), lon1, lat1');
end
lind = find(ismember(lags, lag_plot));
res13 = -temd - (ubtp13(lind,:,:)+vbtp13(lind,:,:)+temw1+...
                 uptb13(lind,:,:)+vptb13(lind,:,:)+temw2-temh);
for i = 1:3;
  lind = find(lags == lag_plot(i));
  temw1(i,:,:) = interp2(lon2, lat2, squeeze(wbtp47(lind,:,:)), lon1, lat1');
  temw2(i,:,:) = interp2(lon2, lat2, squeeze(wptb47(lind,:,:)), lon1, lat1');
  temd(i,:,:) = interp2(lon2, lat2, squeeze(dhcdt47(lind,:,:)), lon1, lat1');
end
lind = find(ismember(lags, lag_plot));
res47 = -temd - (ubtp47(lind,:,:)+vbtp47(lind,:,:)+temw1+...
                 uptb47(lind,:,:)+vptb47(lind,:,:)+temw2);


figure(4); fo(1); clf
for j = 1:2;
  for i = 1:3;
    pos = [.2+.38*(j-1) (9.8/11)-(i)*7/(3*11) ...
           .3 .18]; 
    if j == 1; tem = res13(i,:,:); end;
    if j == 2; tem = res47(i,:,:); end;
    subplot('position', pos);
    set(gca, 'FontSize', 10);
      XAX = lon1; YAX = lat1;
      gcont(tem, cint);
      XAX = lon; YAX = lat;
      dc2(lm);
      if j == 1;
        yl(i) = ylabel(['Lag = ' num2str(lags(lind))]);
      end
      if i == 1;
        title(['LP9:  Residual']);
      elseif i == 3;
%        xlabel(['Contour Interval:  ' num2str(cint) ' W m^-^2 std^-^2']);
      end
%    set(gca, 'FontSize', 9);
  end
end

cd /home/disk/tao/dvimont/Thesis/Chap4
% print -dps2 lag-4to2_Wterm_80-270m.ps

%%%%%%%%%%%%%%%%%  Plot Heat Flux

get_global; FRAME = [105 300 -60 60];

order = ['hflx'; '-evp'; '-sgn'; '-hfl'; '-rgn'];
tit = ['Net Flux'; ' LH Flux'; ' SW Flux'; ' SH Flux'; ' LW Flux'];

lag_plot = -4:3:2;

cint = 0.5; clev = [-10:cint:-cint cint:cint:10];

figure(4); fo(1); clf;
for j = 1:1;
  for i = 1:3;
    pos = [.2+.38*(j-1) (9.8/11)-(i)*7/(3*11) ...
           .3 .18]; 
    lind = find(lags == lag_plot(i));
    eval(['tem = -1*pn*' order(j,:) '_reg(lind, :, :);']);
    XAX = lonh; YAX = lath;
    subplot('position', pos);
    set(gca, 'FontSize', 10);
%    subplot(3,3,3*(i-1)+j-0);
      gcont(tem, cint);
      XAX = lon; YAX = lat;
      dc2(lm);
      if rem(j, 3) == 1;
        yl(i) = ylabel(['Lag = ' num2str(lags(lind))]);
      end
      if i == 1;
        title(['LP9:  ' tit(j,:)]);
      elseif i == 3;
%        xlabel(['Contour Interval:  ' num2str(cint) ' W m^-^2 std^-^2']);
      end
%    set(gca, 'FontSize', 9);
  end
end

cd /home/disk/tao/dvimont/Thesis/Chap4
% print -dps2 lag-4to2_hflx_tot.ps

figure(5); fo(1); clf;
for j = 1:2;
  for i = 1:3;
    pos = [.2+.38*(j-1) (9.8/11)-(i)*7/(3*11) ...
           .3 .18]; 
    lind = find(lags == lag_plot(i));
    eval(['tem = -1*pn*' order(j+1,:) '_reg(lind, :, :);']);
    XAX = lonh; YAX = lath;
    subplot('position', pos);
    set(gca, 'FontSize', 10);
%    subplot(3,3,3*(i-1)+j-0);
      gcont(tem, cint);
      XAX = lon; YAX = lat;
      dc2(lm);
      if j==1;
        yl(i) = ylabel(['Lag = ' num2str(lags(lind))]);
      end
      if i == 1;
        title(['LP9:  ' tit(j+1,:)]);
      elseif i == 3;
%        xlabel(['Contour Interval:  ' num2str(cint) ' W m^-^2 std^-^2']);
      end
%    set(gca, 'FontSize', 9);
  end
end

cd /home/disk/tao/dvimont/Thesis/Chap4
% print -dps2 lag-4to2_LH_SW.ps

figure(4); fo(1); clf;
for j = 1:2;
  for i = 1:3;
    pos = [.2+.38*(j-1) (9.8/11)-(i)*7/(3*11) ...
           .3 .18]; 
    lind = find(lags == lag_plot(i));
    eval(['tem = -1*pn*' order(j+3,:) '_reg(lind, :, :);']);
    XAX = lonh; YAX = lath;
    subplot('position', pos);
    set(gca, 'FontSize', 10);
%    subplot(3,3,3*(i-1)+j-0);
      gcont(tem, cint);
      XAX = lon; YAX = lat;
      dc2(lm);
      if j==1;
        yl(i) = ylabel(['Lag = ' num2str(lags(lind))]);
      end
      if i == 1;
        title(['LP9:  ' tit(j+3,:)]);
      elseif i == 3;
%        xlabel(['Contour Interval:  ' num2str(cint) ' W m^-^2 std^-^2']);
      end
%    set(gca, 'FontSize', 9);
  end
end

cd /home/disk/tao/dvimont/Thesis/Chap4
% print -dps2 lag-4to2_SH_LW.ps










%%%%%%%%%%%%%%%%%%%%%%%%%  Old stuff










figure(1); figure_landscape(1);
for j = 1:3;
  for i = 1:3;
    lind = find(lags == lag_plot(i));
    eval(['tem = pn*' order(j,:) topbot '(lind, :, :);']);
    eval(['XAX = lon' llord(j) '; YAX = lat' llord(j) ';']);
%    tem(abs(tem) < cint) = NaN;
    subplot(3,3,3*(i-1)+mod(j-1, 3)+1);
%      mcolor(tem, cint, 'mollweid');
      gcont(tem, cint);
      XAX = lon; YAX = lat;
      dc2(lm);
%      drawmapm; gridm on;
%      axis_limits;
      if mod(j, 3) == 1;
        yl(i) = ylabel(['Lag = ' num2str(lags(lind))]);
      end
      if i == 1;
        title([tit2 ' ' tit(j,:)]);
      elseif i == 3;
        xlabel(['Contour Interval:  ' num2str(cint) ' W m^-^2 std^-^2']);
      end
      caxis([-5 5]);
  end
end

cd ~/Thesis/Chap4
% print -dps2 lag-4to2_Ubar_80-270m_tend_terms.ps

figure(2); figure_landscape(1);
for j = 4:6;
  for i = 1:3;
    lind = find(lags == lag_plot(i));
    eval(['tem = pn*' order(j,:) topbot '(lind, :, :);']);
    eval(['XAX = lon' llord(j) '; YAX = lat' llord(j) ';']);
    subplot(3,3,3*(i-1)+j-3);
      gcont(tem, cint);
      XAX = lon; YAX = lat;
      dc2(lm);
      if j == 4;
        yl(i) = ylabel(['Lag = ' num2str(lags(lind))]);
      end
      if i == 1;
        title([tit2 ' ' tit(j,:)]);
      elseif i == 3;
        xlabel(['Contour Interval:  ' num2str(cint) ' W m^-^2 std^-^2']);
      end
  end
end

cd ~/Thesis/Chap4
% print -dps2 lag-4to2_Uprime_80-270m_tend_terms.ps


%%%%%%%%%%%%%%%%%  Plot Heat Flux

get_global; FRAME = [105 300 -60 60];

order = ['hflx'; '-evp'; '-sgn'; '-hfl'; '-rgn'];
tit = ['Net Flux'; ' LH Flux'; ' SW Flux'; ' SH Flux'; ' LW Flux'];

lag_plot = -4:3:2;

cint = 0.5; clev = [-10:cint:-cint cint:cint:10];

figure(3); figure_landscape(1); clf;
for j = 4:5;
  for i = 1:3;
    lind = find(lags == lag_plot(i));
    eval(['tem = -1*pn*' order(j,:) '_reg(lind, :, :);']);
    XAX = lonh; YAX = lath;
    subplot(3,3,3*(i-1)+mod(j-1, 3)+1);
      gcont(tem, cint);
      XAX = lon; YAX = lat;
      dc2(lm);
      if rem(j, 3) == 1;
        yl(i) = ylabel(['Lag = ' num2str(lags(lind))]);
      end
      if i == 1;
        title(['LP9:  ' tit(j,:)]);
      elseif i == 3;
        xlabel(['Contour Interval:  ' num2str(cint) ' W m^-^2 std^-^2']);
      end
  end
end

cd ~/Thesis/Chap4
% print -dps2 lag-4to2_HFLX_LH_SW_reg.ps
% print -dps2 lag-4to2_SH_LW_reg.ps