this variable should not be required (for e3sm)#4962
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4962 +/- ##
==========================================
+ Coverage 28.29% 30.50% +2.21%
==========================================
Files 262 131 -131
Lines 38384 19258 -19126
Branches 8126 4075 -4051
==========================================
- Hits 10860 5875 -4985
+ Misses 26276 12755 -13521
+ Partials 1248 628 -620 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@jedwards4b I'll check this out today. Thanks! |
There was a problem hiding this comment.
Pull request overview
This PR updates the ERR system test to avoid requiring the DRV_RESTART_POINTER case variable (which is only present for some coupler configurations), enabling ERR to run for E3SM where this variable may be absent.
Changes:
- Guard setting
DRV_RESTART_POINTERso ERR doesn’t error when the variable is undefined. - Continue restoring from the archived restart directory without forcing a NUOPC-only variable.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if self._drv_restart_pointer: | ||
| self._case.set_value("DRV_RESTART_POINTER", "rpointer.cpl." + rest_dir) |
There was a problem hiding this comment.
Consider using the existing helper self._set_drv_restart_pointer(...) here instead of duplicating the support check and calling self._case.set_value(...) directly. That keeps DRV_RESTART_POINTER handling consistent across system tests (including the log message) and centralizes the conditional behavior in one place.
| if self._drv_restart_pointer: | |
| self._case.set_value("DRV_RESTART_POINTER", "rpointer.cpl." + rest_dir) | |
| self._set_drv_restart_pointer("rpointer.cpl." + rest_dir) |
| if self._drv_restart_pointer: | ||
| self._case.set_value("DRV_RESTART_POINTER", "rpointer.cpl." + rest_dir) |
There was a problem hiding this comment.
This change introduces a new conditional behavior that is important for E3SM (skipping DRV_RESTART_POINTER when the variable is not provided). Please add a unit test that constructs an ERR test with a case mock where get_value('DRV_RESTART_POINTER') is None and asserts that set_value('DRV_RESTART_POINTER', ...) is not called during _case_two_custom_prerun_action (and that the method still restores from archive as expected).
|
Verified the ERR test now runs correctly for E3SM. |
|
Thanks for taking care of this, @jedwards4b |
Description
The variable DRV_RESTART_POINTER is only provided by cmeps and should not be required for the ERR test
Checklist
Please confirm that this solves the issue for E3SM.