Skip to content

Simplify test input files using AMReX FILE directive - #1

Closed
baperry2 with Copilot wants to merge 560 commits into
mainfrom
copilot/simplify-test-input-files
Closed

Simplify test input files using AMReX FILE directive#1
baperry2 with Copilot wants to merge 560 commits into
mainfrom
copilot/simplify-test-input-files

Conversation

Copilot AI commented Mar 27, 2026

Copy link
Copy Markdown

Summary

Reduce duplication in test input files by using the AMReX FILE = <path> directive to import a base input file and override only the settings that differ.

Pull request type

  • 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

36 test input files simplified (2,607 lines removed, 47 added) where variants differed from a base case by only a few settings. Each simplified file now imports the base and specifies only what changes:

FILE = ../abl_unstable/abl_unstable.inp
ABL.wall_shear_stress_type = constant

Groups simplified:

  • ABL wall model variants (abl_unstable_constant/local/schumann_wall_model) — single ABL.wall_shear_stress_type override
  • ABL stable variants (abl_stable_different_roughness, abl_stable_zfp_hdf5) — roughness or HDF5/ZFP settings
  • ABL Godunov scheme variants (abl_godunov_ppm/nofft/nolim/weno/noncons/plm, velocity solve variants, abl_godunov_ascent/restart/mpl_amr) — advection scheme, diffusion type, or feature additions
  • ABL boundary I/O variants (abl_bndry_output_native/amr_inflow/amr_native/amr_upper, abl_bndry_input_native/amr_native/amr_inflow) — native vs netcdf format or AMR level additions
  • Channel/halfchannel variants — turbulence model or solver flag changes
  • MMS/CTV/sampling variants — advection scheme or output format changes
  • joukowsky_disk_awc — AWC actuator parameters
  • noprecursor_les_pert — PerturbationForcing addition
  • nrel_terrain_amr — AMR refinement addition

Not simplified: cases where the variant removes a setting from the base (e.g., abl_mol_cn removes incflo.diffusion_type), since FILE cannot unset keys — overriding is one-directional.

Issue Number:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

marchdf and others added 30 commits January 16, 2025 07:19
…nema#1415)

* basic implementation of current for linear waves, numerical beach

* format

* starting on a reg test

* updates to reg test

* documentation

* spellcheck

* remove commented code

* use aborts, modify docs

* consolidate calculations for vel_liq
…nema#1450)

* initialize w2a levelset field to water level (not 0 everywhere), only zero fields during updates where updates will occur

* add conditional meant for last commit

* add reg test that shows problem with old implementation

* fix segfault at initialization; incorporate into reg test

* remove conditional that does nothing

* replace unnecessary ad-hoc function
…ynema#1454)

* Add initial modifications to sampling_info

* Add sampling type and name per group

* Add corresponding python reader for new sampling_info file

* clean-up

* simplifications

* yaml formatting

* change name

* change another name

* another name

---------

