Documentation of clim_plot


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


Help text

ind1 = [1 2 12]; % Winter
ind2 = [6:8];

Cross-Reference Information

This script calls

Listing of script clim_plot


clean
path( '/home/disk/tao/dvimont/matlab/CCM', path );
cd /home/disk/hayes2/dvimont/ccm/ccm3.6/run/sun/HTRAE/data
filin = 'htrae.nc';
lims = [0 360 -90 90];
tim = 1:12;
filin1 = ['/home/disk/hayes2/dvimont/ccm/ccm3.6/run/sun/HTRAE/data/' ...
	  'earth.nc'];
tit1 = 'FORWARD';
filin2 = ['/home/disk/hayes2/dvimont/ccm/ccm3.6/run/sun/HTRAE/data/' ...
	  'htrae.nc'];
tit2 = 'BACKWARD';
[lat, lon, lev, hyam, hybm, P0] = getll_ccm(filin1);
nc1 = netcdf(filin1, 'nowrite');
nc2 = netcdf(filin2, 'nowrite');
ind1 = [6:8]; % Summer
ind2 = [1 2 12];

oro1 = nc1{'ORO', 1}(:,:,:);
oro2 = nc2{'ORO', 1}(:,:,:);
lm1 = oro1;
lm1(lm1 == 1) = NaN;
lm1(lm1 == 0) = 1;
lm1(lm1 == 2) = 1;
lm2 = oro2;
lm2(lm2 == 1) = NaN;
lm2(lm2 == 0) = 1;
lm2(lm2 == 2) = 1;

%  Get PS
varn = 'PS';
ps1 = nc1{varn, 1}(:,:,:);
ps2 = nc2{varn, 1}(:,:,:);

%  Start with JJA (boreal winter);

global GRDX_SPACING GRDY_SPACING
GRDX_SPACING = 45; GRDY_SPACING = 20;

figure(1); fo(1); clf;
default_global; FRAME = [0 360 -90 90];

lm1a = squeeze(mean2(lm1(ind1,:,:)));
lm2a = squeeze(mean2(lm2(ind2,:,:)));
lm2a = rot90(rot90(lm2a));

%  Start with surface temperature
varn = 'TS1';
tem1 = nc1{varn, 1}(:,:,:);
tem2 = nc2{varn, 1}(:,:,:);

tem1 = squeeze(mean(tem1(ind1,:,:)));
tem2 = squeeze(mean(tem2(ind2,:,:)));
tem2 = rot90(rot90(tem2));

spback(1);
  gcont(tem1-273.15, 5, 1);
  dc2(lm1a, 0.5, -1000);
%  gshade(tem1, 1);
%  dc
%  caxis([240 305]);
%  colorbar2
  set(gca, 'fontsize', 9);
  title([tit1 ':  ' varn], 'fontsize', 10);
  xlabel(['Contour interval:  5 \circC'], 'fontsize', 10);
spback(2);
  gcont(tem2-273.15, 5, 1);
  dc2(lm2a, 0.5, -1000);
%  gshade(tem2, 1);
%  dc
%  caxis([240 305]);
%  colorbar2
  set(gca, 'fontsize', 9);
  title([tit2 ':  ' varn], 'fontsize', 10);
  xlabel(['Contour interval:  5 \circC'], 'fontsize', 10);
spback(3);
  gcont(tem2-tem1, 2.5, 0);
  dc2(lm2a, 0.5, -1000);
%  gshade(tem2-tem1, 1);
%  dc
%  caxis([-25 25]);
%  colorbar2
  set(gca, 'fontsize', 9);
  title([tit2 '-' tit1 ':  ' varn], 'fontsize', 10);
  xlabel(['Contour interval:  2.5 \circC'], 'fontsize', 10);

cd /home/disk/tao/dvimont/matlab/CCM/Htrea/Figs_sum
%print -dps2 TS1.ps


%  Precipitation:

varn1 = 'PRECC'; varn2 = 'PRECL'; varn = 'Precipitation';
tem1 = 1000*3600*24*(nc1{varn1, 1}(:,:,:)+nc1{varn2, 1}(:,:,:));
tem2 = 1000*3600*24*(nc2{varn1, 1}(:,:,:)+nc2{varn2, 1}(:,:,:));

tem1 = squeeze(mean(tem1(ind1,:,:)));
tem2 = squeeze(mean(tem2(ind2,:,:)));
tem2 = rot90(rot90(tem2));

spback(1);
  gcont(tem1, 2, 1);
  dc2(lm1a, 0.5, -1000);
  color_shade(tem1, 5, 0.7*[1 1 1]);
  set(gca, 'fontsize', 9);
  title([tit1 ':  ' varn], 'fontsize', 10);
  xlabel(['Contour interval:  2 mm day^-^1, Shading > 5 mm day^-^1'], ...
	  'fontsize', 10);
spback(2);
  gcont(tem2, 2, 1);
  dc2(lm2a, 0.5, -1000);
  color_shade(tem2, 5, 0.7*[1 1 1]);
  set(gca, 'fontsize', 9);
  title([tit2 ':  ' varn], 'fontsize', 10);
  xlabel(['Contour interval:  2 mm day^-^1, Shading > 5 mm day^-^1'], ...
	  'fontsize', 10);
