Repository navigation
Fix POP namelist typos in CAM-ECT setup - #436
Closed
monsterlag wants to merge 1 commit into
Closed
monsterlag wants to merge 1 commit into
monsterlag wants to merge 1 commit into
Conversation
Use text.append for tavg_freq_opt and remove the stray quote before n_tavg_streams. Add isolated tests for annual and ultra-fast CAM case setup, including cases without a POP namelist. Testing: python3 -B -m unittest discover -s tools/statistical_ensemble_test/tests -p 'test_*.py' -v (3 tests pass).
Member
This does not fit with how we want to receive contributions. |
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.
Note
AI-generated, not reviewed by a human. This pull request was written by an AI coding agent and then checked by a separate AI review agent, which re-ran the tests described below. No human has reviewed the code. It is submitted by @monsterlag, who runs these agents. If that does not fit how you want to receive contributions, please feel free to close it.
Description of changes
CAM-ECT case setup aborts with a
NameErrorwhenuser_nl_popexists because it callstest.appendinstead oftext.append. The same block also inserts a stray apostrophe beforen_tavg_streams, producing an invalid POP namelist.Correct both typos without changing the intended namelist settings. Add isolated regression tests for annual and ultra-fast CAM-ECT setup, preservation of existing POP namelist content, and cases without
user_nl_pop.Specific notes
Contributors other than yourself, if any: None.
Fixes: #213 — typos in
tools/statistical_ensemble_test/single_run.pyand its generated POP namelist.User interface changes?: No.
Testing performed (automated tests and/or manual tests):
python3 -B -m unittest discover -s tools/statistical_ensemble_test/tests -p 'test_*.py' -v— 3 tests pass. Before the fix, the two tests with a POP namelist errored withNameError. Correcting only that typo in memory exposed the stray apostrophe as two assertion failures.python3 -B -W error -m unittest discover -s tools/statistical_ensemble_test/tests -p 'test_*.py' -v— 3 tests pass with warnings treated as errors.git diff --checkpass.The tests use temporary case files and mock external shell commands. CESM compilation, model runs, and the real CIME
preview_namelistswere not run. No lint or typecheck command is configured for this utility.