Skip to content

Commit

Permalink
Apply Black to cime_config python files
Browse files Browse the repository at this point in the history
  • Loading branch information
manishvenu committed Aug 27, 2024
1 parent 0804362 commit 7429d76
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 29 deletions.
39 changes: 24 additions & 15 deletions cime_config/SystemTests/dimcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"H_RESCALE_POWER = -11",
"Z_RESCALE_POWER = -11",
"R_RESCALE_POWER = -11",
"Q_RESCALE_POWER = -11"
]
"Q_RESCALE_POWER = -11",
]

run_suffixes = [
"base",
Expand Down Expand Up @@ -67,27 +67,36 @@
"scale the dimension Q by 2**-11",
]


class DIMCS(SystemTestsCompareN):

def __init__(self, case):
self.comp = case.get_value("COMP_OCN")
SystemTestsCompareN.__init__(self, case, N=len(nl_contents),
separate_builds = False,
run_suffixes = run_suffixes,
run_descriptions = run_descriptions,
ignore_fieldlist_diffs = True)
SystemTestsCompareN.__init__(
self,
case,
N=len(nl_contents),
separate_builds=False,
run_suffixes=run_suffixes,
run_descriptions=run_descriptions,
ignore_fieldlist_diffs=True,
)

def _common_setup(self):
nl_contents_common = '''
nl_contents_common = """
! DIMCS test changes
'''
append_to_user_nl_files(caseroot = self._case.get_value("CASEROOT"),
component = self.comp,
contents = nl_contents_common)
"""
append_to_user_nl_files(
caseroot=self._case.get_value("CASEROOT"),
component=self.comp,
contents=nl_contents_common,
)

def _case_setup(self, i):

# Second append user_nl change sepecific to case-i
append_to_user_nl_files(caseroot = self._case.get_value("CASEROOT"),
component = self.comp,
contents = nl_contents[i])
append_to_user_nl_files(
caseroot=self._case.get_value("CASEROOT"),
component=self.comp,
contents=nl_contents[i],
)
37 changes: 23 additions & 14 deletions cime_config/SystemTests/dimcsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"Z_RESCALE_POWER = 11",
"R_RESCALE_POWER = 11",
"Q_RESCALE_POWER = 11",
]
]

run_suffixes = [
"base",
Expand All @@ -49,27 +49,36 @@
"scale the dimension Q by 2**11",
]


class DIMCSL(SystemTestsCompareN):

def __init__(self, case):
self.comp = case.get_value("COMP_OCN")
SystemTestsCompareN.__init__(self, case, N=len(nl_contents),
separate_builds = False,
run_suffixes = run_suffixes,
run_descriptions = run_descriptions,
ignore_fieldlist_diffs = True)
SystemTestsCompareN.__init__(
self,
case,
N=len(nl_contents),
separate_builds=False,
run_suffixes=run_suffixes,
run_descriptions=run_descriptions,
ignore_fieldlist_diffs=True,
)

def _common_setup(self):
nl_contents_common = '''
nl_contents_common = """
! DIMCSL test changes
'''
append_to_user_nl_files(caseroot = self._case.get_value("CASEROOT"),
component = self.comp,
contents = nl_contents_common)
"""
append_to_user_nl_files(
caseroot=self._case.get_value("CASEROOT"),
component=self.comp,
contents=nl_contents_common,
)

def _case_setup(self, i):

# Second append user_nl change sepecific to case-i
append_to_user_nl_files(caseroot = self._case.get_value("CASEROOT"),
component = self.comp,
contents = nl_contents[i])
append_to_user_nl_files(
caseroot=self._case.get_value("CASEROOT"),
component=self.comp,
contents=nl_contents[i],
)

0 comments on commit 7429d76

Please sign in to comment.