spback(3);
  gcont(tem2-tem1, 2, 0);
  dc2(lm2a, 0.5, -1000);
  color_shade(abs(tem2-tem1), 5, 0.7*[1 1 1]);
  set(gca, 'fontsize', 9);
  title([tit2 '-' tit1 ':  ' varn], 'fontsize', 10);
  xlabel(['Contour interval:  2 mm day^-^1, Shading > 5 mm day^-^1'], ...
	  'fontsize', 10);

cd /home/disk/tao/dvimont/matlab/CCM/Htrea/Figs_sum
%print -dps2 Precip.ps

%  Surface winds
temps1 = squeeze(mean(ps1(ind1,:,:)));
temps2 = squeeze(mean(ps2(ind2,:,:)));

varn1 = 'U'; varn2 = 'V';
tem1 = nc1{varn1, 1}(:,:,:,:);
tem2 = nc1{varn2, 1}(:,:,:,:);
tem1 = squeeze(mean(tem1(ind1,:,:,:)));
tem2 = squeeze(mean(tem2(ind1,:,:,:)));
temu1 = atlev(tem1, 925, temps1, hyam, hybm, P0);
temv1 = atlev(tem2, 925, temps1, hyam, hybm, P0);

tem1 = nc2{varn1, 1}(:,:,:,:);
tem2 = nc2{varn2, 1}(:,:,:,:);
tem1 = squeeze(mean(tem1(ind2,:,:,:)));
tem2 = squeeze(mean(tem2(ind2,:,:,:)));
temu2 = atlev(tem1, 925, temps2, hyam, hybm, P0);
temv2 = atlev(tem2, 925, temps2, hyam, hybm, P0);
temu2 = -rot90(rot90(temu2));
temv2 = -rot90(rot90(temv2));

figure(4); fo(1); clf;
spback(1);
  gquiv(temu1, temv1, -20, 1, 'm s^-^1');
  dc2(lm1a, 0.5, -1000);
  color_shade(sqrt(temu1.^2+temv1.^2), 10, 0.7*[1 1 1]);
  set(gca, 'fontsize', 9);
  title([tit1 ':  925 mb (' varn1 ',' varn2 ')'], 'fontsize', 10);
  xl = get(gca, 'xlabel'); xl = get(xl, 'string');
  xlabel([xl ', Shading > 10 m s^-^1'], ...
	  'fontsize', 10);
spback(2);
  gquiv(temu2, temv2, -20, 1, 'm s^-^1');
  dc2(lm2a, 0.5, -1000);
  color_shade(sqrt(temu2.^2+temv2.^2), 10, 0.7*[1 1 1]);
  set(gca, 'fontsize', 9);
  title([tit2 ':  925 mb (' varn1 ',' varn2 ')'], 'fontsize', 10);
  xl = get(gca, 'xlabel'); xl = get(xl, 'string');
  xlabel([xl ', Shading > 10 m s^-^1'], ...
	  'fontsize', 10);

cd /home/disk/tao/dvimont/matlab/CCM/Htrea/Figs_sum
%print -dps2 U_V_925mb.ps

colormap default;

%  500mb winds
temps1 = squeeze(mean(ps1(ind1,:,:)));
temps2 = squeeze(mean(ps2(ind2,:,:)));

varn1 = 'U'; varn2 = 'V';
tem1 = nc1{varn1, 1}(:,:,:,:);
tem2 = nc1{varn2, 1}(:,:,:,:);
tem1 = squeeze(mean(tem1(ind1,:,:,:)));
tem2 = squeeze(mean(tem2(ind1,:,:,:)));
temu1 = atlev(tem1, 500, temps1, hyam, hybm, P0);
temv1 = atlev(tem2, 500, temps1, hyam, hybm, P0);

tem1 = nc2{varn1, 1}(:,:,:,:);
tem2 = nc2{varn2, 1}(:,:,:,:);
tem1 = squeeze(mean(tem1(ind2,:,:,:)));
tem2 = squeeze(mean(tem2(ind2,:,:,:)));
temu2 = atlev(tem1, 500, temps2, hyam, hybm, P0);
temv2 = atlev(tem2, 500, temps2, hyam, hybm, P0);
temu2 = -rot90(rot90(temu2));
temv2 = -rot90(rot90(temv2));

figure(4); fo(1); clf;
spback(1);
  gquiv(temu1, temv1, -40, 1, 'm s^-^1');
  dc2(lm1a, 0.5, -1000);
  color_shade(sqrt(temu1.^2+temv1.^2), 20, 0.7*[1 1 1]);
  set(gca, 'fontsize', 9);
  title([tit1 ':  500 mb (' varn1 ',' varn2 ')'], 'fontsize', 10);
  xl = get(gca, 'xlabel'); xl = get(xl, 'string');
  xlabel([xl ', Shading > 10 m s^-^1'], ...
	  'fontsize', 10);
