Documentation of calc_eq_tend_terms


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


Help text

  Get lower layer

Cross-Reference Information

This script calls

Listing of script calc_eq_tend_terms


clear
cd /home/disk/tao/dvimont/matlab/CSIRO/Thesis/Data
load LP9_detrend_L1-7_EOF_yr101-1000.mat
for regind = [10];
if regind == 0.5;
  lims = [178 272 -3 3];  %  EQ, CT region
  fname = 'eq_ct'
elseif regind == 1; 
  lims = [179.9 259 -66 -49];  %  Southern Ocean anomaly
  fname = 'south_ocean'
elseif regind == 2; 
  lims = [61 90.5 -11.5 11.5];  %  Indian Ocean
  fname = 'indian_ocean'
elseif regind == 3; 
  lims = [150 181 -3 3];  %  Western Pacific region
  fname = 'wpac_reg'
elseif regind == 4; 
  lims = [298 332 39 56];  %  Gulf Stream
  fname = 'gulf_stream'
elseif regind == 5; 
  lims = [112 141 -11.5 -0.1];  %  Indonesian Through-flow
  fname = 'ind_through'
elseif regind == 6;
  lims = [208 237 -37 -23];  %  SP Cold Anom
  fname = 'sp_cold'
elseif regind == 7;
  lims = [157 192 -21 -7.5];  %  S_WSTP
  fname = 's_wstp'
elseif regind == 8;
  lims = [168 209 27 40]; % NP cold anom (2nd attempt);
  fname = 'np_anom2'
elseif regind == 9;
  lims = [213 242 30 37]; %  CALIF warm anom
  fname = 'calif'
elseif regind == 10;
  lims = [112 164 4.5 21];  % LP WSTP cold anom
  fname = 'wstp2'
end
nfrm = -20:20; lags = nfrm;
tim = 101:1000;
lev = 1:3;
cd ~/matlab/CSIRO/Heat/Old_routines
   [utem, vtem, lat_out, lon_out, depth_out] = ...
           get_ubar_gradtprime(pcs, lims, nfrm, tim, lev);
   if ndims(utem) == 2;
     ubtp13 = squeeze(mean(utem));%2(mean2(shiftdim(utem, 1))));
     vbtp13 = squeeze(mean(vtem));%2(mean2(shiftdim(vtem, 1))));
   elseif ndims(utem) == 3;
     ubtp13 = squeeze(mean2(mean2(shiftdim(utem, 1))));
     vbtp13 = squeeze(mean2(mean2(shiftdim(vtem, 1))));
   end
   [utem, vtem, lat_out, lon_out, depth_out] = ...
           get_uprime_gradtbar(pcs, lims, nfrm, tim, lev);
   if ndims(utem) == 2;
     uptb13 = squeeze(mean(utem));%2(mean2(shiftdim(utem, 1))));
     vptb13 = squeeze(mean(vtem));%2(mean2(shiftdim(vtem, 1))));
   elseif ndims(utem) == 3;
     uptb13 = squeeze(mean2(mean2(shiftdim(utem, 1))));
     vptb13 = squeeze(mean2(mean2(shiftdim(vtem, 1))));
   end
   [wtem, lat_out, lon_out] = ...
           get_wbar_dtprimedz(pcs, lims, nfrm, tim, lev);
   wbtp13 = squeeze(mean2(mean2(shiftdim(wtem, 1))))';
   [wtem, lat_out, lon_out] = ...
           get_wprime_dtbardz(pcs, lims, nfrm, tim, lev);
   wptb13 = squeeze(mean2(mean2(shiftdim(wtem, 1))))';
   tim2 = 100:1000; ntim = length(tim2);
   hc13 = getheat(lims, lev, tim2);
   dhc13dt = (hc13(3:ntim,:,:) - hc13(1:(ntim-2),:,:)) / (2*3600*24*365);
   hc13 = hc13(2:ntim,:,:); ntim = length(tim);
   hc13 = regress_eof(hc13, pcs, nfrm);
   dhc13dt = regress_eof(dhc13dt, pcs(1:(ntim-1), :), nfrm);
   hc13 = squeeze(mean2(mean2(shiftdim(hc13, 1))))';
   dhc13dt = squeeze(mean2(mean2(shiftdim(dhc13dt, 1))))';
   hflx = getnc('heat', lims, 1, tim);
   hflx = regress_eof(hflx, pcs, nfrm);
   hflx = squeeze(mean2(mean2(shiftdim(hflx, 1))))';

