14c14,27 < sign = 1. --- > sign = -1. > > ; casename = "b40.1850.track1.1deg.006" > ; datadir = "/ccsm/ocn/yeager/amoc_ts/"+casename+"/eofs/" > ; netcdf = "MOC.700-1299.eof.atl.nc" > > casename = "taiesm" ; > datadir = "/work/yiwen89419/CCSM_ncl/" > ; netcdf = "./f09.B-PI.tn15.cmip6.j01.re/yearly/MOCtot.500-700.eof.atl.lz10+.nodt.nc" > ; netcdf = "MOCtot.500-700.eof.atl.nc" ;detrend & smooth > ; netcdf = "MOCtot.500-700.eof.atl.lz10+.nodt.nc" ;not detrend & smooth [default] > ; netcdf = "MOCtot.500-700.eof.atl.lz10+.nc" ;detrend & smooth(x) > ; netcdf = "MOCtot.500-700.eof.atl.nodt.nc" ;not detrend & smooth(x) > netcdf = "./paper_data/MOCtot.957-1108.eof.atl.nodt.nc" ; test change yr 16,20d28 < casename = "b40.1850.track1.1deg.006" < datadir = "/work/yiwen89419/CCSM_ncl/paper_data/" < ; netcdf = "MOCtot.957-1108.eof.atl.lz10+.nodt.nc" < netcdf = "MOCtot.957-1108.eof.atl.nodt.nc" < 23c31 < psout = sfx@fBase --- > psout = "Fig2_AMOCeofs" 26d33 < 36,37c43,44 < eof = eof*sign < eofts = eofts*sign --- > eof(0,:,:) = eof(0,:,:)*sign > eofts(0,:) = eofts(0,:)*sign 40c47,48 < mocz@units = "m" --- > mocz = mocz/1000. > mocz@units = "km" 57c65,66 < jave = 1 ; number of periodograms to average (if < 3, no smoothing!) --- > jave = 5 ; number of periodograms to average (if < 3, no smoothing!) > ;jave = 1 ; number of periodograms to average (if < 3, no smoothing!) [default] 64,65c73,77 < gsn_define_colormap(wks,"amwg_blueyellowred") ; choose colormap < i = NhlNewColor(wks,0.8,0.8,0.8) ; add gray to map --- > gsn_define_colormap(wks,"gsdtol") > blk = NhlNewColor(wks,0.,0.,0.) ; add gray to map > grey = NhlNewColor(wks,0.5,0.5,0.5) ; add gray to map > ltgrey = NhlNewColor(wks,0.8,0.8,0.8) ; add gray to map > wt = NhlNewColor(wks,1.,1.,1.) ; add gray to map 74c86 < res@cnMissingValFillColor = "grey" --- > res@cnMissingValFillColor = blk 77,78c89,90 < res@cnLinesOn = True ; turn off contour lines < res@cnLineLabelsOn = True ; turn the line labels off --- > res@cnLinesOn = False ; turn off contour lines > res@cnLineLabelsOn = False ; turn the line labels off 80,81c92,95 < res@gsnSpreadColorStart = 2 ; start at color 10 < res@gsnSpreadColorEnd = 17 ; end at color 96 --- > res@gsnSpreadColorStart = 32 ; start at color 10 > res@gsnSpreadColorEnd = 8 ; end at color 96 > res@gsnLeftStringFontHeightF = 0.025 > res@gsnRightStringFontHeightF = 0.025 85,86c99,100 < res@cnMinLevelValF = -2.0 < res@cnMaxLevelValF = 2.0 --- > res@cnMinLevelValF = 0.0 > res@cnMaxLevelValF = 1.0 88c102 < res@gsnMaximize = False ; enlarge plot --- > res@gsnMaximize = True ; enlarge plot 92c106 < res@tiYAxisString= "depth (m)" --- > res@tiYAxisString= "depth (km)" 96a111,136 > res@tmXTOn = False > res@tmYROn = False > res@tmXBLabelsOn = True > res@tmXBMode = "Explicit" > res@tmXBValues = (/-30.,0.,30.,60.,90./) > res@tmXBLabels = (/"30~S~o~N~S","0~S~o~N~N","30~S~o~N~N","60~S~o~N~N","90~S~o~N~N"/) > > lineres = True > lineres@gsnDraw = False > lineres@gsnFrame = False > lineres@cnFillOn = False ; turn on color fill > lineres@cnLinesOn = True ; turn off contour lines > lineres@cnLineLabelFontHeightF = 0.018 > lineres@cnLineLabelsOn = True ; turn the line labels off > lineres@cnLevelSelectionMode = "ManualLevels" ; manually set the contour levels > lineres@cnMinLevelValF = -1.0 > lineres@cnMaxLevelValF = 1.0 > lineres@cnLevelSpacingF = 0.1 > lineres@cnMonoLineThickness = False > lineres@cnMonoLineDashPattern = False > lineres@cnLineThicknesses = (/1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1/) > lineres@cnLineDashPatterns = (/1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0/) > lineres@cnInfoLabelOn = False > > > 104c144 < resxy@gsnMaximize = False ; enlarge plot --- > resxy@gsnMaximize = True ; enlarge plot 107c147,148 < resxy@xyLineColors = (/"blue"/) ; change line color --- > resxy@gsnLeftStringFontHeightF = 0.025 > resxy@xyLineColors = (/"black"/) ; change line color 114c155 < resxy@trYMaxF = 3. ; max value on y-axis --- > resxy@trYMaxF = 3. ; max value on y-axis 116a158,159 > resxy@tmXTOn = False > resxy@tmYROn = False 124c167 < spec@tiYAxisString = "Variance/(unit freq.)" --- > ;spec@tiYAxisString = "Frequency x Power (Sv~S~2~N~)" 126c169 < spec@gsnMaximize = False ; enlarge plot --- > spec@gsnMaximize = True ; enlarge plot 129a173,174 > spec@gsnLeftStringFontHeightF = 0.025 > spec@gsnRightStringFontHeightF = 0.025 132c177 < spec@xyLineColors = (/"black","red","red","red"/) --- > spec@xyLineColors = (/blk,grey,grey,grey/) 137c182,183 < spec@xyXStyle = "Log" --- > spec@xyXStyle = "Log" > ;spec@xyYStyle = "Log" 144c190,191 < spec@trYMaxF = 120. --- > spec@trYMinF = 0.0 > spec@trYMaxF = 1. 151a199,206 > lres = True > lres@gsLineDashPattern = 0 > lres@gsLineColor = "grey" > nxlines = dimsizes(spec@tmXBValues) - 2 > specxlines1 = new(nxlines,graphic) > specxlines2 = new(nxlines,graphic) > > 155,161c210,218 < res@gsnLeftString = "ci = "+flt2string(res@cnLevelSpacingF)+" Sv" < res@gsnRightString = "EOF 1, "+flt2string(eof@pcvar(0))+"%" < plot(0) = gsn_csm_contour(wks,eof(0,:,:),res) < ; label = "ci = "+flt2string(res@cnLevelSpacingF) < ; text = gsn_add_text(wks,plot(0),label,70.,4500.,txres) < ; label = "Sv" < ; text = gsn_add_text(wks,plot(0),label,70.,5000.,txres) --- > ; res@gsnLeftString = "ci = "+flt2string(res@cnLevelSpacingF)+" Sv" > res@gsnLeftString = "a. AMOC EOF1" > res@gsnRightString = sprintf("%3.1f", eof@pcvar(0))+"%" > tmp = eof(0,:,:) > tmp = abs(eof(0,:,:)) > plot(0) = gsn_csm_contour(wks,tmp,res) > ploto = gsn_csm_contour(wks,eof(0,:,:),lineres) > overlay (plot(0), ploto) > delete(tmp) 163c220,221 < resxy@gsnCenterString = "PC 1 time series" --- > resxy@gsnLeftString = "b. PC1 Time Series" > ; resxy@gsnCenterString = "" 167,169c225,228 < spectrum = specx_ci(dof,0.95,0.99) < spec@gsnCenterString = "Power Spectrum" < plot(2)=gsn_csm_xy(wks,dof@frq,spectrum,spec) --- > spectrum = specx_ci(dof,0.95,0.) > spec@gsnLeftString = "c. PC1 Power Spectrum" > spec@gsnCenterString = "" > plot(2)=gsn_csm_xy(wks,dof@frq,spectrum*conform(spectrum,dof@frq,(/1/)),spec) 173,176c232,268 < < res@gsnRightString = "EOF 2, "+flt2string(eof@pcvar(1))+"%" < plot(3) = gsn_csm_contour(wks,eof(1,:,:),res) < resxy@gsnCenterString = "PC 2 time series" --- > getvalues plot(2) ; retrieve some of the plot resources > "tmYLValues" : tmYLValues ; values used by NCL at major tick marks > "tmYLMinorValues" : tmYLMinorValues ; values used by NCL at major tick marks > end getvalues > do i=0,nxlines-1 > x0 = spec@tmXBValues(i+1) > specxlines1(i) = gsn_add_polyline(wks,plot(2),(/x0,x0/),(/spec@trYMinF,spec@trYMaxF/),lres) > end do > nyMajlines = dimsizes(tmYLValues) > nyMinlines = dimsizes(tmYLMinorValues) > specyMajlines1 = new(nyMajlines,graphic) > specyMinlines1 = new(nyMinlines,graphic) > do i=0,nyMajlines-1 > y0 = tmYLValues(i) > specyMajlines1(i) = gsn_add_polyline(wks,plot(2),(/spec@trXMinF,spec@trXMaxF/),(/y0,y0/),lres) > end do > do i=0,nyMinlines-1 > y0 = tmYLMinorValues(i) > specyMinlines1(i) = gsn_add_polyline(wks,plot(2),(/spec@trXMinF,spec@trXMaxF/),(/y0,y0/),lres) > end do > > delete(tmYLValues) > delete(tmYLMinorValues) > delete(nyMajlines) > delete(nyMinlines) > > res@gsnLeftString = "d. AMOC EOF2" > res@gsnRightString = sprintf("%3.1f", eof@pcvar(1))+"%" > res@tiXAxisString = "Latitude" > tmp = eof(1,:,:) > tmp = abs(eof(1,:,:)) > plot(3) = gsn_csm_contour(wks,tmp,res) > ploto3 = gsn_csm_contour(wks,eof(1,:,:),lineres) > delete(tmp) > overlay (plot(3), ploto3) > resxy@gsnLeftString = "e. PC2 Time Series" > resxy@tiXAxisString = "Time (years)" 180,182c272,275 < spectrum = specx_ci(dof,0.95,0.99) < spec@gsnCenterString = "" < plot(5)=gsn_csm_xy(wks,dof@frq,spectrum,spec) --- > spectrum = specx_ci(dof,0.95,0.) > spec@gsnLeftString = "f. PC2 Power Spectrum" > spec@tiXAxisString = "Period (years)" > plot(5)=gsn_csm_xy(wks,dof@frq,spectrum*conform(spectrum,dof@frq,(/1/)),spec) 185a279,299 > getvalues plot(5) ; retrieve some of the plot resources > "tmYLValues" : tmYLValues ; values used by NCL at major tick marks > "tmYLMinorValues" : tmYLMinorValues ; values used by NCL at major tick marks > end getvalues > do i=0,nxlines-1 > x0 = spec@tmXBValues(i+1) > specxlines2(i) = gsn_add_polyline(wks,plot(5),(/x0,x0/),(/spec@trYMinF,spec@trYMaxF/),lres) > end do > nyMajlines = dimsizes(tmYLValues) > nyMinlines = dimsizes(tmYLMinorValues) > specyMajlines2 = new(nyMajlines,graphic) > specyMinlines2 = new(nyMinlines,graphic) > do i=0,nyMajlines-1 > y0 = tmYLValues(i) > specyMajlines2(i) = gsn_add_polyline(wks,plot(5),(/spec@trXMinF,spec@trXMaxF/),(/y0,y0/),lres) > end do > do i=0,nyMinlines-1 > y0 = tmYLMinorValues(i) > specyMinlines2(i) = gsn_add_polyline(wks,plot(5),(/spec@trXMinF,spec@trXMaxF/),(/y0,y0/),lres) > end do > 191d304 < ; pres@txString = casename 196a310 > pres@gsnPanelRight = 0.95