Skip to content

Commit c89b251

Browse files
committed
Make black happy
1 parent 0ae1e01 commit c89b251

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

python/ctsm/site_and_regional/plumber2_usermods.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def write_usermods(
6363
# pylint: disable=line-too-long
6464
s_file.write(
6565
# TODO turn on following line after cdeps changes are added
66-
'./xmlchange PLUMBER2SITE='+site + '\n' \
66+
"./xmlchange PLUMBER2SITE=" + site + "\n"
6767
"./xmlchange PTS_LON=" + str(lon) + "\n"
6868
"./xmlchange PTS_LAT=" + str(lat) + "\n"
6969
"./xmlchange DATM_YR_END=" + str(end_year) + "\n"
@@ -124,6 +124,7 @@ def write_usermods(
124124

125125
s_file.close()
126126

127+
127128
# End write_usermods function
128129

129130

python/ctsm/site_and_regional/tower_site.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -304,18 +304,20 @@ def modify_user_nl(self, base_case_root, case_root, run_type, rundir, site_lines
304304

305305
# Grep for the parameter file string, get just the location of the parameter file
306306
# and strip the apostrophe(s) from the string
307-
paramfile = subprocess.run(command, shell=True, capture_output=True,
308-
text=True, check=True)
307+
paramfile = subprocess.run(
308+
command, shell=True, capture_output=True, text=True, check=True
309+
)
309310
output_paramfile = paramfile.stdout.strip()
310-
split_output_paramfile = output_paramfile.split('=')
311+
split_output_paramfile = output_paramfile.split("=")
311312
clean_paramfile = split_output_paramfile[1].replace("'", "")
312313

313314
# Define a new parameter file that will go in the run directory
314315
modified_paramfile = os.path.join(case_root, "run/modified_paramfile.nc")
315316

316317
# Set baseflow_scalar = 0 in the modified parameter file
317-
os.system("ncap2 -s 'baseflow_scalar=0'" + " " + clean_paramfile +
318-
" " + modified_paramfile)
318+
os.system(
319+
"ncap2 -s 'baseflow_scalar=0'" + " " + clean_paramfile + " " + modified_paramfile
320+
)
319321

320322
# Create a string with the modified parameter file for user_nl_clm
321323
modified_paramfile_user_nl_line = "paramfile = " + "'" + modified_paramfile + "'"

0 commit comments

Comments
 (0)