<div dir="ltr"><div><div><div>Hi Qi,<br></div>What you are seeing looks right to me.The ocean is very likely = 0.0m. When the first contour level starts at 2, the ocean will be colored the color that shades all areas less than 2. When the first contour level starts at 0, all areas greater than <i>or equal to</i> 0 and less than 25 (?) will be colored green, and all areas less than 0 blue. This is a good example of NCL color filling behavior. <br></div>Hope that helps!<br></div>Adam <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 2, 2015 at 2:26 AM, LI Qi <span dir="ltr">&lt;<a href="mailto:liqi123sh@qq.com" target="_blank">liqi123sh@qq.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br></div><div>Dear Rick,</div><div><br></div><div>Really appreciate your help! It works!</div><div><br></div><div>Attached is my script to add domain idx. </div><div><br></div><div><span style="line-height:1.5">But I still have a minor question: when the minimum contour level of terrain height (unit: m) is set to 0, the ocean area shows green. Only when set to 2, the ocean displays correctly (shown below). Why? </span></div><div><span style="line-height:1.5">The terrain data is output from WRF model. </span></div><div><span style="line-height:1.5"><br></span></div><div><span style="line-height:1.5">Best regards,</span></div><div>Qi</div><div><br></div><div><br></div><div>ncl script:</div><div><div>  xbox = (/lon2(0,0),lon2(0,nx2),lon2(ny2,nx2),lon2(ny2,0),lon2(0,0)/)</div><div>  ybox = (/lat2(0,0),lat2(0,nx2),lat2(ny2,nx2),lat2(ny2,0),lat2(0,0)/)</div><div>  datatondc(map, xbox, ybox, xbox_out, ybox_out)</div><div>  gsn_polyline_ndc(wks, xbox_out, ybox_out, lnres)</div><div>; domain 2 idx</div><div>  gsn_text_ndc(wks, &quot;d02&quot; , xbox_out(3), ybox_out(3), txres)<span style="line-height:0px">‍</span></div></div><div><br></div><div><img src="cid:2BFCF807@AA32EF10.36FD1C55"><span style="line-height:0px">‍</span></div><div><br></div><div><br></div><div><div><br></div><div><img src="cid:2FFFF406@AA32EF10.36FD1C55"><span style="line-height:0px">‍</span></div><div><br></div><div style="font-size:12px;font-family:Arial Narrow;padding:2px 0 2px 0">------------------ Original ------------------</div><div style="font-size:12px;background:#efefef;padding:8px"><div><b>From: </b> &quot;Rick Brownrigg&quot;;&lt;<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>&gt;;</div><div><b>Date: </b> Thu, Apr 2, 2015 00:47 AM</div><div><b>To: </b> &quot;LI Qi&quot;&lt;<a href="mailto:liqi123sh@qq.com" target="_blank">liqi123sh@qq.com</a>&gt;; <u></u></div><div><b>Cc: </b> &quot;ncl-talk&quot;&lt;<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>&gt;; <u></u></div><div><b>Subject: </b> Re: [ncl-talk] add string on each domain</div></div><div><br></div><div dir="ltr"><div><div>Hi,<br><br></div>There&#39;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:<br><br><a href="http://ncl.ucar.edu/Document/Graphics/Interfaces/gsn_add_text.shtml" target="_blank">http://ncl.ucar.edu/Document/Graphics/Interfaces/gsn_add_text.shtml</a><br><br><br></div><div>In the example script you referenced, you&#39;d want to make this call before the call to &quot;draw(map)&quot; for plot 3.<br><br>Alternatively, you can position the text in normalized-device-coordinate space (NDC-space) using gsn_text_ndc():<br><br><a href="http://ncl.ucar.edu/Document/Graphics/Interfaces/gsn_text_ndc.shtml" target="_blank">http://ncl.ucar.edu/Document/Graphics/Interfaces/gsn_text_ndc.shtml</a><br><br></div><div>Look in particular at how the nested domain&#39;s outline was drawn *on top of* plot3 using NDC coordinates:<br><pre>; 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)<br><br></pre><pre>Hope that helps...<br></pre><pre>Rick<br></pre><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 31, 2015 at 8:35 PM, LI Qi <span dir="ltr">&lt;<a href="mailto:liqi123sh@qq.com" target="_blank">liqi123sh@qq.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hello NCL community,</div><div><br></div><div>I was wondering how to add strings like d01 and d02 in the top-left corner of each domain separately.</div><div><br></div><div>The plot of nested domains is shown below.</div><div>( <a href="http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/EXPERIMENTAL/wrf_overlay_doms.htm" target="_blank">http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/EXPERIMENTAL/wrf_overlay_doms.htm</a> )<span style="line-height:0px">‍</span></div><div><br></div><div><img src="http://www2.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/EXPERIMENTAL/wrf_overlay_doms-2.png"><span style="line-height:0px">‍</span></div><div><br></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist,  </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>   </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</div>