Documentation of check_pac_trop_vwnd


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


Help text

  Define regions, etc

Cross-Reference Information

This script calls

Listing of script check_pac_trop_vwnd


clean
cd /home/disk/tao/dvimont/Papers/obs/matlab/Data
load cti2.mat;
lims = [0 360 -90 90];
tim = 13:648;
yr = [(1949+1/24):1/12:(2001.99)];

%  Get time series
ct = ct2(tim);

ncep
limsatl = [360-35.625 5.625 -4.76 4.76];
%limspac = [180 138.75 -4.76 4.76];
limspac = [180 222 -5 5];
[vwnd1, lat1, lon1] = ...
    getnc2('vwnd10m.mon.mean.nc', 'vwnd', limspac, 1, tim);

cd /home/disk/tao/dvimont/matlab/NMC/Atlantic/Data
load V_timeseries.mat 

[ntim, nlat, nlon] = size(vwnd1);
tem = ones(2,nlat,nlon);
tem = cosweight(tem, lat1);
tem = cosweight(tem, lat1);
tem = sum(sum(squeeze(tem(1,:,:))));

vwnd1 = cosweight(vwnd1, lat1);
vwnd1 = cosweight(vwnd1, lat1);

vpac2 = squeeze(sum(sum(shiftdim(vwnd1, 1))))./tem;
[vpac2, vclim] = annave(vpac2);

%  Now, load data for regressions
ncep
[skt, lat, lon] = getnc2('skt.mon.mean.nc', 'skt', lims, 1, tim);
[skt, clim] = annave(skt);

skt = detrend(skt);
vpac = detrend(vpac);
ct = detrend(ct);

%  Round 1:
timeseries = vpac;
data = skt;

[rpat, cpat] = regress_eof(data, timeseries);

figure_tall(1); clf;
global_axes(6.5, 4, 0.5, 0.5, 1.5);

global_latlon(lat, lon, lims);
subplot2(1,1);
  map_axis('giso');
  map_contour_pn(cpat, 0.2, 'zeroline');
  hold on;
  hh = map_surface(cpat, -1);
  hold off;
  caxis([-1 1]*0.5);
  draw_landmap;
  tightmap; gridm on;
  setm(gca, 'plinelocation', 30, 'mlinelocation', 45, 'frame', 'off');
  colorbar2;
  t2 = title2('Correlation:  VPAC1, SKT', 'fontsize', 10);
  
global_axes(6.5, 1.5, 0.5, 0.5, 5.5+.5);
subplot2(1,1);
  plot(yr, standardize(timeseries), '-k', yr, standardize(ct), '--r');
  axis([1945 2005 -4 4]);
  grid on;
  legend('VPAC1', 'CTI');

cd /home/disk/tao/dvimont/matlab/NMC/Atlantic/Plots
print -painters -dpsc2 vpac1_corrmap.ps


%  Round 2:
timeseries = lin_remove(vpac, ct);
data = lin_remove(skt, ct);

[rpat, cpat] = regress_eof(data, timeseries);

figure_tall(2); clf;
global_axes(6.5, 4, 0.5, 0.5, 1.5);

global_latlon(lat, lon, lims);
subplot2(1,1);
  map_axis('giso');
  map_contour_pn(cpat, 0.2, 'zeroline');
  hold on;
  hh = map_surface(cpat, -1);
  hold off;
  caxis([-1 1]*0.5);
  draw_landmap;
  tightmap; gridm on;
  setm(gca, 'plinelocation', 30, 'mlinelocation', 45, 'frame', 'off');
  colorbar2;
  t2 = title2('Correlation:  VPAC1, SKT;  CTI linearly removed', ...
	      'fontsize', 10);
  bx = drawboxm(limspac);
  set(bx, 'linewidth', 2);
  
global_axes(6.5, 1.5, 0.5, 0.5, 5.5+.5);
subplot2(1,1);
  plot(yr, standardize(timeseries), '-k', yr, standardize(ct), '--r');
  axis([1945 2005 -4 4]);
  grid on;
  legend('VPAC1', 'CTI');

cd /home/disk/tao/dvimont/matlab/NMC/Atlantic/Plots
print -painters -dpsc2 vpac1_corrmap_noct.ps

%  Round 3:  Get rid of outliers
kp = find(abs(standardize(vpac)) < 3);
timeseries = lin_remove(vpac(kp), ct(kp));
data = lin_remove(skt(kp,:,:), ct(kp));

