Skip to content

Commit

Permalink
Merge pull request #117 from nusbaume/add_ts_outdir
Browse files Browse the repository at this point in the history
Add ability to specify generated time series file output path
  • Loading branch information
mnlevy1981 authored Jul 18, 2024
2 parents 8fccfdf + 91c1698 commit 644ca18
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion cupid/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,22 @@ def run(

for component, comp_bool in component_options.items():
if comp_bool:

# set time series output directory:
# -----
if "ts_output_dir" in timeseries_params:
ts_output_dir = os.path.join(
timeseries_params["ts_output_dir"],
f"{component}", "proc", "tseries",
)
else:
ts_output_dir = os.path.join(
global_params["CESM_output_dir"],
timeseries_params["case_name"],
f"{component}", "proc", "tseries",
)
# -----

# fmt: off
# pylint: disable=line-too-long
cupid.timeseries.create_time_series(
Expand All @@ -119,7 +135,7 @@ def run(
[timeseries_params["case_name"]],
timeseries_params[component]["hist_str"],
[global_params["CESM_output_dir"]+"/"+timeseries_params["case_name"]+f"/{component}/hist/"],
[global_params["CESM_output_dir"]+"/"+timeseries_params["case_name"]+f"/{component}/proc/tseries/"],
[ts_output_dir],
# Note that timeseries output will eventually go in
# /glade/derecho/scratch/${USER}/archive/${CASE}/${component}/proc/tseries/
timeseries_params["ts_done"],
Expand Down

0 comments on commit 644ca18

Please sign in to comment.