Skip to content

Commit

Permalink
Black reformatging
Browse files Browse the repository at this point in the history
  • Loading branch information
slevis-lmwg committed Nov 8, 2023
1 parent d42b32c commit a0d014f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
10 changes: 9 additions & 1 deletion python/ctsm/modify_input_files/fsurdat_modifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,15 @@ def read_cfg_subgrid(config, cfg_path, numurbl=3):

subgrid_settings = {}
var_list = config.options(section)
valid_list = ["pct_natveg", "pct_crop", "pct_lake", "pct_glacier", "pct_wetland", "pct_urban","pct_ocean"]
valid_list = [
"pct_natveg",
"pct_crop",
"pct_lake",
"pct_glacier",
"pct_wetland",
"pct_urban",
"pct_ocean",
]
varsum = 0
for var in var_list:
if valid_list.count(var) == 0:
Expand Down
7 changes: 6 additions & 1 deletion python/ctsm/modify_input_files/modify_fsurdat.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,12 @@ def check_varlist(self, settings, allow_uppercase_vars=False):
)
if len(val) != dim1:
abort(
"Variable " + varname + " is " + str(len(val)) + ". It should be = " + str(dim1)
"Variable "
+ varname
+ " is "
+ str(len(val))
+ ". It should be = "
+ str(dim1)
)
return settings_return

Expand Down
4 changes: 3 additions & 1 deletion python/ctsm/test/test_sys_fsurdat_modifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ def test_short_config(self):
self._cfg_file_path = os.path.join(self._testinputs_path, "modify_fsurdat_short.cfg")
sys.argv = ["fsurdat_modifier", self._cfg_file_path]
parser = fsurdat_modifier_arg_process()
fsurdat_out = os.path.join(self._testinputs_path, "surfdata_5x5_amazon_hist_16pfts_CMIP6_2000_c231031.out.nc")
fsurdat_out = os.path.join(
self._testinputs_path, "surfdata_5x5_amazon_hist_16pfts_CMIP6_2000_c231031.out.nc"
)
if os.path.exists(fsurdat_out):
os.remove(fsurdat_out)
fsurdat_modifier(parser)
Expand Down

0 comments on commit a0d014f

Please sign in to comment.