Skip to content

Commit

Permalink
EAM: removed stale code in buildnml
Browse files Browse the repository at this point in the history
The folder eamxx/data no longer exists, and did not contain any input
data for EAM in the first place
  • Loading branch information
bartgol committed Dec 19, 2024
1 parent cd6a6b9 commit 3fe9539
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions components/eam/cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -233,29 +233,6 @@ def buildnml(case, caseroot, compname):
safe_copy(os.path.join(eamconf_dir, "atm_in"), os.path.join(rundir, "atm_in{}".format(inst_string)))
safe_copy(os.path.join(eamconf_dir, "drv_flds_in"), os.path.join(rundir, "drv_flds_in"))

# -----------------------------------------------------
# copy scream input data
# -----------------------------------------------------

with SharedArea():
scream_data_dir = os.path.join(case.get_value("SRCROOT"), "components/eamxx/data")
for item in os.listdir(scream_data_dir):
tgt_dir = os.path.join(din_loc_root, "atm/cam/physprops")
tgt_path = os.path.join(tgt_dir, item)
if not os.path.isdir(tgt_dir):
try:
os.makedirs(tgt_dir)
except OSError:
pass # lost the race

try:
fd = os.open(tgt_path, os.O_CREAT | os.O_EXCL)
# If we get to this line, we won the race
os.close(fd)
safe_copy(os.path.join(scream_data_dir, item), tgt_path)
except OSError:
pass # lost the race

###############################################################################
def _main_func():
###############################################################################
Expand Down

0 comments on commit 3fe9539

Please sign in to comment.