spback(2);
  gquiv(temu2, temv2, -40, 1, 'm s^-^1');
  dc2(lm2a, 0.5, -1000);
  color_shade(sqrt(temu2.^2+temv2.^2), 20, 0.7*[1 1 1]);
  set(gca, 'fontsize', 9);
  title([tit2 ':  500 mb (' varn1 ',' varn2 ')'], 'fontsize', 10);
  xl = get(gca, 'xlabel'); xl = get(xl, 'string');
  xlabel([xl ', Shading > 10 m s^-^1'], ...
	  'fontsize', 10);

cd /home/disk/tao/dvimont/matlab/CCM/Htrea/Figs_sum
%print -dps2 U_V_500mb.ps

colormap default;

%  250mb winds
temps1 = squeeze(mean(ps1(ind1,:,:)));
temps2 = squeeze(mean(ps2(ind2,:,:)));

varn1 = 'U'; varn2 = 'V';
tem1 = nc1{varn1, 1}(:,:,:,:);
tem2 = nc1{varn2, 1}(:,:,:,:);
tem1 = squeeze(mean(tem1(ind1,:,:,:)));
tem2 = squeeze(mean(tem2(ind1,:,:,:)));
temu1 = atlev(tem1, 250, temps1, hyam, hybm, P0);
temv1 = atlev(tem2, 250, temps1, hyam, hybm, P0);

tem1 = nc2{varn1, 1}(:,:,:,:);
tem2 = nc2{varn2, 1}(:,:,:,:);
tem1 = squeeze(mean(tem1(ind2,:,:,:)));
tem2 = squeeze(mean(tem2(ind2,:,:,:)));
temu2 = atlev(tem1, 250, temps2, hyam, hybm, P0);
temv2 = atlev(tem2, 250, temps2, hyam, hybm, P0);
temu2 = -rot90(rot90(temu2));
temv2 = -rot90(rot90(temv2));

figure(4); fo(1); clf;
spback(1);
  gquiv(temu1, temv1, -60, 1, 'm s^-^1');
  dc2(lm1a, 0.5, -1000);
  color_shade(sqrt(temu1.^2+temv1.^2), 30, 0.7*[1 1 1]);
  set(gca, 'fontsize', 9);
  title([tit1 ':  250 mb (' varn1 ',' varn2 ')'], 'fontsize', 10);
  xl = get(gca, 'xlabel'); xl = get(xl, 'string');
  xlabel([xl ', Shading > 10 m s^-^1'], ...
	  'fontsize', 10);
spback(2);
  gquiv(temu2, temv2, -60, 1, 'm s^-^1');
  dc2(lm2a, 0.5, -1000);
  color_shade(sqrt(temu2.^2+temv2.^2), 30, 0.7*[1 1 1]);
  set(gca, 'fontsize', 9);
  title([tit2 ':  250 mb (' varn1 ',' varn2 ')'], 'fontsize', 10);
  xl = get(gca, 'xlabel'); xl = get(xl, 'string');
  xlabel([xl ', Shading > 10 m s^-^1'], ...
	  'fontsize', 10);

cd /home/disk/tao/dvimont/matlab/CCM/Htrea/Figs_sum
%print -dps2 U_V_250mb.ps

colormap default;

%  SLP
varn = 'PSL';
tem1 = nc1{varn, 1}(:,:,:);
tem2 = nc2{varn, 1}(:,:,:);

tem1 = squeeze(mean(tem1(ind1,:,:)));
tem2 = squeeze(mean(tem2(ind2,:,:)));
tem2 = rot90(rot90(tem2));

spback(1); cla;
  [h, c]=gcont(0.01*tem1, 5, 1);
  cl = clabel(c, h, 'manual'); set(cl, 'fontsize', 8);
  dc2(lm1a, 0.5, -1000);
  set(gca, 'fontsize', 9);
  title([tit1 ':  ' varn], 'fontsize', 10);
  xlabel(['Contour interval:  5 hPa'], ...
	  'fontsize', 10);
spback(2);
  [h, c]=gcont(0.01*tem2, 5, 1);
  cl = clabel(c, h, 'manual'); set(cl, 'fontsize', 8);
  dc2(lm2a, 0.5, -1000);
  set(gca, 'fontsize', 9);
  title([tit2 ':  ' varn], 'fontsize', 10);
  xlabel(['Contour interval:  5 hPa'], ...
	  'fontsize', 10);
spback(3);
  gcont(0.01*(tem2-tem1), 2.5, 0);
  dc2(lm2a, 0.5, -1000);
  color_shade(0.01*abs(tem2-tem1), 10, 0.7*[1 1 1]);
  set(gca, 'fontsize', 9);
  title([tit2 '-' tit1 ':  ' varn], 'fontsize', 10);
  xlabel(['Contour interval:  2.5 hPa, Shading > 10 hPa'], ...
	  'fontsize', 10);

cd /home/disk/tao/dvimont/matlab/CCM/Htrea/Figs_sum
%print -dps2 PSL.ps

%  500mb height
temps1 = squeeze(mean(ps1(ind1,:,:)));
temps2 = squeeze(mean(ps2(ind2,:,:)));

varn = 'Z3';

tem1 = nc1{varn, 1}(:,:,:,:);
tem1 = squeeze(mean(tem1(ind1,:,:,:)));
tem1 = atlev(tem1, 500, temps1, hyam, hybm, P0);

tem2 = nc2{varn, 1}(:,:,:,:);
tem2 = squeeze(mean(tem2(ind2,:,:,:)));
tem2 = atlev(tem2, 500, temps2, hyam, hybm, P0);
tem2 = rot90(rot90(tem2));

spback(1); cla;
  [h, c]=gcont(tem1, 75, 1);
  cl = clabel(c, h, 'manual'); set(cl, 'fontsize', 8);
  dc2(lm1a, 0.5, -1000);
  set(gca, 'fontsize', 9);
  title([tit1 ':  500 hPa ' varn], 'fontsize', 10);
  xlabel(['Contour interval:  75 m'], ...
	  'fontsize', 10);
spback(2); cla;
  [h, c]=gcont(tem2, 75, 1);
  cl = clabel(c, h, 'manual'); set(cl, 'fontsize', 8);
  dc2(lm2a, 0.5, -1000);
  set(gca, 'fontsize', 9);
  title([tit2 ':  500 hPa ' varn], 'fontsize', 10);
  xlabel(['Contour interval:  75 m'], ...
	  'fontsize', 10);
spback(3); cla;
  [h, c]=gcont((tem2-tem1), 30, 0);
%  cl = clabel(c, h, 'manual'); set(cl, 'fontsize', 8);
  dc2(lm2a, 0.5, -1000);
%  color_shade(abs(tem2-tem1), 50, 0.7*[1 1 1]);
  set(gca, 'fontsize', 9);
  title([tit2 '-' tit1 ':  500 hPa ' varn], 'fontsize', 10);
  xlabel(['Contour interval:  30 m'], ...
	  'fontsize', 10);

cd /home/disk/tao/dvimont/matlab/CCM/Htrea/Figs_sum
%print -dps2 Z3_500mb.ps

%  250mb height
temps1 = squeeze(mean(ps1(ind1,:,:)));
temps2 = squeeze(mean(ps2(ind2,:,:)));

varn1 = 'Z3';

tem1 = nc1{varn1, 1}(:,:,:,:);
tem1 = squeeze(mean(tem1(ind1,:,:,:)));
tem1 = atlev(tem1, 250, temps1, hyam, hybm, P0);

tem2 = nc2{varn1, 1}(:,:,:,:);
tem2 = squeeze(mean(tem2(ind2,:,:,:)));
tem2 = atlev(tem2, 250, temps2, hyam, hybm, P0);
tem2 = rot90(rot90(tem2));

spback(1); cla;
  [h, c]=gcont(tem1, 150, 1);
  cl = clabel(c, h, 'manual'); set(cl, 'fontsize', 8);
  dc2(lm1a, 0.5, -1000);
  set(gca, 'fontsize', 9);
  title([tit1 ':  250 hPa ' varn], 'fontsize', 10);
  xlabel(['Contour interval:  150 m'], ...
	  'fontsize', 10);
spback(2); cla;
  [h, c]=gcont(tem2, 150, 1);
  cl = clabel(c, h, 'manual'); set(cl, 'fontsize', 8);
  dc2(lm2a, 0.5, -1000);
  set(gca, 'fontsize', 9);
  title([tit2 ':  250 hPa ' varn], 'fontsize', 10);
  xlabel(['Contour interval:  150 m'], ...
	  'fontsize', 10);
spback(3); cla;
  [h, c]=gcont((tem2-tem1), 50, 0);
%  cl = clabel(c, h, 'manual'); set(cl, 'fontsize', 8);
  dc2(lm2a, 0.5, -1000);
%  color_shade(abs(tem2-tem1), 50, 0.7*[1 1 1]);
  set(gca, 'fontsize', 9);
  title([tit2 '-' tit1 ':  250 hPa ' varn], 'fontsize', 10);
  xlabel(['Contour interval:  50 m'], ...
	  'fontsize', 10);

cd /home/disk/tao/dvimont/matlab/CCM/Htrea/Figs_sum
%print -dps2 Z3_250mb.ps

%  250mb height Stationary waves
temps1 = squeeze(mean(ps1(ind1,:,:)));
temps2 = squeeze(mean(ps2(ind2,:,:)));

varn1 = 'Z3';

tem1 = nc1{varn1, 1}(:,:,:,:);
tem1 = squeeze(mean(tem1(ind1,:,:,:)));
tem1 = atlev(tem1, 250, temps1, hyam, hybm, P0);

tem2 = nc2{varn1, 1}(:,:,:,:);
tem2 = squeeze(mean(tem2(ind2,:,:,:)));
tem2 = atlev(tem2, 250, temps2, hyam, hybm, P0);
tem2 = rot90(rot90(tem2));

tem1 = tem1 - mean(tem1, 2) * ones(1, size(tem1, 1));
tem2 = tem2 - mean(tem2, 2) * ones(1, size(tem2, 1));

