computation using ascii data
Charles Seman
Charles.Seman at NOAA.GOV
Wed Jun 28 17:01:10 EDT 2006
Suha,
From the GrADS web page:
http://grads.iges.org/grads/gadoc/script.html#intrinsic
----*|
read (/filename/)|*
This functions reads individual records from file |/filename/|. Repeated
calls must be made to read consecutive records. The result is a string
containing two lines: the first line is the return code, the 2nd line is
the record read from the file. The record may be a maximum of 80
characters. Use the |sublin| function to separate the result. Return
codes are:
|0 - |ok
|1 - |open error
|2 - |end of file
|8 - |file open for write
|9 - |I/O error
Files are opened when the first call to read is made for a particular
file name. Files are closed when the execution of the script file
terminates (note that files remain open between function calls, etc).
----
Is the "0" the "return code"?
I hope this helps,
Chuck
*||*
suha aslam wrote:
> Hello grads users,
> I want to compute correlation between two parameters.
> Of which one parameter has to be calculated from a
> binary file and the second is a time series (column
> matrix) directly given as an ascii file. What is the
> method to read the ascii file and asign the
> consecutive lines (each values) as x1, x2, x3,
> .....xn. When i used the command read(file) and
> written it out (in a loop) to check whether it was
> read correctly, the output file shows 0 and the first
> value only. What could be wrong? Any idea?
> A help would be appreciated.
> Thanks,
> Suha
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
--
Please note that Charles.Seman at noaa.gov should be considered my NOAA
email address, not cjs at gfdl.noaa.gov.
********************************************************************
Charles Seman Charles.Seman at noaa.gov
U.S. Department of Commerce / NOAA / OAR
Geophysical Fluid Dynamics Laboratory voice: (609) 452-6547
201 Forrestal Road fax: (609) 987-5063
Princeton, NJ 08540-6649 http://www.gfdl.noaa.gov/~cjs/
********************************************************************
"The contents of this message are mine personally and do not reflect
any position of the Government or NOAA."
More information about the gradsusr
mailing list