Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading native AMReX data into a Fortran code #4361

Open
rthedin opened this issue Mar 3, 2025 · 6 comments
Open

Reading native AMReX data into a Fortran code #4361

rthedin opened this issue Mar 3, 2025 · 6 comments

Comments

@rthedin
Copy link

rthedin commented Mar 3, 2025

Hello AMReX team,

I'm part of the NREL team working on the integration of AMR-Wind into industry workflows. Part of this project is the integration of sampled inflow from AMR-Wind into the engineering-fidelity tool FAST.Farm.

In the recent past, our workflow consisted of sampling of structured array of points using the netcdf format, followed by our own post-processing routines. As of a few months ago, performance issues have been uncovered when sampling a large number of points (1M+) and the FAST.Farm team has been instructed by the AMR-Wind team to change the sampling format to native (particles). We have adapted our workflow and post-processing routines and that has been working just fine.

One of the main questions we have is regarding the data format. It is my understanding that the native/particle format outputs a cloud of points and contains no information regarding the structured nature of the data. For example, requesting planes of data with certain offsets is no different than requesting a list of arbitrary points. Is that accurate? If so, are there plans to re-structure the saved data so that reading of structured data is more efficient?

With that in mind, we are now aiming to support direct AMReX particle format as input to FAST.Farm, skipping the intermediate post-processing and allow more efficient reading of data. I'm reaching out to seek guidance and comments from the AMReX team on how to best tackle this. We are looking for efficient ways to read AMReX data directly into FAST.Farm (which is a Fortran code). We note that for this integration, it can be assumed the used has requested structured data (likely in the format of several stacked (offset'd) planes using PlaneSampler).

After initial discussions within the FAST.Farm team, we have the following goals for this integration:

  1. Be able to read the metadata regarding the underlying group saved and determine the domain where data were saved (extent, resolution, etc). Essentially, as if we read the first few lines of a STRUCTURED_POINTS VTK file.
  2. Split the domain of the saved data into small sub-domains, and identify which of these sub-domains will need to be read at a later time. This is only done once and the desired sub-domains do not change. This step is entirely internal to FAST.Farm.
  3. Read small structured chunks ad-hoc. The same chunks will be read for the current time step, one time step at a time.

We appreciate any guidance and suggestions on how to best approach this.

cc @jjonkman @andrew-platt

@asalmgren
Copy link
Member

It would be good to come up with a solution that would work for ERF data as well as AMR-Wind data. I'm wondering if we could set up a call next week to discuss the choices you've made so far and how to make everything work optimally. @WeiqunZhang -- would you be available for that?

@WeiqunZhang
Copy link
Member

@asalmgren Yes, I am available next week.

@hgopalan
Copy link

hgopalan commented Mar 3, 2025

This was one of the use cases for which I wanted to see if we can also use ERF and asked for adding post-processing capabilities to write planes.

@asalmgren
Copy link
Member

asalmgren commented Mar 3, 2025 via email

@hgopalan
Copy link

hgopalan commented Mar 3, 2025

We discussed about doing it in ERF. We never discussed about porting the code into AMR-Wind at that time as it already had the particle format to do it.

@rthedin
Copy link
Author

rthedin commented Mar 3, 2025

Adding support for ERF is something we definitely want to do as well. I will send a calendar invite for next week. Thanks for the availability!

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

No branches or pull requests

4 participants