figure(1); fo(1); clf;
spback(1);
  gcont(tem1, 30);
  dc2(lm1a, 0.5, -1000);
  set(gca, 'fontsize', 9);
  title([tit1 ':  250 hPa ' varn ' Stationary Waves'], 'fontsize', 10);
  xlabel(['Contour interval:  30 m'], ...
	  'fontsize', 10);
spback(2);
  gcont(tem2, 30);
  dc2(lm2a, 0.5, -1000);
  set(gca, 'fontsize', 9);
  title([tit2 ':  250 hPa ' varn ' Stationary Waves'], 'fontsize', 10);
  xlabel(['Contour interval:  30 m'], ...
	  'fontsize', 10);
spback(3);
  gcont(tem2-tem1, 30);
  dc2(lm2a, 0.5, -1000);
  set(gca, 'fontsize', 9);
  title([tit2 '-' tit1 ':  250 hPa ' varn ' Stationary Waves'], ...
	 'fontsize', 10);
  xlabel(['Contour interval:  30 m'], ...
	  'fontsize', 10);

cd /home/disk/tao/dvimont/matlab/CCM/Htrea/Figs_sum
%print -dps2 Z3_250mb_Stationary_Waves.ps

%  500mb zonal mean wind
temps1 = squeeze(mean(ps1(ind1,:,:)));
temps2 = squeeze(mean(ps2(ind2,:,:)));

varn1 = 'U';

tem1 = nc1{varn1, 1}(:,:,:,:);
tem1 = squeeze(mean(tem1(ind1,:,:,:)));
tem1 = atlev(tem1, 500, temps1, hyam, hybm, P0);

tem2 = nc2{varn1, 1}(:,:,:,:);
tem2 = squeeze(mean(tem2(ind2,:,:,:)));
tem2 = atlev(tem2, 500, temps2, hyam, hybm, P0);
tem2 = -rot90(rot90(tem2));

figure(1); fo(1); clf;
spback(1);
  gcont(tem1, 5);
  dc2(lm1a, 0.5, -1000);
  set(gca, 'fontsize', 9);
  title([tit1 ':  500 hPa ' varn1 'bar'], 'fontsize', 10);
  xlabel(['Contour interval:  5 m s^-^1'], ...
	  'fontsize', 10);
spback(2);
  gcont(tem2, 5);
  dc2(lm2a, 0.5, -1000);
  set(gca, 'fontsize', 9);
  title([tit2 ':  500 hPa ' varn1 'bar'], 'fontsize', 10);
  xlabel(['Contour interval:  5 m s^-^1'], ...
	  'fontsize', 10);
spback(3);
  gcont(-tem2-tem1, 2.5);
  dc2(lm2a, 0.5, -1000);
  set(gca, 'fontsize', 9);
  title(['-' tit2 '-' tit1 ':  500 hPa ' varn1 'bar'], ...
	 'fontsize', 10);
  xlabel(['Contour interval:  2.5 m s^-^1'], ...
	  'fontsize', 10);

cd /home/disk/tao/dvimont/matlab/CCM/Htrea/Figs_sum
%print -dps2 Ubar_500mb.ps

%  Vertically integrated water vapor
varn1 = 'Q';
levs = [1000:-50:50];

tem1 = nc1{varn1, 1}(:,:,:,:);
tem1 = squeeze(mean(tem1(ind1,:,:,:)));
tem1 = atlev(tem1, levs, temps1, hyam, hybm, P0);
tem1 = squeeze(sum(tem1));

tem2 = nc2{varn1, 1}(:,:,:,:);
tem2 = squeeze(mean(tem2(ind2,:,:,:)));
tem2 = atlev(tem2, levs, temps1, hyam, hybm, P0);
tem2 = squeeze(sum(tem2));
tem2 = rot90(rot90(tem2));

tem1 = tem1*95000/9.8;
tem2 = tem2*95000/9.8;

figure(1); fo(1); clf;
spback(1);
  [h, c] = gcont(tem1, 100);
  cl = clabel(c, h, 'manual'); set(cl, 'fontsize', 8);  
  dc2(lm1a, 0.5, -1000);
  set(gca, 'fontsize', 9);
  title([tit1 ':  Vertically Integrated ' varn1], 'fontsize', 10);
  xlabel(['Contour interval:  10 g kg^-^1'], ...
	  'fontsize', 10);
spback(2);
  [h, c] = gcont(1000*tem2, 10);
  cl = clabel(c, h, 'manual'); set(cl, 'fontsize', 8);  
  dc2(lm2a, 0.5, -1000);
  set(gca, 'fontsize', 9);
  title([tit2 ':  Vertically Integrated ' varn1], 'fontsize', 10);
  xlabel(['Contour interval:  10 g kg^-^1'], ...
	  'fontsize', 10);
spback(3);
  gcont(1000*(tem2-tem1), 5);
  dc2(lm2a, 0.5, -1000);
  set(gca, 'fontsize', 9);
  title([tit2 '-' tit1 ':  Vertically Integrated ' varn1], ...
	 'fontsize', 10);
  xlabel(['Contour interval:  10 g kg^-^1'], ...
	  'fontsize', 10);

cd /home/disk/tao/dvimont/matlab/CCM/Htrea/Figs_sum
%print -dps2 Z3_250mb_Stationary_Waves.ps

