[ncl-talk] Plotting station data

Geeta Geeta geetag54 at yahoo.com
Tue Sep 15 09:33:20 MDT 2015


thanks Dennis and karin for your help. 
My data looks like SNo   District                  Taluk                       Station                 lat        Lon      Height amsl.   
1       Bangalore Urban Bangalore South Bangalore CO    12.57   77.38   919.6
2       Bangalore Urban Bangalore North Bangalore HAL   12.3    78.18   882.2
3       Bangalore Rural Devanahalli     Bangalore KIAL  13.06   77.24   900
4       Belgaum Belgaum         Sambra obsy     15.3    74.18   747.4
5       Chitradurga     Chitradurga     Chitradurga Obsy        14.08   76.15   733.4
6       DAKSHINA KANNADA        Mangalore       Panambur obsy   12.3    74.3    30.8
7       DAKSHINA KANNADA        Managalore      Bajpe obsy      12.3    74.3    101.8
8       Gadag   Gadag   Gadag PBO       15.12   75.12   669.9
9       Gulbarga        Gulbarga        Gulbarga MO     17.12   76.3    456.9
10      Uttar Kannada   Honavar         Honavar obsy    14.07   74.13   25.9
11      Uttar Kannada   Karwar  Karwar obsy     14.25   74.01   3.4
 This data also has Rf. 

I was reading it as string and then used the function 

ncl 152> myrg=asciiread("rg.txt",-1,"string")
ncl 153> delim = " "       
ncl 154> nfields =str_fields_count(strs(0),delim)
fatal:Undefined identifier: (strs) is undefined, can't continue
fatal:["Execute.c":8576]:Execute: Error occurred at or near line 154

ncl 155> nfields =str_fields_count(myrg(0),delim) 
ncl 156> print(nfields)


Variable: nfields
Type: integer
Total Size: 4 bytes
            1 values
Number of Dimensions: 1
Dimensions and sizes:    [1]
Coordinates: 
(0)    5
ncl 157> 

So all the data is read as string and NCL should give me nfields as 10. 
Kindly explain???
Geeta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150915/dd0c37a8/attachment.html 


More information about the ncl-talk mailing list