Skip to content

Commit

Permalink
Merge pull request ESCOMP#12 from ESCOMP/fix_cpp_issue
Browse files Browse the repository at this point in the history
do not change DECOMPTYPE only to change it back again
  • Loading branch information
dabail10 authored Jan 7, 2019
2 parents 1301011 + 1f0c5e0 commit 2b2055e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cime_config/buildcpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ def buildcpp(case):
cice_auto_decomp = case.get_value("CICE_AUTO_DECOMP")

pts_mode = case.get_value("PTS_MODE")
# set cice mode and cice_config_opts
cice_mode = case.get_value("CICE_MODE")

if pts_mode:
# explicitl set values for single column mode
nx = 1
Expand Down Expand Up @@ -79,11 +82,10 @@ def buildcpp(case):
case.set_value("CICE_BLCKX", config[2])
case.set_value("CICE_BLCKY", config[3])
case.set_value("CICE_MXBLCKS",config[4])
case.set_value("CICE_DECOMPTYPE", config[5])
if cice_mode != 'prescribed':
case.set_value("CICE_DECOMPTYPE", config[5])
case.set_value("CICE_DECOMPSETTING", config[6])

# set cice mode and cice_config_opts
cice_mode = case.get_value("CICE_MODE")

# set cice physics
if "cice5" in cice_config_opts:
Expand Down Expand Up @@ -200,7 +202,7 @@ def set_nondefault_cpp(cice_config_opts, string, value):
def _main_func():

caseroot = parse_input(sys.argv)
with Case(caseroot) as case:
with Case(caseroot, read_only=False) as case:
cice_cppdefs = buildcpp(case)
logger.info("CICE_CPPDEFS: %s" %cice_cppdefs)

Expand Down

0 comments on commit 2b2055e

Please sign in to comment.