[ncl-talk] add string on each domain

Rick Brownrigg brownrig at ucar.edu
Wed Apr 1 10:47:25 MDT 2015


Hi,

There's probably a couple of ways to do this.  gsn_add_text allows you to
add and position text in the coordinate space of the data:

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


In the example script you referenced, you'd want to make this call before
the call to "draw(map)" for plot 3.

Alternatively, you can position the text in normalized-device-coordinate
space (NDC-space) using gsn_text_ndc():

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

Look in particular at how the nested domain's outline was drawn *on top of*
plot3 using NDC coordinates:

; PLOT 3
  draw(map)   ; domain 2 already overlaid here - so just draw again
  xbox = (/lon2(0,0),lon2(0,nx2),lon2(ny2,nx2),lon2(ny2,0),lon2(0,0)/)
  ybox = (/lat2(0,0),lat2(0,nx2),lat2(ny2,nx2),lat2(ny2,0),lat2(0,0)/)
  datatondc(map, xbox, ybox, xbox_out, ybox_out)
  gsn_polyline_ndc(wks, xbox_out, ybox_out, lnres)

Hope that helps...

Rick




On Tue, Mar 31, 2015 at 8:35 PM, LI Qi <liqi123sh at qq.com> wrote:

> Hello NCL community,
>
> I was wondering how to add strings like d01 and d02 in the top-left corner
> of each domain separately.
>
> The plot of nested domains is shown below.
> (
> http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/EXPERIMENTAL/wrf_overlay_doms.htm
> )‍
>
>>
>
> _______________________________________________
> ncl-talk mailing list
> 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/20150401/1d58f637/attachment.html 


More information about the ncl-talk mailing list