I want to read numerical model output file in Python. This model output file is unformatted Fortran output file.
So, to read in Fortran
OPEN(10, FILE=FILE_NAME, STATUS="OLD", ACCESS="DIRECT", FORM="UNFORMATTED", RECL=NX*NY, CONVERT="big_endian")
and to write other format(NetCDF), output format is f8(float)
format.
I'm trying to read the 1-bit binary file in Python,
(fromfile
function in the NumPy module, struct module, etc..)
but I am getting the wrong data or read error.
open
statement, and you want to know how to read the same data in python? What do you mean with "1-bit"? Is that file storing booleans? – chw21 17 hours ago