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

fix cime issue 2822 and pylint chk #526

Merged
merged 1 commit into from
Oct 26, 2018
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
2 changes: 1 addition & 1 deletion cime_config/buildlib
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
build clm library
"""
import sys, os, time, filecmp, shutil, imp
import sys, os, shutil, imp

_CIMEROOT = os.environ.get("CIMEROOT")
if _CIMEROOT is None:
Expand Down
30 changes: 14 additions & 16 deletions cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
CLM namelist creator
"""
import sys, os, time, shutil, re, imp, filecmp
import sys, os, shutil, imp, filecmp

_CIMEROOT = os.environ.get("CIMEROOT")
if _CIMEROOT is None:
Expand Down Expand Up @@ -46,7 +46,6 @@ def buildnml(case, caseroot, compname):
clm_force_coldstart = case.get_value("CLM_FORCE_COLDSTART")
lnd_tuning_mode = case.get_value("LND_TUNING_MODE")
clm_accelerated_spinup = case.get_value("CLM_ACCELERATED_SPINUP")
comp_glc = case.get_value("COMP_GLC")
comp_atm = case.get_value("COMP_ATM")
lnd_grid = case.get_value("LND_GRID")
lnd_ncpl = case.get_value("LND_NCPL")
Expand All @@ -62,14 +61,6 @@ def buildnml(case, caseroot, compname):
glc_nec = case.get_value("GLC_NEC")
mask = case.get_value("MASK_GRID")

# -----------------------------------------------------
# Clear out old data
# -----------------------------------------------------

input_data_list = os.path.join(caseroot,"Buildconf","clm.input_data_list")
if os.path.exists(input_data_list):
os.remove(input_data_list)

# -----------------------------------------------------
# Set clmconf
# -----------------------------------------------------
Expand Down Expand Up @@ -133,10 +124,10 @@ def buildnml(case, caseroot, compname):
if run_type == "branch":
startfile_type = "nrevsn"
if clm_force_coldstart == "on":
clm_force_coldstart = "off"
logger.warning( "WARNING: You've turned on CLM_FORCE_COLDSTART for a branch run_type, which is a contradiction, the coldstart will be ignored\n" +
" turn off CLM_FORCE_COLDSTART, or set RUN_TYPE=hybrid to get rid of this warning"
)
clm_force_coldstart = "off"
logger.warning( "WARNING: You've turned on CLM_FORCE_COLDSTART for a branch run_type, which is a contradiction, the coldstart will be ignored\n" +
" turn off CLM_FORCE_COLDSTART, or set RUN_TYPE=hybrid to get rid of this warning")


if (clm_force_coldstart == "on"):
logger.warning( "WARNING: CLM is starting up from a cold state" )
Expand Down Expand Up @@ -168,9 +159,9 @@ def buildnml(case, caseroot, compname):
usecase = ""

if ( (mask != "null") and (mask != "UNSET") ):
gridmask = "-mask %s" %mask
gridmask = "-mask %s" %mask
else:
gridmask = ""
gridmask = ""

start_ymd = run_startdate.replace('-','')

Expand All @@ -191,6 +182,13 @@ def buildnml(case, caseroot, compname):

config_cache_file = os.path.join(caseroot,"Buildconf","clmconf","config_cache.xml")

# -----------------------------------------------------
# Clear out old data
# -----------------------------------------------------

if os.path.exists(inputdata_file):
os.remove(inputdata_file)

# -----------------------------------------------------
# loop over instances
# -----------------------------------------------------
Expand Down