diff --git a/cime_config/buildnml b/cime_config/buildnml index cbefd4f155..2c4a320046 100644 --- a/cime_config/buildnml +++ b/cime_config/buildnml @@ -184,9 +184,7 @@ def buildnml(case, caseroot, compname): clm_phys = case.get_value("CLM_PHYSICS_VERSION") config_cache_text = _config_cache_template.format(clm_phys=clm_phys) - config_cache_path = os.path.join( - caseroot, "Buildconf", compname + "conf", "config_cache.xml" - ) + config_cache_path = os.path.join(caseroot, "Buildconf", compname + "conf", "config_cache.xml") with open(config_cache_path, "w") as config_cache_file: config_cache_file.write(config_cache_text) @@ -293,17 +291,13 @@ def buildnml(case, caseroot, compname): if (yr_start != None) and (yr_end != None): nyr = yr_end - yr_start + 1 if (yr_end <= 0) or (yr_start <= 0): - logger.error( - "ERROR: Year start and end are both negative and should not be" - ) + logger.error("ERROR: Year start and end are both negative and should not be") clm_namelist_opts = "nyr_forcing={} {}".format(nyr, clm_namelist_opts) else: logger.warning( "WARNING: It does not make sense to do a SASU spinup with a prognostic atmosphere model" ) - logger.warning( - " as it expects regular atmosphere forcing that is cycled over" - ) + logger.warning(" as it expects regular atmosphere forcing that is cycled over") infile = os.path.join(ctsmconf, "namelist") @@ -317,9 +311,7 @@ def buildnml(case, caseroot, compname): lndfrac_file = os.path.join(lnd_domain_path, lnd_domain_file) lndfrac_setting = "-lnd_frac " + lndfrac_file - config_cache_file = os.path.join( - caseroot, "Buildconf", compname + "conf", "config_cache.xml" - ) + config_cache_file = os.path.join(caseroot, "Buildconf", compname + "conf", "config_cache.xml") # ----------------------------------------------------- # Clear out old data @@ -389,9 +381,7 @@ def buildnml(case, caseroot, compname): break if not os.path.exists(os.path.join(rundir, clm_startfile)): - logger.warning( - "WARNING: Could NOT find a start file named " + clm_startfile - ) + logger.warning("WARNING: Could NOT find a start file named " + clm_startfile) clm_icfile = "%s = '%s'" % (startfile_type, clm_startfile) else: clm_icfile = "" @@ -402,9 +392,7 @@ def buildnml(case, caseroot, compname): user_nl_file = os.path.join(caseroot, "user_nl_clm" + inst_string) namelist_infile = os.path.join(ctsmconf, "namelist") - create_namelist_infile( - case, user_nl_file, namelist_infile, "\n".join(infile_lines) - ) + create_namelist_infile(case, user_nl_file, namelist_infile, "\n".join(infile_lines)) cmd = os.path.join(lnd_root, "bld", "build-namelist")