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 pylint error in buildnml #1253

Merged
merged 1 commit into from
Mar 16, 2017
Merged
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
16 changes: 8 additions & 8 deletions src/drivers/mct/cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -191,19 +191,19 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files):

if len(infiles) != 0:

# First read the drv_flds_in files and make sure that
# First read the drv_flds_in files and make sure that
# for any key there are not two conflicting values
dicts = {}
for infile in infiles:
dict = {}
dict_ = {}
with open(infile) as myfile:
for line in myfile:
if "=" in line and '!' not in line:
name, var = line.partition("=")[::2]
name = name.strip()
var = var.strip()
dict[name] = var
dicts[infile] = dict
dict_[name] = var
dicts[infile] = dict_

for first,second in itertools.combinations(dicts.keys(),2):
compare_drv_flds_in(dicts[first], dicts[second], first, second)
Expand Down Expand Up @@ -315,10 +315,10 @@ def buildnml(case, caseroot, component):

# create cplconf/namelist
infile_text = ""
if case.get_value('COMP_ATM') == 'cam':
# cam is actually changing the driver namelist settings
cam_config_opts = case.get_value("CAM_CONFIG_OPTS")
if "aquaplanet" in cam_config_opts:
if case.get_value('COMP_ATM') == 'cam':
# cam is actually changing the driver namelist settings
cam_config_opts = case.get_value("CAM_CONFIG_OPTS")
if "aquaplanet" in cam_config_opts:
infile_text = "aqua_planet = .true. \n aqua_planet_sst = 1"

user_nl_file = os.path.join(caseroot, "user_nl_cpl")
Expand Down