Documentation of ts_eof2


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


Help text

  Look at regressions

Cross-Reference Information

This script calls

Listing of script ts_eof2


clear
cd /home/disk/hayes2/werner/matlab
[lat, lon] = getll('histape.cdf.36');
lims = [100 290 -60 60];
[xk, yk] = keep_var(lims, lon, lat);
define_global
nc = netcdf('histape.cdf.36', 'nowrite');
  ts = nc{'TS'}(:, yk, xk);
  oro = nc{'ORO'}(:, yk, xk);
nc = close(nc);
[ntim, nlat, nlon] = size(ts);
ts = reshape(ts, ntim, nlat*nlon);
oroave = squeeze(mean(oro));
[ts, clim] = annave(ts);
ts = cosweight(ts, YAX);
ts = ts(:, find(~oroave));
ts = myrunning_ave(ts, 11);
c = ts' * ts;
[lam, lds, per] = eof(c);
if (0)
for i = 3:4
num = i;
tem = NaN * ones(1, nlat * nlon);
tem(find(~oroave)) = lds(:,num);
tem = reshape(tem, nlat, nlon);
[clev, cint] = get_contour_int(tem, 10);
figure(1)
subplot(2,1,2-mod(i,2))
gcont(tem, clev)
dc
end
end
pc10 = ts * lds(:,1:10);
pc10 = (pc10 - ones(ntim, 1)*mean(pc10)) ./ (ones(ntim, 1) * std(pc10));
lds10 = pc10' * ts / ntim;
figure(1)
num = 2;
tem = NaN * ones(1, nlat * nlon);
tem(find(~oroave)) = lds10(num,:);
tem = reshape(tem, nlat, nlon);
[clev, cint] = get_contour_int(tem, 15);
sd(1)
     gcont(tem, clev)
     xlabel(['Contour Interval:  ' num2str(cint) 'K (std)^-^1'])
     title(['EOF ' num2str(num) ' from 100yr SOM run']);
     dc
sd(2)
     plot(pc10(:,num));
     set(gca, 'XTick', [1:ntim/10:(ntim+1)], 'XTickLabel', [0:10:100]);
     axis([0 1201 -4 3])
     grid

clear oro

nc = netcdf('histape.cdf.36', 'nowrite');
  psl = nc{'PSL'}(:, yk, xk);
  prec = (nc{'PRECC'}(:, yk, xk) + nc{'PRECL'}(:, yk, xk));
nc = close(nc);

[psl, pslc] = annave(psl);

psl10 = pc10'*psl/ntim;

figure(2)
num = 2;

tem = psl10(num, :);
tem = reshape(tem, nlat, nlon);
[clev, cint] = get_contour_int(tem, 15);

sd(1)
     gcont(tem, clev)
     xlabel(['Contour Interval:  ' num2str(cint) 'Pa (std)^-^1'])
     title(['EOF ' num2str(num) ' from 100yr SOM run']);
     dc
sd(2)
     plot(pc10(:,num));
     set(gca, 'XTick', [1:ntim/10:(ntim+1)], 'XTickLabel', [0:10:100]);
     axis([0 1201 -4 3])
     grid

[prec, precc] = annave(prec);

prec10 = pc10'*prec/ntim;

figure(3)
num = 2;

tem = prec10(num, :);
tem = reshape(tem, nlat, nlon);
[clev, cint] = get_contour_int(tem, 15);

sd(1)
     gcont(tem, clev)
     xlabel(['Contour Interval:  ' num2str(cint) 'Pa (std)^-^1'])
     title(['EOF ' num2str(num) ' from 100yr SOM run']);
     dc
sd(2)
     plot(pc10(:,num));
     set(gca, 'XTick', [1:ntim/10:(ntim+1)], 'XTickLabel', [0:10:100]);
     axis([0 1201 -4 3])
     grid