Skip to content

Conversation

@akeeste
Copy link
Contributor

@akeeste akeeste commented Aug 29, 2024

writeBEMIOH5 can take a very long time. Almost all of the BEM coefficients are written twice, in the "components" groups, but never used in WEC-Sim. These groups are never read in by readBEMIOH5

In my testing with the directional OSWEC data in the Applications repo, this duplicate data takes approximately 98.9% of the CPU time of writeBEMIOH5 and increases the H5 file size by almost 4 times.

This PR eliminates the duplicate writing of BEM data into the "component" groups and significantly reduces the computational expense of writeBEMIOH5. This will critically enable the use of variable hydro.

@kmruehl kmruehl self-assigned this Sep 4, 2024
@kmruehl kmruehl self-requested a review September 4, 2024 14:11
@kmruehl kmruehl added the BEM/BEMIO related to BEMIO or BEM hydro data label Sep 4, 2024
@kmruehl
Copy link
Collaborator

kmruehl commented Sep 4, 2024

Thanks @akeeste, this is a great suggestion. I certainly see value in having the component information in the h5 files for easy viewing/plotting of this data. However, that benefit is minimal when compared to the computation expense and size of the resulting h5 file. Plus, as you mentioned, the data is already contained within the h5, it just requires a bit more (or different) post-processing to plot each component. In short, I'm going to go ahead and merge this PR. If we decide we don't like it, we can revert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BEM/BEMIO related to BEMIO or BEM hydro data

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants