Re: Contour Overlay

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Mar 01 2011 - 11:22:58 MST

Hi Xinyuan,

The problem is that wrf_map_overlays removes the contour plot after it overlays it. I think this is so you can use this map again later to overlay something else.

To trick wrf_map_overlays into *not* removing the overlay, set:

   pltres@PanelPlot = True

This makes the wrf_map_overlays function think you are going to panel the plots later, and hence it won't remove anything.

You'll also want to uncomment the frame call.

So, basically, in your NCL script, change these lines:

    pltres = True
    mpres = True
    plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)
    overlay(plot,plot_ov)
    draw(plot)
; frame(wks)
  end do

to:

    pltres = True
    mpres = True
    pltres@PanelPlot = True
    plot = wrf_map_overlays(a,wks,(/contour/),pltres,mpres)
    overlay(plot,plot_ov)
    draw(plot)
    frame(wks)
  end do

The line labels are a bit much, and your information label is in a weird place, so you might want to additionally set these resources:

  res@cnLineLabelsOn = False
  res@cnInfoLabelOrthogonalPosF = -0.17

Finally, you have two sets of subtitles overwriting each other at the top. My suggestion is to turn them off for the line contour plot:

  res@gsnRightString = ""
  res@gsnLeftString = ""

You may need to change or add other titles as appropriate.

--Mary

On Mar 1, 2011, at 10:57 AM, fengxy wrote:

> Hi,
>
> I'm trying to overlay 500mb heights on terrain. However, it just plots terrain. If set the "cnFillOn" to "False", the 500mb heights can show up over terrain. So I think it's not the problem of lat/lon coordinate arrays. The terrain data is from WPS and the 500mb heighs is reanalysis data. And I use "wrf_map_overlays" to create terrain map.
> I've provided the files offline. Could anyone suggest something I could try?
> Thank you!
> Xinyuan
>
> 2011-03-02
> fengxy
> _______________________________________________
> 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 Tue Mar 1 11:23:10 2011

This archive was generated by hypermail 2.1.8 : Wed Mar 02 2011 - 09:18:12 MST