Skip to content

Commit

Permalink
Merge pull request #65 from jedwards4b/Bcasefix
Browse files Browse the repository at this point in the history
need a flush before preview_namelist in case.build, need to allow for…
  • Loading branch information
jgfouca committed Feb 17, 2016
2 parents e754a30 + df9f510 commit 88b5876
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 20 deletions.
3 changes: 2 additions & 1 deletion scripts-python/case.build
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,8 @@ def case_build(caseroot, testmode):
# Load modules
env_module = EnvModule(mach, compiler, cimeroot, caseroot, mpilib, debug)
env_module.load_env_for_case()

# Need to flush case xml to disk before calling preview_namelists
case.flush()
run_cmd("./preview_namelists")

build_checks(case, build_threaded, comp_interface, use_esmf_lib, mpilib,
Expand Down
39 changes: 21 additions & 18 deletions scripts-python/check_input_data
Original file line number Diff line number Diff line change
Expand Up @@ -117,29 +117,32 @@ def check_input_data(svn_loc, input_data_root, data_list_dir, download):
if (line and not line.startswith("#")):
tokens = line.split('=')
description, full_path = tokens[0].strip(), tokens[1].strip()

if(full_path):
# expand xml variables
full_path = case.get_resolved_value(full_path)
rel_path = full_path.replace(input_data_root, "")

if (not os.path.exists(full_path)):
model = os.path.basename(data_list_file).split('.')[0]
logging.warning("Model %s missing file %s = '%s'" % (model,description,full_path))

if (download):
success = download_if_in_repo(svn_loc, input_data_root, rel_path)
if (not success):
# If ACME, try CESM repo as backup
if (get_model() == "acme" and svn_loc != SVN_LOCS["cesm"]):
success = download_if_in_repo(SVN_LOCS["cesm"], input_data_root, rel_path)
if (not success):
full_path = case.get_resolved_value(full_path)
rel_path = full_path.replace(input_data_root, "")

if (not os.path.exists(full_path)):
model = os.path.basename(data_list_file).split('.')[0]
logging.warning("Model %s missing file %s = '%s'" % (model,description,full_path))

if (download):
success = download_if_in_repo(svn_loc, input_data_root, rel_path)
if (not success):
# If ACME, try CESM repo as backup
if (get_model() == "acme" and svn_loc != SVN_LOCS["cesm"]):
success = download_if_in_repo(SVN_LOCS["cesm"], input_data_root, rel_path)
if (not success):
no_files_missing = False
else:
no_files_missing = False
else:
no_files_missing = False
else:
no_files_missing = False
else:
logging.info("Already had input file: '%s'" % full_path)
else:
logging.info("Already had input file: '%s'" % full_path)
model = os.path.basename(data_list_file).split('.')[0]
logging.warning("Model %s no file specified for %s"%(model,description))

return no_files_missing

Expand Down
2 changes: 1 addition & 1 deletion scripts-python/xmlchange
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def xmlchange(caseroot, listofsettings=None, xmlfile=None, xmlid=None, xmlval=No
case = Case(caseroot)
if(listofsettings ):
for setting in listofsettings:
(xmlid, xmlval) = setting.split('=')
(xmlid, xmlval) = setting.split('=', 1)
if(append is True):
value = case.get_value(xmlid, resolved=False, subgroup=subgroup)
xmlval = "%s %s" %(xmlval, value)
Expand Down

0 comments on commit 88b5876

Please sign in to comment.