[ncl-talk] Showing location and name of synoptic stations on a plot

Rick Brownrigg brownrig at ucar.edu
Thu Aug 29 07:14:00 MDT 2019


Hi,

If you have an excel file, perhaps the easiest thing is to export it as a
CSV file to read with NCL for plotting. See this link for how to read and
parse such files to extract your lat/lon positions:

    http://ncl.ucar.edu/Applications/read_csv.shtml

This link shows how to draw markers on top of a map:

    http://ncl.ucar.edu/Applications/polyg.shtml

The key elements here are:

i) set the resources
   res at gsnFrame = False
   res at gsnDraw = False

where "res" is the resource variable that gets passed into making your plot

ii) use gsn_add_polymarker to draw the markers on top of the plot. See:


http://ncl.ucar.edu/Document/Graphics/Interfaces/gsn_add_polymarker.shtml

and

    http://ncl.ucar.edu/Document/Graphics/Resources/gs.shtml

for the various "gsMarkerXXX" resources that control marker style, color,
size, etc

and finally

    http://ncl.ucar.edu/Document/Graphics/Images/markers.png

for the available marker styles

iii)  Call
   draw(plot)
   frame(wks)

to draw you plot with the attached markers

Hope that helps...
Rick


On Thu, Aug 29, 2019 at 5:06 AM zoe jacobs via ncl-talk <ncl-talk at ucar.edu>
wrote:

> Hi all,
>
> I have got an excel file containing stations names plus their lat/lon.
> What I  need is to show the location and name of stations on my plot with
> markers, like black circles  ( my plot is based on a model output). Would
> you please help me how can I do this.
> look forward to hearing from you.
> Kind regards,
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190829/47b3796b/attachment.html>


More information about the ncl-talk mailing list