Skip to content

Commit c0ec3a8

Browse files
authored
Merge pull request #164 from mnlevy1981/more_workflow_updates
Cleanup in response to failed CESM Workflow
2 parents 8464969 + 4ba8dde commit c0ec3a8

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

cupid/run_timeseries.py

+7-8
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@
2525
import os
2626

2727
import click
28-
29-
import cupid.timeseries
30-
import cupid.util
28+
import timeseries
29+
import util
3130

3231
CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"])
3332

@@ -68,9 +67,9 @@ def run_timeseries(
6867
# fmt: on
6968
# pylint: enable=line-too-long
7069
# Get control structure
71-
control = cupid.util.get_control_dict(config_path)
72-
cupid.util.setup_book(config_path)
73-
logger = cupid.util.setup_logging(config_path)
70+
control = util.get_control_dict(config_path)
71+
util.setup_book(config_path)
72+
logger = util.setup_logging(config_path)
7473

7574
component_options = {
7675
"atm": atmosphere,
@@ -112,7 +111,7 @@ def run_timeseries(
112111
if isinstance(timeseries_params["case_name"], list):
113112
ts_input_dirs = []
114113
for cname in timeseries_params["case_name"]:
115-
if cname == global_params["base_case_name"]:
114+
if cname == global_params["base_case_name"] and "base_case_output_dir" in global_params:
116115
ts_input_dirs.append(global_params["base_case_output_dir"]+"/"+cname+f"/{component}/hist/")
117116
else:
118117
ts_input_dirs.append(global_params["CESM_output_dir"]+"/"+cname+f"/{component}/hist/")
@@ -162,7 +161,7 @@ def run_timeseries(
162161

163162
# fmt: off
164163
# pylint: disable=line-too-long
165-
cupid.timeseries.create_time_series(
164+
timeseries.create_time_series(
166165
component,
167166
timeseries_params[component]["vars"],
168167
timeseries_params[component]["derive_vars"],

0 commit comments

Comments
 (0)