Documentation of plot_30s30n_EOF_terms


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


Help text

  Get ubar_dHCprimedx and vbar_dHCprimedy

Cross-Reference Information

This script calls

Listing of script plot_30s30n_EOF_terms


clear
cd /home/disk/tao/dvimont/matlab/CSIRO/Thesis/Data
load HP10_detrend_L1-7_EOF_yr101-1000.mat
cd ~/matlab/CSIRO/Heat/Old_routines
nfrm = -3:3; lags = nfrm;
tim = 101:1000;
lev = 1:3;
lims = [106 312 -31 31];
tit = '80-270m HP10';

   [ubtp, vbtp, lat_out, lon_out, depth_out] = ...
           get_ubar_gradtprime(pcs, lims, nfrm, tim, lev);

   [uptb, vptb, lat_out, lon_out, depth_out] = ...
           get_uprime_gradtbar(pcs, lims, nfrm, tim, lev);

%  Plot the data

[lat_out, lon_out, depth_out] = getll('u', lims);
default_global;  XAX = lon_out; YAX = lat_out; FRAME = [110 299 -30 30];
lag = 0;

figure(1); figure_orient(1);
cint = 0.5; clev = [-10:cint:-cint cint:cint:10];
for i = 1:7;
  tem = -1 * squeeze(ubtp(i,:,:));
  subplot(7,2,2*i-1);
    gcont(tem, clev);
    dc2(tem);
    ylabel(['Lag = ' num2str(lags(i))]);
  if i == 7;
    xlabel(['Contour Interval:  ' num2str(cint) ' W m^-^2']);
  end
end
subplot(7,2,1)
  title([tit ' Ubar dT''dx']);

for i = 1:7;
  tem = -1 * squeeze(uptb(i,:,:));
  subplot(7,2,2*i);
    gcont(tem, clev);
    dc2(tem);
    ylabel(['Lag = ' num2str(lags(i))]);
  if i == 7;
    xlabel(['Contour Interval:  ' num2str(cint) ' W m^-^2']);
  end
end
subplot(7,2,2)
  title([tit ' U'' dTbardx']);

cd /home/disk/tao/dvimont/matlab/CSIRO/Thesis/Chap2/Plots
%print -dps2 udtdx_terms_80-270m_PC1.ps

%  Plot the vdtdy data

default_global;  XAX = lon_out; YAX = lat_out; FRAME = [110 299 -30 30];
lag = 0;

figure(2); figure_orient;
for i = 1:7;
  tem = -1 * squeeze(vbtp(i,:,:));
  subplot(7,2,2*i-1);
    gcont(tem, clev);
    dc2(tem);
    ylabel(['Lag = ' num2str(lags(i))]);
  if i == 7;
    xlabel(['Contour Interval:  ' num2str(cint) ' W m^-^2']);
  end
end
subplot(7,2,1)
  title([tit ' Vbar dT''dy']);

for i = 1:7;
  tem = -1 * squeeze(vptb(i,:,:));
  subplot(7,2,2*i);
    gcont(tem, clev);
    dc2(tem);
    ylabel(['Lag = ' num2str(lags(i))]);
  if i == 7;
    xlabel(['Contour Interval:  ' num2str(cint) ' W m^-^2']);
  end
end
subplot(7,2,2)
  title([tit ' V'' dTbardy']);

cd /home/disk/tao/dvimont/matlab/CSIRO/Thesis/Chap2/Plots
%print -dps2 vdtdy_terms_80-270m_PC1.ps

%  Get the wdtdz terms

cd ~/matlab/CSIRO/Heat/Old_routines

   [wbtp, lat_out, lon_out] = ...
        get_wbar_dtprimedz(pcs, lims, nfrm, tim, lev);
   [wptb, lat_out, lon_out] = ...
        get_wprime_dtbardz(pcs, lims, nfrm, tim, lev);

%  Plot the wdtdz data

