Re: read Index from ASCII

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Fri Dec 06 2013 - 14:20:21 MST

The best way to learn, is to try a few different things.

---
Please read the documentation for the functions used:
http://www.ncl.ucar.edu/Document/Functions/Contributed/readAsciiTable.shtml
http://www.ncl.ucar.edu/Document/Functions/Built-in/ndtooned.shtml
---
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
   ncol = 13
   diri = "./"
   fili = "Index50.txt"
   work = readAsciiTable(diri+fili, ncol , "float", "YEAR") ; (row,col)
   x2d  = work(:,1:)   ; all rows :, 1:  means from the 1-th column
                       ;                 to the last
;;print(x2d)
   x    = ndtooned(x2d); make a one dimensional array
;;print(x)
   delete([/ work, x2d /])  ; optional; not necessary
On 12/6/13, 1:13 PM, Xi Chang wrote:
> Dear NCL,
>
> I have never done it before, could anyone supervise me
> how could I read this ASCII file so that in the end I will have 1D monthly
> data
> extending from first year to the last year.
>
> Thank you so much.
> Xi
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Dec 6 14:20:28 2013

This archive was generated by hypermail 2.1.8 : Fri Dec 13 2013 - 11:39:30 MST