cd ~/matlab/CSIRO/Heat/Old_routines

lev = 1:7;
   [utem, vtem, lat_out, lon_out, depth_out] = ...
           get_ubar_gradtprime(pcs, lims, nfrm, tim, lev);
   if ndims(utem) == 2;
     ubtp17 = squeeze(mean(utem));%2(mean2(shiftdim(utem, 1))));
     vbtp17 = squeeze(mean(vtem));%2(mean2(shiftdim(vtem, 1))));
   elseif ndims(utem) == 3;
     ubtp17 = squeeze(mean2(mean2(shiftdim(utem, 1))));
     vbtp17 = squeeze(mean2(mean2(shiftdim(vtem, 1))));
   end

   [utem, vtem, lat_out, lon_out, depth_out] = ...
           get_uprime_gradtbar(pcs, lims, nfrm, tim, lev);
   if ndims(utem) == 2;
     uptb17 = squeeze(mean(utem));%2(mean2(shiftdim(utem, 1))));
     vptb17 = squeeze(mean(vtem));%2(mean2(shiftdim(vtem, 1))));
   elseif ndims(utem) == 3;
     uptb17 = squeeze(mean2(mean2(shiftdim(utem, 1))));
     vptb17 = squeeze(mean2(mean2(shiftdim(vtem, 1))));
   end

   [wtem, lat_out, lon_out] = ...
           get_wbar_dtprimedz(pcs, lims, nfrm, tim, lev);
   wbtp17 = squeeze(mean2(mean2(shiftdim(wtem, 1))))';

   [wtem, lat_out, lon_out] = ...
           get_wprime_dtbardz(pcs, lims, nfrm, tim, lev);
   wptb17 = squeeze(mean2(mean2(shiftdim(wtem, 1))))';

   tim2 = 100:1000; ntim = length(tim2);
   hc17 = getheat(lims, lev, tim2);
   dhc17dt = (hc17(3:ntim,:,:) - hc17(1:(ntim-2),:,:)) / (2*3600*24*365);
   hc17 = hc17(2:ntim,:,:); ntim = length(tim);
   hc17 = regress_eof(hc17, pcs, nfrm);
   dhc17dt = regress_eof(dhc17dt, pcs(1:(ntim-1), :), nfrm);
   hc17 = squeeze(mean2(mean2(shiftdim(hc17, 1))))';
   dhc17dt = squeeze(mean2(mean2(shiftdim(dhc17dt, 1))))';

cd /home/disk/tao/dvimont/matlab/CSIRO/Thesis/Data

eval(['save LP9_' fname '_terms.mat uptb13 ubtp13 vptb13 vbtp13 wptb13 wbtp13 ' ...
      'uptb17 ubtp17 vptb17 vbtp17 wptb17 wbtp17 ' ...
      'hc13 hc17 dhc13dt dhc17dt hflx lags lims tim nfrm']);

end;  %  regind loop



cd /home/disk/tao/dvimont/matlab/CSIRO/Thesis/Data
load LP10_detrend_L1-7_yr101-1000.mat

   taux = getnc('taux', [165 210 -3 3], 1, tim);
   taux = regress_eof(taux, pcs, nfrm);
   taux = squeeze(mean2(taux'));


cd /home/disk/tao/dvimont/matlab/CSIRO/Thesis/Data

save LP10_west_eq_l1-9_tend_terms.mat uptb19 ubtp19 vptb19 vbtp19 wptb19 wbtp19 ...
                                      hc19 dhc19dt