comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Help needed: read procedure for SCAN-data (soil climate analysis network)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Help needed: read procedure for SCAN-data (soil climate analysis network) [message #45664] Mon, 26 September 2005 06:52 Go to next message
peter.albert@gmx.de is currently offline  peter.albert@gmx.de
Messages: 108
Registered: July 2005
Senior Member
Hi Daniel,

from a quick glance at the website, I'd guess that the files come as
plain ASCII files. In that case, you might start with something like

openr, lun, filename
line = ""
while not eof(lun) do begin
readf, lun, line
print, line
elements = strsplit(line, /extract)
help, elements
endwhile
free_lun, lun

With the "openr" command you open the file for reading. Each subsequent
call to "readf" reads one line into the (string) variable "line"
defined in the second line. Most likely you can seperate the
individual pieces of information contained in this line with the
"strsplit" command, if not, you will have to have a close look into the
manual and learn something about the "format" keyword to "readf". Each
individual element can then be adressed e.g. like

data = elements[2]

which will give you the third element in that line. (IDL starts
counting at zero.)

If you don't have ASCII files but HDF, netcdf or similar, things are
different, but easier. Just tell us.

Regards,

Peter
Re: Help needed: read procedure for SCAN-data (soil climate analysis network) [message #45783 is a reply to message #45664] Tue, 04 October 2005 03:47 Go to previous message
daniel.sabel is currently offline  daniel.sabel
Messages: 2
Registered: September 2005
Junior Member
Sorry for the late reply. Thank you very much for your answer. The
files were in ascii format but lacked the consistency to use the
strsplit straight off, but the problem is solved now.

Best regards,

Daniel
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: MODIS bowtie correction
Next Topic: Histogram CLipping

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:16:49 PDT 2025

Total time taken to generate the page: 0.35798 seconds