[rpat, cpat] = regress_eof(data, timeseries);

figure_tall(3); clf;
global_axes(6.5, 4, 0.5, 0.5, 1.5);

global_latlon(lat, lon, lims);
subplot2(1,1);
  map_axis('giso');
  map_contour_pn(cpat, 0.2, 'zeroline');
  hold on;
  hh = map_surface(cpat, -1);
  hold off;
  caxis([-1 1]*0.5);
  draw_landmap;
  tightmap; gridm on;
  setm(gca, 'plinelocation', 30, 'mlinelocation', 45, 'frame', 'off');
  colorbar2;
  t2 = title2(['Correlation:  VPAC1, SKT;  CTI linearly removed; ' ...
	       'Outliers removed'], ...
	      'fontsize', 10);
  bx = drawboxm(limspac);
  set(bx, 'linewidth', 2);
  
global_axes(6.5, 1.5, 0.5, 0.5, 5.5+.5);
subplot2(1,1);
  tem1 = NaN*yr; tem1(kp) = yr(kp);
  tem2 = NaN*vpac; tem2(kp) = standardize(vpac(kp));
  tem3 = NaN*ct; tem3(kp) = standardize(ct(kp));
  plot(tem1, tem2, '-k', ...
       tem1, tem3, '--r');
  axis([1945 2005 -4 4]);
  grid on;
  legend('VPAC3', 'CTI');

cd /home/disk/tao/dvimont/matlab/NMC/Atlantic/Plots
print -painters -dpsc2 vpac1_corrmap_noct2.ps



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  Now, do the same for OLR:
clean

cd /home/disk/tao/dvimont/Papers/obs/matlab/Data
load cti2.mat;

%  Define regions, etc
lims = [0 360 -90 90];
tim = (12*(1974-1948)+6):(12*(2001-1948)+12);
yr = [(1974+11/24):1/12:(2001.99)];
tim2 = 1:331;
limspac = [180 222 -5 5];

%  Get time series
ct = ct2(tim);

cd /home/disk/tao/dvimont/matlab/NMC/Atlantic/Data
load V_timeseries.mat 
vpac = vpac(tim-12);

%  Now, load data for regressions
cd /home/disk/tao/data/olr/interpolated
[olr, lat, lon] = getnc2('olrint.mon.mean.nc', 'olr', lims, 1, tim2);
[olr, clim] = annave(olr);

olr = detrend_NaN(olr);
vpac = detrend(vpac);
ct = detrend(ct);

kp = find(~isnan(olr(:,1,1)));
olr = olr(kp,:,:);
ct = ct(kp);
vpac = vpac(kp);

%  Round 1:
timeseries = vpac;
data = olr;

[rpat, cpat] = regress_eof(data, timeseries);

figure_tall(1); clf;
global_axes(6.5, 4, 0.5, 0.5, 1.5);

global_latlon(lat, lon, lims);
subplot2(1,1);
  map_axis('giso');
  map_contour_pn(cpat, 0.2, 'zeroline');
  hold on;
  hh = map_surface(cpat, -1);
  hold off;
  caxis([-1 1]);
  draw_landmap;
  tightmap; gridm on;
  setm(gca, 'plinelocation', 30, 'mlinelocation', 45, 'frame', 'off');
  colorbar2;
  t2 = title2('Correlation:  VPAC1, OLR', 'fontsize', 10);
  
global_axes(6.5, 1.5, 0.5, 0.5, 5.5+.5);
subplot2(1,1);
  tem = NaN*yr; tem(kp) = yr(kp);
  tem1 = NaN*yr; tem1(kp) = standardize(vpac);
  tem2 = NaN*yr; tem2(kp) = standardize(ct);
  plot(tem, tem1, '-k', tem, tem2, '--r');
  axis([1970 2005 -4 4]);
  grid on;
  legend('VPAC1', 'CTI');

cd /home/disk/tao/dvimont/matlab/NMC/Atlantic/Plots
print -painters -dpsc2 vpac1_olr_corrmap.ps


%  Round 2:
timeseries = lin_remove(vpac, ct);
data = lin_remove(olr, ct);

[rpat, cpat] = regress_eof(data, timeseries);

figure_tall(2); clf;
global_axes(6.5, 4, 0.5, 0.5, 1.5);

