From a0d014fae9550dd9ffbc934abd29ef16176f8208 Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Tue, 7 Nov 2023 17:56:23 -0700 Subject: [PATCH] Black reformatging --- python/ctsm/modify_input_files/fsurdat_modifier.py | 10 +++++++++- python/ctsm/modify_input_files/modify_fsurdat.py | 7 ++++++- python/ctsm/test/test_sys_fsurdat_modifier.py | 4 +++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/python/ctsm/modify_input_files/fsurdat_modifier.py b/python/ctsm/modify_input_files/fsurdat_modifier.py index a511fcfddc..8f63339c2b 100644 --- a/python/ctsm/modify_input_files/fsurdat_modifier.py +++ b/python/ctsm/modify_input_files/fsurdat_modifier.py @@ -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: diff --git a/python/ctsm/modify_input_files/modify_fsurdat.py b/python/ctsm/modify_input_files/modify_fsurdat.py index 919c42098c..13495d8b10 100644 --- a/python/ctsm/modify_input_files/modify_fsurdat.py +++ b/python/ctsm/modify_input_files/modify_fsurdat.py @@ -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 diff --git a/python/ctsm/test/test_sys_fsurdat_modifier.py b/python/ctsm/test/test_sys_fsurdat_modifier.py index b4559d1867..ce498692ed 100755 --- a/python/ctsm/test/test_sys_fsurdat_modifier.py +++ b/python/ctsm/test/test_sys_fsurdat_modifier.py @@ -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)