From c5884d96bca0e013f685898ce79a8db36dcd790a Mon Sep 17 00:00:00 2001 From: Brian Eaton Date: Wed, 21 Aug 2024 14:21:42 -0400 Subject: [PATCH] replace RuntimeError exception by log message in buildnml --- cime_config/buildnml | 4 ++-- doc/ChangeLog | 13 ++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/cime_config/buildnml b/cime_config/buildnml index a077e13fcd..9c156b66d5 100755 --- a/cime_config/buildnml +++ b/cime_config/buildnml @@ -78,11 +78,11 @@ def buildnml(case, caseroot, compname): buildcpp = import_from_file("buildcpp", cmd) _ = buildcpp.buildcpp(case) except: - raise RuntimeError("CAM's 'buildcpp' script failed to run properly.") + logger.warning(" ...cam buildcpp exited with error") # Verify that we have a config_cache file (generated by the call to buildcpp) expect(os.path.isfile(filename), - " Missing config_cache.xml - cannot run build-namelist") + " Missing CAM's config_cache.xml - cannot run build-namelist") #-------------------------------------------------------------------- # Invoke cam build-namelist - output will go in $CASEROOT/Buildconf/camconf diff --git a/doc/ChangeLog b/doc/ChangeLog index d3e86964e5..e2a74d99c3 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -3,7 +3,7 @@ Tag name: Originator(s): jedwards, eaton Date: -One-line Summary: fix issue #1108, merge PR#1101 +One-line Summary: fix issues #1108, #1106; merge PR#1101 Github PR URL: Purpose of changes (include the issue number and title text for each relevant GitHub issue): @@ -17,6 +17,14 @@ Issue #1108 - More robust logic in gw_drag.F90 when deep_scheme='off' PR #1101 - improved fix for rh write performance - reorder output fields. Merge Jim's PR into this one. +Issue #1106 - Report an error if a user uses --model_top with anything other than cam7 +- configure reports this error, but the output in the log file gets + obscured by a stack traceback issued from buildnml which is not useful. + The fix implemented in buildnml replaces the "raise RuntimeError" call in + buildcpp by a warning message in the log file. If a subsequent check for + CAM's config_cache.xml file fails, then exection is terminated by a call + to the CIME.utils "expect()" routine. + Describe any changes made to build system: @@ -39,6 +47,9 @@ List all existing files that have been modified, and describe the changes: bld/build-namelist . add check to set use_gw_convect_dp=.false. when deep_scheme='off'. +cime_config/buildnml +. replace RuntimeError exception by message to logger. + src/control/cam_history.F90 . The variables in the restart history files are reordered so that the nacs variables are all written together rather than being next to their