I've been trying to read in a binary file that was apparently created using Fortran code. It's in .j03 format which is claimed to be some "old Fortran format". However, I am unable to read this thing into either Python or MATLAB. The file in question is here. From the source of the file:
*The files are written in the standard BINARY FORTRAN UNFORMATTED fashion, and the Byte ordering of each 4-Byte word is LITTLE ENDIAN.
If you try to read these files in MATLAB or C, take into account that IFORT adds 4 bytes at the end and beginning of each record.*
I've already tried multiple approaches in Python - reading in with np.fromfile
or with open
by stepping every 4 bytes and trying to use decode (which tells me that it's apparently ASCII). No idea how to proceed from here. If anyone can decode that file or help me in doing so, I'd be grateful... accessing the file contents is way more important to me than the technique for opening it. So any bit of information that I can immediately use will help.
EDIT: The first couple of rows should look like this.
variables= "x","z","uu","vv","ww","uv","oxox","oyoy", "ozoz"
zone i= 128 , j= 85 ,f=point
7012.0693359375 2337.3564453125 0.0006860329 0.0000001922 0.0001566301 -0.0000022967 0.0212685466 0.0001820315 0.1483741105
3506.0346679688 2337.3564453125 0.0013318420 0.0000009303 0.0003984132 -0.0000067950 0.0487244353 0.0004225464 0.2540639639
2337.3564453125 2337.3564453125 0.0016939737 0.0000021201 0.0004831004 -0.0000040161 0.0822693184 0.0006190896 0.3612477779
1753.0173339844 2337.3564453125 0.0016179247 0.0000034364 0.0006777456 0.0000034771 0.1159339100 0.0008106859 0.4871017039
1402.4138183594 2337.3564453125 0.0017362968 0.0000055227 0.0006670614 0.0000114476 0.1455238760 0.0010049801 0.5012307167
1168.6782226562 2337.3564453125 0.0016870550 0.0000076339 0.0006272307 0.0000261369 0.1872732490 0.0011485637 0.6453682184