Skip to content

Commit

Permalink
Merge pull request #164 from mnlevy1981/more_workflow_updates
Browse files Browse the repository at this point in the history
Cleanup in response to failed CESM Workflow
  • Loading branch information
mnlevy1981 authored Jan 17, 2025
2 parents 8464969 + 4ba8dde commit c0ec3a8
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions cupid/run_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@
import os

import click

import cupid.timeseries
import cupid.util
import timeseries
import util

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

Expand Down Expand Up @@ -68,9 +67,9 @@ def run_timeseries(
# fmt: on
# pylint: enable=line-too-long
# Get control structure
control = cupid.util.get_control_dict(config_path)
cupid.util.setup_book(config_path)
logger = cupid.util.setup_logging(config_path)
control = util.get_control_dict(config_path)
util.setup_book(config_path)
logger = util.setup_logging(config_path)

component_options = {
"atm": atmosphere,
Expand Down Expand Up @@ -112,7 +111,7 @@ def run_timeseries(
if isinstance(timeseries_params["case_name"], list):
ts_input_dirs = []
for cname in timeseries_params["case_name"]:
if cname == global_params["base_case_name"]:
if cname == global_params["base_case_name"] and "base_case_output_dir" in global_params:
ts_input_dirs.append(global_params["base_case_output_dir"]+"/"+cname+f"/{component}/hist/")
else:
ts_input_dirs.append(global_params["CESM_output_dir"]+"/"+cname+f"/{component}/hist/")
Expand Down Expand Up @@ -162,7 +161,7 @@ def run_timeseries(

# fmt: off
# pylint: disable=line-too-long
cupid.timeseries.create_time_series(
timeseries.create_time_series(
component,
timeseries_params[component]["vars"],
timeseries_params[component]["derive_vars"],
Expand Down

0 comments on commit c0ec3a8

Please sign in to comment.