Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make e3sm_to_cmip task #496

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Status file printing
  • Loading branch information
forsyth2 committed Sep 6, 2023
commit 33f87307d97d0b8e06a91ccc294e47f17e7d82b6
14 changes: 13 additions & 1 deletion zppy/ilamb.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def ilamb(config, scriptDir, existing_bundles, job_ids_file):
scriptDir,
"e3sm_to_cmip_%s_%04d-%04d-%04d.status"
% (
"land_monthly",
c["ts_land_subsection"],
c["year1"],
c["year2"],
c["ts_num_years"],
Expand All @@ -91,6 +91,18 @@ def ilamb(config, scriptDir, existing_bundles, job_ids_file):
),
),
)
dependencies.append(
os.path.join(
scriptDir,
"e3sm_to_cmip_%s_%04d-%04d-%04d.status"
% (
c["ts_atm_subsection"],
c["year1"],
c["year2"],
c["ts_num_years"],
),
),
)

prefix = "ilamb_%04d-%04d" % (
c["year1"],
Expand Down
2 changes: 2 additions & 0 deletions zppy/templates/default.ini
Original file line number Diff line number Diff line change
Expand Up @@ -306,5 +306,7 @@ ts_years = string_list(default=list(""))
cfg = string(default="ilamb/cmip.cfg")
ilamb_obs = string(default="")
land_only = boolean(default=False)
# time-series atm subsection name (this should also match the e3sm_to_cmip atm subsection name)
ts_atm_subsection = string(default="atm_monthly_180x360_aave")
# time-series land subsection name (this should also match the e3sm_to_cmip land subsection name)
ts_land_subsection = string(default="land_monthly")
12 changes: 8 additions & 4 deletions zppy/templates/e3sm_to_cmip.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
{% include 'slurm_header.sh' %}
{{ environment_commands }}

# TODO: figrue out dependencies on ts
# TODO: figure out dependencies for E3SM Diags. It doesn't look like E3SM Diags depends on e3sm_to_cmip.

# Turn on debug output if needed
debug={{ debug }}
if [[ "${debug,,}" == "true" ]]; then
Expand Down Expand Up @@ -33,10 +36,6 @@ do
done
done





tmp_dir=tmp_{{ prefix }}

# Generate CMIP ts
Expand Down Expand Up @@ -95,6 +94,11 @@ if [ $? != 0 ]; then
exit 3
fi

# Delete temporary workdir
cd ..
if [[ "${debug,,}" != "true" ]]; then
rm -rf ${workdir}
fi

# Update status file and exit
{% raw %}
Expand Down
Loading