Re: Add points of interes to a background map

From: Jing Zheng <jingzheng.bj_at_nyahnyahspammersnyahnyah>
Date: Fri Aug 26 2011 - 11:17:38 MDT

Hi Adam,

I am really appreciated for your reply.

I added at the beginning:

res = True
res@gsnDraw = False
res@gsnFrame = False
pltres@PanelPlot = True ; = setting gsnFrame,gsnDraw = False

Then
in the plotting part,

I removed
map = wrf_map(wks,a0,mpres)
to be:
map = gsn_csm_contour_map(wks,a0,res)

However, I still can't get the point from either

map = gsn_csm_contour_map(wks,arr,res)
doto=gsn_add_polymarker(wks,map,xxo,yyo,gsres)
draw(map)
frame(wks)
or

plot=wrf_map_overlays(a1,wks,(/diff_tc,diff_slp,diff_gh/),pltres,mpres)
doto=gsn_add_polymarker(wks,plot,xxo,yyo,gsres)
draw(plot)
frame(wks)

I got an error message:

fatal:Argument type mismatch on argument (1) of (gsn_csm_contour_map) can
not coerce
fatal:Execute: Error occurred at or near line 435 in file wrfout_help.ncl

What does it mean? Thanks.

Jing
On Fri, Aug 26, 2011 at 11:57 PM, Adam Phillips <asphilli@ucar.edu> wrote:

> Hi Jing,
> You're close. The key when using any gsn_add_* procedure is to make sure
> the plot is not drawn and the frame is not advanced. When using normal
> NCL plotting functions, this can be done like this:
>
> res = True
> res@gsnDraw = False
> res@gsnFrame = False
> ...
> map = gsn_csm_contour_map(wks,arr,res)
> doto=gsn_add_polymarker(wks,map,xxo,yyo,gsres)
> draw(map)
> frame(wks)
>
> With the wrf_* plotting functions it can be a little different. Instead
> of specifying gsnDraw/gsnFrame as was done above, you need to set the
> WRF resource PanelPlot = True, which automatically sets gsnDraw/gsnFrame
> = False:
>
> .....
> pltres@PanelPlot = True ; = setting gsnFrame,gsnDraw = False
> plot=wrf_map_overlays(a1,wks,(/diff_tc,diff_slp,diff_gh/),pltres,mpres)
> doto=gsn_add_polymarker(wks,plot,xxo,yyo,gsres)
> draw(plot)
> frame(wks)
>
> If you continue to have this problem after applying the above coding let
> the group know.. Adam
>
> On 08/26/2011 09:23 AM, Jing Zheng wrote:
> > Hi all,
> > I am not quite familiar with NCL. I met a similar problem with this.
> > I followed this Q&A but still was not very clear how to figure out my
> > problem.
> > I just wanted to add 1 point of location into the plot, but failed to
> > add the point.
> > I didn't call any NCL procedure. But I added a few lines in the scripts
> > as follow:
> > ---------------------------
> > plot = wrf_map_overlays(a1,wks,(/diff_tc,diff_slp,diff_gh/),pltres,mpres)
> > doto=gsn_add_polymarker(wks,plot,xxo,yyo,gsres)
> > frame(wks)
> > --------------------------
> > Any suggestion? Thanks.
> > Jing
> >
>

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

Received on Fri Aug 26 11:17:48 2011

This archive was generated by hypermail 2.1.8 : Mon Aug 29 2011 - 21:44:22 MDT