<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px"><div id="yui_3_16_0_1_1442243061304_6040"><span id="yui_3_16_0_1_1442243061304_6055">thanks Dennis and karin for your help. <br></span></div><div id="yui_3_16_0_1_1442243061304_6100"><span id="yui_3_16_0_1_1442243061304_6055">My data looks like </span></div><div dir="ltr" id="yui_3_16_0_1_1442243061304_6307"><span id="yui_3_16_0_1_1442243061304_6055">SNo District Taluk Station lat Lon Height amsl. <br></span></div><div dir="ltr" id="yui_3_16_0_1_1442243061304_6099"><span id="yui_3_16_0_1_1442243061304_6055">1 Bangalore Urban Bangalore South Bangalore CO 12.57 77.38 919.6<br class="" id="yui_3_16_0_1_1442243061304_6283">2 Bangalore Urban Bangalore North Bangalore HAL 12.3 78.18 882.2<br class="" id="yui_3_16_0_1_1442243061304_6285">3 Bangalore Rural Devanahalli Bangalore KIAL 13.06 77.24 900<br class="" id="yui_3_16_0_1_1442243061304_6287">4 Belgaum Belgaum Sambra obsy 15.3 74.18 747.4<br class="" id="yui_3_16_0_1_1442243061304_6289">5 Chitradurga Chitradurga Chitradurga Obsy 14.08 76.15 733.4<br class="" id="yui_3_16_0_1_1442243061304_6291">6 DAKSHINA KANNADA Mangalore Panambur obsy 12.3 74.3 30.8<br class="" id="yui_3_16_0_1_1442243061304_6293">7 DAKSHINA KANNADA Managalore Bajpe obsy 12.3 74.3 101.8<br class="" id="yui_3_16_0_1_1442243061304_6295">8 Gadag Gadag Gadag PBO 15.12 75.12 669.9<br class="" id="yui_3_16_0_1_1442243061304_6297">9 Gulbarga Gulbarga Gulbarga MO 17.12 76.3 456.9<br class="" id="yui_3_16_0_1_1442243061304_6299">10 Uttar Kannada Honavar Honavar obsy 14.07 74.13 25.9<br class="" id="yui_3_16_0_1_1442243061304_6301">11 Uttar Kannada Karwar Karwar obsy 14.25 74.01 3.4<br class="" id="yui_3_16_0_1_1442243061304_6303"></span></div><div id="yui_3_16_0_1_1442243061304_6097"><div id="yui_3_16_0_1_1442243061304_6333"> This data also has Rf. <br></div><div id="yui_3_16_0_1_1442243061304_6334"><br></div><div id="yui_3_16_0_1_1442243061304_6335">I was reading it as string and then used the function <br></div><div id="yui_3_16_0_1_1442243061304_6431"><br></div><div id="yui_3_16_0_1_1442243061304_6427" dir="ltr">ncl 152> myrg=asciiread("rg.txt",-1,"string")<br class="" id="yui_3_16_0_1_1442243061304_6390">ncl 153> delim = " " <br class="" id="yui_3_16_0_1_1442243061304_6392">ncl 154> nfields =str_fields_count(strs(0),delim)<br class="" id="yui_3_16_0_1_1442243061304_6394">fatal:Undefined identifier: (strs) is undefined, can't continue<br class="" id="yui_3_16_0_1_1442243061304_6396">fatal:["Execute.c":8576]:Execute: Error occurred at or near line 154<br class="" id="yui_3_16_0_1_1442243061304_6398"><br class="" id="yui_3_16_0_1_1442243061304_6400">ncl 155> nfields =str_fields_count(myrg(0),delim) <br class="" id="yui_3_16_0_1_1442243061304_6402">ncl 156> print(nfields)<br class="" id="yui_3_16_0_1_1442243061304_6404"><br class="" id="yui_3_16_0_1_1442243061304_6406"><br class="" id="yui_3_16_0_1_1442243061304_6408">Variable: nfields<br class="" id="yui_3_16_0_1_1442243061304_6410">Type: integer<br class="" id="yui_3_16_0_1_1442243061304_6412">Total Size: 4 bytes<br class="" id="yui_3_16_0_1_1442243061304_6414"> 1 values<br class="" id="yui_3_16_0_1_1442243061304_6416">Number of Dimensions: 1<br class="" id="yui_3_16_0_1_1442243061304_6418">Dimensions and sizes: [1]<br class="" id="yui_3_16_0_1_1442243061304_6420">Coordinates: <br class="" id="yui_3_16_0_1_1442243061304_6422">(0) 5<br class="" id="yui_3_16_0_1_1442243061304_6424">ncl 157> <br class="" id="yui_3_16_0_1_1442243061304_6426"></div><div id="yui_3_16_0_1_1442243061304_6473" dir="ltr"><br></div><div id="yui_3_16_0_1_1442243061304_6472" dir="ltr">So all the data is read as string and NCL should give me nfields as 10. <br></div><div id="yui_3_16_0_1_1442243061304_6511" dir="ltr">Kindly explain???<br></div></div><div id="yui_3_16_0_1_1442243061304_6098" class="signature">Geeta.</div></div></body></html>