%  Geopotential height variance
temps1 = squeeze(mean(ps1(ind1,:,:)));
temps2 = squeeze(mean(ps2(ind2,:,:)));
lind = 500;

varn1 = 'Z3'; varn2 = 'Z3SQRD';
cd /home/disk/tao/dvimont/matlab/CCM/Htrea/data
load z3psqrd.mat; tem2 = z3psqrd; clear z3psqrdmon;
load z3psqrd_earth.mat; tem1 = z3psqrd; clear z3psqrdmon;

tem1 = squeeze(mean(tem1(ind1,:,:,:)));
tem1 = atlev(tem1, lind, temps1, hyam, hybm, P0);

tem2 = squeeze(mean(tem2(ind2,:,:,:)));
tem2 = atlev(tem2, lind, temps2, hyam, hybm, P0);
tem2 = rot90(rot90(tem2));

spback(1); cla;
  [h, c]=gcont(tem1, 1500, 1);
  cl = clabel(c, h, 'manual'); set(cl, 'fontsize', 8);
  dc2(lm1a, 0.5, -1000);
  set(gca, 'fontsize', 9);
  title([tit1 ':  250 hPa ' varn], 'fontsize', 10);
  xlabel(['Contour interval:  150 m'], ...
	  'fontsize', 10);
spback(2); cla;
  [h, c]=gcont(tem2, 2000, 1);
  cl = clabel(c, h, 'manual'); set(cl, 'fontsize', 8);
  dc2(lm2a, 0.5, -1000);
  set(gca, 'fontsize', 9);
  title([tit2 ':  250 hPa ' varn], 'fontsize', 10);
  xlabel(['Contour interval:  150 m'], ...
	  'fontsize', 10);
spback(3); cla;
  [h, c]=gcont((tem2-tem1), 50, 0);
%  cl = clabel(c, h, 'manual'); set(cl, 'fontsize', 8);
  dc2(lm2a, 0.5, -1000);
%  color_shade(abs(tem2-tem1), 50, 0.7*[1 1 1]);
  set(gca, 'fontsize', 9);
  title([tit2 '-' tit1 ':  250 hPa ' varn], 'fontsize', 10);
  xlabel(['Contour interval:  50 m'], ...
	  'fontsize', 10);

cd /home/disk/tao/dvimont/matlab/CCM/Htrea/Figs_sum
%print -dps2 Z3_250mb.ps

%  Transient Kinetic Energy
temps1 = squeeze(mean(ps1(ind1,:,:)));
temps2 = squeeze(mean(ps2(ind2,:,:)));
lind = 500;

varn1 = 'TKE'; varn2 = 'Z3SQRD';
cd /home/disk/tao/dvimont/matlab/CCM/Htrea/data
load ke_htrae.mat; tem2 = kep_ann;
load ke_earth.mat; tem1 = kep_ann;

tem1 = squeeze(mean(tem1(ind1,:,:,:)));
tem1 = atlev(tem1, lind, temps1, hyam, hybm, P0);

tem2 = squeeze(mean(tem2(ind2,:,:,:)));
tem2 = atlev(tem2, lind, temps2, hyam, hybm, P0);
tem2 = rot90(rot90(tem2));

spback(1); cla;
  [h, c]=gcont(tem1, 25, 1);
  cl = clabel(c, h, 'manual'); set(cl, 'fontsize', 8);
  dc2(lm1a, 0.5, -1000);
  set(gca, 'fontsize', 9);
  title([tit1 ':  500mb Transient KE'], 'fontsize', 10);
  xlabel(['Contour interval:  25 m^2 s^-^2'], ...
	  'fontsize', 10);
spback(2); cla;
  [h, c]=gcont(tem2, 25, 1);
  cl = clabel(c, h, 'manual'); set(cl, 'fontsize', 8);
  dc2(lm2a, 0.5, -1000);
  set(gca, 'fontsize', 9);
  title([tit2 ':  500mb Transient KE'], 'fontsize', 10);
  xlabel(['Contour interval:  25 m^2 s^-^2'], ...
	  'fontsize', 10);
spback(3); cla;
  [h, c]=gcont((tem2-tem1), 25, 0);
%  cl = clabel(c, h, 'manual'); set(cl, 'fontsize', 8);
  dc2(lm2a, 0.5, -1000);
%  color_shade(abs(tem2-tem1), 50, 0.7*[1 1 1]);
  set(gca, 'fontsize', 9);
  title([tit2 '-' tit1 ':  500mb Transient KE'], 'fontsize', 10);
  xlabel(['Contour interval:  25 m^2 s^-^2'], ...
	  'fontsize', 10);

cd /home/disk/tao/dvimont/matlab/CCM/Htrea/Figs_sum
%print -dps2 TKE_500mb.ps




%  Zonally averaged stuff:

%  Winds:

varn1 = 'U'; 
levs = [1000:-50:50];
cint = 5; cint2 = 0.5;

