Re: Add points of interes to a background map

From: Jing Zheng <jingzheng.bj_at_nyahnyahspammersnyahnyah>
Date: Fri Aug 26 2011 - 13:47:08 MDT

Hi Adam,

Yes, the wrf_map() worked now!

Thanks a lot!

Jing

On Sat, Aug 27, 2011 at 1:32 AM, Adam Phillips <asphilli@ucar.edu> wrote:

> Hi Jing,
> You should continue to use wrf_map. Keep your wrf_map call as you had it.
>
> Why you are getting the error message:
> wrf_map wants the 2nd input to be a netCDF file pointer.
> gsn_csm_contour_map wants the 2nd input to be a data array.
>
> http://www.ncl.ucar.edu/**Document/Functions/WRF_arw/**wrf_map.shtml<http://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_map.shtml>
> http://www.ncl.ucar.edu/**Document/Graphics/Interfaces/**
> gsn_csm_contour_map.shtml<http://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_contour_map.shtml>
>
>
> map = wrf_map(wks,a0,mpres)
> .....
>
> 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)
>
> Let the group know if that doesn't work...
> Adam
>
>
> On 08/26/2011 11:17 AM, Jing Zheng wrote:
>
>> 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
>> <mailto: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
>> >
>>
>>
> --
> ______________________________**______________________________**__
>
> Adam Phillips asphilli@ucar.edu
> NCAR/Climate and Global Dynamics Division (303) 497-1726
> P.O. Box 3000
> Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/**asphilli<http://www.cgd.ucar.edu/cas/asphilli>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Aug 26 13:47:18 2011

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