From 9abd9d45bc3ce5ec2708f9e2dcbb1366190aad9c Mon Sep 17 00:00:00 2001 From: Stig Rune Jensen Date: Wed, 12 Feb 2025 16:23:44 +0100 Subject: [PATCH] feat: add read omega block --- src/Fvcom.fs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Fvcom.fs b/src/Fvcom.fs index 060bc4d..d756d86 100644 --- a/src/Fvcom.fs +++ b/src/Fvcom.fs @@ -165,6 +165,17 @@ let readOmega (ds: DataSet) t l = Log.Error $"{e}" Array.empty +let readOmegaBlock (ds: DataSet) t = + try + let n = ds.Dimensions["node"].Length + let l = ds.Dimensions["siglev"].Length + let u = ds[ "omega" ].GetData([| t; 0; 0 |], [| 1; l; n |]) :?> single [,,] + u[0, *, *] + with + | e -> + Log.Error $"{e}" + Array2D.zeroCreate 0 0 + let readOmegas (ds: DataSet) t l es = try let n = ds.Dimensions["node"].Length