CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Difference betw Binary & Fortran Unformatted?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 25, 2002, 00:38
Default Difference betw Binary & Fortran Unformatted?
  #1
Ruobo
Guest
 
Posts: n/a
My cfd output file is in Fortran Unformatted PLOT3D format, I want to convert it to get PLOT3D Binary file? How should I do? Anyone can point out their difference?

Thank you

YRB
  Reply With Quote

Old   April 25, 2002, 09:43
Default Re: Difference betw Binary & Fortran Unformatted?
  #2
sylvain
Guest
 
Posts: n/a
If they are both of same Endian kind (big/little) and if I remenber well, it's just a matter of C. Return. Fortran ends each line with a CR.

Sylvain
  Reply With Quote

Old   April 26, 2002, 05:42
Default Re: Difference betw Binary & Fortran Unformatted?
  #3
Lionel Larcheveque
Guest
 
Posts: n/a
Hi,

For each single instruction write(), the binary fortran format (unformatted) include at the beginning and the end of the data block a word (4 bytes) giving the size of the data block. For instance :

write(10) k

write(10) ((a(i,j),i=1,2),j=1,3)

write(10) b,c

where each variable as a size of four bytes (integer and float)

will result in :

[4] [binary value for k] [4]

[24] 6*[binary value for a(.,.)] [24]

[8] [binary value for b] [binary value for c] [8]

with [] a four bytes block.

The existence of these blocks is the only difference between a binary format and the fortran unformatted format for PLOT3D.

Best regards
  Reply With Quote

Old   April 28, 2002, 04:04
Default Re: Difference betw Binary & Fortran Unformatted?
  #4
Ruobo
Guest
 
Posts: n/a
Thanks a lot. What you pointed out is exactly the difference. I have fixed my format problem.

Ruobo
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparison between C/C++ and Fortran? rick Main CFD Forum 45 September 6, 2011 01:52
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 19:56
Binary in Fortran Gerrit Main CFD Forum 6 September 8, 2006 05:26
Error to re-open fluent case file J.Gimbun FLUENT 0 April 27, 2006 09:42
Sliding mesh error Karl Kevala FLUENT 4 February 21, 2001 16:52


All times are GMT -4. The time now is 02:57.