[Thread Prev][Thread Next][Index]

Re: ascii file problems when reading



Hi Mick,

You are right. Your script works fine, so the problem is in my dataset,
but don't know where, it is just a '.txt' file with 200 records of
monthly wind values (1 values per row) of this format:

5.3
4.5
3.4
....

with no apparent header. Maybe I can send you a copy of it (it's very,
very small)?

Thanks in advance

Cheers,

Antonio

----- Original Message -----
From: "Mick Spillane" <spillane@pmel.noaa.gov>
To: <arv@ono.com>
Cc: <ansley@pmel.noaa.gov>
Sent: Thursday, January 30, 2003 5:25 PM
Subject: Re: ascii file problems when reading


> Hi Antonio,
> First try
> file/form=free/var=v your.file
> In recent versions /form=free is not necessary but I still always use
it.
>
> Most likely the problem is with your data file - perhaps there are
> non-printing characters in that data file.  Or could it have some
> header records that you are neglecting to skip over?
>
> Try the following in a Ferret session
>
> ! open a file test.data with a header record
> spawn echo 'this is test data' > test.data
> ! output random data with variable format
> region/j=1:5
> repeat/k=1:5 (li/noh/form=(g12.`k`)/file=test.data/app
10^exp(randu(j+`k`)))
>
> ! check contents of test.data
> sp head test.data
>
> ! now read in the file ...
> file/skip=1/var=v test.data
> ! ... and plot it
> plot v
>
> If this fails to write a readable file then read it back in and plot
it
> successfully let me know, and also what version of Ferret you are
using.
> If it does work then you will have to look at your real data file as
the
> source of the problem.
>
> Good Luck,
> Mick
>
>
> |____spillane@pmel.noaa.gov____|
> |__Room 2070 Bldg#3 NOAA/PMEL__|
> |____Phone_:_(206)526-6780_____|
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.443 / Virus Database: 248 - Release Date: 10/01/03



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement