Reading irregular ASCII file

From: Jakob Tendel <tendel_at_nyahnyahspammersnyahnyah>
Date: Tue Feb 23 2010 - 17:18:23 MST

Hi,

I am having trouble finding a sane way to read in a type of ASCII file
of pilot reports on in-flight icing I have. The data is mostly columns
of differing data types. The problem is that each line has an unordered
bit of textual information at the end, that is different from line to
line. This screw up the 'column detection' logic and defeats the usual
approaches to reading tabled ascii data that I could find. The good
thing is that I don't need any of that info and only want a couple of
the nice columns.

Example:

20100205 1205 40.29 -83.28 -1 -1 UA /OV CMH315025 /TM 1205 /FL070
20100205 1210 41.89 -91.79 3 1 UA /OV CID /TM 1210 /FL065 /TP E120

The first six columns of numeric data is what I need.

Question:

Is there a way to make 'asciiread' or a similar function only read the
first x columns of each line and ignore the rest, EVEN IF IT IS NOT
NICELY COLUMNAR?

Thanks for any tips.

Jakob
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Feb 23 17:18:27 2010

This archive was generated by hypermail 2.1.8 : Thu Feb 25 2010 - 09:38:32 MST