[lat_out, lon_out, depth_out] = getll('wl', lims);
default_global;  XAX = lon_out; YAX = lat_out; FRAME = [110 299 -30 30];
lag = 0;

figure(3); figure_orient;
for i = 1:7;
  tem = -1 * squeeze(wbtp(i,:,:));
  subplot(7,2,2*i-1);
    gcont(tem, clev);
    dc2(tem);
    ylabel(['Lag = ' num2str(lags(i))]);
  if i == 7;
    xlabel(['Contour Interval:  ' num2str(cint) ' W m^-^2']);
  end
end
subplot(7,2,1)
  title([tit ' Wbar dT''dz']);

for i = 1:7;
  tem = -1 * squeeze(wptb(i,:,:));
  subplot(7,2,2*i);
    gcont(tem, clev);
    dc2(tem);
    ylabel(['Lag = ' num2str(lags(i))]);
  if i == 7;
    xlabel(['Contour Interval:  ' num2str(cint) ' W m^-^2']);
  end
end
subplot(7,2,2)
  title([tit ' W'' dTbardz']);

cd /home/disk/tao/dvimont/matlab/CSIRO/Thesis/Chap2/Plots
%print -dps2 wdtdz_terms_80-270m_PC1.ps


%  Plot the heat flux and actual heat content terms

hflx = getnc('heat', lims, lev, tim);
[lat, lon, depth] = getll('heat', lims);

cd ~/matlab/CSIRO/Heat
[dhcdt, lat_out, lon_out, tim2] = get_dhcdt(pcs, lims, nfrm, tim, lev);
[hc17, lat_out, lon_out] = getheat(lims, 1:7, tim);

hc17_reg = regress_eof(hc17, pcs, nfrm);
hflx_reg = regress_eof(hflx, pcs, nfrm);

res = dhcdt + ubtp + vbtp + wbtp + uptb + vptb + wptb - hflx_reg;

%  Plot the HC and HFLX data

default_global;  XAX = lon; YAX = lat; FRAME = [110 299 -30 30];
lag = 0;

cint = 0.5; clev = [-10:cint:-cint cint:cint:10];
figure(4); figure_orient;
for i = 1:7;
  tem = squeeze(hflx_reg(i,:,:));
  subplot(7,2,2*i);
    gcont(tem, clev);
    dc2(tem);
    ylabel(['Lag = ' num2str(lags(i))]);
  if i == 7;
    xlabel(['Contour Interval:  ' num2str(cint) ' W m^-^2']);
  end
end
subplot(7,2,2)
  title([tit ' Heat Flux (Pos Down)']);

cint = 0.25; clev = [-10:cint:-cint cint:cint:10];
for i = 1:7;
  tem = squeeze(1e-8*hc17_reg(i,:,:));
  subplot(7,2,2*i-1);
    gcont(tem, clev);
    dc2(tem);
    ylabel(['Lag = ' num2str(lags(i))]);
  if i == 7;
    xlabel(['Contour Interval:  ' num2str(10*cint) 'x10^7 J m^-^2']);
  end
end
subplot(7,2,1)
  title([tit ' 0-270m HC Tendency']);

cd /home/disk/tao/dvimont/matlab/CSIRO/Thesis/Chap2/Plots
%print -dps2 HFLX_HC_0-270m_PC1.ps




cd /home/disk/tao/dvimont/matlab/CSIRO/Thesis/Data
%save HP10_hctend_L1-3_yr101-1000_lreg.mat uptb ubtp vptb vbtp wptb wbtp...
%      dhcdt3 hflx_reg lims lags tim lev nfrm
%save HP10_hctend_L1-3_yr101-1000_lreg.mat uptb ubtp vptb vbtp wptb wbtp lags tim lev nfrm


cd /home/disk/tao/dvimont/matlab/CSIRO/Thesis/Data
load HP10_hctend_L1-7_yr101-1000_lreg.mat;
uptb7 = uptb;
ubtp7 = ubtp; 
vptb7 = vptb; 
vbtp7 = vbtp; 
wptb7 = wptb; 
wbtp7 = wbtp;

load HP10_hctend_L1-3_yr101-1000_lreg.mat

uptb3 = uptb;
ubtp3 = ubtp; 
vptb3 = vptb; 
vbtp3 = vbtp; 
wptb3 = wptb; 
wbtp3 = wbtp;


uptb = uptb7 - uptb3;
ubtp = ubtp7 - ubtp3; 
vptb = vptb7 - vptb3; 
vbtp = vbtp7 - vbtp3; 
wptb = wptb7 - wptb3; 
wbtp = wbtp7 - wbtp3;


dhcdt7 = dhcdt;
dhcdt3 = dhcdt;
dhcdt = dhcdt7 - dhcdt3;

%  Get residual

[nfrm, nlat, nlon] = size(hflx_reg);
[lat, lon] = getll('u', lims);
[latw, lonw] = getll('wl', lims);

for i = 1:7;
  tem1(i,:,:) = interp2(lonw, latw, squeeze(dhcdt7(i,:,:)), lon', lat);
  tem2(i,:,:) = interp2(lonw, latw, squeeze(hflx_reg(i,:,:)), lon', lat);
  tem3(i,:,:) = interp2(lonw, latw, squeeze(wptb7(i,:,:)), lon', lat);
  tem4(i,:,:) = interp2(lonw, latw, squeeze(wbtp7(i,:,:)), lon', lat);
end
dhcdt7 = tem1;
hflx_reg = tem2;
wptb7 = tem3;
wbtp7 = tem4;
res7 = dhcdt7 + (ubtp7 + vbtp7 + wbtp7 + uptb7 + vptb7 + wptb7 - hflx_reg);

for i = 1:7;
  tem1(i,:,:) = interp2(lonw, latw, squeeze(dhcdt3(i,:,:)), lon', lat);
  tem2(i,:,:) = interp2(lonw, latw, squeeze(hflx_reg(i,:,:)), lon', lat);
  tem3(i,:,:) = interp2(lonw, latw, squeeze(wptb3(i,:,:)), lon', lat);
  tem4(i,:,:) = interp2(lonw, latw, squeeze(wbtp3(i,:,:)), lon', lat);
end
dhcdt3 = tem1;
hflx_reg = tem2;
wptb3 = tem3;
wbtp3 = tem4;
res3 = dhcdt3 + (ubtp3 + vbtp3 + wbtp3 + uptb3 + vptb3 + wptb3 - hflx_reg);

res47 = res7 - res3;

default_global;  XAX = lon; YAX = lat; FRAME = [110 299 -30 30];
lag = 0;

cint = 0.5; clev = [-5:cint:-cint cint:cint:5];
figure(3); figure_orient;
for i = 1:7;
  tem = squeeze(res3(i,:,:));
  subplot(7,2,2*i-1);
    gcont(tem, clev);
    dc2(tem);
    ylabel(['Lag = ' num2str(lags(i))]);
  if i == 7;
    xlabel(['Contour Interval:  ' num2str(cint) ' W m^-^2']);
  end
end
subplot(7,2,1)
  title(['0-80m HP10 Residual']);

for i = 1:7;
  tem = squeeze(res47(i,:,:));
  subplot(7,2,2*i);
    gcont(tem, clev);
    dc2(tem);
    ylabel(['Lag = ' num2str(lags(i))]);
  if i == 7;
    xlabel(['Contour Interval:  ' num2str(cint) ' W m^-^2']);
  end
end
subplot(7,2,2)
  title(['80-270m HP10 Residual']);

cd /home/disk/tao/dvimont/matlab/CSIRO/Thesis/Chap2/Plots
%print -dps2 Residual_0-80m_80-270m.ps