Skip to content

EAMxx: upgrades to DataInterpolation#8390

Open
Copilot wants to merge 5 commits into
masterfrom
copilot/add-horiz-vert-interpolation-support
Open

EAMxx: upgrades to DataInterpolation#8390
Copilot wants to merge 5 commits into
masterfrom
copilot/add-horiz-vert-interpolation-support

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 13, 2026

Add two features to DataInterpolation:

  • Ability to inteprolate non-time-dependent data
  • Ability to pick a start timestamp for YearlyPeridic when the database spans 2+ years.

[BFB]


Fixes #7619

Luca: While copilot took the first stab, I did most of the cleanup and polishing, so I'm removing myself as a reviewer. Here's a summary of what this PR does:

  1. allow to read in non-time-dependent data
  2. for YearlyPeriodic timeline, allow to specify a start date for the 12 months to use.
  3. Split setup_time_database into two methods: the periodic one can take the extra "start_ts" arg, which makes no sense for linear history.
  4. The time interpolation type (Linear vs Nearest) concerns the time interpolation interval, not the time database, so now it's passed to init_time_interpolation, which is the new name of init_time_interval.

@bartgol bartgol force-pushed the copilot/add-horiz-vert-interpolation-support branch from 2da8a14 to c24cccc Compare May 13, 2026 22:20
@bartgol bartgol added BFB PR leaves answers BFB EAMxx C++ based E3SM atmosphere model (aka SCREAM) labels May 13, 2026
@bartgol bartgol changed the title Add static data and yearly-periodic start_ts support to DataInterpolation EAMxx: upgrades to DataInterpolation May 13, 2026
@bartgol bartgol force-pushed the copilot/add-horiz-vert-interpolation-support branch 5 times, most recently from 552e4ad to eab4523 Compare May 14, 2026 20:36
@bartgol bartgol marked this pull request as ready for review May 14, 2026 20:36
bartgol added 3 commits May 15, 2026 10:01
- Use separate methods for linear/periodic timeline
- For periodic, allow to pick which is the first timeslice to use from
  the input file
@bartgol bartgol force-pushed the copilot/add-horiz-vert-interpolation-support branch from eab4523 to 672c583 Compare May 15, 2026 16:03
@bartgol bartgol requested review from Copilot and odiazib May 16, 2026 02:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR upgrades EAMxx’s DataInterpolation utility to support both (1) true
time-independent (“static”) inputs and (2) improved YearlyPeriodic handling when
input datasets span multiple years (via a start_ts selection mechanism). It
also refactors and expands the unit tests to cover these new modes and to
increase parallel test throughput.

Changes:

  • Introduces a clearer DataInterpolation setup API by splitting time-dependent
    setup into setup_linear_time_database / setup_periodic_time_database and
    adding setup_static_database, plus new init/run entry points for static vs.
    time-dependent usage.
  • Implements a static-data execution path that reads once and then remaps
    without requiring a timeline/interval.
  • Refactors/splits the former monolithic data interpolation test into multiple
    focused test executables and expands coverage (static data, start_ts
    selection/rotation behavior, etc.).

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
components/eamxx/src/share/algorithm/eamxx_data_interpolation.hpp New public API for linear/periodic/static databases; new init/run entry points.
components/eamxx/src/share/algorithm/eamxx_data_interpolation.cpp Implements static path, periodic pruning logic, refactors reader setup, and updates interpolation runtime.
components/eamxx/src/share/algorithm/tests/data_interpolation_tests.hpp Shared test helpers updated for multi-file/multi-year and static testing.
components/eamxx/src/share/algorithm/tests/data_interpolation_tests.cpp Removes the old monolithic test file (tests are split into multiple new files).
components/eamxx/src/share/algorithm/tests/data_interpolation_setup.cpp Generates additional time slices/files and new static (no-time-dim) test inputs.
components/eamxx/src/share/algorithm/tests/data_interpolation_exceptions_tests.cpp Split-out exception coverage updated to new API.
components/eamxx/src/share/algorithm/tests/data_interpolation_periodic_linear_tests.cpp Split-out YearlyPeriodic+Linear test coverage.
components/eamxx/src/share/algorithm/tests/data_interpolation_periodic_nearest_tests.cpp Split-out YearlyPeriodic+Nearest test coverage.
components/eamxx/src/share/algorithm/tests/data_interpolation_linear_hist_linear_tests.cpp Split-out Linear timeline + Linear interpolation test coverage.
components/eamxx/src/share/algorithm/tests/data_interpolation_linear_hist_nearest_tests.cpp Split-out Linear timeline + Nearest interpolation test coverage.
components/eamxx/src/share/algorithm/tests/data_interpolation_static_tests.cpp New tests for static (time-independent) interpolation and snapshot selection.
components/eamxx/src/share/algorithm/tests/data_interpolation_start_ts_tests.cpp New tests for start_ts behavior in YearlyPeriodic databases.
components/eamxx/src/share/algorithm/tests/CMakeLists.txt Splits the test target into multiple executables for parallelism and adds new tests.
components/eamxx/src/physics/spc/eamxx_spc_process_interface.cpp Updates SPC to the new DataInterpolation setup/init API.
components/eamxx/src/physics/spa/eamxx_spa_process_interface.cpp Updates SPA to the new DataInterpolation setup/init API.
components/eamxx/src/physics/mam/eamxx_mam_microphysics_process_interface.cpp Updates MAM readers to the new DataInterpolation setup/init API.

Comment thread components/eamxx/src/share/algorithm/eamxx_data_interpolation.cpp
Comment thread components/eamxx/src/share/algorithm/eamxx_data_interpolation.cpp
Comment thread components/eamxx/src/share/algorithm/eamxx_data_interpolation.cpp Outdated
Comment thread components/eamxx/src/share/algorithm/eamxx_data_interpolation.cpp Outdated
Comment thread components/eamxx/src/share/algorithm/eamxx_data_interpolation.hpp Outdated
Comment thread components/eamxx/src/share/algorithm/eamxx_data_interpolation.cpp
Comment thread components/eamxx/src/physics/spc/eamxx_spc_process_interface.cpp Outdated
@bartgol bartgol removed their request for review May 16, 2026 02:15
@bartgol bartgol force-pushed the copilot/add-horiz-vert-interpolation-support branch from 7b3dbc6 to 6296b00 Compare May 16, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BFB PR leaves answers BFB EAMxx C++ based E3SM atmosphere model (aka SCREAM)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC] EAMxx: Improving DataInterpolation Class

3 participants