EAMxx: upgrades to DataInterpolation#8390
Open
Copilot wants to merge 5 commits into
Open
Conversation
Copilot created this pull request from a session on behalf of
bartgol
May 13, 2026 20:51
View session
107022e to
c239451
Compare
2da8a14 to
c24cccc
Compare
552e4ad to
eab4523
Compare
- Use separate methods for linear/periodic timeline - For periodic, allow to pick which is the first timeslice to use from the input file
eab4523 to
672c583
Compare
Contributor
There was a problem hiding this comment.
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
DataInterpolationsetup API by splitting time-dependent
setup intosetup_linear_time_database/setup_periodic_time_databaseand
addingsetup_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. |
7b3dbc6 to
6296b00
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add two features to DataInterpolation:
[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:
YearlyPeriodictimeline, allow to specify a start date for the 12 months to use.setup_time_databaseinto two methods: the periodic one can take the extra "start_ts" arg, which makes no sense for linear history.init_time_interpolation, which is the new name ofinit_time_interval.