Skip to content

field

Parser of legacy field output.

istep

istep(fieldfile: Path) -> int | None

Read istep from binary field file.

Parameters:

Name Type Description Default
fieldfile Path

path of the binary field file.

required

Returns:

Type Description
int | None

the time step at which the binary file was written.

header

header(fieldfile: Path) -> dict[str, Any] | None

Read header info from binary field file.

Parameters:

Name Type Description Default
fieldfile Path

path of the binary field file.

required

Returns:

Type Description
dict[str, Any] | None

the header information of the binary file.

field

field(
    fieldfile: Path,
) -> tuple[dict[str, Any], NDArray[np.float64]] | None

Extract fields data.

Parameters:

Name Type Description Default
fieldfile Path

path of the binary field file.

required

Returns:

Type Description
tuple[dict[str, Any], NDArray[float64]] | None

the tuple (header, fields). fields is an array of scalar fields indexed by variable, x-direction, y-direction, z-direction, block.