[ncl-talk] Station data plotting.
Dennis Shea
shea at ucar.edu
Mon Sep 14 06:58:03 MDT 2015
In addition to KMF's suggestion, there are numerous examples of
reading ascii at:
http://www.ncl.ucar.edu/
Click 'Examples'
Click 'File I/O'
Click the section containing
===
Output ascii
Read ascii
Output CSV
Read CSV
===
Really, you should have shown one or two lines of the data.
The first column .. are they integer IDs? Are the mixed alphabetical
and numeriic (Pune123)?
Your file looks like a header line (row) and 4 columns of information.
asciiread, read AsciiTable, ..... look at them.
http://www.ncl.ucar.edu/Document/Functions/string.shtml
See the Examples but the most robust would likely be
diri = "./" ; input file directory
fili = "your_ascii_file"
ncol = 4 ; # of fields
delim= " " ; delimiter
dstr = asciiread(diri+fili, -1, "string") ; read all as string
sta = str_get_field(dstr, 1, delim)
lat = tofloat(str_get_field(dstr, 2, delim))
lpn = ... 3 ...
rain = ... 4 ...
On Mon, Sep 14, 2015 at 1:52 AM, Karin Meier-Fleischer
<meier-fleischer at dkrz.de> wrote:
> Hi Geeta,
>
> I think, you have to read your data using asciiread function. Take a look at
> the other
> station example http://ncl.ucar.edu/Applications/Scripts/station_4.ncl
>
> Bye,
> Karin
>
> Am 13.09.15 um 19:09 schrieb Geeta Geeta:
>
> I have to plot Station rainfall of approx 100 stations. I have my data in
> the text format having
>
> Station Name Lat Long
> Rainfall
>
>
> I did look at the page
> (https://www.ncl.ucar.edu/Applications/Scripts/station_2.ncl )
>
> but in this example, the data is mentioned as an array
>
> begin
> ;---Set some needed arrays
> arr = (/0.,5.,10.,15.,20.,23.,26./)
>
> Can some one suggest me how to plot the data ???
> Geeta.
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
More information about the ncl-talk
mailing list