Hello there,
I'm working with python, and I'm trying to automatically read the .sf file. Unfortunately I cannot read fortran, so reverse engineering fds2ascii is impossible for me.
Working from the slread.py as a basis, my guess as to how the .sf file is structured is the following:
4 header bytes (no data)
30 bytes corresponding to the quantity (utf-8)
8 intermediate bytes (no data)
30 bytes corresponding to the short name (utf-8)
8 intermediate bytes (no data)
30 bytes corresponding to the units (utf-8)
8 intermediate bytes (no data)
24 bytes for 6 integers, representing the bounds
8 intermediate bytes (no data)
Followed by data entries, with the format:
one time entry, 4 bytes float
8 intermediate bytes (no data)
IxJxK floats for the values in each grid cells, all represented by 4 bytes floats (I, J and K being the number of cells in each directions, read in the first part of the code)
8 intermediate bytes (no data)
repeating over all simulation times.
First of all, am I right ?
Second, when parsing the file like this I don't get as many data entries as expected: especially, it seems that I only get one time slice, while I expect ten (see the tattached input file) because I did not specify any time-averaging.
What am I missing here ?
If that may help, I can provide the binary .sf file that resulted from the simulation. (Note that it's a mock-up simulation, it runs really fast)
Thanks in advance for your precious help !
Best,
Simon