Documentation of eof_5093


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


Help text

cd /home/disk/hayes2/werner/matlab
[ts, oro] = getnc('histape.cdf.36', 'TS', 'ORO');
[lat, lon] = getll('histape.cdf.36');

Cross-Reference Information

This script calls

Listing of script eof_5093


clear

cd /home/disk/hayes2/dvimont/ccm/ccm3.6/run/sun/som_5093/clim_5093/data
ts = getnc('TS_som5093.nc', 'TS');
oro = getnc('ORO_som5093.nc', 'ORO');
[lat, lon] = getll('TS_som5093.nc');

if1;
cd /home/disk/hayes2/dvimont/ccm/ccm3.6/run/sun/som_5093/clim_5093/data
[precc, precl] = getnc('PREC_som5093.nc', 'PRECC', 'PRECL');
prec = (precc + precl) * (3600*24*1000);
clear precl precc
end

%FRAME = [120 290 -40 40];
lims = [0 360 -90 90];
[xk, yk] = keep_var(lims, lon, lat);
ts = ts(:, yk, xk); oro = oro(:, yk, xk); lat = lat(yk); lon = lon(xk);
get_global
default_global
FRAME = lims;

[ntim, nlat, nlon] = size(ts);
moro = squeeze(mean(oro));
kp = find(moro == 0);
clear oro;

[ts, clim] = annave(ts);
ts = cosweight(ts, lat);
ts = ts(:, kp);
tsnew = zeros(ntim, nlat*nlon);
tsnew(:, kp) = ts;
ts = tsnew;
ts = reshape(ts, ntim, nlat, nlon);
clear tsnew;

if 0;
  c = ts*ts';
else
  lims = [120 290 -60 60];
  [xk, yk] = keep_var(lims, lon, lat);
  ts2 = ts(:, yk, xk);
  [ntim, nlat, nlon] = size(ts2);
  moro2 = moro(yk, xk); kp = find(moro2 == 0);
  ts2 = ts2(:, kp);
  clear tsnew;
  prec2 = reshape(prec(:,yk,xk), ntim, nlat*nlon);
  for i = 1:47;
    tsnew(i,:) = mean2(ts2((12*(i-1)+[1:12]),:));
    prnew(i,:) = mean2(prec2((12*(i-1)+[1:12]),:));
  end;
  tsnew = rave(tsnew, 1);
  prnew = rave(prnew, 1);
%  ts = rave(rave(ts, 6), 5);
  ntim = size(tsnew, 1);
  c = tsnew * tsnew' / ntim;
  define_global
end;

[lam, pcs, per] = eof(c);

pc10 = pcs(:,1:10);
pc10 = (pc10 - ones(ntim, 1)*mean(pc10)) ./ (ones(ntim, 1)*std(pc10));

lds = pc10' * tsnew / ntim;
reg = pc10' * prnew / ntim;

for i = 1:2;
num = i;
figure(num);
tem = NaN * ones(1, nlat*nlon);
tem(kp) = lds(num, :);
end
tem = reshape(tem, nlat, nlon);
sd(1)
     clma;
     mcont(tem, [-1:.1:1], 'giso');
sd(2)
     plot(pc10(:,num));
     set(gca, 'XTick', [1:5:500], 'XTickLabel', [1:5:500]);
end

figure(2)
num = 21;
tem = NaN * ones(1, nlat*nlon);
tem(kp) = prec2(num, kp);
tem = reshape(tem, nlat, nlon);
sd(1)
     clma;
     mcont(tem, [-5:2.5:40], 'giso');
sd(2)
     plot(pc10(:,num));
     set(gca, 'XTick', [1:5:500], 'XTickLabel', [1:5:500]);