Difference betw Binary & Fortran Unformatted?
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 |
Re: Difference betw Binary & Fortran Unformatted?
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 |
Re: Difference betw Binary & Fortran Unformatted?
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 |
Re: Difference betw Binary & Fortran Unformatted?
Thanks a lot. What you pointed out is exactly the difference. I have fixed my format problem.
Ruobo |
All times are GMT -4. The time now is 23:49. |