Skip to content

Read uncompressed binary outputs (FileID 3) without scaling - #89

Open
maoji-y wants to merge 1 commit into
OpenFAST:mainfrom
maoji-y:fix/uncompressed-binary-output
Open

maoji-y wants to merge 1 commit into
OpenFAST:mainfrom
maoji-y:fix/uncompressed-binary-output

Conversation

@maoji-y

@maoji-y maoji-y commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Fixes #41.

OpenFAST writes uncompressed binary outputs (OutFileFmt = 4, FileID 3) as unscaled float64 values. For these files ColScl and ColOff are (NumOutChans, 1) arrays, so the default non-buffered read of FASTOutputFile failed with operands could not be broadcast together, and only use_buffer=True worked. The scaling step is now skipped for FileID 3, as welib does since ebranlard/welib@9d7b720.

Tests

  • New example file FASTOutBin_ID3.outb (599 bytes): a 0.1 s IEA-15-240-RWT-UMaineSemi run with three ElastoDyn channels, written by OpenFAST v4.2.1. test_001_read_all now reads it, and the new test checks time and TwrBsFxt against the text output of the same run and compares with buffered reading. Both fail on main with the error from Dimension Mismatch Error When Using FASTOutputFile.toDataFrame(): operands could not be broadcast together with shapes (4801,138) (138,1) #41.
  • On a full IEA-15-240-RWT-UMaineSemi run (881 channels), the mix, numpy, struct, optim and buffered reads all match the .out file within its precision (4.9e-8 relative).
  • Windows, Python 3.13, numpy 2.5.5, pandas 3.1.1: test_fast_output.py 4 passed. In the full suite, the airfoil tests that fail under pandas 3 (read-only arrays) and some example scripts fail the same way with and without this change.

🤖 Generated with Claude Code

OpenFAST writes uncompressed binary outputs (OutFileFmt=4, FileID 3)
as unscaled float64 values. For these files ColScl and ColOff are
(NumOutChans, 1) arrays, so the non-buffered path, which is the
default, failed with "operands could not be broadcast together".
Skip the scaling for FileID 3, as welib does since 9d7b720.

The new example file is a 0.1 s IEA-15-240-RWT-UMaineSemi run with
three ElastoDyn channels, written by OpenFAST v4.2.1.

Fixes OpenFAST#41.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dimension Mismatch Error When Using FASTOutputFile.toDataFrame(): operands could not be broadcast together with shapes (4801,138) (138,1)

1 participant