Expand description
Fortran sequential unformatted files (SciPy’s io.FortranFile).
Each record written by a Fortran WRITE statement to an unformatted sequential file is
framed by its length in bytes, as a 4-byte (gfortran’s default, SciPy’s header_dtype
uint32) or 8-byte integer, before and after the data. The data are raw machine values,
here little-endian.
See the book entry Scientific data files.
Functions§
- fortran_
records_ decode - Splits a Fortran unformatted sequential file into its records (SciPy’s
FortranFile.read_record), withmarker_bytes(4 or 8) per length marker. Each record’s leading and trailing markers must agree. - fortran_
records_ encode - Frames records for a Fortran unformatted sequential file (SciPy’s
FortranFile.write_record). - read_
fortran_ file - Reads the records of a Fortran unformatted sequential file.
- record_
from_ f32 f32values as a record’s bytes.- record_
from_ f64 f64values as a record’s bytes.- record_
from_ i32 i32values as a record’s bytes.- record_
to_ f32 - A record’s bytes as little-endian
f32values. - record_
to_ f64 - A record’s bytes as little-endian
f64values (read_reals(dtype=float)). - record_
to_ i32 - A record’s bytes as little-endian
i32values (read_ints()). - write_
fortran_ file - Writes records as a Fortran unformatted sequential file.