From 0defa5f6f1822e7e3a1af9686f137f5eb2bec530 Mon Sep 17 00:00:00 2001 From: maoji-y <255648417+maoji-y@users.noreply.github.com> Date: Mon, 23 Nov 2026 12:16:00 +0100 Subject: [PATCH] Read uncompressed binary outputs without scaling 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 #41. Co-Authored-By: Claude Opus 5.5 --- openfast_toolbox/io/fast_output_file.py | 3 ++- .../io/tests/example_files/FASTOutBin_ID3.outb | Bin 0 -> 599 bytes openfast_toolbox/io/tests/test_fast_output.py | 11 +++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 openfast_toolbox/io/tests/example_files/FASTOutBin_ID3.outb diff --git a/openfast_toolbox/io/fast_output_file.py b/openfast_toolbox/io/fast_output_file.py index 3ac89a6..2227530 100644 --- a/openfast_toolbox/io/fast_output_file.py +++ b/openfast_toolbox/io/fast_output_file.py @@ -614,7 +614,8 @@ def freadRowOrderTableBuffered(fid, n, type_in, nCols, nOff=0, type_out='float64 data[:,0] = time else: # NOTE: memory expensive due to time conversion, and concatenation - data = (data - ColOff) / ColScl + if FileID != FileFmtID_NoCompressWithoutTime: # uncompressed data are not scaled + data = (data - ColOff) / ColScl data = np.concatenate([time.reshape(NT, 1), data], 1) info = {'name': os.path.splitext(os.path.basename(filename))[0], diff --git a/openfast_toolbox/io/tests/example_files/FASTOutBin_ID3.outb b/openfast_toolbox/io/tests/example_files/FASTOutBin_ID3.outb new file mode 100644 index 0000000000000000000000000000000000000000..0f2a199563be389fb9559fbfe10861569e16f59b GIT binary patch literal 599 zcmXw0!EO^V6kMn{apPQ7g9K6#Y?a-#IV7sODQTpNCLlH?5(o)r^ER=%winymw4C?? z?r`Eq5WVmL+&OUJz!mra>`n4yYwYp!8_)AruoVQsEjKsu>0=#-Z*K&_Gfgv|S+1nP zk~CpXk~Fh4gOZ3_;YeMCaWig%SwwNijaD0#;c||rCCNcA9X~>*M9GWQogveRn%LZl zo1NBvCyKxf7}|T`lv}W}EO^Ge?7EgOSP)8088@DGa;~ay$rpRO@ot2I%X6o&2`#sO5yqSr