Documentation of hc_eof


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


Help text

lims = [110 300 -60 60];

Cross-Reference Information

This script calls

Listing of script hc_eof


clear
lims = [110 300 -30 30];
tim = 101:1000;
lev = 1;

%[heat, lat, lon, depth, middepth] = getheat(lims, lev, tim, 'temp');
heat = getnc('temp', lims, lev, tim);
[lat, lon] = getll('temp', lims);

for hplp = 0:2;
  if hplp == 0;
    heat2 = heat;
  elseif hplp == 1;
    [b, a] = butter(9, 2/12);
    heat2 = heat - filtfilt(b, a, heat);
  elseif hplp == 2;
    [b, a] = butter(9, 2/10);
    heat2 = filtfilt(b, a, heat);
  elseif hplp == 3;
    [b1, a1] = butter(9, 2/15);
    [b2, a2] = butter(9, 2/40);
    heat2 = filtfilt(b1, a1, heat)-filtfilt(b2, a2, heat);
  elseif hplp == 4;
    [b, a] = butter(9, 2/15);
    heat2 = filtfilt(b, a, heat);
  end
  hplp

  [heat2, clim] = remove_mean(heat2);
  heat2 = detrend(heat2);
  kp = find(~isnan(clim));

  heat2 = cosweight(heat2, lat);
  heat2 = heat2(:, kp);

  if hplp == 0;
    [rlam, rlds, rpcs, rper] = eof_dan(heat2);
  elseif hplp == 1;
    [hlam, hlds, hpcs, hper] = eof_dan(heat2);
  elseif hplp == 2; 
    [llam, llds, lpcs, lper] = eof_dan(heat2);
  elseif hplp == 3; 
    [blam1540, blds1540, bpcs1540, bper1540] = eof_dan(heat2);
  elseif hplp == 4; 
    [llam15, llds15, lpcs15, lper15] = eof_dan(heat2);
  end

end

cd ~/matlab/CSIRO/New_calcs2/data
%save heat_pcs.mat ...
save sst_pcs.mat ...
    hlam7 hlds7 hpcs7 hper7 ...
    blam412 blds412 bpcs412 bper412 ...
    blam1540 blds1540 bpcs1540 bper1540 ...
    llam15 llds15 lpcs15 lper15 ...
    lims lev tim

cd ~/matlab/CSIRO/New_calcs2/data
save heat_pcs_nhem_raw_47.mat ...
    rlam rlds rpcs rper ...
    lims lev tim

cd ~/matlab/CSIRO/New_calcs2/data
descr1 = ['Raw (rpcs, etc), 12 year highpass filtered (hpcs, etc) '...
	  'and 10 year lowpass filtered EOF''s and such, TROPICS'];
%save heat_pcs.mat ...
save sst_pcs_tropx.mat ...
    rlam rlds rpcs rper ...
    llam llds lpcs lper ...
    hlam hlds hpcs hper ...
    lims lev tim descr1 kp