Re: tabs vs. spaces with asciiread

From: Leslie Hartten <Leslie.M.Hartten_at_nyahnyahspammersnyahnyah>
Date: Tue Dec 08 2009 - 16:36:45 MST

Hi All,

On 12/7/09 3:03 PM, Jonathan Vigh wrote:
> Hi NCL'ers,
> I have another ASCII reading question. I created a data file by hand
> using nedit. This file has mixed type (strings, logicals, and
> integers). My original plan was to use asciiread to read the file into
> NCL by column position, converting the strings into the appropriate
> type. Unfortunately, when I was creating the file I used both spaces and
> tabs to align the columns, and it seems that asciiread is not seeing
> things in the position they appear within nedit.
> I'm wondering, first of all, if anyone knows a simple way to save such a
> file to fix this (maybe in a different text editor?).

   I see that someone already beat me to a solution, but I want to throw
two others out there:
1) BBEdit or its free cousin TextWrangler. They do a lot of powerful
text search/replace, including grep and other "geeky" commands.
However, they're only available for Macs (OS X).
2) Excel or perhaps another spreadsheet program. If you've gone through
the trouble to get the data into columns, you can probably import it
into Excel (and force it to get the columns right, if need be) and then
save it with a consistent column delimiter.

Cheers,
   Leslie
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Dec 8 16:36:59 2009

This archive was generated by hypermail 2.1.8 : Thu Dec 10 2009 - 11:30:59 MST