Documentation of MIX_regressions


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


Help text

load SH_MIX_slpx_DYN_ATM_pslpx_RAW.mat; dofilt = 0;

Cross-Reference Information

This script calls

Listing of script MIX_regressions


clean
cd ~/Papers/mlcsiro/matlab/Data2
load SH_MIX_slpx_DYN_ATM_pslpx_LP9.mat; dofilt = 1;

lims = [89 306 -80 80];
cd /home/disk/hayes2/dvimont/csiro/matlab_data/Heat_Content
load ML_ANN_slp.mat
load ML_ANN_sst.mat
load taux_ML_annave.mat
load prec_ML_annave.mat

[xk, yk] = keep_var(lims, lon, lat);
slp = slp(:, yk, xk);
sst = sst2(:, yk, xk);
tx = txann(:, yk, xk);
prec = prec(:, yk, xk);
lon = lon(xk); lat = lat(yk);

slp = detrend(slp); 
sst = detrend(sst);
tx = detrend(tx);
prec = detrend(prec);

if dofilt
  [b, a] = butter(9, 2/9);
  slp = filtfilt(b, a, slp);
  sst = filtfilt(b, a, sst);
  tx = filtfilt(b, a, tx);
  prec = filtfilt(b, a, prec);
end

[pat1, c1] = regress_eof(slp, slpx(:,1), 0);
[pat2, c2] = regress_eof(tx, slpx(:,1), 0);
[pat3, c3] = regress_eof(sst, slpx(:,1), 0);
[pat4, c4] = regress_eof(prec, slpx(:,1), 0);

%  Do the same for the DYN run
slp = getflx('psl', lims, 101:1000);
sst = getnc('temp', lims, 1, 101:1000);
taux = getnc('taux', lims, 1, 101:1000);
prec = getflx('rnd', lims, 101:1000);

[lat1, lon1, tem, lm] = getll('temp', lims);
[lat2, lon2] = getll('taux', lims);

slp = detrend(slp); 
sst = detrend(sst);
tx = detrend(tx);
prec = detrend(prec);

if dofilt
  [b, a] = butter(9, 2/9);
  slp = filtfilt(b, a, slp);
  sst = filtfilt(b, a, sst);
  taux = filtfilt(b, a, taux);
  prec = filtfilt(b, a, prec);
end

[pat1b, c1b] = regress_eof(slp, pslpxd(:,1), 0);
[pat2b, c2b] = regress_eof(taux, pslpxd(:,1), 0);
[pat3b, c3b] = regress_eof(sst, pslpxd(:,1), 0);
[pat4b, c4b] = regress_eof(prec, pslpxd(:,1), 0);

cd ~/Papers/mlcsiro/matlab/Data2
save SH_MIX_reg_slpx_LP9.mat pat1 pat2 pat3 pat4 c1 c2 c3 c4 lims ...
    lat lon lm
save SH_DYN_reg_slpx_LP9.mat pat1b pat2b pat3b pat4b ...
    c1b c2b c3b c4b lims lat1 lon1 lat2 lon2



%  Plot the data
clean

cd ~/Papers/mlcsiro/matlab/Data2
load SH_MIX_reg_slpx_RAW.mat
load SH_DYN_reg_slpx_RAW.mat
for i = 1:4;
  eval(['pat' num2str(i) ' = -pat' num2str(i) ';']);
  eval(['pat' num2str(i) 'b = -pat' num2str(i) 'b;']);
end
cint = [0.25 0.025 0.075 0.075];

cd ~/Papers/mlcsiro/matlab/Data2
load SH_MIX_reg_slpx_LP9.mat
load SH_DYN_reg_slpx_LP9.mat
cint = [0.15 0.015 0.05 0.075];

default_global;  FRAME = [95 300 -75 75];
figure(1); fo(1); clf;
sz = get(gcf, 'PaperSize');
hw = 1/sz(1); vw = 1/sz(2); hsz = hw*(2.5); vsz = vw*1.8;
bmarg = (sz(2) - 8.5)*0.5; tmarg = (sz(2) - 8.5)*0.5;
mid = 0.45;

[tem, tem, tem, lm] = getll('temp', lims);

global GRDX_SPACING GRDY_SPACING
GRDX_SPACING = 45; GRDY_SPACING = 20;


% MIX run
subplot('position', [0.5-hsz-0.04 ...
		    vw*(sz(2)-tmarg)-vsz hsz vsz]);
  gcont(pat1, cint(1));
  dc2(lm, 0.3, -1000);
  color_shade(squeeze(c1.^2), 0.25, 0.7*[1 1 1])
  set(gca, 'fontsize', 8);
  t1 = title(['< MIX-SLP, SLP >']);
  set(t1, 'units', 'normalized', 'HorizontalAlignment', 'left', ...
      'VerticalAlignment', 'bottom', 'fontsize', 9);
  pos2 = get(t1, 'position');
  set(t1, 'position', [0 pos2(2)-0.01 0]);
  tx1 = text(mean(FRAME(1:2)), 110, 'SH LP9:  MIX');
  set(tx1, 'fontsize', 10, 'HorizontalAlignment', 'center');

subplot('position', [0.5-hsz-0.04 ...
		    vw*(sz(2)-tmarg-mid)-2*vsz hsz vsz]);
  gcont(10*pat2, cint(2));
  dc2(lm, 0.3, 1000);
  color_shade(squeeze(c2.^2), 0.25, 0.7*[1 1 1])
  set(gca, 'fontsize', 8);
  t1 = title(['< MIX-SLP, TAUX >']);
  set(t1, 'units', 'normalized', 'HorizontalAlignment', 'left', ...
      'VerticalAlignment', 'bottom', 'fontsize', 9);
  pos2 = get(t1, 'position');
  set(t1, 'position', [0 pos2(2)-0.01 0]);

subplot('position', [0.5-hsz-0.04 ...
		    vw*(sz(2)-tmarg-2*mid)-3*vsz hsz vsz]);
  gcont(pat3, cint(3));
  dc2(lm, 0.3, 1000);
  color_shade(squeeze(c3.^2), 0.25, 0.7*[1 1 1])
  set(gca, 'fontsize', 8);
  t1 = title(['< MIX-SLP, SST >']);
  set(t1, 'units', 'normalized', 'HorizontalAlignment', 'left', ...
      'VerticalAlignment', 'bottom', 'fontsize', 9);
  pos2 = get(t1, 'position');
  set(t1, 'position', [0 pos2(2)-0.01 0]);

subplot('position', [0.5-hsz-0.04 ...
		    vw*(sz(2)-tmarg-3*mid)-4*vsz hsz vsz]);
  gcont(pat4, cint(4));
  dc2(lm, 0.3, -1000);
  color_shade(squeeze(c4.^2), 0.25, 0.7*[1 1 1])
  set(gca, 'fontsize', 8);
  t1 = title(['< MIX-SLP, PREC >']);
  set(t1, 'units', 'normalized', 'HorizontalAlignment', 'left', ...
      'VerticalAlignment', 'bottom', 'fontsize', 9);
  pos2 = get(t1, 'position');
  set(t1, 'position', [0 pos2(2)-0.01 0]);

%  DYN run
XAX = lon1; YAX = lat1;
subplot('position', [0.5+0.04 ...
		    vw*(sz(2)-tmarg)-vsz hsz vsz]);
  gcont(pat1b, cint(1));
  dc2(lm, 0.3, -1000);
  color_shade(squeeze(c1b.^2), 0.25, 0.7*[1 1 1])
  set(gca, 'fontsize', 8);
  t1 = title(['< DYN-SLP, SLP >']);
  set(t1, 'units', 'normalized', 'HorizontalAlignment', 'left', ...
      'VerticalAlignment', 'bottom', 'fontsize', 9);
  pos2 = get(t1, 'position');
  set(t1, 'position', [0 pos2(2)-0.01 0]);
  tx1 = text(mean(FRAME(1:2)), 110, 'SH LP9:  DYN');
  set(tx1, 'fontsize', 10, 'HorizontalAlignment', 'center');

subplot('position', [0.5+0.04 ...
		    vw*(sz(2)-tmarg-mid)-2*vsz hsz vsz]);
  XAX = lon2; YAX = lat2;
  gcont(pat2b, cint(2));
  XAX = lon1; YAX = lat1;
  dc2(lm, 0.3, 1000);
  XAX = lon2; YAX = lat2;
  color_shade(squeeze(c2b.^2), 0.25, 0.7*[1 1 1])
  set(gca, 'fontsize', 8);
  t1 = title(['< DYN-SLP, TAUX >']);
  set(t1, 'units', 'normalized', 'HorizontalAlignment', 'left', ...
      'VerticalAlignment', 'bottom', 'fontsize', 9);
  pos2 = get(t1, 'position');
  set(t1, 'position', [0 pos2(2)-0.01 0]);

XAX = lon1; YAX = lat1;
subplot('position', [0.5+0.04 ...
		    vw*(sz(2)-tmarg-2*mid)-3*vsz hsz vsz]);
  gcont(pat3b, cint(3));
  dc2(lm, 0.3, 1000);
  color_shade(squeeze(c3b.^2), 0.25, 0.7*[1 1 1])
  set(gca, 'fontsize', 8);
  t1 = title(['< DYN-SLP, SST >']);
  set(t1, 'units', 'normalized', 'HorizontalAlignment', 'left', ...
      'VerticalAlignment', 'bottom', 'fontsize', 9);
  pos2 = get(t1, 'position');
  set(t1t1'position', [0 pos2(2)-0.01 0]);

subplot('position', [0.5+0.04 ...
		    vw*(sz(2)-tmarg-3*mid)-4*vsz hsz vsz]);
  gcont(pat4b, cint(4));
  dc2(lm, 0.3, -1000);
  color_shade(squeeze(c4b.^2), 0.25, 0.7*[1 1 1])
  set(gca, 'fontsize', 8);
  t1 = title(['< DYN-SLP, PREC >']);
  set(t1, 'units', 'normalized', 'HorizontalAlignment', 'left', ...
      'VerticalAlignment', 'bottom', 'fontsize', 9);
  pos2 = get(t1, 'position');
  set(t1, 'position', [0 pos2(2)-0.01 0]);

  

cd /home/disk/tao/dvimont/matlab/CSIRO/Tony/Figs_28June2000
print -dps2 SH_LP9_MIX_DYN_regressions.ps