Skip to content

Commit

Permalink
Fix sets to run
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvothecoder committed Nov 30, 2023
1 parent f5aa6d2 commit 7f66f4b
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions e3sm_diags/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ def _get_run_parameters(
"""
run_params = []

sets_to_run = SET_TO_PARAMETERS.keys()
for set_name in sets_to_run:
if len(self.sets_to_run) == 0:
self.sets_to_run = list(SET_TO_PARAMETERS.keys())

for set_name in self.sets_to_run:
other_params = self._get_diags_from_cfg_file()

# For each of the set_names, get the corresponding parameter.
Expand Down Expand Up @@ -192,13 +194,14 @@ def _get_debug_parameters(
"""
debug_params = []

sets_to_run = [param.sets for param in parameters]
sets_to_run = list(chain.from_iterable(sets_to_run)) # type: ignore
if len(self.sets_to_run) == 0:
sets_to_run = [param.sets for param in parameters]
self.sets_to_run = list(chain.from_iterable(sets_to_run))

for set_name in sets_to_run:
for set_name in self.sets_to_run:
# For each of the set_names, get the corresponding parameter.
api_param = self._get_instance_of_param_class(
SET_TO_PARAMETERS[set_name], parameters # type: ignore
SET_TO_PARAMETERS[set_name], parameters
)

# Since each parameter will have lots of default values, we want to remove them.
Expand Down

0 comments on commit 7f66f4b

Please sign in to comment.