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

Home » Public Forums » archive » reading f77_unformatted and writing it as ascii file
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
reading f77_unformatted and writing it as ascii file [message #42142] Tue, 21 December 2004 14:53
Jaehyung Yu is currently offline  Jaehyung Yu
Messages: 2
Registered: November 2004
Junior Member
Dear all,

I downloaded f77_unformatted data file and tried to extract the information
to ascii format.

However, the output file I extracted has only one value of "0".

The dataset is 1400x1400 float array. I used the following lines. Can
somebody help me what I did wrong?

Thank you in advance.

IDL> file = 'bal_flux.bas_smooth35'
IDL> openr, lun, file, /f77_unformatted, /get_lun
IDL> nx = 0L & ny = 0L
IDL> readu, lun, nx, ny
IDL> print, nx, ny
1400 1400
IDL> bal_flux = fltarr(nx, ny)
IDL> help, bal_flux
BAL_FLUX FLOAT = Array[1400, 1400]
IDL> free_lun, lun
IDL> outfile = 'outfile.txt'
IDL> openw, lun_out, outfile, /get_lun
IDL> printf, lun_out, bal_flux
IDL> free_lun, lun_out

Your help is very important and urgent to me.

Sincerely,
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: updating a value in a window
Next Topic: Re: reading f77_unformatted and writing it as ascii file

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

Current Time: Wed Oct 08 16:00:27 PDT 2025

Total time taken to generate the page: 0.00506 seconds