Skip to content

Commit

Permalink
Merge pull request #406 from blcc/release-1.4
Browse files Browse the repository at this point in the history
Fix namelist creating for multiple instances
  • Loading branch information
TomasTorsvik authored Sep 27, 2024
2 parents 8fd2ff8 + 40c1307 commit b53a5da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cime_config/buildcpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ def create_dimmod(case):
comp_root_dir_ocn = case.get_value("COMP_ROOT_DIR_OCN")
ocn_grid = case.get_value("OCN_GRID")
blom_vcoord = case.get_value("BLOM_VCOORD")
ntasks_ocn = case.get_value("NTASKS_OCN")
if case.get_value("NINST_OCN") > 1:
ntasks_ocn = case.get_value("NTASKS_OCN")
else:
ntasks_ocn = case.get_value("NTASKS_PER_INST_OCN")
objroot = case.get_value("OBJROOT")

gridconf_dir = os.path.join(comp_root_dir_ocn, "bld", ocn_grid)
Expand Down
2 changes: 1 addition & 1 deletion cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ def buildnml(case, caseroot, compname):
#--------------------------

xml_fil = os.path.join(srcroot,"components","blom","cime_config","namelist_definition_blom.xml")
pg_blom = OcnInParamGen.from_namelist_xml(xml_fil)

#------------------------
# Loop over all instances:
Expand All @@ -115,6 +114,7 @@ def buildnml(case, caseroot, compname):
# Remove old input data:
#----------------------

pg_blom = OcnInParamGen.from_namelist_xml(xml_fil)
if os.path.isfile(input_data_list):
os.remove(input_data_list)

Expand Down

0 comments on commit b53a5da

Please sign in to comment.