<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Message noted!&nbsp;<div class=""><br class=""></div><div class="">My apology for the oversight about subject line.<div class=""><div class=""><br class=""></div><div class="">Dawit</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 19, 2017, at 6:06 PM, Mary Haley &lt;<a href="mailto:haley@ucar.edu" class="">haley@ucar.edu</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-size:small">Dawit,</div><div class="gmail_default" style="font-size:small"><br class=""></div><div class="gmail_default" style="font-size:small">When you send messages to ncl-talk, I have a couple of suggestions:</div><div class="gmail_default" style="font-size:small"><br class=""></div>[1] &nbsp;When you have a new question, please compose a new message with a meaningful subject.&nbsp; A subject of "Re: ncl-talk Digest, Vol 161, Issue 23"<div class="gmail_default" style="font-size:small;display:inline">​ may cause some people to skip the message.</div><div class=""><div class="gmail_default" style="font-size:small;display:inline">​</div><div class="gmail_default" style="font-size:small">[2] Only send your message to <a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a> and don't CC other people. Otherwise, we all get multiple messages in our mailboxes.</div><div class="gmail_default" style="font-size:small"><br class=""></div><div class="gmail_default" style="font-size:small">Thanks for your consideration.</div><div class="gmail_default" style="font-size:small"><br class=""></div><div class="gmail_default" style="font-size:small">The source of your problem is this line:</div><div class="gmail_default" style="font-size:small"><br class=""></div><div class="gmail_default">&nbsp; res@gsnCenterString &nbsp;= yyyymm({192112})<br class=""></div><div class="gmail_default"><br class=""></div><div class="gmail_default">Whenever you use the '{...}' syntax, this is called "coordinate subscripting". To use coordinate subscripting, yyyymm must have a coordinate array associated with it that defines the coordinates.</div><div class="gmail_default" style="font-size:small"><br class=""></div><div class="gmail_default" style="font-size:small"><br class=""></div><div class="gmail_default" style="font-size:small">To assign a coordinate array to a one-dimensional array, you need to name the dimension and then assign the coordinate array:</div><div class="gmail_default" style="font-size:small"><div style="font-size:12.8px" class=""><br class=""></div><div style="font-size:12.8px" class=""><font face="monospace, monospace" class="">&nbsp; year &nbsp; &nbsp; &nbsp; = yyyymm/100</font></div><div style="font-size:12.8px" class=""><font face="monospace, monospace" class="">&nbsp; yrStrt &nbsp; &nbsp; = 1901</font></div><div style="font-size:12.8px" class=""><font face="monospace, monospace" class="">&nbsp; yrLast &nbsp; &nbsp; = 2014</font></div><div style="font-size:12.8px" class=""><font face="monospace, monospace" class="">&nbsp; nyear &nbsp; &nbsp; &nbsp;= yrLast-yrStrt+1</font></div><div style="font-size:12.8px" class=""><font face="monospace, monospace" class="">&nbsp; yyyymm &nbsp; &nbsp; = yyyymm_time(yrStrt, yrLast, "integer")<br class=""><br class=""></font><div style="font-size:12.8px" class=""><font face="monospace, monospace" class="">&nbsp; yyyymm<b class="">!0</b> &nbsp; &nbsp;= "<b class="">time</b>" &nbsp; &nbsp; &nbsp;; Name the dimension of "yyyymm" so we can assign a coordinate array</font></div><div style="font-size:12.8px" class=""><font face="monospace, monospace" class="">&nbsp; yyyymm&amp;time = yyyymm &nbsp; &nbsp; &nbsp;; Assign a coordinate array called "<b class="">time</b>"</font></div><div style="font-size:12.8px" class=""><font face="arial, helvetica, sans-serif" class=""><br class=""></font></div><div style="font-size:12.8px" class=""><font face="arial, helvetica, sans-serif" class="">Note that the name "time" is arbitrary.&nbsp; You just need to make sure that whatever name you give the dimension is the same name you use when you assign the coordinate array:</font></div><div style="font-size:12.8px" class=""><font face="monospace, monospace" class=""><br class=""></font></div><div style="font-size:12.8px" class=""><font face="monospace, monospace" class=""><br class=""></font></div></div><div style="font-size:12.8px" class=""><div style="font-size:12.8px" class=""><font face="monospace, monospace" class="">&nbsp; yyyymm<b class="">!0</b> &nbsp; &nbsp;= "<b class="">date</b>" &nbsp; &nbsp; &nbsp;; Name the dimension of "yyyymm" so we can assign a coordinate array</font></div><div style="font-size:12.8px" class=""><font face="monospace, monospace" class="">&nbsp; yyyymm<b class="">&amp;date</b> = yyyymm &nbsp; &nbsp; &nbsp;; Assign a coordinate array called "<b class="">date</b>"</font></div></div></div><div class="gmail_default" style="font-size:small"><br class=""></div><div class="gmail_default" style="font-size:small">Now, you should be able to use coordinate subscripting:</div><div class="gmail_default" style="font-size:small"><br class=""></div><div class="gmail_default" style="font-size:small"><div class="gmail_default"><font face="monospace, monospace" class="">&nbsp; res@gsnCenterString &nbsp;= yyyymm({192112})<br class=""></font></div><div class=""><br class=""></div><div class="">--Mary</div><div class=""><br class=""></div></div></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Apr 18, 2017 at 8:50 AM, Dawit Abebe <span dir="ltr" class="">&lt;<a href="mailto:dawit.kan@gmail.com" target="_blank" class="">dawit.kan@gmail.com</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Dear All,<div class=""><br class=""></div><div class="">I was trying to plot a spatial map of SPI but having a challenge indexing coordinates. I pasted my script as well as the point a stuck (red text) from NCL output below.</div><div class=""><br class=""></div><div class="">Thank you so much for your support as usual.</div><div class=""><br class=""></div><div class="">Dawit</div><div class=""><br class=""></div><div class=""><font color="#0433ff" class=""><b class="">1. My script</b></font></div><div class=""><br class=""></div><div class="">;=============================<wbr class="">==============================<wbr class="">==============================</div><div class="">;spi spatial map plot</div><div class="">;=============================<wbr class="">==============================<wbr class="">==============================</div><div class="">load "$NCARG_ROOT/lib/ncarg/<wbr class="">nclscripts/csm/gsn_code.ncl"</div><div class="">load "$NCARG_ROOT/lib/ncarg/<wbr class="">nclscripts/csm/gsn_csm.ncl"</div><div class="">load "$NCARG_ROOT/lib/ncarg/<wbr class="">nclscripts/csm/contributed.<wbr class="">ncl"</div><div class=""><br class=""></div><div class="">begin</div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; diri &nbsp;= "./"</div><div class="">&nbsp; &nbsp; fili &nbsp;= "<a href="http://pre_cru_1901_2014.nc/" target="_blank" class="">pre_cru_1901_2014.nc</a>"</div><div class="">&nbsp; &nbsp; f &nbsp; &nbsp; = addfile(diri+fili, "r")</div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; prc &nbsp;= f-&gt;pre</div><div class="">&nbsp; &nbsp; prc@_FillValue = -999.0</div><div class="">&nbsp; &nbsp; pmsg = prc@_FillValue</div><div class="">&nbsp; &nbsp; printVarSummary(prc)</div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; dimp = dimsizes(prc)</div><div class="">&nbsp; &nbsp; ntim = dimp(0)</div><div class="">&nbsp; &nbsp; nlat = dimp(1)</div><div class="">&nbsp; &nbsp; mlon = dimp(2)</div><div class=""><br class=""></div><div class=""><span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span>run &nbsp;= (/12/)</div><div class=""><span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span>nrun = dimsizes(run)</div><div class=""><br class=""></div><div class=""><span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span>spi = new((/nrun,ntim,nlat,mlon/), typeof(prc), pmsg)</div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; opt = True</div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; do nr=0,nrun-1</div><div class=""><span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span> &nbsp; &nbsp;spi(nr,:,:,:)= dim_spi_n(prc, run(nr), True, 0)</div><div class=""><span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span>end do</div><div class=""><br class=""></div><div class=""><span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span> copy_VarCoords(prc,spi(0,:,:,:<wbr class="">))</div><div class=""><span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span> spi@long_name = "SPI"</div><div class=""><span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span> spi!0 &nbsp; &nbsp; &nbsp; &nbsp; = "run"</div><div class=""><span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span> spi&amp;run &nbsp; &nbsp; &nbsp; = &nbsp;run</div><div class=""><span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span> printVarSummary(spi)</div><div class=""><br class=""></div><div class="">&nbsp;;============================<wbr class="">==============================<wbr class="">==============================</div><div class="">&nbsp;; Plot parameter</div><div class="">&nbsp;;============================<wbr class="">==============================<wbr class="">==============================</div><div class="">&nbsp; &nbsp; dimp = dimsizes(prc)</div><div class="">&nbsp; &nbsp; ntim = dimp(0)</div><div class="">&nbsp; &nbsp; nlat = dimp(1)</div><div class="">&nbsp; &nbsp; mlon = dimp(2)</div><div class=""><br class=""></div><div class="">&nbsp; yyyymm = f-&gt;time</div><div class="">&nbsp; yyyymm = yyyymm/100</div><div class=""><br class=""></div><div class="">&nbsp; year &nbsp; &nbsp;= yyyymm/100</div><div class="">&nbsp; yrStrt &nbsp;= 1901</div><div class="">&nbsp; yrLast &nbsp;= 2014</div><div class="">&nbsp; nyear &nbsp; = yrLast-yrStrt+1</div><div class="">&nbsp; yyyymm &nbsp;= yyyymm_time(yrStrt, yrLast, "integer")</div><div class="">&nbsp; yrfrac &nbsp;= (/ yyyymm_to_yyyyfrac(yyyymm, 0.0) /)</div><div class=""><br class=""></div><div class="">&nbsp; prc&amp;time = (/ yyyymm /)</div><div class=""><br class=""></div><div class="">;=============================<wbr class="">==============================<wbr class="">=============================</div><div class=""><br class=""></div><div class="">&nbsp; wks &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= gsn_open_wks ("ps","spi")</div><div class="">&nbsp; gsn_define_colormap(wks,"<wbr class="">BlueWhiteOrangeRed")</div><div class="">&nbsp; gsn_reverse_colormap(wks) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; Reverse the color map.</div><div class=""><br class=""></div><div class="">&nbsp; res &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= True</div><div class="">&nbsp; res@gsnDraw &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= False &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; don't draw</div><div class="">&nbsp; res@gsnFrame &nbsp; &nbsp; &nbsp; &nbsp; = False &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; don't advance frame</div><div class="">&nbsp; res@gsnSpreadColors &nbsp;= True</div><div class=""><br class=""></div><div class="">&nbsp; res@cnFillOn &nbsp; &nbsp; &nbsp; &nbsp; = True &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; color Fill</div><div class="">&nbsp; res@cnFillMode &nbsp; &nbsp; &nbsp; = "RasterFill" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; Raster Mode</div><div class="">&nbsp; res@cnLinesOn &nbsp; &nbsp; &nbsp; &nbsp;= &nbsp;False &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; Turn off contour lines</div><div class="">&nbsp; res@cnLevelSelectionMode = "ManualLevels" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; set manual contour levels</div><div class="">&nbsp; res@cnMinLevelValF &nbsp; = -3.0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; set min contour level</div><div class="">&nbsp; res@cnMaxLevelValF &nbsp; = &nbsp;3.0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; set max contour level</div><div class="">&nbsp; res@cnLevelSpacingF &nbsp;= &nbsp;0.5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; set contour spacing</div><div class="">&nbsp; res@lbLabelBarOn &nbsp; &nbsp; = False &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; turn off individual cb's</div><div class=""><br class=""></div><div class="">&nbsp; resP &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = True &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; panel resources</div><div class="">&nbsp; resP@txString &nbsp; &nbsp; &nbsp; &nbsp;= False</div><div class="">&nbsp; resP@gsnPanelLabelBar= True &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; add common colorbar</div><div class=""><br class=""></div><div class="">&nbsp; plot = new ( 5, "graphic")</div><div class=""><br class=""></div><div class="">&nbsp; do nl=0,nlat-1</div><div class="">&nbsp; &nbsp; &nbsp;do ml=0,mlon-1</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; do nr=0,nrun-1</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;spi(nr,:,:,:)= dim_spi_n(prc, run(nr), True, 0)</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;spi@long_name = "SPI"</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;spi@units = "nrun="+run(nr)</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;copy_VarCoords(prc,spi(0,:,:,<wbr class="">:))</div><div class=""><span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span> &nbsp; &nbsp; &nbsp; spi!0 &nbsp; &nbsp; &nbsp; &nbsp; = "run"</div><div class=""><span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span> &nbsp; &nbsp; &nbsp; spi&amp;run &nbsp; &nbsp; &nbsp; = &nbsp;run</div><div class=""><span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span> &nbsp; &nbsp; &nbsp; printVarSummary(spi)</div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;res@gsnCenterString &nbsp;= yyyymm({192112})</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;plot(0) = gsn_csm_contour_map_ce(wks,<wbr class="">spi({192112},:,:,:), res)</div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;res@gsnCenterString &nbsp;= yyyymm({192212})</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;plot(1) = gsn_csm_contour_map_ce(wks,<wbr class="">spi({192212},:,:,:), res)</div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;res@gsnCenterString &nbsp;= yyyymm({192712})</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;plot(2) = gsn_csm_contour_map_ce(wks,<wbr class="">spi({192712},:,:,:), res)</div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;res@gsnCenterString &nbsp;= yyyymm({197312})</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;plot(3) = gsn_csm_contour_map_ce(wks,<wbr class="">spi({197312},:,:,:), res)</div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;res@gsnCenterString &nbsp;= yyyymm({198412})</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;plot(4) = gsn_csm_contour_map_ce(wks,<wbr class="">spi({198412},:,:,:), res)</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; end do</div><div class="">&nbsp; &nbsp; &nbsp; end do</div><div class="">&nbsp; &nbsp; &nbsp;end do</div><div class=""><br class=""></div><div class="">&nbsp; &nbsp; &nbsp;gsn_panel(wks,plot,(/5,1/),<wbr class="">resP) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; now draw as one plot</div><div class=""><br class=""></div><div class="">end</div><div class=""><br class=""></div><div class=""><b style="color:rgb(4,51,255)" class="">2. NCL output from exciting the script above</b></div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">(my_ncl) Dagemawes-MacBook-Pro:~ dawitabebe$ ncl -Q spi12_plotmap_script.ncl</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Variable: prc</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Type: double</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Total Size: 393984 bytes</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 49248 values</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Number of Dimensions: 3</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Dimensions and sizes:<span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span>[time | 1368] x [lat | 4] x [lon | 9]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Coordinates:&nbsp;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time: [ 380..41987]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lat: [3.75..5.25]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lon: [36.75..40.75]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Number Of Attributes: 5</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; correlation_decay_distance :<span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span> 450</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; long_name :<span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span>precipitation</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; units :<span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span>mm/month</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; missing_value :<span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span>9.96920996839e+36</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; _FillValue :<span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span>-999</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Variable: spi</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Type: double</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Total Size: 393984 bytes</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 49248 values</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Number of Dimensions: 4</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Dimensions and sizes:<span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span>[run | 1] x [time | 1368] x [lat | 4] x [lon | 9]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Coordinates:&nbsp;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; run: [12..12]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time: [ 380..41987]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lat: [3.75..5.25]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lon: [36.75..40.75]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Number Of Attributes: 2</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; long_name :<span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span>SPI</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; _FillValue :<span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span>-999</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Variable: spi</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Type: double</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Total Size: 393984 bytes</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 49248 values</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Number of Dimensions: 4</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Dimensions and sizes:<span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span>[run | 1] x [time | 1368] x [lat | 4] x [lon | 9]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Coordinates:&nbsp;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; run: [12..12]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time: [190101..201412]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lat: [3.75..5.25]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lon: [36.75..40.75]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Number Of Attributes: 4</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; units :<span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span>nrun=12</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; long_name :<span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span>SPI</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; run :<span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span>12</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">&nbsp; _FillValue :<span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span>-999</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">fatal:<wbr class="">NclOneDValGetClosestIndex: <font color="#ff2600" class="">finish coordinate index out of range, can't continue</font></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#ff2600" class="">fatal:Could not obtain coordinate indexes, unable to perform subscript</font></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><font color="#ff2600" class="">fatal:["Execute.c":8640]:<wbr class="">Execute: Error occurred at or near line 98 in file spi12_plotmap_script.ncl</font></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">(my_ncl) Dagemawes-MacBook-Pro:~ dawitabebe$&nbsp;</span></div></div><div class=""><span style="font-variant-ligatures:no-common-ligatures" class="">……………………………………...</span></div><div class="">&nbsp;<br class=""><div class=""><blockquote type="cite" class=""><div class="">On Apr 18, 2017, at 10:29 AM, <a href="mailto:ncl-talk-request@ucar.edu" target="_blank" class="">ncl-talk-request@ucar.edu</a> wrote:</div><br class="m_-4943166290922558066Apple-interchange-newline"><div class=""><div class="">Send ncl-talk mailing list submissions to<br class=""><span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span><a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a><br class=""><br class="">To subscribe or unsubscribe via the World Wide Web, visit<br class=""><span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank" class="">http://mailman.ucar.edu/<wbr class="">mailman/listinfo/ncl-talk</a><br class="">or, via email, send a message with subject or body 'help' to<br class=""><span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span><a href="mailto:ncl-talk-request@ucar.edu" target="_blank" class="">ncl-talk-request@ucar.edu</a><br class=""><br class="">You can reach the person managing the list at<br class=""><span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span><a href="mailto:ncl-talk-owner@ucar.edu" target="_blank" class="">ncl-talk-owner@ucar.edu</a><br class=""><br class="">When replying, please edit your Subject line so it is more specific<br class="">than "Re: Contents of ncl-talk digest..."<br class=""><br class=""><br class="">Today's Topics:<br class=""><br class=""> &nbsp;&nbsp;1. Re: Problem with gsn_add_text (Stavros Dafis)<br class=""> &nbsp;&nbsp;2. Problem with contour plot (Guilherme Martins)<br class=""> &nbsp;&nbsp;3. Re: Problem with gsn_add_text (Rick Brownrigg)<br class=""> &nbsp;&nbsp;4. Re: Problem with contour plot (Mary Haley)<br class=""> &nbsp;&nbsp;5. how to draw this kind of plot (wen)<br class=""><br class=""><br class="">------------------------------<wbr class="">------------------------------<wbr class="">----------<br class=""><br class="">Message: 1<br class="">Date: Mon, 17 Apr 2017 21:48:31 +0300<br class="">From: Stavros Dafis &lt;<a href="mailto:sdafis@cc.uoi.gr" target="_blank" class="">sdafis@cc.uoi.gr</a>&gt;<br class="">Subject: Re: [ncl-talk] Problem with gsn_add_text<br class="">To: Rick Brownrigg &lt;<a href="mailto:brownrig@ucar.edu" target="_blank" class="">brownrig@ucar.edu</a>&gt;<br class="">Cc: "<a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a>" &lt;<a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a>&gt;<br class="">Message-ID: &lt;<a href="mailto:1492454911.58f50dffc9203@webmail.uoi.gr" target="_blank" class="">1492454911.58f50dffc9203@<wbr class="">webmail.uoi.gr</a>&gt;<br class="">Content-Type: text/plain; charset=ISO-8859-7<br class=""><br class="">Dear Rick, thank you for your suggestion, I have tried to assign both the<br class="">FillValue and the missing value (@missing_value) but nothing seems to work.<br class=""><br class="">I forgot to mention that I am using NCL 6.2.0, 6.3.0 and 6.4.0, on different<br class="">machines.<br class=""><br class=""><br class="">-- <br class="">Stavros NTAFIS (DAFIS)<br class="">------------------------------<wbr class="">-----------------<br class="">Physicist - Meteorologist, M.Sc.<br class="">Research Associate, National Observatory of Athens<br class=""><a href="tel:+33%209%2081%2094%2022%2012" value="+33981942212" target="_blank" class="">(+33)9 81 94 22 12</a>, Mobile: +30 697 04 20 242<br class="">---------------<br class="">Weather charts:<br class=""><a href="http://www.meteo.gr/" target="_blank" class="">http://www.meteo.gr</a><br class=""><a href="http://www.meteo.gr/meteomaps/" target="_blank" class="">http://www.meteo.gr/meteomaps/</a><br class=""><br class=""><br class="">Quoting Rick Brownrigg &lt;<a href="mailto:brownrig@ucar.edu" target="_blank" class="">brownrig@ucar.edu</a>&gt;:<br class=""><br class=""><blockquote type="cite" class="">Hi Stavros,<br class=""><br class="">I don't know for certain, but I suspect you need to assign the _FillValue<br class="">to the string array "points" that you constructed from "t2" (I don't see<br class="">how the attributes from t2 would carry to points via the sprintf() ).<br class=""><br class="">Hope that helps...<br class="">Rick<br class=""><br class="">On Sun, Apr 16, 2017 at 12:56 PM, Stavros Dafis &lt;<a href="mailto:sdafis@cc.uoi.gr" target="_blank" class="">sdafis@cc.uoi.gr</a>&gt; wrote:<br class=""><br class=""><blockquote type="cite" class="">Hello everyone, I am facing a problem with the function gsn_add_text. In<br class="">the<br class="">description of the function, it is mentioned that no missing values will be<br class="">plotted:<br class=""><br class="">&amp;#8220;This function attaches a list of text strings to the given plot.<br class="">The text<br class="">strings will be drawn only when the plot is drawn. If a missing value is<br class="">encountered in the text strings or x/y values, then no text string will be<br class="">drawn at this pair.&amp;#8221;<br class=""><br class="">My script reads a netCDF file with 3 variables t2(lat,lon), lat(lat),<br class="">lon(lon),<br class="">so in order to attach values on the plot using this function, I have to<br class="">make<br class="">new 2-D variables for lat/lon and define the string to be plotted on the<br class="">map.<br class="">Values are assigned just fine on the plot, over the land, but missing<br class="">values<br class="">are also printed over the sea. I tried to use landsea masking but my data<br class="">have<br class="">high horizontal resolution (5km). Any suggestions?<br class=""><br class="">I have the same problem with WRF data, with already 2-D lat/lon arrays.<br class=""><br class=""> This is the part of the code which prints the values:<br class="">.<br class="">.<br class="">.<br class="">contour = gsn_csm_contour_map(wks,t2,<wbr class="">res)<br class=""><br class="">t2@missing_value = -1<br class="">t2@_FillValue = -1<br class="">(default missing values = -999)<br class=""><br class="">lat2 = new(dimsizes(t2),typeof(lat),-<wbr class="">1)<br class="">lon2 = new(dimsizes(t2),typeof(lon),-<wbr class="">1)<br class=""><br class="">nb = dimsizes(t2)<br class=""><br class="">do nl=0,nb(0)-1,1<br class="">do ml=0,nb(1)-1,1<br class=""><br class="">lat2(nl,ml) = lat(nl)<br class="">lon2(nl,ml) = lon(ml)<br class=""><br class="">end do<br class="">end do<br class=""><br class="">points = sprintf("%3.0f", t2)<br class="">;points = ""+t2(:,:)+""<br class=""><br class="">values = gsn_add_text(wks,contour,<wbr class="">points,lon2(:,:),lat2(:,:),<wbr class="">True)<br class=""><br class=""><br class=""><br class="">--<br class="">Stavros NTAFIS (DAFIS)<br class="">------------------------------<wbr class="">-----------------<br class="">Physicist - Meteorologist, M.Sc.<br class="">Research Associate, National Observatory of Athens<br class=""><a href="tel:+33%209%2081%2094%2022%2012" value="+33981942212" target="_blank" class="">(+33)9 81 94 22 12</a>, Mobile: +30 697 04 20 242<br class="">---------------<br class="">Weather charts:<br class=""><a href="http://www.meteo.gr/" target="_blank" class="">http://www.meteo.gr</a><br class=""><a href="http://www.meteo.gr/meteomaps/" target="_blank" class="">http://www.meteo.gr/meteomaps/</a><br class=""><br class=""><br class=""><br class="">______________________________<wbr class="">_________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class=""><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank" class="">http://mailman.ucar.edu/<wbr class="">mailman/listinfo/ncl-talk</a><br class=""><br class=""></blockquote><br class=""></blockquote><br class=""><br class="">------------------------------<br class=""><br class="">Message: 2<br class="">Date: Mon, 17 Apr 2017 19:00:02 +0000<br class="">From: Guilherme Martins &lt;<a href="mailto:jgmsantos@gmail.com" target="_blank" class="">jgmsantos@gmail.com</a>&gt;<br class="">Subject: [ncl-talk] Problem with contour plot<br class="">To: NCL &lt;<a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a>&gt;<br class="">Message-ID:<br class=""><span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span>&lt;CAH+t_<wbr class="">hMaRUDHM0wMkLC9cz2pFmMYGXgGC+<wbr class="">X+bcxDLo=+<a href="mailto:8fgWQg@mail.gmail.com" target="_blank" class="">8fgWQg@mail.gmail.<wbr class="">com</a>&gt;<br class="">Content-Type: text/plain; charset="utf-8"<br class=""><br class="">Dear users,<br class=""><br class="">After searching extensively on the NCL website I was not able to find a<br class="">solution to my problem. I only want values within the contour of the<br class="">continent, but some edges appear in the figure that are stemming from the<br class="">mask that I applied and I do not know how to remove this. The figure is<br class="">attached for a better view of my problem.<br class=""><br class="">Best regards,<br class=""><br class="">Guilherme.<br class="">-- <br class="">------------------------------<wbr class="">------------------------------<wbr class="">------------------------------<wbr class="">------<br class="">Instituto Nacional de Pesquisas Espaciais (INPE)<br class="">Centro de Previs?o de Tempo e Estudos Clim?ticos (CPTEC)<br class="">Divis?o de Sat?lites e Sistemas Ambientais (DSA)<br class="">Programa de Monitoramento de Queimadas<br class="">Telefone (INPE/CP): <a href="tel:+55%2012%203186-9205" value="+551231869205" target="_blank" class="">+55 12 3186-9205</a> || Celular (TIM): <a href="tel:+55%2012%2098111-4292" value="+5512981114292" target="_blank" class="">+55 12 98111-4292</a><br class="">E-mail: <a href="mailto:guilherme.martins@inpe.br" target="_blank" class="">guilherme.martins@inpe.br</a> || <a href="mailto:jgmsantos@gmail.com" target="_blank" class="">jgmsantos@gmail.com</a><br class="">Skype: guilherme.martins.<br class="">Homepage: <a href="https://sites.google.com/site/jgmsantos" target="_blank" class="">https://sites.google.com/site/<wbr class="">jgmsantos</a><br class="">Curr?culo Lattes: <a href="http://lattes.cnpq.br/5997657584785803" target="_blank" class="">http://lattes.cnpq.br/<wbr class="">5997657584785803</a><br class="">------------------------------<wbr class="">------------------------------<wbr class="">------------------------------<wbr class="">------<br class="">-------------- next part --------------<br class="">An HTML attachment was scrubbed...<br class="">URL: <a href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170417/c3215b0e/attachment-0001.html" target="_blank" class="">http://mailman.ucar.edu/<wbr class="">pipermail/ncl-talk/<wbr class="">attachments/20170417/c3215b0e/<wbr class="">attachment-0001.html</a> <br class="">-------------- next part --------------<br class="">A non-text attachment was scrubbed...<br class="">Name: figure.png<br class="">Type: image/png<br class="">Size: 58495 bytes<br class="">Desc: not available<br class="">Url : <a href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170417/c3215b0e/attachment-0001.png" target="_blank" class="">http://mailman.ucar.edu/<wbr class="">pipermail/ncl-talk/<wbr class="">attachments/20170417/c3215b0e/<wbr class="">attachment-0001.png</a> <br class=""><br class="">------------------------------<br class=""><br class="">Message: 3<br class="">Date: Mon, 17 Apr 2017 14:32:43 -0600<br class="">From: Rick Brownrigg &lt;<a href="mailto:brownrig@ucar.edu" target="_blank" class="">brownrig@ucar.edu</a>&gt;<br class="">Subject: Re: [ncl-talk] Problem with gsn_add_text<br class="">To: Stavros Dafis &lt;<a href="mailto:sdafis@cc.uoi.gr" target="_blank" class="">sdafis@cc.uoi.gr</a>&gt;<br class="">Cc: "<a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a>" &lt;<a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a>&gt;<br class="">Message-ID:<br class=""><span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span>&lt;CAGKRhbHX1v-1sJ3G=<a href="mailto:QrXGA%2B0wSJ2KKsBB_7GqbCnp9krh9fkkQ@mail.gmail.com" target="_blank" class="">QrXGA+<wbr class="">0wSJ2KKsBB_7GqbCnp9krh9fkkQ@<wbr class="">mail.gmail.com</a>&gt;<br class="">Content-Type: text/plain; charset="utf-8"<br class=""><br class="">Hi,<br class=""><br class="">You used -1 as _FillValue for variable "t2". Note it is an integer value --<br class="">what type is the array t2 -- float or int?&nbsp; In any case, you created the<br class="">formatted string array "points" from t2 as "%3.0f", so that any data values<br class="">in t2 that were -1 are now " -1", and thus it seems your _FillValue should<br class="">be " -1". Did you do this, and do the types between data and _FillValue<br class="">agree everywhere?<br class=""><br class="">If that's not the issue, I think we may need to see script and dataset to<br class="">figure out what the issue is.<br class=""><br class="">HTH...<br class="">Rick<br class=""><br class="">On Mon, Apr 17, 2017 at 12:48 PM, Stavros Dafis &lt;<a href="mailto:sdafis@cc.uoi.gr" target="_blank" class="">sdafis@cc.uoi.gr</a>&gt; wrote:<br class=""><br class=""><blockquote type="cite" class="">Dear Rick, thank you for your suggestion, I have tried to assign both the<br class="">FillValue and the missing value (@missing_value) but nothing seems to work.<br class=""><br class="">I forgot to mention that I am using NCL 6.2.0, 6.3.0 and 6.4.0, on<br class="">different<br class="">machines.<br class=""><br class=""><br class="">--<br class="">Stavros NTAFIS (DAFIS)<br class="">------------------------------<wbr class="">-----------------<br class="">Physicist - Meteorologist, M.Sc.<br class="">Research Associate, National Observatory of Athens<br class=""><a href="tel:+33%209%2081%2094%2022%2012" value="+33981942212" target="_blank" class="">(+33)9 81 94 22 12</a>, Mobile: +30 697 04 20 242<br class="">---------------<br class="">Weather charts:<br class=""><a href="http://www.meteo.gr/" target="_blank" class="">http://www.meteo.gr</a><br class=""><a href="http://www.meteo.gr/meteomaps/" target="_blank" class="">http://www.meteo.gr/meteomaps/</a><br class=""><br class=""><br class="">Quoting Rick Brownrigg &lt;<a href="mailto:brownrig@ucar.edu" target="_blank" class="">brownrig@ucar.edu</a>&gt;:<br class=""><br class=""><blockquote type="cite" class="">Hi Stavros,<br class=""><br class="">I don't know for certain, but I suspect you need to assign the _FillValue<br class="">to the string array "points" that you constructed from "t2" (I don't see<br class="">how the attributes from t2 would carry to points via the sprintf() ).<br class=""><br class="">Hope that helps...<br class="">Rick<br class=""><br class="">On Sun, Apr 16, 2017 at 12:56 PM, Stavros Dafis &lt;<a href="mailto:sdafis@cc.uoi.gr" target="_blank" class="">sdafis@cc.uoi.gr</a>&gt;<br class=""></blockquote>wrote:<br class=""><blockquote type="cite" class=""><br class=""><blockquote type="cite" class="">Hello everyone, I am facing a problem with the function gsn_add_text.<br class=""></blockquote></blockquote>In<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">the<br class="">description of the function, it is mentioned that no missing values<br class=""></blockquote></blockquote>will be<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">plotted:<br class=""><br class="">&amp;#8220;This function attaches a list of text strings to the given plot.<br class="">The text<br class="">strings will be drawn only when the plot is drawn. If a missing value<br class=""></blockquote></blockquote>is<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">encountered in the text strings or x/y values, then no text string<br class=""></blockquote></blockquote>will be<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">drawn at this pair.&amp;#8221;<br class=""><br class="">My script reads a netCDF file with 3 variables t2(lat,lon), lat(lat),<br class="">lon(lon),<br class="">so in order to attach values on the plot using this function, I have to<br class="">make<br class="">new 2-D variables for lat/lon and define the string to be plotted on<br class=""></blockquote></blockquote>the<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">map.<br class="">Values are assigned just fine on the plot, over the land, but missing<br class="">values<br class="">are also printed over the sea. I tried to use landsea masking but my<br class=""></blockquote></blockquote>data<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">have<br class="">high horizontal resolution (5km). Any suggestions?<br class=""><br class="">I have the same problem with WRF data, with already 2-D lat/lon arrays.<br class=""><br class=""> This is the part of the code which prints the values:<br class="">.<br class="">.<br class="">.<br class="">contour = gsn_csm_contour_map(wks,t2,<wbr class="">res)<br class=""><br class="">t2@missing_value = -1<br class="">t2@_FillValue = -1<br class="">(default missing values = -999)<br class=""><br class="">lat2 = new(dimsizes(t2),typeof(lat),-<wbr class="">1)<br class="">lon2 = new(dimsizes(t2),typeof(lon),-<wbr class="">1)<br class=""><br class="">nb = dimsizes(t2)<br class=""><br class="">do nl=0,nb(0)-1,1<br class="">do ml=0,nb(1)-1,1<br class=""><br class="">lat2(nl,ml) = lat(nl)<br class="">lon2(nl,ml) = lon(ml)<br class=""><br class="">end do<br class="">end do<br class=""><br class="">points = sprintf("%3.0f", t2)<br class="">;points = ""+t2(:,:)+""<br class=""><br class="">values = gsn_add_text(wks,contour,<wbr class="">points,lon2(:,:),lat2(:,:),<wbr class="">True)<br class=""><br class=""><br class=""><br class="">--<br class="">Stavros NTAFIS (DAFIS)<br class="">------------------------------<wbr class="">-----------------<br class="">Physicist - Meteorologist, M.Sc.<br class="">Research Associate, National Observatory of Athens<br class=""><a href="tel:+33%209%2081%2094%2022%2012" value="+33981942212" target="_blank" class="">(+33)9 81 94 22 12</a>, Mobile: +30 697 04 20 242<br class="">---------------<br class="">Weather charts:<br class=""><a href="http://www.meteo.gr/" target="_blank" class="">http://www.meteo.gr</a><br class=""><a href="http://www.meteo.gr/meteomaps/" target="_blank" class="">http://www.meteo.gr/meteomaps/</a><br class=""><br class=""><br class=""><br class="">______________________________<wbr class="">_________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class=""><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank" class="">http://mailman.ucar.edu/<wbr class="">mailman/listinfo/ncl-talk</a><br class=""><br class=""></blockquote><br class=""></blockquote><br class=""></blockquote>-------------- next part --------------<br class="">An HTML attachment was scrubbed...<br class="">URL: <a href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170417/01bd2242/attachment-0001.html" target="_blank" class="">http://mailman.ucar.edu/<wbr class="">pipermail/ncl-talk/<wbr class="">attachments/20170417/01bd2242/<wbr class="">attachment-0001.html</a> <br class=""><br class="">------------------------------<br class=""><br class="">Message: 4<br class="">Date: Mon, 17 Apr 2017 15:02:08 -0600<br class="">From: Mary Haley &lt;<a href="mailto:haley@ucar.edu" target="_blank" class="">haley@ucar.edu</a>&gt;<br class="">Subject: Re: [ncl-talk] Problem with contour plot<br class="">To: Guilherme Martins &lt;<a href="mailto:jgmsantos@gmail.com" target="_blank" class="">jgmsantos@gmail.com</a>&gt;<br class="">Cc: NCL &lt;<a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a>&gt;<br class="">Message-ID:<br class=""><span class="m_-4943166290922558066Apple-tab-span" style="white-space:pre-wrap">        </span>&lt;<a href="mailto:CACNN_CJz1yvpMXMABZ8FhSEov1T0qN63rzsNBBVXBhLos3UKjg@mail.gmail.com" target="_blank" class="">CACNN_<wbr class="">CJz1yvpMXMABZ8FhSEov1T0qN63rzs<wbr class="">NBBVXBhLos3UKjg@mail.gmail.com</a><wbr class="">&gt;<br class="">Content-Type: text/plain; charset="utf-8"<br class=""><br class="">Guilherme,<br class=""><br class="">Please see examples shapefiles_21.ncl at:<br class=""><br class=""><a href="http://www.ncl.ucar.edu/Applications/shapefiles.shtml#ex21" target="_blank" class="">http://www.ncl.ucar.edu/<wbr class="">Applications/shapefiles.shtml#<wbr class="">ex21</a><br class=""><br class="">It explains why you see these "blocky" contours in NCL.<br class=""><br class="">Simply put, if you have four points that represent a box at the edge of a<br class="">domain, and three of them have data one them and one is missing, then NCL<br class="">will only draw contours in half of the box, because it won't extrapolate to<br class="">that missing point.<br class=""><br class="">The real question is: do you simply want the graphics not to have gaps, or<br class="">do you actually want there to be data in locations that fall just outside<br class="">the geographical boundary?&nbsp; You can do things to force values just outside<br class="">the geographical boundary, but this depends on how you are masking in the<br class="">first place.<br class=""><br class="">If you are masking based on a shapefile, then see example shapefiles_18.ncl<br class="">on the same page:<br class=""><br class=""><a href="http://www.ncl.ucar.edu/Applications/shapefiles.shtml#ex18" target="_blank" class="">http://www.ncl.ucar.edu/<wbr class="">Applications/shapefiles.shtml#<wbr class="">ex18</a><br class=""><br class="">Note, however, that this mask is now returning values outside the range of<br class="">interest.<br class=""><br class="">If you are simply trying to mask your data *graphically* by some<br class="">geographical area, then instead of trying to use a mask function, you can<br class="">draw the full data, and then draw polygons filled in with white in the<br class="">areas you don't want to see graphically.&nbsp; That's what example 21 is showing.<br class=""><br class="">--Mary<br class=""><br class=""><br class="">On Mon, Apr 17, 2017 at 1:00 PM, Guilherme Martins &lt;<a href="mailto:jgmsantos@gmail.com" target="_blank" class="">jgmsantos@gmail.com</a>&gt;<br class="">wrote:<br class=""><br class=""><blockquote type="cite" class="">Dear users,<br class=""><br class="">After searching extensively on the NCL website I was not able to find a<br class="">solution to my problem. I only want values within the contour of the<br class="">continent, but some edges appear in the figure that are stemming from the<br class="">mask that I applied and I do not know how to remove this. The figure is<br class="">attached for a better view of my problem.<br class=""><br class="">Best regards,<br class=""><br class="">Guilherme.<br class="">--<br class="">------------------------------<wbr class="">------------------------------<br class="">------------------------------<wbr class="">------<br class="">Instituto Nacional de Pesquisas Espaciais (INPE)<br class="">Centro de Previs?o de Tempo e Estudos Clim?ticos (CPTEC)<br class="">Divis?o de Sat?lites e Sistemas Ambientais (DSA)<br class="">Programa de Monitoramento de Queimadas<br class="">Telefone (INPE/CP): <a href="tel:+55%2012%203186-9205" value="+551231869205" target="_blank" class="">+55 12 3186-9205</a> &lt;+55%2012%203186-9205&gt; || Celular<br class="">(TIM): <a href="tel:+55%2012%2098111-4292" value="+5512981114292" target="_blank" class="">+55 12 98111-4292</a> &lt;+55%2012%2098111-4292&gt;<br class="">E-mail: <a href="mailto:guilherme.martins@inpe.br" target="_blank" class="">guilherme.martins@inpe.br</a> || <a href="mailto:jgmsantos@gmail.com" target="_blank" class="">jgmsantos@gmail.com</a><br class="">Skype: guilherme.martins.<br class="">Homepage: <a href="https://sites.google.com/site/jgmsantos" target="_blank" class="">https://sites.google.com/site/<wbr class="">jgmsantos</a><br class="">Curr?culo Lattes: <a href="http://lattes.cnpq.br/5997657584785803" target="_blank" class="">http://lattes.cnpq.br/<wbr class="">5997657584785803</a><br class="">------------------------------<wbr class="">------------------------------<br class="">------------------------------<wbr class="">------<br class=""><br class="">______________________________<wbr class="">_________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class=""><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank" class="">http://mailman.ucar.edu/<wbr class="">mailman/listinfo/ncl-talk</a><br class=""><br class=""><br class=""></blockquote>-------------- next part --------------<br class="">An HTML attachment was scrubbed...<br class="">URL: <a href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170417/96b2b947/attachment-0001.html" target="_blank" class="">http://mailman.ucar.edu/<wbr class="">pipermail/ncl-talk/<wbr class="">attachments/20170417/96b2b947/<wbr class="">attachment-0001.html</a> <br class=""><br class="">------------------------------<br class=""><br class="">Message: 5<br class="">Date: Tue, 18 Apr 2017 15:29:04 +0800 (CST)<br class="">From: wen &lt;<a href="mailto:wenguanhuan@163.com" target="_blank" class="">wenguanhuan@163.com</a>&gt;<br class="">Subject: [ncl-talk] how to draw this kind of plot<br class="">To: ncl-list &lt;<a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a>&gt;<br class="">Message-ID: &lt;<a href="mailto:5de3ed86.9f7f.15b7ff6fb6f.Coremail.wenguanhuan@163.com" target="_blank" class="">5de3ed86.9f7f.15b7ff6fb6f.<wbr class="">Coremail.wenguanhuan@163.com</a>&gt;<br class="">Content-Type: text/plain; charset="gbk"<br class=""><br class="">Hi all,<br class=""> &nbsp;I am trying to use TRMM 3B42 data &nbsp;to draw this kind of plot. I haven't found a example on the website to draw it.&nbsp; Do anyone know &nbsp;how to make it. Which function should I<br class="">use. Thank you!<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class="">--<br class=""><br class="">??<br class="">???<br class="">-------------- next part --------------<br class="">An HTML attachment was scrubbed...<br class="">URL: <a href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170418/b09be439/attachment.html" target="_blank" class="">http://mailman.ucar.edu/<wbr class="">pipermail/ncl-talk/<wbr class="">attachments/20170418/b09be439/<wbr class="">attachment.html</a> <br class="">-------------- next part --------------<br class="">A non-text attachment was scrubbed...<br class="">Name: ??1.png<br class="">Type: image/png<br class="">Size: 249741 bytes<br class="">Desc: not available<br class="">Url : <a href="http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170418/b09be439/attachment.png" target="_blank" class="">http://mailman.ucar.edu/<wbr class="">pipermail/ncl-talk/<wbr class="">attachments/20170418/b09be439/<wbr class="">attachment.png</a> <br class=""><br class="">------------------------------<br class=""><br class="">______________________________<wbr class="">_________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class=""><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank" class="">http://mailman.ucar.edu/<wbr class="">mailman/listinfo/ncl-talk</a><br class=""><br class=""><br class="">End of ncl-talk Digest, Vol 161, Issue 23<br class="">******************************<wbr class="">***********<br class=""></div></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></div></div></body></html>