amrex
amrex copied to clipboard
Reading native AMReX data into a Fortran code
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:
- 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_POINTSVTK file. - 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.
- 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
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?
@asalmgren Yes, I am available next week.
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.
ERF does write planes which AMR-Wind can read.
@harish -- remind me -- did we talk about AMR-Wind also being able to write planes?
On Mon, Mar 3, 2025 at 2:17 PM Harish @.***> wrote:
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.
— Reply to this email directly, view it on GitHub https://github.com/AMReX-Codes/amrex/issues/4361#issuecomment-2695691794, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACRE6YRQQDNNRVQVMIF2YSL2STIF7AVCNFSM6AAAAABYH2OBF6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJVGY4TCNZZGQ . You are receiving this because you were mentioned.Message ID: @.***> [image: hgopalan]hgopalan left a comment (AMReX-Codes/amrex#4361) https://github.com/AMReX-Codes/amrex/issues/4361#issuecomment-2695691794
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.
— Reply to this email directly, view it on GitHub https://github.com/AMReX-Codes/amrex/issues/4361#issuecomment-2695691794, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACRE6YRQQDNNRVQVMIF2YSL2STIF7AVCNFSM6AAAAABYH2OBF6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJVGY4TCNZZGQ . You are receiving this because you were mentioned.Message ID: @.***>
-- Ann Almgren Senior Scientist; Dept. Head, Applied Mathematics
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.
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!
Closing this issue due to lack of activity. Please re-open it if you feel there is is still an issue!