Documentation of regress_flux


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


Help text

  print -dps2 HP10_Prec_Icon_lag0.ps

Cross-Reference Information

This script calls

Listing of script regress_flux


clear
cd /home/disk/tao/dvimont/matlab/CSIRO/Thesis/Data
load HP9_detrend_L1-7_EOF_yr101-1000.mat; pcs = -1*pcs;
lims = [-0.1 360 -90 90];
tim = 101:1000;
lags = [-3:3];
varn1= 'rnd';  tit1 = 'HP10:  Precipitation';  units1 = 'mm day^-^1 std^-^1';
varn2= 'ico';  tit2 = 'HP10:  Ice Concentration';  units2 = 'Percent std^-^1';
varn1= 'evp';  tit1 = 'HP10:  Latent Heat Flux';  units1 = 'W m^-^2 std^-^1';
varn2= 'hfl';  tit2 = 'HP10:  Sensible Heat Flux';  units2 = 'W m^-^2 std^-^1';
varn1= 'rgn';  tit1 = 'HP10:  Net Longwave';  units1 = 'W m^-^2 std^-^1';
varn2= 'sgn';  tit2 = 'HP10:  Net Shortwave';  units2 = 'W m^-^2 std^-^1';
[lat, lon, depth, lm] = getll('temp', lims);
var1 = getflx(varn1, lims, tim);
[var1r, ccoef1] = regress_eof(var1, pcs, lags);
var2 = getflx(varn2, lims, tim);
[var2r, ccoef2] = regress_eof(var2, pcs, lags);
default_global;  FRAME = [0 360 -90 90];
cint = 0.5; clev = [-15:cint:-cint cint:cint:15];
ind = find(lags == 0);
  subplot(2,1,1);
  gcont(1*var1r(ind,:,:), clev);
  dc;
  title([tit1 ':  Lag 0 Regression Map'])
  xlabel(['Contour Interval:  ' units1 ';  (Positive Downwards)'])
cint = 0.5; clev = [-15:cint:-cint cint:cint:15];
ind = find(lags == 0);
  subplot(2,1,2);
  gcont(-1*var2r(ind,:,:), clev);
  dc;
  title([tit2 ':  Lag 0 Regression Map'])
  xlabel(['Contour Interval:  ' units2 ';  (Positive Downwards)'])
cd /home/disk/tao/dvimont/matlab/CSIRO/Flux/Plots



default_global; 

FRAME = [0 360 -90 90];
cint = .05; clev = [-2:cint:-cint cint:cint:2];
subplot(2,1,1)
  gcont(-1*var1r, clev);
  dc
  title([tit1 ':  Lag 0 Regression Map'])
  xlabel(['Contour Interval:  ' num2str(cint) ' ' units1]);

FRAME = [0 360 40 90];
cint = 0.01; clev = [-1:cint:1];
subplot(2,2,3);
  mcont(-1*var2r, clev, 'stereo', [90 270]);
  title([tit2 ':  Years 101-1000']);
  xlabel(['Contour Interval:  ' num2str(100*cint) ' ' units2]);

FRAME = [0 360 -90 -40];
subplot(2,2,4);
  mcont(-1*var2r, clev, 'stereo', [-90 270]);
  setm(gca, 'FLatLimit', [40 90], 'MapLatLimit', [-40 -90]);
  title([tit2 ':  Lag 0 Regression Map'])
  xlabel(['Contour Interval:  ' num2str(100*cint) ' ' units2]);

cd /home/disk/tao/dvimont/matlab/CSIRO/Flux/Plots



%%%%%%%%%%%%%%%%% Plot lagged regressions


figure(1); figure_orient(1);

default_global;  FRAME = [105 300 -30 30];

cint = 0.05; clev = [-15:cint:-cint cint:cint:15];
for i = 1:7;
  subplot(7,2,2*i-1);
  gcont(-1*var1r(i,:,:), clev);
  dc2(lm);
  ylabel(['Lag = ' num2str(lags(i))]);
  if i == 7;
    xlabel(['Contour Interval:  ' num2str(cint) ' ' units1]);% ';  (Pos. Down)'])
  end
end
subplot(7,2,1)
  title([tit1])

default_global;  FRAME = [120 210 30 70];

cint = 0.01; clev = [-.15:cint:-cint cint:cint:.15];
for i = 1:7;
  subplot(7,2,2*i);
  gcont(-1*var2r(i,:,:), clev);
  dc2(lm);
  ylabel(['Lag = ' num2str(lags(i))]);
  if i == 7;
    xlabel(['Contour Interval:  ' num2str(100*cint) ' ' units2]);% ';  (Pos. Down)'])
  end
end
subplot(7,2,2)
  title([tit2])

cd /home/disk/tao/dvimont/matlab/CSIRO/Flux/Plots




%%%%%%%%%%%%%%%%% Plot lagged regressions


figure(1); figure_orient(1);

default_global;  FRAME = [105 300 -30 30];

cint = 0.05; clev = [-15:cint:-cint cint:cint:15];
for i = 1:6;
  subplot(6,2,2*i-1);
  gcont(-1*var1r(i,:,:), clev);
  dc2(lm);
  ylabel(['Lag = ' num2str(lags(i))]);
  if i == 6;
    xlabel(['Contour Interval:  ' num2str(cint) ' ' units1 ';  (Pos. Down)'])
  end
end
for i = 1:6;
  subplot(6,2,2*i);
  gcont(-1*var1r(i+6,:,:), clev);
  dc2(lm);
  ylabel(['Lag = ' num2str(lags(i+6))]);
  if i == 6;
    xlabel(['Contour Interval:  ' num2str(cint) ' ' units1 ';  (Pos. Down)'])
  end
end
subplot(6,2,1)
  title([tit1])
subplot(6,2,2)
  title([tit1])


figure(2); figure_orient(2);

default_global;  FRAME = [120 210 30 70];

cint = 0.01; clev = [-1:cint:-cint cint:cint:1];
%cint = 0.5; clev = [-15:cint:-cint cint:cint:15];
for i = 1:6;
  subplot(6,2,2*i-1);
  gcont(-1*var2r(i,:,:), clev);%, 'stereo', [90 180]);
  dc2(lm);
  ylabel(['Lag = ' num2str(lags(i))]);
  if i == 6;
    xlabel(['Contour Interval:  ' num2str(cint) ' ' units2 ';  (Pos. Down)'])
  end
end
for i = 1:6;
  subplot(6,2,2*i);
  gcont(-1*var2r(i+6,:,:), clev);%, 'stereo', [90 180]);
  dc2(lm);
  ylabel(['Lag = ' num2str(lags(i+6))]);
  if i == 6;
    xlabel(['Contour Interval:  ' num2str(100*cint) ' ' units2 ';  (Pos. Down)'])
  end
end
subplot(6,2,1)
  title([tit2])
subplot(6,2,2)
  title([tit2])

cd /home/disk/tao/dvimont/matlab/CSIRO/Flux/Plots