reading f77_unformatted and writing it as ascii file [message #42142] |
Tue, 21 December 2004 14:53 |
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,
|
|
|