<div dir="ltr">Hi all,<br><div><br></div><div>I want to overlay climatology temperature on the potential temperature, but it does not work. Here is my code:</div><div><br></div><div><br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br><br><br>ana=addfile("pop_T_AFR_cam4.nc","r")<br>temp1_cam4=ana->temp1<br>temp1_diff_cam4=ana->temp1_diff<br>delete(ana)<br><br>ana=addfile("pop_parameters_T.nc","r")  <br>lev_diff = ana->lev_diff<br>z_max = ana->z_max<br>lev = ana->lev<br>tlon_eq = ana->tlon_eq<br>z_t = ana->z_t<br>ulon=ana->ulon<br>y_eq=ana->y_eq<br>delete(ana)<br><br><br><br>;****** PLOT  *******<br>   wks = gsn_open_wks("eps","T_EQ_100_149")<br>   res = True<br>   res@gsnDraw = False<br>   res@gsnFrame = False<br>   res@sfYArray = z_t(:z_max)<br>   res@sfXArray = tlon_eq<br>   res@cnFillOn = True<br> <br>  res@cnFillPalette       = "BlRe"  ; set color map<br>  res@cnLinesOn           = False        ; turn off countour lines<br>  res@gsnDraw      =  False                   ; do not draw the plot<br>  res@gsnFrame     =  False                   ; do not advance the frame<br>   res@cnRasterSmoothingOn = True<br>   res@cnLevelSelectionMode = "explicitLevels"<br>   res@cnLevels = lev<br>   res@tiYAxisString = "Depth (m)"<br>   res@tiYAxisFontHeightF = .025<br><br>res@lbTitleString    = "K"                ; title string<br>res@lbTitlePosition  = "Right"              ; title position<br>res@lbTitleFontHeightF= .025                ; make title smaller<br>res@lbTitleDirection = "Across"             ; title direction<br><br>res@tiMainString        = "CAM4 potential temperature response"   ; add title<br> res@tmXBLabelsOn = True<br> res@tmXBMode = "explicit"<br><br> res@tmXBValues = (/ 150, 200, 250 /)<br> res@tmXBMinorValues = (/ 120, 130, 140, 160, 170, 180, 190, 210, 220, 230, 240, 260, 270, 280 /)<br> res@tmXBLabels = (/ "150~S~o~N~E", "200~S~o~N~E", "250~S~o~N~E" /)<br><br>res@cnLevelSelectionMode =  "ManualLevels"   ; AutomaticLevels<br>res@cnMinLevelValF       = -3              ; min level<br>res@cnMaxLevelValF       =  3               ; max level<br>res@cnLevelSpacingF      =  0.25               ; interval<br><br>plot = gsn_csm_contour(wks,temp1_diff_cam4(:z_max,:),res)  <br><br><br><br><br>sres                      = True              ; set up a second resource list<br>sres@gsnDraw              = False             ; do not draw the plot<br>sres@gsnFrame             = False             ; do not advance the frame<br>sres@cnLinesOn = True                       ; turn the contour lines on<br>sres@cnLineLabelsOn = True                  ; turn the line labels on<br>sres@cnLevelSelectionMode =  "AutomaticLevels"   ; AutomaticLevels<br>sres@cnLineLabelPlacementMode = "constant"<br>sres@cnLineLabelBackgroundColor     = -1    ; transparent <br>sres@cnLineThicknessF               = 1.5   <br>sres@gsnContourNegLineDashPattern = 1       ; sets negative contours to dash pattern 1<br>sres@cnLineLabelFontHeightF   = 0.005  <br>sres@cnLineColor                    = "NavyBlue"<br><br><br>plot_ov = gsn_csm_contour(wks,temp1_cam4(:z_max,:),sres)      ; create the U-wind plot<br>overlay(plot,plot_ov)  <br><br>draw(plot)                                  ; draw the temperature plot (with the climatology temp  overlaid)<br>frame(wks)   <br><br>delete(wks)<br></div><div><br></div><div><br></div><div>Thanks,</div><div>Ana</div></div>