Skip to content

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.

@github-actions
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.

@github-actions
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
@github-actions
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.

@github-actions
Copy link

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

@github-actions github-actions bot closed this Jul 20, 2025
@rthedin
Copy link
Contributor

rthedin commented Nov 17, 2025

I wanted to resume discussions around this PR. I'm testing it on the ERF side and things have been working. I'm ready to start testing and might have a few requests on the AMR-Wind side (although skimming the source code and the test input file, I don't have any immediate request-- the inputs are covering our needs). I haven't tested this PR as is yet because it's fairly old.

@rthedin rthedin reopened this Nov 17, 2025
@mbkuhn
Copy link
Contributor Author

mbkuhn commented Nov 17, 2025

@rthedin does that mean the downstream capability (in FastFarm) is implemented now? I updated the branch in this PR so that it can be tested -- happy to incorporate any improvements if you have ideas.

@rthedin
Copy link
Contributor

rthedin commented Nov 17, 2025

The team is finalizing the implementation of the capability in FAST.Farm and we're currently testing it with ERF data. Thank you for getting this branch updated! I will test it and let you know how it goes.

@mbkuhn
Copy link
Contributor Author

mbkuhn commented Dec 10, 2025

@rthedin any updates?

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.

4 participants