diff --git a/cime_config/buildcpp b/cime_config/buildcpp
index 656ffcec..333d3b8d 100644
--- a/cime_config/buildcpp
+++ b/cime_config/buildcpp
@@ -13,11 +13,10 @@ sys.path.append(os.path.join(CIMEROOT, "scripts", "Tools"))
from standard_script_setup import *
-from CIME.utils import run_cmd_no_fail, expect
-from CIME.utils import run_cmd
+#from CIME.utils import run_cmd_no_fail, expect
+#from CIME.utils import run_cmd
from CIME.case import Case
from CIME.buildnml import parse_input
-
import glob, shutil
logger = logging.getLogger(__name__)
@@ -25,12 +24,14 @@ logger = logging.getLogger(__name__)
def buildcpp(case):
###############################################################################
- # determine cice_config_opts
+# tcraig, should move the decomposition stuff from buildcpp to buildnml
+# the only thing needed here is the actual cpp stuff -Dncdf -DRASM -DCESMCOUPLED
+# # determine cice_config_opts
cice_config_opts = case.get_value('CICE_CONFIG_OPTS')
- # set ice grid settings
- nx = case.get_value("ICE_NX")
- ny = case.get_value("ICE_NY")
+# # set ice grid settings
+# nx = case.get_value("ICE_NX")
+# ny = case.get_value("ICE_NY")
ice_grid = case.get_value('ICE_GRID')
if ice_grid == 'ar9v2':
@@ -40,118 +41,127 @@ def buildcpp(case):
else:
hgrid = ice_grid
- # determine decomposition xml variables if CICE_AUTO_DECOMP is true
- # - invoke generate_cice_decomp.pl and update env_build.xml settings to
- # reflect changes in the configuration this will trigger
- cice_auto_decomp = case.get_value("CICE_AUTO_DECOMP")
-
- pts_mode = case.get_value("PTS_MODE")
- if pts_mode:
- # explicitl set values for single column mode
- nx = 1
- ny = 1
- cice_auto_decomp = False
- case.set_value("CICE_BLCKX", 1)
- case.set_value("CICE_BLCKY", 1)
- case.set_value("CICE_MXBLCKS", 1)
- case.set_value("CICE_DECOMPTYPE", "cartesian")
- case.set_value("CICE_DECOMPSETTING", "square-ice")
-
- if cice_auto_decomp:
- nthrds_ice = case.get_value("NTHRDS_ICE")
- ninst_ice = case.get_value("NINST_ICE")
- ntasks = case.get_value("NTASKS_PER_INST_ICE")
- srcroot = case.get_value("SRCROOT")
-
- cmd = os.path.join(srcroot, "components", "cice", "bld", "generate_cice_decomp.pl")
- command = "%s -ccsmroot %s -res %s -nx %s -ny %s -nproc %s -thrds %s -output %s " \
- % (cmd, srcroot, hgrid, nx, ny, ntasks, nthrds_ice, "all")
- rc, out, err = run_cmd(command)
-
- expect(rc==0,"Command %s failed rc=%d\nout=%s\nerr=%s"%(cmd,rc,out,err))
- if out is not None:
- logger.debug(" %s"%out)
- if err is not None:
- logger.debug(" %s"%err)
-
- config = out.split()
- if int(config[0]) > 0:
- 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])
- case.set_value("CICE_DECOMPSETTING", config[6])
-
- # set cice mode and cice_config_opts
+# # determine decomposition xml variables if CICE_AUTO_DECOMP is true
+# # - invoke generate_cice_decomp.pl and update env_build.xml settings to
+# # reflect changes in the configuration this will trigger
+# 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")
-
- # set cice physics
- if "cice5" in cice_config_opts:
- phys = "cice5"
- elif "cice4" in cice_config_opts:
- phys = "cice4"
-
- if cice_mode == 'prescribed':
- case.set_value("CICE_DECOMPTYPE", "roundrobin")
-
- if cice_mode == 'prescribed':
- ntr_aero = 0
- else:
- ntr_aero = 3
- ntr_aero = set_nondefault_cpp(cice_config_opts, "ntr_aero", ntr_aero)
- case.set_value("ICE_NAERO", ntr_aero)
-
- # set number of bgc tracers (valid values are 0->10)
- if cice_mode == 'prescribed':
- nbgclyr = 0
- else:
- nbgclyr = 3
- nbgclyr = set_nondefault_cpp(cice_config_opts, "nbgclyr", nbgclyr)
-
- # set isotope tracer
- ntr_iso = 0
- ntr_iso = set_nondefault_cpp(cice_config_opts, "ntr_iso", ntr_iso)
-
- # set age tracer
- trage = 1
- trage = set_nondefault_cpp(cice_config_opts, "trage", trage)
-
- # set first year ice tracer (valid values are 0,1)
- trfy = 1
- trfy = set_nondefault_cpp(cice_config_opts, "trfy", trfy)
-
- # set pond tracer (valid values are 0,1)
- trpnd = 1
- trpnd = set_nondefault_cpp(cice_config_opts, "trpnd", trpnd)
-
- # set level ice tracer (valid values are 0,1)
- trlvl = 1
- trlvl = set_nondefault_cpp(cice_config_opts, "trlvl", trlvl)
-
- # set brine tracer (valid values are 0,1)
- trbri = 0
- trbri = set_nondefault_cpp(cice_config_opts, "trbri", trbri)
-
- # set skeletal layer tracer (valid values are 0,1)
- trbgcs = 0
- trbgcs = set_nondefault_cpp(cice_config_opts, "trbgcs", trbgcs)
-
- # set number of ice layers
- if phys == "cice4":
- nicelyr = 4
- elif "ar9v" in hgrid:
- nicelyr = 7
- else:
- nicelyr = 8
- case.set_value("ICE_NILYR", nicelyr)
-
- # set number of snow layers
- if phys == "cice4":
- nsnwlyr = 1
- else:
- nsnwlyr = 3
- case.set_value("ICE_NSLYR", nsnwlyr)
-
+#
+# if pts_mode:
+# # explicitl set values for single column mode
+# nx = 1
+# ny = 1
+# cice_auto_decomp = False
+# case.set_value("CICE_BLCKX", 1)
+# case.set_value("CICE_BLCKY", 1)
+# case.set_value("CICE_MXBLCKS", 1)
+# case.set_value("CICE_DECOMPTYPE", "cartesian")
+# case.set_value("CICE_DECOMPSETTING", "square-ice")
+#
+# if cice_auto_decomp:
+# nthrds_ice = case.get_value("NTHRDS_ICE")
+# ninst_ice = case.get_value("NINST_ICE")
+# ntasks = case.get_value("NTASKS_PER_INST_ICE")
+# srcroot = case.get_value("SRCROOT")
+#
+# cmd = os.path.join(srcroot, "components", "cice", "bld", "generate_cice_decomp.pl")
+# command = "%s -ccsmroot %s -res %s -nx %s -ny %s -nproc %s -thrds %s -output %s " \
+# % (cmd, srcroot, hgrid, nx, ny, ntasks, nthrds_ice, "all")
+# rc, out, err = run_cmd(command)
+#
+# expect(rc==0,"Command %s failed rc=%d\nout=%s\nerr=%s"%(cmd,rc,out,err))
+# if out is not None:
+# logger.debug(" %s"%out)
+# if err is not None:
+# logger.debug(" %s"%err)
+#
+# config = out.split()
+# if int(config[0]) > 0:
+# case.set_value("CICE_BLCKX", config[2])
+# case.set_value("CICE_BLCKY", config[3])
+# case.set_value("CICE_MXBLCKS",config[4])
+# if cice_mode != 'prescribed':
+# case.set_value("CICE_DECOMPTYPE", config[5])
+# case.set_value("CICE_DECOMPSETTING", config[6])
+
+
+# tcraig, moved to namelist_definition_cice.xml
+# # set cice physics
+# if "cice5" in cice_config_opts:
+# phys = "cice5"
+# elif "cice4" in cice_config_opts:
+# phys = "cice4"
+
+# if cice_mode == 'prescribed' and not pts_mode:
+# case.set_value("CICE_DECOMPTYPE", "roundrobin")
+
+# tcraig, moved to namelist_definition_cice.xml
+# if cice_mode == 'prescribed':
+# ntr_aero = 0
+# elif "tx0.25" in hgrid:
+# ntr_aero = 0
+# else:
+# ntr_aero = 3
+# ntr_aero = set_nondefault_cpp(cice_config_opts, "ntr_aero", ntr_aero)
+#
+# # set number of number of bio grid layers (valid values are 0->10)
+# if cice_mode == 'prescribed':
+# nbgclyr = 0
+# elif "tx0.25" in hgrid:
+# nbgclyr = 7
+# else:
+# nbgclyr = 3
+# nbgclyr = set_nondefault_cpp(cice_config_opts, "nbgclyr", nbgclyr)
+#
+# # set isotope tracer
+# ntr_iso = 0
+# ntr_iso = set_nondefault_cpp(cice_config_opts, "ntr_iso", ntr_iso)
+#
+# # set age tracer
+# trage = 1
+# trage = set_nondefault_cpp(cice_config_opts, "trage", trage)
+#
+# # set first year ice tracer (valid values are 0,1)
+# trfy = 1
+# trfy = set_nondefault_cpp(cice_config_opts, "trfy", trfy)
+#
+# # set pond tracer (valid values are 0,1)
+# trpnd = 1
+# trpnd = set_nondefault_cpp(cice_config_opts, "trpnd", trpnd)
+#
+# # set level ice tracer (valid values are 0,1)
+# trlvl = 1
+# trlvl = set_nondefault_cpp(cice_config_opts, "trlvl", trlvl)
+#
+# # set brine tracer (valid values are 0,1)
+# trbri = 0
+# trbri = set_nondefault_cpp(cice_config_opts, "trbri", trbri)
+#
+# # set skeletal layer tracer (valid values are 0,1)
+# trbgcs = 0
+# trbgcs = set_nondefault_cpp(cice_config_opts, "trbgcs", trbgcs)
+#
+# # set number of ice layers
+# if phys == "cice4":
+# nicelyr = 4
+# elif "ar9v" in hgrid:
+# nicelyr = 7
+# elif "tx0.25" in hgrid:
+# nicelyr = 7
+# else:
+# nicelyr = 8
+#
+# # set number of snow layers
+# if phys == "cice4":
+# nsnwlyr = 1
+# elif "tx0.25" in hgrid:
+# nsnwlyr = 1
+# else:
+# nsnwlyr = 3
+#
# set number of ice categories
# NOTE that ICE_NCAT is used by both cice and pop - but is set by cice
# and as a result it is assumed that the cice buildcpp is called
@@ -165,29 +175,32 @@ def buildcpp(case):
case.set_value("ICE_NCAT",ncat)
logger.debug("cice: number of ice categories (ncat) is %s" %ncat)
- # set decomposition block sizes
- cice_blckx = case.get_value("CICE_BLCKX")
- cice_blcky = case.get_value("CICE_BLCKY")
- cice_mxblcks = case.get_value("CICE_MXBLCKS")
+# # set decomposition block sizes
+# cice_blckx = case.get_value("CICE_BLCKX")
+# cice_blcky = case.get_value("CICE_BLCKY")
+# cice_mxblcks = case.get_value("CICE_MXBLCKS")
- cice_cppdefs = " -DCESMCOUPLED -Dncdf -DNUMIN=11 -DNUMAX=99 " \
- " -DNICECAT=%s -DNXGLOB=%s -DNYGLOB=%s -DNTRAERO=%s -DNTRISO=%s" \
- " -DNBGCLYR=%s -DNICELYR=%s -DNSNWLYR=%s" \
- " -DTRAGE=%s -DTRFY=%s -DTRLVL=%s -DTRPND=%s -DTRBRI=%s -DTRBGCS=%s" \
- %(ncat,nx,ny,ntr_aero,ntr_iso,nbgclyr,nicelyr,nsnwlyr,trage,trfy,trlvl,trpnd,trbri,trbgcs)
+ comp_atm = case.get_value("COMP_ATM")
+ comp_ocn = case.get_value("COMP_OCN")
+# cice_cppdefs = " -Dncdf -DNUMIN=11 -DNUMAX=99 " \
+# " -DNICECAT=%s -DNXGLOB=%s -DNYGLOB=%s -DNTRAERO=%s -DNTRISO=%s" \
+# " -DNBGCLYR=%s -DNICELYR=%s -DNSNWLYR=%s" \
+# " -DTRAGE=%s -DTRFY=%s -DTRLVL=%s -DTRPND=%s -DTRBRI=%s -DTRBGCS=%s" \
+# %(ncat,nx,ny,ntr_aero,ntr_iso,nbgclyr,nicelyr,nsnwlyr,trage,trfy,trlvl,trpnd,trbri,trbgcs)
+ cice_cppdefs = " -Dncdf"
+
+ if (comp_atm == 'fv3gfs' and comp_ocn == "mom"):
+ cice_cppdefs = cice_cppdefs + " -DNEMS_COUPLED"
# trigger RASM options with ar9v grid, otherwise set CESM options
if "ar9v" in hgrid:
- cice_cppdefs = cice_cppdefs + "-DRASM_MODS"
-
- # determine cice_cppdefs used in build
- cice_cppdefs = cice_cppdefs + " -DBLCKX=%s -DBLCKY=%s -DMXBLCKS=%s"%(cice_blckx, cice_blcky, cice_mxblcks)
+ cice_cppdefs = cice_cppdefs + " -DRASM_MODS"
- cice_cppdefs = " -DCESMCOUPLED -Dncdf "
+# # determine cice_cppdefs used in build
+# cice_cppdefs = cice_cppdefs + " -DBLCKX=%s -DBLCKY=%s -DMXBLCKS=%s"%(cice_blckx, cice_blcky, cice_mxblcks)
# update the xml variable CICE_CPPDEFS with the above definition
case.set_value("CICE_CPPDEFS", cice_cppdefs)
- case.flush()
return cice_cppdefs
@@ -205,7 +218,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)
diff --git a/cime_config/buildlib b/cime_config/buildlib
index 9621b75d..3dfefc96 100755
--- a/cime_config/buildlib
+++ b/cime_config/buildlib
@@ -11,6 +11,7 @@ from standard_script_setup import *
from CIME.case import Case
from CIME.utils import expect, run_cmd
from CIME.buildlib import parse_input
+from CIME.build import get_standard_makefile_args
logger = logging.getLogger(__name__)
@@ -20,37 +21,45 @@ def _build_cice():
caseroot, libroot, bldroot = parse_input(sys.argv)
- with Case(caseroot) as case:
- casetools = case.get_value("CASETOOLS")
- gmake_j = case.get_value("GMAKE_J")
- gmake = case.get_value("GMAKE")
+ with Case(caseroot, read_only=False) as case:
srcroot = case.get_value("SRCROOT")
+ driver = case.get_value("COMP_INTERFACE")
# call buildcpp to set the cppdefs
cmd = os.path.join(os.path.join(srcroot,"components","cice","cime_config","buildcpp"))
- logger.info(" ...calling cice buildcpp to set build time options")
+ logger.info(" ... buildlib calling cice buildcpp to set build time options")
try:
mod = imp.load_source("buildcpp", cmd)
cice_cppdefs = mod.buildcpp(case)
except:
raise
+ with Case(caseroot) as case:
+ casetools = case.get_value("CASETOOLS")
+ gmake_j = case.get_value("GMAKE_J")
+ gmake = case.get_value("GMAKE")
+ srcroot = case.get_value("SRCROOT")
+
# create Filepath file
objroot = case.get_value("OBJROOT")
filepath_file = os.path.join(objroot,"ice","obj","Filepath")
if not os.path.isfile(filepath_file):
srcroot = case.get_value("SRCROOT")
caseroot = case.get_value("CASEROOT")
- paths = [os.path.join(caseroot,"SourceMods","src.cice"),
- os.path.join(srcroot,"components","cice","src","cicecore","drivers","cesm"),
+ paths = [os.path.join(caseroot,"SourceMods","src.cice"),
os.path.join(srcroot,"components","cice","src","cicecore","shared"),
os.path.join(srcroot,"components","cice","src","icepack","columnphysics"),
os.path.join(srcroot,"components","cice","src","cicecore","cicedynB","infrastructure"),
- os.path.join(srcroot,"components","cice","src","cicecore","cicedynB","infrastructure","io","io_pio"),
+ os.path.join(srcroot,"components","cice","src","cicecore","cicedynB","infrastructure","io","io_pio2"),
os.path.join(srcroot,"components","cice","src","cicecore","cicedynB","infrastructure","comm","mpi"),
os.path.join(srcroot,"components","cice","src","cicecore","cicedynB","analysis"),
os.path.join(srcroot,"components","cice","src","cicecore","cicedynB","dynamics"),
os.path.join(srcroot,"components","cice","src","cicecore","cicedynB","general")]
+ if driver == 'nuopc':
+ paths.append(os.path.join(srcroot,"components","cice","src","cicecore","drivers","nuopc"))
+ if driver == 'mct':
+ paths.append(os.path.join(srcroot,"components","cice","src","cicecore","drivers","mct"))
+
with open(filepath_file, "w") as filepath:
filepath.write("\n".join(paths))
filepath.write("\n")
@@ -59,8 +68,8 @@ def _build_cice():
complib = os.path.join(libroot,"libice.a")
makefile = os.path.join(casetools, "Makefile")
- cmd = "%s complib -j %d MODEL=cice COMPLIB=%s -f %s USER_CPPDEFS=\"%s\"" \
- % (gmake, gmake_j, complib, makefile, cice_cppdefs )
+ cmd = "{} complib -j {} MODEL=cice COMPLIB={} -f {} USER_CPPDEFS=\"{}\" {} " \
+ .format(gmake, gmake_j, complib, makefile, cice_cppdefs, get_standard_makefile_args(case))
rc, out, err = run_cmd(cmd, from_dir=bldroot)
expect(rc == 0, "Command %s failed rc=%d\nout=%s\nerr=%s" % (cmd, rc, out, err))
diff --git a/cime_config/buildnml b/cime_config/buildnml
index edacbb34..245c7e57 100755
--- a/cime_config/buildnml
+++ b/cime_config/buildnml
@@ -9,7 +9,7 @@
# Disable these because this is our standard setup
# pylint: disable=wildcard-import,unused-wildcard-import,wrong-import-position
-import os, shutil, sys, glob, filecmp, imp
+import os, shutil, sys, glob, filecmp, imp, re
CIMEROOT = os.environ.get("CIMEROOT")
if CIMEROOT is None:
@@ -20,8 +20,11 @@ from standard_script_setup import *
from CIME.case import Case
from CIME.nmlgen import NamelistGenerator
from CIME.utils import expect
+from CIME.utils import run_cmd_no_fail, expect
+from CIME.utils import run_cmd
from CIME.buildnml import create_namelist_infile, parse_input
+import glob, shutil
logger = logging.getLogger(__name__)
# pylint: disable=too-many-arguments,too-many-locals,too-many-branches,too-many-statements
@@ -67,26 +70,84 @@ def _create_namelists(case, confdir, infile, nmlgen):
if cice_mode == 'prescribed':
config['sstice_stream'] = case.get_value("SSTICE_STREAM")
- if "DNTRAERO=0" in case.get_value("CICE_CPPDEFS"):
- config['ntraero'] = "0"
+# if "DNTRAERO=0" in case.get_value("CICE_CPPDEFS"):
+# config['ntraero'] = "0"
- if "DNTRISO=0" in case.get_value("CICE_CPPDEFS"):
- config['ntriso'] = "0"
+# if "DNTRISO=0" in case.get_value("CICE_CPPDEFS"):
+# config['ntriso'] = "0"
- if "DTRAGE=0" in case.get_value("CICE_CPPDEFS"):
- config['ntrage'] = "0"
+# if "DTRAGE=0" in case.get_value("CICE_CPPDEFS"):
+# config['ntrage'] = "0"
- if "DTRFY=0" in case.get_value("CICE_CPPDEFS"):
- config['ntrfy'] = "0"
+# if "DTRFY=0" in case.get_value("CICE_CPPDEFS"):
+# config['ntrfy'] = "0"
- if "DTRPND=0" in case.get_value("CICE_CPPDEFS"):
- config['ntrpnd'] = "0"
+# if "DTRPND=0" in case.get_value("CICE_CPPDEFS"):
+# config['ntrpnd'] = "0"
- if "DTRLVL=0" in case.get_value("CICE_CPPDEFS"):
- config['ntrlvl'] = "0"
+# if "DTRLVL=0" in case.get_value("CICE_CPPDEFS"):
+# config['ntrlvl'] = "0"
- # Note - xml ICE_NCAT, CICE_DECOMPSETTING, CICE_DECOMPTYPE are used
- # in setting the cice namelist and are set in buildlib:
+ #----------------------------------------------------
+ # Grid and Decomposition
+ #----------------------------------------------------
+ nx = case.get_value("ICE_NX")
+ ny = case.get_value("ICE_NY")
+
+ ice_grid = case.get_value('ICE_GRID')
+ if ice_grid == 'ar9v2':
+ hgrid = 'ar9v1'
+ elif ice_grid == 'ar9v4':
+ hgrid = 'ar9v3'
+ else:
+ hgrid = ice_grid
+
+ # determine decomposition xml variables if CICE_AUTO_DECOMP is true
+ # - invoke generate_cice_decomp.pl and update env_build.xml settings to
+ # reflect changes in the configuration this will trigger
+ cice_auto_decomp = case.get_value("CICE_AUTO_DECOMP")
+
+ pts_mode = case.get_value("PTS_MODE")
+ # set cice mode and cice_config_opts
+
+ if pts_mode:
+ # explicitl set values for single column mode
+ nx = 1
+ ny = 1
+ cice_auto_decomp = False
+ cice_blckx = 1
+ cice_blcky = 1
+ cice_mxblcks = 1
+ cice_decomptype = "cartesian"
+ cice_decompsetting = "square-ice"
+
+ if cice_auto_decomp:
+ nthrds_ice = case.get_value("NTHRDS_ICE")
+ ninst_ice = case.get_value("NINST_ICE")
+ ntasks = case.get_value("NTASKS_PER_INST_ICE")
+ srcroot = case.get_value("SRCROOT")
+
+ cmd = os.path.join(srcroot, "components", "cice", "bld", "generate_cice_decomp.pl")
+ command = "%s -ccsmroot %s -res %s -nx %s -ny %s -nproc %s -thrds %s -output %s " \
+ % (cmd, srcroot, hgrid, nx, ny, ntasks, nthrds_ice, "all")
+ rc, out, err = run_cmd(command)
+
+ expect(rc==0,"Command %s failed rc=%d\nout=%s\nerr=%s"%(cmd,rc,out,err))
+ if out is not None:
+ logger.debug(" %s"%out)
+ if err is not None:
+ logger.debug(" %s"%err)
+
+ decompconfig = out.split()
+ if int(decompconfig[0]) > 0:
+ cice_blckx = decompconfig[2]
+ cice_blcky = decompconfig[3]
+ cice_mxblcks = decompconfig[4]
+ if cice_mode == 'prescribed':
+ cice_decomptype = "roundrobin"
+ else:
+ cice_decomptype = decompconfig[5]
+ cice_decompsetting = decompconfig[6]
#----------------------------------------------------
# Initialize namelist defaults
@@ -96,17 +157,31 @@ def _create_namelists(case, confdir, infile, nmlgen):
#----------------------------------------------------
# Set values not obtained in the default settings
#----------------------------------------------------
+ nmlgen.set_value('block_size_x', value=cice_blckx)
+ nmlgen.set_value('block_size_y', value=cice_blcky)
+ nmlgen.set_value('max_blocks', value=cice_mxblcks)
+ nmlgen.set_value('distribution_type', value=cice_decomptype)
+ nmlgen.set_value('processor_shape', value=cice_decompsetting)
+
+# if cice_decomptype == "spacecurve":
+# nmlgen.set_value('distribution_wght', value="erfc")
+
+ if nmlgen.get_value('n_aero') == '0':
+ nmlgen.set_value('tr_aero', value=".false.")
+# if nmlgen.get_value('n_iso') > '0':
+# nmlgen.set_value('tr_iso', value=".true.")
+
if nmlgen.get_value('gridcpl_file') == 'UNSET':
nmlgen.set_value('gridcpl_file', value="unknown_gridcpl_file")
if nmlgen.get_value('bathymetry_file') == 'UNSET':
nmlgen.set_value('bathymetry_file', value="unknown_bathymetry_file")
- # note that CICE_DECOMPSETTING is set in call to buildcpp
- if case.get_value('CICE_DECOMPSETTING') == 'null':
+ # tcraig, why is this here and what is it doing?
+ if cice_decompsetting == 'null':
config['cice_decomp_setting'] = 'null'
processor_shape = nmlgen.get_default('processor_shape', config=config)
else:
- processor_shape = case.get_value("CICE_DECOMPSETTING")
+ processor_shape = cice_decompsetting
nmlgen.set_value('processor_shape', value=processor_shape)
# set initial conditions for branch of hybrid runs
@@ -267,6 +342,15 @@ def buildnml(case, caseroot, compname):
shutil.copy2(file1, file2)
###############################################################################
+def set_nondefault_nml(cice_config_opts, string, value):
+
+ # overwrite value if need be
+ if string in cice_config_opts:
+ match = re.search(r"\s*-%s\s*(\d+)\s*"%string, cice_config_opts)
+ if match is not None:
+ value = match.group(1)
+ return value
+###############################################################################
def _main_func():
caseroot = parse_input(sys.argv)
diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml
index c7078a4d..a660236a 100644
--- a/cime_config/config_component.xml
+++ b/cime_config/config_component.xml
@@ -72,99 +72,6 @@
CICE_DECOMPTYPE, and CICE_DECOMPSETTING".
-
- integer
-
- 3
- build_component_cice
- env_build.xml
- Number of aerosols
- (DO NOT EDIT if CICE_AUTO_DECOMP is true).
- This is for experts only - automatically set if CICE_AUTO_DECOMP
- is true to set this value, must first set CICE_AUTO_DECOMP to false.
-
-
-
- integer
-
- 8
- build_component_cice
- env_build.xml
- Number of vertical levels in ice
- (DO NOT EDIT if CICE_AUTO_DECOMP is true).
- This is for experts only - automatically set if CICE_AUTO_DECOMP
- is true to set this value, must first set CICE_AUTO_DECOMP to false.
-
-
-
- integer
-
- 8
- build_component_cice
- env_build.xml
- Number of vertical levels in snow
- (DO NOT EDIT if CICE_AUTO_DECOMP is true).
- This is for experts only - automatically set if CICE_AUTO_DECOMP
- is true to set this value, must first set CICE_AUTO_DECOMP to false.
-
-
-
- integer
-
- 0
- build_component_cice
- env_build.xml
- Size of cice block in first horiz dimension
- (DO NOT EDIT if CICE_AUTO_DECOMP is true).
- This is for experts only - automatically set if CICE_AUTO_DECOMP
- is true to set this value, must first set CICE_AUTO_DECOMP to false.
-
-
-
- integer
-
- 0
- build_component_cice
- env_build.xml
- Size of cice block in second horiz dimension
- (DO NOT EDIT if CICE_AUTO_DECOMP is true).
- This is for experts only - automatically set if CICE_AUTO_DECOMP is true,
- to set this value, must first set CICE_AUTO_DECOMP to false.
-
-
-
- integer
-
- 0
- build_component_cice
- env_build.xml
- Max number of cice blocks per processor (do not edit if CICE_AUTO_DECOMP is true)
- This is for experts only - automatically set if CICE_AUTO_DECOMP is true,
- to set this value, must first set CICE_AUTO_DECOMP to false.
-
-
-
- char
- cartesian,rake,sectrobin,spacecurve,roundrobin,sectrobin,sectcart,null
- null
- build_component_cice
- env_build.xml
- cice block distribution type (do not edit if CICE_AUTO_DECOMP is true)
- This is for experts only - automatically set if CICE_AUTO_DECOMP is true,
- to set this value, must first set CICE_AUTO_DECOMP to false.
-
-
-
- char
- slenderX1,slenderX2,square-ice,square-pop,blocks,null
- square-ice
- build_component_cice
- env_build.xml
- cice decomp setting for decomp type (do not edit if CICE_AUTO_DECOMP is true)
- This is for experts only - automatically set if CICE_AUTO_DECOMP is true,
- to set this value, must first set CICE_AUTO_DECOMP to false.
-
-
char
diff --git a/cime_config/namelist_definition_cice.xml b/cime_config/namelist_definition_cice.xml
index ff7689f9..7edebc3e 100644
--- a/cime_config/namelist_definition_cice.xml
+++ b/cime_config/namelist_definition_cice.xml
@@ -53,7 +53,6 @@
char
setup
setup_nml
- abs
Method of ice cover initialization.
'default'=>latitude and sst dependent, 'none'=>no ice, restart filename (must be a full path)
@@ -229,6 +228,18 @@
+
+ integer(5)
+ setup
+ setup_nml
+
+ frequency of history output (10 = once per 10 h,d,m,y)
+
+
+ 1,0,0,0,0
+
+
+
char
setup
@@ -237,19 +248,19 @@
frequency of restart output (once per 1,h,d,m,y)
- x
+ "m"
-
+
integer(5)
setup
setup_nml
- frequency of history output (10 = once per 10 h,d,m,y)
+ frequency of restart output (10 = once per 10 h,d,m,y)
- 1,0,0,0,0
+ 1
@@ -317,15 +328,15 @@
-
- logical
+
+ char
setup
setup_nml
logical to control bit-for-bit computations
- $BFBFLAG
+ off
@@ -548,7 +559,7 @@
-
+
integer
grid
grid_nml
@@ -556,11 +567,14 @@
number of vertical layers in ice
- $ICE_NILYR
+ 8
+ 4
+ 7
+ 7
-
+
integer
grid
grid_nml
@@ -568,7 +582,9 @@
number of vertical layers in snow
- $ICE_NSLYR
+ 3
+ 1
+ 1
@@ -580,7 +596,9 @@
number of vertical layers in zbgc
- 1
+ 3
+ 7
+ 0
@@ -612,7 +630,7 @@
-
+
integer
decomp
domain_nml
@@ -620,11 +638,11 @@
x-direction block size
- $CICE_BLCKX
+ 0
-
+
integer
decomp
domain_nml
@@ -632,11 +650,11 @@
y-direction block size
- $CICE_BLCKY
+ 0
-
+
integer
decomp
domain_nml
@@ -644,11 +662,11 @@
maximum blocks per processor
- $CICE_MXBLCKS
+ 0
-
+
char
decomp
domain_nml
@@ -656,12 +674,11 @@
processor shape
- square-ice
- $CICE_DECOMPSETTING
+ square-ice
-
+
char
decomp
domain_nml
@@ -669,7 +686,7 @@
method to use for distributing blocks among processors
- $CICE_DECOMPTYPE
+ cartesian
@@ -758,7 +775,7 @@
-
+
integer
tracers
tracer_nml
@@ -766,7 +783,9 @@
Number of aerosols
- $ICE_NAERO
+ 3
+ 0
+ 0
@@ -863,7 +882,6 @@
.true.
- .false.
.true.
.true.
.false.
@@ -891,7 +909,6 @@
.true.
- .false.
.true.
.true.
.false.
@@ -919,7 +936,6 @@
.true.
- .false.
.false.
.true.
.true.
@@ -947,7 +963,6 @@
.false.
- .false.
.true.
.false.
.false.
@@ -1001,7 +1016,6 @@
.true.
- .false.
.false.
.true.
.true.
@@ -1029,7 +1043,6 @@
.true.
- .false.
@@ -1612,7 +1625,7 @@
snow depth of transition to bare sea ice (m)
- 0.03
+ 0.00