- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I try to read and convert a file to big endian using fortran on windows. I use this command:
"open(fgrid,file=grid,form='unformatted',status='old', convert='big_endian')"
I got no messages when I compiled but when I ran the code I got:
"forrtl: severe (39): error during read, unit 2."
I don't know what the problem is. If someone can help it will greatly appriciate.
Duparcmeur
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The code you have assumes that the file was written by a Fortran application that follows the common layout for unformatted files of 32-bit length, data, 32-bit length. If the file was written using some other system, then it will not be understood.
You say you are trying to convert a file to big-endian, but the code you have suggests you are trying to convert from big-endian. Which is it?
You say you are trying to convert a file to big-endian, but the code you have suggests you are trying to convert from big-endian. Which is it?

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page