Global Index (short | long) | Local contents | Local Index (short | long)
Load PCS:
This script calls | |
---|---|
clear biff2 = 1; cd /home/disk/hayes2/dvimont/csiro/matlab_data/Heat_Content if biff2 == 1; % load LP10_L1-7_CEOF.mat; tit = 'LP10'; load BP10-60yr_L1-7_EOF.mat; tit = 'BP10-60'; elseif biff2 == 2; load HP8_L1-7_CEOF.mat; tit = 'HP8'; elseif biff2 == 3; load RAW_L1-7_CEOF.mat; tit = 'RAW'; end cd ~/matlab/CSIRO/Heat/Old_routines nfrm = [-10:1];%6; tim = 101:550; lev = 1:3; lev2 = 1:7 lims = [106 312 -3 63]; % Get ubar_dHCprimedx and vbar_dHCprimedy [ubtp, vbtp, lat_out, lon_out, depth_out] = ... get_ubar_gradtprime(pcs, lims, nfrm, tim, lev); [uptb, vptb, lat_out, lon_out, depth_out] = ... get_uprime_gradtbar(pcs, lims, nfrm, tim, lev); [ubtp2, vbtp2, lat_out, lon_out, depth_out] = ... get_ubar_gradtprime(pcs, lims, nfrm, tim, lev2); [uptb2, vptb2, lat_out, lon_out, depth_out] = ... get_uprime_gradtbar(pcs, lims, nfrm, tim, lev2); ubtp = ubtp2 - ubtp; uptb = uptb2 - uptb; vbtp = vbtp2 - vbtp; vptb = vptb2 - vptb; % Plot the data default_global; XAX = lon_out; YAX = lat_out; FRAME = [110 299 -60 60]; lag = 0; figure(1); figure_orient; cint = 0.5; clev = [-10:cint:-cint cint:cint:10]; for i = 1:6; tem = -1 * squeeze(ubtp(i,:,:)); subplot(3,2,i); gcont(tem, clev); dc2(tem); % ylabel(['Phase = ' num2str((i-1)*180/nfrm + lag)]); if i >= 5; xlabel(['Contour Interval: ' num2str(cint) ' W m^-^2']); end end subplot(3,2,3) ylabel([tit ': 80-270m Integrated Ubar dT''dx']); cd /home/disk/tao/dvimont/matlab/CSIRO/Heat/Old_routines/Plot_HCadv/LP10_ttend %print -dps2 LP10_ubtp_terms_80-270m.ps for i = 1:6; tem = -1 * squeeze(uptb(i,:,:)); subplot(3,2,i); gcont(tem, clev); dc2(tem); % ylabel(['Phase = ' num2str((i-1)*180/nfrm + lag)]); if i >= 5; xlabel(['Contour Interval: ' num2str(cint) ' W m^-^2']); end end subplot(3,2,3) ylabel([tit ': 80-270m Integrated U'' dTbardx']); cd /home/disk/tao/dvimont/matlab/CSIRO/Heat/Old_routines/Plot_HCadv/LP10_ttend %print -dps2 LP10_uptb_terms_80-270m.ps % Plot the vdtdy data default_global; XAX = lon_out; YAX = lat_out; FRAME = [110 299 -60 60]; lag = 0; figure(2); figure_orient; for i = 1:6; tem = -1 * squeeze(vbtp(i,:,:)); subplot(3,2,i); gcont(tem, clev); dc2(tem); % ylabel(['Phase = ' num2str((i-1)*180/nfrm + lag)]); if i >= 5; xlabel(['Contour Interval: ' num2str(cint) ' W m^-^2']); end end subplot(3,2,3) ylabel([tit ': 80-270m Integrated Vbar dT''dy']); cd /home/disk/tao/dvimont/matlab/CSIRO/Heat/Old_routines/Plot_HCadv/LP10_ttend %print -dps2 LP10_vbtp_terms_80-270m.ps for i = 1:6; tem = -1 * squeeze(vptb(i,:,:)); subplot(3,2,i); gcont(tem, clev); dc2(tem); % ylabel(['Phase = ' num2str((i-1)*180/nfrm + lag)]); if i >= 5; xlabel(['Contour Interval: ' num2str(cint) ' W m^-^2']); end end subplot(3,2,3) ylabel([tit ': 80-270m Integrated V'' dTbardy']); cd /home/disk/tao/dvimont/matlab/CSIRO/Heat/Old_routines/Plot_HCadv/LP10_ttend %print -dps2 LP10_vptb_terms_80-270m.ps % Get the wdtdz terms cd ~/matlab/CSIRO/Heat/Old_routines [wbtp, lat_out, lon_out] = ... get_wbar_dtprimedz(pcs, lims, nfrm, tim, lev); [wptb, lat_out, lon_out] = ... get_wprime_dtbardz(pcs, lims, nfrm, tim, lev); [wbtp2, lat_out2, lon_out] = ... get_wbar_dtprimedz(pcs, lims, nfrm, tim, lev2); [wptb2, lat_out2, lon_out] = ... get_wprime_dtbardz(pcs, lims, nfrm, tim, lev2); wbtp = wbtp2 - wbtp; wptb = wptb2 - wptb; % Plot the wdtdz data default_global; XAX = lon_out; YAX = lat_out; FRAME = [110 299 -60 60]; lag = 0; figure(3); figure_orient; for i = 1:6; tem = -1 * squeeze(wbtp(i,:,:)); subplot(3,2,i); gcont(tem, clev); dc2(tem); % ylabel(['Phase = ' num2str((i-1)*180/nfrm + lag)]); if i >= 5; xlabel(['Contour Interval: ' num2str(cint) ' W m^-^2']); end end subplot(3,2,3) ylabel([tit ': 80-270m Integrated Wbar dT''dy']); cd /home/disk/tao/dvimont/matlab/CSIRO/Heat/Old_routines/Plot_HCadv/LP10_ttend %print -dps2 LP10_wbtp_terms_80-270m.ps for i = 1:6; tem = -1 * squeeze(wptb(i,:,:)); subplot(3,2,i); gcont(tem, clev); dc2(tem); % ylabel(['Phase = ' num2str((i-1)*180/nfrm + lag)]); if i >= 5; xlabel(['Contour Interval: ' num2str(cint) ' W m^-^2']); end end subplot(3,2,3) ylabel([tit ': 80-270m Integrated W'' dTbardy']); cd /home/disk/tao/dvimont/matlab/CSIRO/Heat/Old_routines/Plot_HCadv/LP10_ttend %print -dps2 LP10_wptb_terms_80-270m.ps % Plot the heat flux and actual heat content terms hflx = getnc('heat', lims, lev, tim); [lat, lon, depth] = getll('heat', lims); cd /home/disk/tao/dvimont/matlab/CSIRO/Heat [heat, lath, lonh, depthh, middepth] = getheat(lev, tim, lims); [heat2, lath, lonh, depthh, middepth] = getheat(lev2, tim, lims); heat = heat2-heat; hflx_reg = regress_eof(hflx, pcs, nfrm); heat_reg = regress_eof(heat, pcs, nfrm); % Plot the HC and HFLX data default_global; XAX = lon; YAX = lat; FRAME = [110 299 0 60]; lag = 0; figure(4); figure_orient; cint = 0.5; clev = [-10:cint:-cint cint:cint:10]; for i = 7:12; tem = squeeze(hflx_reg(i,:,:)); subplot(6,2,2*rem(i-1,6)+2); gcont(tem, clev); dc2(tem); ylabel(['Lag = ' num2str(nfrm(i))]); % ylabel(['Phase = ' num2str((i-1)*180/nfrm + lag)]); if i == 6; xlabel(['Contour Interval: ' num2str(cint) ' W m^-^2']); end end subplot(6,2,2) title([tit ': Heat Flux (Pos Down)']); cd /home/disk/tao/dvimont/matlab/CSIRO/Heat/Mid_Lats/Plot_Reg %print -dps2 BP_HC80m_HFLX_lag-4to+1.ps figure(4); figure_orient(1); cint = 0.25; clev = [-10:cint:10]; for i = 7:12; tem = 1e-8*squeeze(heat_reg(i,:,:)); subplot(6,2,2*rem(i-1,6)+1); gcont(tem, clev); dc2(tem); ylabel(['Lag = ' num2str(nfrm(i))]); % ylabel(['Phase = ' num2str((i-1)*180/nfrm + lag)]); if i == 6; xlabel(['Contour Interval: ' num2str(cint) ' x 10^8 J m^-^2']); end end subplot(6,2,1) title([tit ': 0-80m HC']); cd /home/disk/tao/dvimont/matlab/CSIRO/Heat/Old_routines/Plot_HCadv/LP10_ttend %print -dps2 LP10_HC_80-270m.ps % Plot sfc temp and zonal wind [temp, taux] = getnc('temp', 'taux', lims, 8, tim); [lat, lon, depth] = getll('temp', lims); [latx, lonx, depthx] = getll('taux', lims); [treg1, treg] = regress_eof(temp, pcs, nfrm); xreg = regress_eof(taux, pcs, nfrm); % Plot the HC and HFLX data default_global; XAX = lon; YAX = lat; FRAME = [110 299 -60 60]; lag = 0; for biff = 1:3; cint = 0.025; clev = [-1:cint:1]; figure(biff); figure_orient; for i = [1:6]+6*(biff-1); tem = squeeze(treg1(i,:,:)); subplot(3,2,rem(i-1,6)+1); gcont(tem, clev); dc2(tem); title(['Lag ' num2str(nfrm(i))]); % ylabel(['Phase = ' num2str((i-1)*180/nfrm + lag)]); if i >= 5; xlabel(['Contour Interval: ' num2str(cint) ' K std^-^1']); end end end subplot(3,2,3) ylabel([tit ': 80-270m Integrated L1 Temperature']); cd /home/disk/tao/dvimont/matlab/CSIRO/Heat/Old_routines/Plot_HCadv/LP10_ttend %print -dps2 LP10_temp_80-270m.ps default_global; XAX = lonx; YAX = latx; FRAME = [110 299 -60 60]; cint = 1; clev = [-10:cint:10]; for i = 1:6; tem = 100*squeeze(xreg(i,:,:)); subplot(3,2,i); gcont(tem, clev); dc2(tem); % ylabel(['Phase = ' num2str((i-1)*180/nfrm + lag)]); if i >= 5; xlabel(['Contour Interval: ' num2str(cint) ' x 10^2 dynes cm^-^2']); end end subplot(3,2,3) ylabel([tit ': 80-270m Integrated SFC Zonal Wind Stress']); cd /home/disk/tao/dvimont/matlab/CSIRO/Heat/Old_routines/Plot_HCadv/LP10_ttend %print -dps2 LP10_taux_80-270m.ps % Plot ocean velocities var1 = 'taux'; var2 = 'tauy'; units = 'dynes cm^-^2'; [u, v] = getnc(var1, var2, lims, lev, tim); [lat, lon, depth] = getll(var1, lims); [latw, lonw, depthw] = getll('wl', lims); dz = diff([0; depthw(lev)]); %dz = diff(depthw([min(lev)-1 lev])); lags = nfrm; ureg = regress_eof(u, pcs, lags); vreg = regress_eof(v, pcs, lags); szu = size(u); nfrm = length(lags); ureg = dz' * reshape(shiftdim(ureg, 1), [szu(2) nfrm*prod(szu(3:4))]) ./ sum(dz); vreg = dz' * reshape(shiftdim(vreg, 1), [szu(2) nfrm*prod(szu(3:4))]) ./ sum(dz); ureg = reshape(ureg, [szu(3:4) nfrm]); ureg = shiftdim(ureg, 2); vreg = reshape(vreg, [szu(3:4) nfrm]); vreg = shiftdim(vreg, 2); ureg3 = ureg - ureg2; vreg3 = vreg - vreg2; % Plot u, v default_global; XAX = lon2; YAX = lat2; FRAME = [110 299 -3 60]; lag = 0; side = 2; for biff = 1:1; figure(biff); figure_orient(1); for i = [1:nfrm] + nfrm*(biff-1); subplot(nfrm,2,2*rem(i-1,nfrm)+side); % utem = squeeze(ureg(i,:,:)); % vtem = squeeze(vreg(i,:,:)); % gquiv(utem, vtem, 1.75, 1, 'cm s^-^1'); % gquiv(utem, vtem, -0.05, 1, units); cint = 1; clev = [-10:cint:-cint cint:cint:10]; gcont(1e8*vor(i,:,:), clev); dc2(vor(i,:,:)); ylabel(['Lag = ' num2str(lags(i))]); % ylabel(['Phase = ' num2str((i-1)*180/nfrm + lag)]); if (2*rem(i-1,nfrm)+side) <= 2*(nfrm-1); xlabel(''); end end subplot(nfrm,2,side) title([tit ': Wind Stress Curl']); % title([tit ': 80-270m Ocean Velocity']); % title([tit ': 0-80m Ocean Velocity']); end cd /home/disk/tao/dvimont/matlab/CSIRO/Heat/Mid_Lats/Plot_Reg %print -dps2 BP_wstress_0-80m_oce_vel_lag-4to1.ps for i = 1:nfrm; [vor(i,:,:), lat2, lon2] = sph_curl1(ureg(i,:,:), vreg(i,:,:), lat, lon, 1); end