14c14
< sign = -1.
---
> sign = 1.
16,18c16,18
< ; casename = "b40.1850.track1.1deg.006"
< ; datadir = "/ccsm/ocn/yeager/amoc_ts/"+casename+"/eofs/"
< ; netcdf = "MOC.700-1299.eof.atl.nc"
---
> ;  casename = "G_JRA55_test1_vdc013l"
> ;  datadir = "/work/yiwen89419/CCSM_ncl/G_JRA55_test1_vdc013l/"
> ;  netcdf = "MOCtot.306-366.eof.atl.lz10+.nodt.nc"
20c20,24
<   casename = "taiesm"  ;
---
> ;  casename = "b_20ct_ctrl_1"  ;EOF1*(-1)
> ;  datadir = "/work/yiwen89419/CCSM_ncl/"
> ;  netcdf = "./Monthly/MOCtot.1921-2000.eof.atl.lz10+.nodt.nc"
> 
>   casename = "taiesm"  ;EOF1*(-1)
22,25c26,29
< ;  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(x)
<   netcdf = "MOCtot.500-700.eof.atl.lz10+.nodt.nc"  ;not detrend & smooth[default]
< ;  netcdf = "MOCtot.500-700.eof.atl.lz10+.nc"      ;detrend & smooth
---
>   netcdf = "./f09.B-PI.tn15.cmip6.j01.re/yearly/MOCtot.500-700.eof.atl.lz10+.nodt.nc"
>  
> ;  sign = -1.
> 
28c32
<   psout = "Fig2_AMOCeofs"
---
>   psout = sfx@fBase
30a35
> 
40,41c45,46
<   eof(0,:,:) = eof(0,:,:)*sign
<   eofts(0,:) = eofts(0,:)*sign
---
>   eof = eof*sign
>   eofts = eofts*sign
43,45c48,49
<   mocz = mocz/100.
<   mocz = mocz/1000.
<   mocz@units = "km"
---
>   mocz = mocz/100./1000.
>   mocz@units = "m"
62,63c66
< ;jave = 5 ; number of periodograms to average (if < 3, no smoothing!)
< jave = 1 ; number of periodograms to average (if < 3, no smoothing!)
---
> jave = 5 ; number of periodograms to average (if < 3, no smoothing!)
70,74c73,75
<   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
---
> ; gsn_define_colormap(wks,"amwg_blueyellowred")         ; choose colormap
>   gsn_define_colormap(wks,"BlueWhiteOrangeRed")         ; choose colormap
>   i    = NhlNewColor(wks,0.8,0.8,0.8)      ; add gray to map
83c84
<   res@cnMissingValFillColor = blk
---
>   res@cnMissingValFillColor = "grey"
86,87c87,88
<   res@cnLinesOn            = False                ; turn off contour lines
<   res@cnLineLabelsOn 	   = False		; turn the line labels off
---
>   res@cnLinesOn            = True                ; turn off contour lines
>   res@cnLineLabelsOn 	   = True		; turn the line labels off
89,92c90,91
<   res@gsnSpreadColorStart  = 32                   ; start at color 10
<   res@gsnSpreadColorEnd    = 8                   ; end at color 96
<   res@gsnLeftStringFontHeightF = 0.025
<   res@gsnRightStringFontHeightF = 0.025
---
>   res@gsnSpreadColorStart  = 2                   ; start at color 10
>   res@gsnSpreadColorEnd    = 255                   ; end at color 96
96,97c95,96
<   res@cnMinLevelValF	   = 0.0
<   res@cnMaxLevelValF	   =  1.0
---
>   res@cnMinLevelValF	   = -1.4
>   res@cnMaxLevelValF	   =  1.4
108,133d106
<   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
< 
< 
< 
144d116
<   resxy@gsnLeftStringFontHeightF = 0.025
155,156d126
<   resxy@tmXTOn = False
<   resxy@tmYROn = False
164c134
< ;spec@tiYAxisString = "Frequency x Power (Sv~S~2~N~)"
---
> spec@tiYAxisString = "Frequency x Power (Sv~S~2~N~)"
170,171d139
< spec@gsnLeftStringFontHeightF = 0.025
< spec@gsnRightStringFontHeightF = 0.025
174c142
< spec@xyLineColors = (/blk,grey,grey,grey/)
---
> spec@xyLineColors = (/"black","red","red","red"/)
207,215c175,177
< ; 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)
---
>   res@gsnLeftString = "ci = "+flt2string(res@cnLevelSpacingF)+" Sv"
>   res@gsnRightString = "EOF 1,   "+sprintf("%4.2f",eof@pcvar(0) ) + "%"
>   plot(0) = gsn_csm_contour(wks,eof(0,:,:),res)
217,218c179
<   resxy@gsnLeftString = "b. PC1 Time Series"
< ; resxy@gsnCenterString = ""
---
>   resxy@gsnCenterString = "PC 1 time series"
222,224c183,184
<   spectrum = specx_ci(dof,0.95,0.)
<   spec@gsnLeftString = "c. PC1 Power Spectrum"
<   spec@gsnCenterString = ""
---
>   spectrum = specx_ci(dof,0.95,0.99)
>   spec@gsnCenterString = "Power Spectrum"
255,265c215,217
<   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)"
---
>   res@gsnRightString = "EOF 2,   "+sprintf("%4.2f",eof@pcvar(1) ) + "%"
>   plot(3) = gsn_csm_contour(wks,eof(1,:,:),res)
>   resxy@gsnCenterString = "PC 2 time series"
269,270c221,222
<   spectrum = specx_ci(dof,0.95,0.)
<   spec@gsnLeftString = "f. PC2 Power Spectrum"
---
>   spectrum = specx_ci(dof,0.95,0.99)
>   spec@gsnCenterString = ""
301a254
>   pres@txString   = casename
307d259
<   pres@gsnPanelRight = 0.95