<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:14px">Peirong,</span><br><div><span style="font-family:arial,sans-serif;font-size:14px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:14px">You should start debugging something like this with printVarSummary (f) and print(f), not getfilevarnames (f).</span></div>

<div><span style="font-family:arial,sans-serif;font-size:14px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:14px">--Dave</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Aug 5, 2014 at 3:13 PM, Peirong Lin <span dir="ltr">&lt;<a href="mailto:peironglinlin@gmail.com" target="_blank">peironglinlin@gmail.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 dir="ltr">Dear NCL,<div><br></div><div>I am using the following NCL code to read a shapefile attribute table (which allows further computation), but when I printed out all the &quot;COMIDs&quot;, they are all &quot;0&quot;. But when I open the shapefile in ArcGIS, the COMIDs can be correctly shown. Can anybody provide some hints to resolve this? </div>

<div><br></div><div><b>begin<br></b></div><div>
<p><b>shp_file        = &quot;./NHDFlowline.shp&quot;</b></p>
<p><b>f       = addfile(shp_file,&quot;r&quot;)</b></p>
<p><b>varnames        = getfilevarnames(f)</b></p>
<p><b>print(&quot;varnames = &quot;+varnames)</b></p>
<p><b>COMIDs  = f-&gt;COMID</b></p>
<p><b>print(COMIDs)</b></p>
<p><b>end</b></p></div><div><br></div><div>I&#39;ve already made sure the COMID is a variable in the shapefile, but the values just cannot be read correctly. Thank you in advance for replying!!</div><div><br></div>
<div>Best,</div><div>Peirong</div><span class="HOEnZb"><font color="#888888"><div><br clear="all"><div><br></div>-- <br><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><div style="color:rgb(255,102,0)">
<b>Peirong Lin</b> (Ms.)<br>
Graduate Research Assistant <span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse;color:rgb(204,102,0)">(JGB 5.322)</span></span><br>

Jackson School of Geosciences</div><div><font color="#ff6600">The University of Texas at Austin</font><br><font color="#ff6600">Contact: 512-201-3731 </font><br><a href="mailto:prlin@utexas.edu" style="color:rgb(255,102,0)" target="_blank">prlin@utexas.edu</a><font color="#ff6600">; </font><a href="mailto:peironglinlin@gmail.com" style="color:rgb(255,102,0)" target="_blank">peironglinlin@gmail.com</a><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"></span></div>

</span>
</div></font></span></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>