Re: overlay problem

From: Cheung <zuibeidemei_at_nyahnyahspammersnyahnyah>
Date: Mon Jan 09 2012 - 08:27:29 MST

I 've done as you said, and tail_prob does have coordinate info, but without res1@tfDoNDCOverlay, it still cannot be overlayed,

But the res1@tfDoNDCOverlay may generate a unreasonable result.

At 2012-01-09 22:49:13,"Mary Haley" <haley@ucar.edu> wrote:
I noticed you have:

    plot1 = gsn_csm_contour(wks,gsn_add_cyclic_point(tail_prob), res1)

It is better to handle the cyclic point via the "gsnAddCyclic" resource:

   res1@gsnAddCyclic = True
   plot1 = gsn_csm_contour(wks,tail_prob, res1)

You may also need to comment out:

; res1@tfDoNDCOverlay = True

Does "tail_prob" contain any coordinate information?

   printVarSummary(tail_prob)

This could be the source of your problem if it doesn't.

--Mary

On Jan 9, 2012, at 7:22 AM, Cheung wrote:

Dear all:

      I wanna plot a kind of figs like contour on contour, example 4, but for a regional domain.

      And I find I can not overlay my significant level dots plots onto the base map(like fig1), but if I set "res1@tfDoNDCOverlay = True", it's

ok, but the edge of my plot lose some dots which definitely should be there(see fig2 right edge of my plot, a space which should not appear, I've

checked the data).
  
      So does anyone know how to solve this ?

      Thanks a lot!

And below is my ncl resources:

    res &nb sp; = True
    res@gsnSpreadColors = True
    res@gsnSpreadColorStart = 18
    res@gsnSpreadColorEnd = 2
    res@gsnDraw = False
    res@gsnFrame = False
    res@gsnAddCyclic = False
    res@mpFillOn = False
    res@mpLimitMode = "Corners"
    res@mpLeftCornerLatF = 10.
&n bsp; res@mpRightCornerLatF = 45.
    res@mpLeftCornerLonF = 90.
    res@mpRightCornerLonF = 125.
    res@cnFillOn = True
    res@cnLinesOn = False
    res@cnLineLabelsOn = False
    res@cnLevelSelectionMode = "ManualLevels"
    res@cnLevelSpacingF = 1.
    res@cnMinLevelValF = -5.
    res@cnMaxLevelValF = 5.
< div> res@gsnLeftString = ""
    res@gsnCenterString = ""
    plot = gsn_csm_contour_map(wks,below_avg(:,:),res)

    res1 = True
    res1@gsnDraw = False
    res1@gsnFrame = False
; res1@tfDoNDCOverlay = True
    res1@gsnAddCyclic = False
    res1@cnLevelSelection Mode = "ManualLevels" ; set manual contour levels
    res1@cnMinLevelValF = 0.00 ; set min contour level
    res1@cnMaxLevelValF = 1.05 ; set max contour level
    res1@cnLevelSpacingF = 0.01 ; set contour spacing
    res1@cnInfoLabelOn = False ; turn off info label
    res1@cnLinesOn = False ; do not draw contour lines
    res1@cnLineLabelsOn = False &nb sp; ; do not draw contour labels
    res1@cnFillScaleF = 0.6 ; add extra density
    res1@tiXAxisString = ""
    res1@tiYAxisString = ""
    plot1 = gsn_csm_contour(wks,gsn_add_cyclic_point(tail_prob), res1)
    plot1 = ShadeLtContour(plot1, 0.02, 17) ; shade all areas less than the
    overlay(plot, plot1)
    draw(plot)
    frame(wks)
 

<fig1.tiff><fig2.tiff>_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jan 9 08:27:50 2012

This archive was generated by hypermail 2.1.8 : Wed Jan 18 2012 - 09:21:55 MST