Documentation of get_annual_timeseries


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


Help text

  Get landmask

Cross-Reference Information

This script calls

Listing of script get_annual_timeseries


clean
cd /home/disk/tao/dvimont/Papers/mlcsiro/matlab/newobs2/data
load svd_slp_uwn0month.mat
cd /home/disk/tao/data/nmc.reanalysis
load landmask.mat
lm(lm == -1) = NaN;

cd /home/disk/tao/data/nmc.reanalysis/monthly
ctlim = [180 270 -6 6];

%  Load monthly data
filin1a = 'air.mon.mean.sfc.nc'; var1a = 'air';
filin2 = 'slp.monthly.48feb00.nc'; var2 = 'slp';
filin1 = 'uwnd.mon.mean.nc'; var1 = 'uwnd';
tim = 1:624;

ct = getnc2(filin1a, var1a, ctlim, 1, tim);
[uwn, lat1, lon1] = getnc2(filin1, var1, uwnlim, 925, tim);
[slp, lat2, lon2] = getnc2(filin2, var2, slplim, 500, tim);

uwn = squeeze(uwn); slp = squeeze(slp);

[uwn, uwnc] = annave(uwn);
[slp, slpc] = annave(slp);
ct = squeeze(mean(mean(shiftdim(ct, 1))));
ct = annave(ct);

[ntim, nlat1, nlon1] = size(uwn);
[ntim, nlat2, nlon2] = size(slp);

uwn2 = reshape(uwn, ntim, nlat1*nlon1);
slp2 = reshape(slp, ntim, nlat2*nlon2);

%  Normalize, as in Deser and Timlin
if 0;
  uwnstd = std(uwn2);
  slpstd = std(slp2);

  uwn2 = uwn2 ./ (ones(ntim,1)*uwnstd);
  slp2 = slp2 ./ (ones(ntim,1)*slpstd);
end

%  Weight by cosine latitude
uwn2 = reshape(uwn2, ntim, nlat1, nlon1);
uwn2 = cosweight(uwn2, lat1);
uwn2 = reshape(uwn2, ntim, nlat1*nlon1);
slp2 = reshape(slp2, ntim, nlat2, nlon2);
slp2 = cosweight(slp2, lat2);
slp2 = reshape(slp2, ntim, nlat2*nlon2);

%  Get rid of land points for UWN
if 0;
  [xk, yk] = keep_var(uwnlim, lon, lat);
  kp = find(~isnan(lm(yk, xk)));
  uwn2 = uwn2(:,kp);
end

%  Get monthly time series
slpx_tot = slp2*slpu; %  SLP index
uwny_tot = uwn2*uwnv; %  UWND index

%  Get annual time series by averaging monthly data

nyr = size(uwny_tot, 1)/12;
tim1 = NaN*ones(nyr-1, 2);
tim2 = NaN*ones(nyr-1, 2);
for i = 1:nyr-1;
  ind = 12*(i-1)+[11:16];  %  Adjust this so it's only summer or winter
  tim1(i,:) = [mean(slpx_tot(ind,1)) mean(uwny_tot(ind,1))];
  tim2(i,:) = [mean(slpx_tot(ind,2)) mean(uwny_tot(ind,2))];
end
tim1 = tim1./(ones(nyr-1, 1)*std(tim1));
tim2 = tim2./(ones(nyr-1, 1)*std(tim2));
yr = 1947+[1:nyr];