global_latlon(lat, lon, lims);
subplot2(1,1);
  map_axis('giso');
  map_contour_pn(cpat, 0.2, 'zeroline');
  hold on;
  hh = map_surface(cpat, -1);
  hold off;
  caxis([-1 1]);
  draw_landmap;
  tightmap; gridm on;
  setm(gca, 'plinelocation', 30, 'mlinelocation', 45, 'frame', 'off');
  colorbar2;
  t2 = title2('Correlation:  VPAC1, OLR;  CTI linearly removed', ...
	      'fontsize', 10);
  bx = drawboxm(limspac);
  set(bx, 'linewidth', 2);
  
global_axes(6.5, 1.5, 0.5, 0.5, 5.5+.5);
subplot2(1,1);
  tem = NaN*yr; tem(kp) = yr(kp);
  tem1 = NaN*yr; tem1(kp) = standardize(timeseries);
  tem2 = NaN*yr; tem2(kp) = standardize(ct);
  plot(tem, tem1, '-k', tem, tem2, '--r');
  axis([1970 2005 -4 4]);
  grid on;
  legend('VPAC2', 'CTI');

cd /home/disk/tao/dvimont/matlab/NMC/Atlantic/Plots
print -painters -dpsc2 vpac1_olr_corrmap_noct.ps

%  Round 3:  Get rid of outliers
kp2 = find(abs(standardize(vpac)) < 3);
timeseries = lin_remove(vpac(kp2), ct(kp2));
data = lin_remove(olr(kp2,:,:), ct(kp2));

[rpat, cpat] = regress_eof(data, timeseries);

figure_tall(3); clf;
global_axes(6.5, 4, 0.5, 0.5, 1.5);

global_latlon(lat, lon, lims);
subplot2(1,1);
  map_axis('giso');
  map_contour_pn(cpat, 0.2, 'zeroline');
  hold on;
  hh = map_surface(cpat, -1);
  hold off;
  caxis([-1 1]);
  draw_landmap;
  tightmap; gridm on;
  setm(gca, 'plinelocation', 30, 'mlinelocation', 45, 'frame', 'off');
  colorbar2;
  t2 = title2(['Correlation:  VPAC1, OLR;  CTI linearly removed; ' ...
	       'Outliers removed'], ...
	      'fontsize', 10);
  bx = drawboxm(limspac);
  set(bx, 'linewidth', 2);
  
global_axes(6.5, 1.5, 0.5, 0.5, 5.5+.5);
subplot2(1,1);
  kp3 = kp(kp2);
  tem1 = NaN*yr; tem1(kp3) = yr(kp3);
  tem2 = NaN*yr; tem2(kp3) = standardize(vpac(kp2));
  tem3 = NaN*yr; tem3(kp3) = standardize(ct(kp2));
  plot(tem1, tem2, '-k', ...
       tem1, tem3, '--r');
  axis([1970 2005 -4 4]);
  grid on;
  legend('VPAC3', 'CTI');

cd /home/disk/tao/dvimont/matlab/NMC/Atlantic/Plots
print -painters -dpsc2 vpac1_olr_corrmap_noct2.ps



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  Now, do the same for CMAP:
clean

cd /home/disk/tao/dvimont/Papers/obs/matlab/Data
load cti2.mat;

%  Define regions, etc
lims = [0 360 -90 90];
tim = (12*(1979-1948)+1):(12*(1999-1948)+12);
yr = [(1979+1/24):1/12:(1999.99)];
tim2 = 1:252;
limspac = [180 222 -5 5];

%  Get time series
ct = ct2(tim);

cd /home/disk/tao/dvimont/matlab/NMC/Atlantic/Data
load V_timeseries.mat 
vpac = vpac(tim-12);

%  Now, load data for regressions
cd /home/disk/tao/data/merged_precip/cmap
[olr, lat, lon] = ...
    getnc2('precipcmap.monthly.7999.nc', 'data', lims, 1, tim2);
[olr, clim] = annave(olr);

olr = detrend(olr);
vpac = detrend(vpac);
ct = detrend(ct);

%  Round 1:
timeseries = vpac;
data = olr;

[rpat, cpat] = regress_eof(data, timeseries);

figure_tall(1); clf;
global_axes(6.5, 4, 0.5, 0.5, 1.5);

