discuss: Thread: how to read out binary data file


[<<] [<] Page 1 of 1 [>] [>>]
Subject: how to read out binary data file
From: Bomin Sun ####@####.####
Date: 17 Jan 2001 01:24:10 -0000
Message-Id: <3A64F421.69D3130F@whoi.edu>

hello,

the  linux system I am using is installed in the pc with intel III.

I have a problem in reading binary data file (e.g., a binary file
(integer*2) downloaded from a website) using a fortran program under my
linux environment.

The program (also was provided by those data people) to read the file
is:

integer*2 isea(100,100)
open(1,file='seatemp.dat',form='unformatted')
 read(1) isea
print*,isea(1,1)
stop
end

I used g77 to compile that program. The output from that program is
totally wrong.
for example, the value of isea(1,1) is a very large integer number.


does anyone know how to correctly read out the binary data ?

thanks!

Bomin
--
Bomin Sun
Physical Oceanography Department
MS#21, 360 Woods Hole Road
Woods Hole Oceanographic Institution
Woods Hole, MA 02543
Tel:508-2893365
Fax:508-4572181


Subject: Re: how to read out binary data file
From: David Lloyd ####@####.####
Date: 17 Jan 2001 01:39:06 -0000
Message-Id: <3A64F8BC.DFD70DE8@rebel.net.au>

Hi There!

I can understand your frustration about not being able to get your
Fortran program working, but this is a discussion list about the LDP and
Linux documentation. You may want to visit http://www.linux.org/ and see
if you can find an appropriate forum to ask questions there. I suspect a
fortran newsgroup may be able to help too...

DL
-- 
Compromise or death, 
 he fought 'til his last breath
 he never had it in him to surrender
Just like me he never could surrender!
[<<] [<] Page 1 of 1 [>] [>>]


  ©The Linux Documentation Project, 2014. Listserver maintained by dr Serge Victor on ibiblio.org servers. See current spam statz.