tem1 = nc1{varn1, 1}(:,:,:,:);
tem1 = squeeze(mean(tem1(ind1,:,:,:)));
tem1 = atlev(tem1, levs, temps1, hyam, hybm, P0);
tem1 = squeeze(mean2(shiftdim(tem1, 2)));
tem2 = nc2{varn1, 1}(:,:,:,:);
tem2 = squeeze(mean(tem2(ind2,:,:,:)));
tem2 = atlev(tem2, levs, temps2, hyam, hybm, P0);
tem2 = -fliplr(squeeze(mean2(shiftdim(tem2, 2))));

figure(1); fo(1); clf;
spback(1);
  pncont(lat, -log(levs), tem1, ...
	 [-200:cint:-cint cint:cint:200], 0, 'k');
  set(gca, 'XTick', -90:30:90, 'fontsize', 9);
  axis([-90 90 -log(1000) -log(50)]);
  yt = 1000:-100:100;
  ytl = ['1000'; '    '; '    '; '    '; '    '; 
	 ' 500'; '    '; '    '; '    '; ' 100'];
  set(gca, 'YTick', -log(yt), 'YTickLabel', ytl);
  title([tit1 ' zonal mean U'], 'fontsize', 10);
  xlabel(['Contour interval:  5 m s^-^1'], ...
	  'fontsize', 10);
spback(2);
  pncont(lat, -log(levs), tem2, ...
	 [-200:cint:-cint cint:cint:200], 0, 'k');
  set(gca, 'XTick', -90:30:90, 'fontsize', 9);
  axis([-90 90 -log(1000) -log(50)]);
  yt = 1000:-100:100;
  ytl = ['1000'; '    '; '    '; '    '; '    '; 
	 ' 500'; '    '; '    '; '    '; ' 100'];
  set(gca, 'YTick', -log(yt), 'YTickLabel', ytl);
  title([tit2 ' zonal mean U'], 'fontsize', 10);
  xlabel(['Contour interval:  5 m s^-^1'], ...
	  'fontsize', 10);
  
tem3 = -tem2 - tem1;
tem4 = 2*tem3./(tem1-tem2);
XAX = lat; YAX = -log(levs); FRAME = [-90 90 -log(1000) -log(50)];
spback(3);
  pncont(lat, -log(levs), tem3, ...
	 [-5:cint2:-cint2 cint2:cint2:5], 0, 'k');
  color_shade(abs(tem4), 0.1, 0.7*[1 1 1])
  set(gca, 'XTick', -90:30:90, 'fontsize', 9);
  axis([-90 90 -log(1000) -log(50)]);
  yt = 1000:-100:100;
  ytl = ['1000'; '    '; '    '; '    '; '    '; 
	 ' 500'; '    '; '    '; '    '; ' 100'];
  set(gca, 'YTick', -log(yt), 'YTickLabel', ytl);
  title(['-'tit2 '-' tit1 ' zonal mean U'], 'fontsize', 10);
  xlabel(['Contour interval:  0.5 m s^-^1, Shading > 10% of mean'], ...
	  'fontsize', 10);

cd /home/disk/tao/dvimont/matlab/CCM/Htrea/Figs_sum
%print -dps2 Zonal_mean_U.ps

%  Winds:

varn1 = 'AIRT'; 
levs = [1000:-50:50];
cint = 2; cint2 = 1;

tem1 = nc1{varn1, 1}(:,:,:,:);
std1 = squeeze(max(tem1) - min(tem1));
tem1 = squeeze(mean(tem1(ind1,:,:,:)));
tem1 = atlev(tem1, levs, temps1, hyam, hybm, P0);
std1 = atlev(std1, levs, temps1, hyam, hybm, P0);
tem1 = squeeze(mean2(shiftdim(tem1, 2)));
std1 = squeeze(mean2(shiftdim(std1, 2)));
tem2 = nc2{varn1, 1}(:,:,:,:);
std2 = squeeze(max(tem2) - min(tem2));
tem2 = squeeze(mean(tem2(ind2,:,:,:)));
tem2 = atlev(tem2, levs, temps2, hyam, hybm, P0);
std2 = atlev(std2, levs, temps1, hyam, hybm, P0);
tem2 = fliplr(squeeze(mean2(shiftdim(tem2, 2))));
std2 = fliplr(squeeze(mean2(shiftdim(std2, 2))));

figure(1); fo(1); clf;
spback(1);
  [h, c] = pncont(lat, -log(levs), 0.5*(std1+std2), ...
	 [0:cint:55], 0, 'k');
  cl = clabel(c, h, 'manual'); set(cl, 'fontsize', 8);
  set(gca, 'XTick', -90:30:90, 'fontsize', 9);
  axis([-90 90 -log(1000) -log(50)]);
  yt = 1000:-100:100;
  ytl = ['1000'; '    '; '    '; '    '; '    '; 
	 ' 500'; '    '; '    '; '    '; ' 100'];
  set(gca, 'YTick', -log(yt), 'YTickLabel', ytl);
  title(['MEAN(' tit1 ' & ' tit2 ') zonal mean AIRT annual cycle'], ...
	'fontsize', 10);
  xlabel(['Contour interval:  ' num2str(cint) ' \circC'], ...
	  'fontsize', 10);
spback(2);
  [h, c] = pncont(lat, -log(levs), tem2-tem1, ...
	 [-30:cint2:30], 0, 'k');