global_latlon(lat, lon, lims);
subplot2(1,1);
  map_axis('giso');
  map_contour_pn(cpat, 0.2, 'zeroline');
  hold on;
  hh = map_surface(cpat, -1);
  hold off;
  caxis([-1 1]);
  draw_landmap;
  tightmap; gridm on;
  setm(gca, 'plinelocation', 30, 'mlinelocation', 45, 'frame', 'off');
  colorbar2;
  t2 = title2('Correlation:  VPAC1, CMAP', 'fontsize', 10);
  
global_axes(6.5, 1.5, 0.5, 0.5, 5.5+.5);
subplot2(1,1);
  tem = NaN*yr; tem = yr;
  tem1 = NaN*yr; tem1 = standardize(timeseries);
  tem2 = NaN*yr; tem2 = standardize(ct);
  plot(tem, tem1, '-k', tem, tem2, '--r');
  axis([1978 2001 -4 4]);
  grid on;
  legend('VPAC1', 'CTI');

cd /home/disk/tao/dvimont/matlab/NMC/Atlantic/Plots
print -painters -dpsc2 vpac1_cmap_corrmap.ps


%  Round 2:
timeseries = lin_remove(vpac, ct);
data = lin_remove(olr, ct);

[rpat, cpat] = regress_eof(data, timeseries);

figure_tall(2); clf;
global_axes(6.5, 4, 0.5, 0.5, 1.5);

global_latlon(lat, lon, lims);
subplot2(1,1);
  map_axis('giso');
  map_contour_pn(cpat, 0.2, 'zeroline');
  hold on;
  hh = map_surface(cpat, -1);
  hold off;
  caxis([-1 1]);
  draw_landmap;
  tightmap; gridm on;
  setm(gca, 'plinelocation', 30, 'mlinelocation', 45, 'frame', 'off');
  colorbar2;
  t2 = title2('Correlation:  VPAC1, CMAP;  CTI linearly removed', ...
	      'fontsize', 10);
  bx = drawboxm(limspac);
  set(bx, 'linewidth', 2);
  
global_axes(6.5, 1.5, 0.5, 0.5, 5.5+.5);
subplot2(1,1);
  tem = yr; tem1 = standardize(timeseries); tem2 = standardize(ct);
  plot(tem, tem1, '-k', tem, tem2, '--r');
  axis([1978 2001 -4 4]);
  grid on;
  legend('VPAC2', 'CTI');

cd /home/disk/tao/dvimont/matlab/NMC/Atlantic/Plots
print -painters -dpsc2 vpac1_cmap_corrmap_noct.ps

%  Round 3:  Get rid of outliers
kp = find(abs(standardize(vpac)) < 3);
timeseries = lin_remove(vpac(kp), ct(kp));
data = lin_remove(olr(kp,:,:), ct(kp));

[rpat, cpat] = regress_eof(data, timeseries);

figure_tall(3); clf;
global_axes(6.5, 4, 0.5, 0.5, 1.5);

global_latlon(lat, lon, lims);
subplot2(1,1);
  map_axis('giso');
  map_contour_pn(cpat, 0.2, 'zeroline');
  hold on;
  hh = map_surface(cpat, -1);
  hold off;
  caxis([-1 1]);
  draw_landmap;
  tightmap; gridm on;
  setm(gca, 'plinelocation', 30, 'mlinelocation', 45, 'frame', 'off');
  colorbar2;
  t2 = title2(['Correlation:  VPAC1, CMAP;  CTI linearly removed; ' ...
	       'Outliers removed'], ...
	      'fontsize', 10);
  bx = drawboxm(limspac);
  set(bx, 'linewidth', 2);
  
global_axes(6.5, 1.5, 0.5, 0.5, 5.5+.5);
subplot2(1,1);
  tem1 = NaN*yr; tem1(kp) = yr(kp);
  tem2 = NaN*vpac; tem2(kp) = standardize(vpac(kp));
  tem3 = NaN*ct; tem3(kp) = standardize(ct(kp));
  plot(tem1, tem2, '-k', ...
       tem1, tem3, '--r');
  axis([1978 2001 -4 4]);
  grid on;
  legend('VPAC3', 'CTI');

cd /home/disk/tao/dvimont/matlab/NMC/Atlantic/Plots
print -painters -dpsc2 vpac1_cmap_corrmap_noct2.ps