Skip to content

Postprocessing Tool: Subvolume Data Output #1547

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

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

mbkuhn
Copy link
Contributor

@mbkuhn mbkuhn commented Mar 31, 2025

Summary

User-requested feature to output chunks of data directly from the computational mesh. Following after the work in ERF https://github.com/erf-model/ERF/blob/development/Source/IO/ERF_WriteSubvolume.cpp and taking advantage of the framework in AMR-Wind sampling (specifying many with different labels, output logic, variety of variables)

Pull request type

Please check the type of change introduced:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

Checklist

The following is included:

  • new unit-test(s)
  • new regression test(s)
  • documentation for new capability

This PR was tested by running:

  • the unit tests
    • on GPU
    • on CPU
  • the regression tests
    • on GPU
    • on CPU

Additional background

Issue Number:

@mbkuhn
Copy link
Contributor Author

mbkuhn commented Mar 31, 2025

@marchdf I haven't tested this yet, looking for feedback and improvements

Also just realized that if a user requests a non-cell-centered variable, this doesn't currently handle it properly.


pp.getarr("origin", m_origin);
pp.getarr("num_points", m_npts_vec);
pp.getarr("dx_vec", m_dx_vec);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe just dx?

@marchdf
Copy link
Contributor

marchdf commented Apr 2, 2025

Nice work! Yeah not sure how best to handle the non-cell centered variables. Maybe just abort until someone needs them?

Does this work if the subvolume crosses coarse-fine interfaces? If not maybe we need an abort to catch for that?

And it looks like this will only have a boxarray that matches the subvolume so the copies won't be too bad. Is that right?

@mbkuhn
Copy link
Contributor Author

mbkuhn commented Apr 2, 2025

In Ann's example, there is an interpolation step because ERF's velocities are at cell faces. We could do something like that conditionally.

This doesn't traverse coarse/fine interfaces, but it uses a target resolution in the user parameters. Presumably, the user is targeting a specific level of the mesh, not multiple levels. This assumption is made in Ann's example, too.

@mbkuhn
Copy link
Contributor Author

mbkuhn commented Apr 7, 2025

need a reg test and documentation for this

@mbkuhn
Copy link
Contributor Author

mbkuhn commented Apr 10, 2025

not sure exactly how to do the reg test check the subvolume results, but they should be eligible inputs for fcompare

@hgopalan
Copy link
Contributor

A simple reg test would be a shear layer with known velocity and computing the mean wind speed within the subvolume.

Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Copy link

This PR was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this May 18, 2025
@mbkuhn mbkuhn reopened this May 19, 2025
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

Successfully merging this pull request may close these issues.

3 participants