%  cl = clabel(c, h, 'manual'); set(cl, 'fontsize', 8);
  set(gca, 'XTick', -90:30:90, 'fontsize', 9);
  axis([-90 90 -log(1000) -log(50)]);
  yt = 1000:-100:100;
  ytl = ['1000'; '    '; '    '; '    '; '    '; 
	 ' 500'; '    '; '    '; '    '; ' 100'];
  set(gca, 'YTick', -log(yt), 'YTickLabel', ytl);
  title([tit2 ' - ' tit1 ' zonal mean AIRT'], ...
	'fontsize', 10);
  xlabel(['Contour interval:  ' num2str(cint2) ' \circC'], ...
	  'fontsize', 10);
  
tem3 = tem2 - tem1;
tem4 = 2*tem3./(std1+std2);
XAX = lat; YAX = -log(levs); FRAME = [-90 90 -log(1000) -log(50)];
spback(3);
  pncont(lat, -log(levs), tem4, ...
	 [-1:.05:1], 0, 'k');
  set(gca, 'XTick', -90:30:90, 'fontsize', 9);
  axis([-90 90 -log(1000) -log(50)]);
  yt = 1000:-100:100;
  ytl = ['1000'; '    '; '    '; '    '; '    '; 
	 ' 500'; '    '; '    '; '    '; ' 100'];
  set(gca, 'YTick', -log(yt), 'YTickLabel', ytl);
  title([tit2 '-' tit1 ':  % of annual cycle'], 'fontsize', 10);
  xlabel(['Contour interval:  5%'], ...
	  'fontsize', 10);

cd /home/disk/tao/dvimont/matlab/CCM/Htrea/Figs_sum
%print -dps2 Zonal_mean_AIRT.ps

%  Winds:

varn1 = 'Q'; 
levs = [1000:-50:50];
cint = 5; cint2 = 0.5;

tem1 = nc1{varn1, 1}(:,:,:,:);
tem1 = squeeze(mean(tem1(ind1,:,:,:)));
tem1 = atlev(tem2, levs, temps2, hyam, hybm, P0);
tem1 = squeeze(mean2(shiftdim(tem1, 2)));
tem2 = nc2{varn1, 1}(:,:,:,:);
tem2 = squeeze(mean(tem2(ind2,:,:,:)));
tem2 = atlev(tem2, levs, temps2, hyam, hybm, P0);
tem2 = fliplr(squeeze(mean2(shiftdim(tem2, 2))));

figure(1); fo(1); clf;
spback(1);
  pncont(lat, -log(levs), tem1, ...
	 [-200:cint:-cint cint:cint:200], 0, 'k');
  set(gca, 'XTick', -90:30:90, 'fontsize', 9);
  axis([-90 90 -log(1000) -log(50)]);
  yt = 1000:-100:100;
  ytl = ['1000'; '    '; '    '; '    '; '    '; 
	 ' 500'; '    '; '    '; '    '; ' 100'];
  set(gca, 'YTick', -log(yt), 'YTickLabel', ytl);
  title([tit1 ' zonal mean U'], 'fontsize', 10);
  xlabel(['Contour interval:  5 m s^-^1'], ...
	  'fontsize', 10);
spback(2);
  pncont(lat, -log(levs), tem2, ...
	 [-200:cint:-cint cint:cint:200], 0, 'k');
  set(gca, 'XTick', -90:30:90, 'fontsize', 9);
  axis([-90 90 -log(1000) -log(50)]);
  yt = 1000:-100:100;
  ytl = ['1000'; '    '; '    '; '    '; '    '; 
	 ' 500'; '    '; '    '; '    '; ' 100'];
  set(gca, 'YTick', -log(yt), 'YTickLabel', ytl);
  title([tit2 ' zonal mean U'], 'fontsize', 10);
  xlabel(['Contour interval:  5 m s^-^1'], ...
	  'fontsize', 10);
  
tem3 = -tem2 - tem1;
tem4 = 2*tem3./(tem1-tem2);
XAX = lat; YAX = -log(levs); FRAME = [-90 90 -log(1000) -log(50)];
spback(3);
  pncont(lat, -log(levs), tem3, ...
	 [-5:cint2:-cint2 cint2:cint2:5], 0, 'k');
  color_shade(abs(tem4), 0.1, 0.7*[1 1 1])
  set(gca, 'XTick', -90:30:90, 'fontsize', 9);
  axis([-90 90 -log(1000) -log(50)]);
  yt = 1000:-100:100;
  ytl = ['1000'; '    '; '    '; '    '; '    '; 
	 ' 500'; '    '; '    '; '    '; ' 100'];
  set(gca, 'YTick', -log(yt), 'YTickLabel', ytl);
  title(['-'tit2 '-' tit1 ' zonal mean U'], 'fontsize', 10);
  xlabel(['Contour interval:  0.5 m s^-^1, Shading > 10% of mean'], ...
	  'fontsize', 10);

cd /home/disk/tao/dvimont/matlab/CCM/Htrea/Figs_sum
%print -dps2 Zonal_mean_U.ps