Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need a flush before preview_namelist in case.build, need to allow for… #65

Merged
merged 1 commit into from
Feb 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full_path can be empty?

# 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