Skip to content

Commit

Permalink
replace RuntimeError exception by log message in buildnml
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-eaton committed Aug 21, 2024
1 parent cb72d70 commit c5884d9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 12 additions & 1 deletion doc/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit c5884d9

Please sign in to comment.