Co-authored-by: Marc Henry de Frahan <marc.henrydefrahan@nrel.gov>
Bumps [submods/amrex](https://github.com/AMReX-Codes/amrex) from `9643da4` to `92d35c2`.
- [Release notes](https://github.com/AMReX-Codes/amrex/releases)
- [Commits](AMReX-Codes/amrex@9643da4...92d35c2)

---
updated-dependencies:
- dependency-name: submods/amrex
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marc T. Henry de Frahan <marc.henrydefrahan@nrel.gov>
* fix tau and math display

* fix link display
* init w2a waves as intended

* set up abl multiphase reg test for w2a, shows obvious flaws

* move variable assignment outside parallelfor

* tweak time stepping settings

* documentation (for arguments now in reg test)

* docs fix

* get those MFIters outta here

* changes to use ow fields in terrain drag

* create modes for ocean waves

* correct conditional

* moving toward ocean waves single-phase compatibility

* renaming update_relax_zones to be more accurate

* init tweaks to w2a

* introduce target vel to drag forcing

* wave terrain showing up in forcing at beginning and end of reg test

* formatting

* more formatting

* correct terrain height

* consistent case

* add dragtempforcing to reg test

* progress on abl + w2a terrain reg test

* move function to public

* address terrain roughness

* ignore unused

* remove unused

* more for unused

* better function name

* change to warning, filling modes by default at beginning

* offset for waves in reg test

* tweak warning message

* correct conditional to get ow_velocity correct

* switching order, adding const

* remove erroneous comment

* remove inappropriate m_ prefix

* remove unused/unnecessary function

* reorganize existing viscous drag approach and make it relative; add form drag from dynamic wave model

* be able to use velocity in current cell when it's a good idea
* first set of tests to speed up

* change dependent test

* update new test from waves as terrain
* Adding mesoscale-zone for no BC cases

* Lint

* Clang

* Bug fixes

* change tke profile meso-coupling

* Clang

* Better confergence

* Add perturbation

* Rearrange

* Compatible

* Code rearrange

* Changes after discussion with Marc

* Added Reg Test

* tighten tolerance

* Adding base documentation

* Update inputs_ABL.rst

* More doc

* Walk through

* s removed

* Changes

* Consistency

* Clean

---------

Co-authored-by: Marc T. Henry de Frahan <marc.henrydefrahan@nrel.gov>
Co-authored-by: prakash <120606615+moprak-nrel@users.noreply.github.com>
* turn off apply_relaxation_zones where terrain blanking (or terrain drag forcing) happens

* modify ow boundary for underwater terrain

* add regression test
---------

Co-authored-by: Jean M. Sexton <jmsexton@lbl.gov>
Co-authored-by: Marc T. Henry de Frahan <marchdf@gmail.com>
* fix dangling reference bug

* use direct function to get the cell size
Copilot AI and others added 6 commits March 25, 2026 12:30
…UpDryRun() (kynema#1895)

* Initial plan

* Fix typo: "checkpoint_inteval" → "checkpoint_interval" in CheckAndSetUpDryRun()

Co-authored-by: jrood-nrel <23264326+jrood-nrel@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Exawind/amr-wind/sessions/2cdda289-57b5-4e35-b37e-7eb5e2947f40

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jrood-nrel <23264326+jrood-nrel@users.noreply.github.com>
…ting (kynema#1891)

* Initial plan

* Fix BurggrafFlow::output_error() - add w_err and fix setw formatting

Co-authored-by: jrood-nrel <23264326+jrood-nrel@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Exawind/amr-wind/sessions/984cfd47-3170-479c-8938-55ebe079db90

* Fix mistakes by Copilot. (kynema#1893)

* Formatting (kynema#1894)

* Fix mistakes by Copilot.

* Formatting.

* remove L2_w from error output header

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jrood-nrel <23264326+jrood-nrel@users.noreply.github.com>
Co-authored-by: Jon Rood <jon.rood@nrel.gov>
Co-authored-by: Michael B Kuhn <31661049+mbkuhn@users.noreply.github.com>
* Initial plan

* Fix redundant nc_inq_vardimid loop in NCVar::shape()

Co-authored-by: jrood-nrel <23264326+jrood-nrel@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Exawind/amr-wind/sessions/c122a331-29dc-4e43-b405-39786654f0b9

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jrood-nrel <23264326+jrood-nrel@users.noreply.github.com>
Co-authored-by: Michael B Kuhn <31661049+mbkuhn@users.noreply.github.com>
* allow tower points in setup

* add tower points to reg test

* update comment

* include tower epsilon as well (necessary)

* remove outdated comment

* check cd grid for tower, interpolate if not matching tower diameter grid
kynema#1799)

* First

* Second

* Third

* Fourth

* Fifth

* New Hope

* Damping strikes back

* Remove unused

* Clean-up

* docs: remove old DragForcing arguments and RayleighDamping (old and new)

* make sure user doesn't forget vertical_cutoff when lateral_damping_start is included

* Adjust test case

* Lateral Damping Example

* Update for coarse grids

* Remove

* Revert Sponge

* Revert

* remerge

* Fixing test

* Revert

* Clang

* Some bugs

* bug

* tke

* Modified Terrain Drag for Vertical Velocity

* Make IB consistent

* Fixes

* Clang

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* bug fix

* single precision stuff

* more single precision stuff

* modify int conversion and more single precision stuff

* missed some stuff

* remove commented code

* remove more commented code

* remove unnecessary changes

* still going

* on and on

* remove empty comments and adjust redundant parentheses

* formatting

* some of the Copilot suggestions

* clang-tidy

* make things bools that obviously should be

* condense some declarations

* give everything the same type, same defaults

* improve parsing to ensure sponge distances are not omitted

* simplify

* make time factor a parameter that can be modified

* updated docs based on new parsing behavior and new defaults

* replace hard-coded 0.1 minimum z, but still unsure about defaults

* formatting

* make sure that kappa parameter from input is used

* add conditional to limit impact on other workflows

* allow different options for specifying start of meso sponge, add to docs

* put warning in the right place and avoid breaking other DragForcing workflows

* handle cases when there is 1 or 0 data points

* update deprecated ABL.reference_temperature lines and avoid adding new "ref_temp" argument

* formatting

* couple of fixes from Copilot review

* improve initialization of "terrain_damping"

* revert Kosovic LES model to main version; still under development and not intended for this PR

* add parentheses for clarit

* avoid dividing by 0 by checking sponge distance denominator

* remove pointless pre-declare

* remove redundant use of sponge bools; gives consistency between x and y

---------

Co-authored-by: Michael Kuhn <mkuhn@nrel.gov>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Michael Kuhn <mkuhn@nlr.gov>
Co-authored-by: Michael B Kuhn <31661049+mbkuhn@users.noreply.github.com>
Copilot AI changed the title [WIP] Simplify input files using AMReX directives Simplify test input files using AMReX FILE directive Mar 27, 2026
Copilot AI requested a review from baperry2 March 27, 2026 18:24
Copilot AI and others added 2 commits March 27, 2026 18:45
…s' into copilot/simplify-test-input-files

# Conflicts:
#	test/test_files/abl_bds/abl_bds.inp
#	test/test_files/abl_bndry_output_amr_inflow/abl_bndry_output_amr_inflow.inp
#	test/test_files/abl_bndry_output_native/abl_bndry_output_native.inp
#	test/test_files/abl_godunov_ascent/abl_godunov_ascent.inp
#	test/test_files/abl_godunov_mpl_amr/abl_godunov_mpl_amr.inp
#	test/test_files/abl_godunov_nolim/abl_godunov_nolim.inp
#	test/test_files/abl_godunov_plm/abl_godunov_plm.inp
#	test/test_files/abl_godunov_restart/abl_godunov_restart.inp
#	test/test_files/abl_godunov_scalar_velocity_solve/abl_godunov_scalar_velocity_solve.inp
#	test/test_files/abl_godunov_segregated_velocity_solve/abl_godunov_segregated_velocity_solve.inp
#	test/test_files/abl_godunov_weno/abl_godunov_weno.inp
#	test/test_files/abl_stable_hdf5/abl_stable_hdf5.inp
#	test/test_files/abl_surf_temp_timetable/abl_surf_temp_timetable.inp
#	test/test_files/inflow_bds_amr/inflow_bds_amr.inp
#	test/test_files/linear_bds_amr/linear_bds_amr.inp

Co-authored-by: baperry2 <53018946+baperry2@users.noreply.github.com>
baperry2 and others added 9 commits March 27, 2026 13:26
* add changes that enable amr-wind+openfast to compile
- fix conflict with unit tests

* formatting

* comments for clarity
Bumps [submods/amrex](https://github.com/AMReX-Codes/amrex) from `fc7d9e7` to `388b0db`.
- [Release notes](https://github.com/AMReX-Codes/amrex/releases)
- [Commits](AMReX-Codes/amrex@fc7d9e7...388b0db)

---
updated-dependencies:
- dependency-name: submods/amrex
  dependency-version: 388b0db16adb5eb90e740343ccbae4c3ba71b519
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown

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
Copy Markdown

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

@github-actions github-actions Bot closed this May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.