<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>