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

Remove climo_land_subsection #679

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ short_name = "v3.LR.historical_0051"
walltime = "5:00:00"

[[ lnd_monthly_mvm_lnd ]]
climo_land_subsection = "land_monthly_climo"
climo_subsection = "land_monthly_climo"
diff_title = "Difference"
ref_final_yr = 1988
ref_name = "v3.LR.historical_0051"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ years = "1982:1984:2",

[[ lnd_monthly_mvm_lnd ]]
# Test model-vs-model using the same files as the reference
climo_land_subsection = "land_monthly_climo"
climo_subsection = "land_monthly_climo"
diff_title = "Difference"
partition = "compute"
qos = "regular"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ tc_obs = "/lcrc/group/e3sm/diagnostics/observations/Atm/tc-analysis/"

[[ lnd_monthly_mvm_lnd ]]
# Test model-vs-model using the same files as the reference
climo_land_subsection = "land_monthly_climo"
climo_subsection = "land_monthly_climo"
diff_title = "Difference"
partition = "compute"
qos = "regular"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ short_name = "#expand case_name#"
walltime = "#expand diags_walltime#"

[[ lnd_monthly_mvm_lnd ]]
climo_land_subsection = "land_monthly_climo"
climo_subsection = "land_monthly_climo"
diff_title = "Difference"
ref_final_yr = 1988
ref_name = "#expand case_name#"
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/template_weekly_comprehensive_v2.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ years = "1982:1984:2",

[[ lnd_monthly_mvm_lnd ]]
# Test model-vs-model using the same files as the reference
climo_land_subsection = "land_monthly_climo"
climo_subsection = "land_monthly_climo"
diff_title = "Difference"
partition = "#expand partition_long#"
qos = "#expand qos_long#"
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/template_weekly_comprehensive_v3.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ tc_obs = "#expand diagnostics_base_path#/observations/Atm/tc-analysis/"

[[ lnd_monthly_mvm_lnd ]]
# Test model-vs-model using the same files as the reference
climo_land_subsection = "land_monthly_climo"
climo_subsection = "land_monthly_climo"
diff_title = "Difference"
partition = "#expand partition_long#"
qos = "#expand qos_long#"
Expand Down
12 changes: 1 addition & 11 deletions tests/test_zppy_e3sm_diags.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ def test_add_climo_dependencies():
base: Dict[str, Any] = {"year1": 1980, "year2": 1990}
sets = [
"lat_lon",
"lat_lon_land",
"zonal_mean_xy",
"zonal_mean_2d",
"polar",
Expand All @@ -509,17 +510,6 @@ def test_add_climo_dependencies():
with pytest.raises(ParameterNotProvidedError):
add_climo_dependencies(c, dependencies, "script_dir")

c = {"sets": ["lat_lon_land"], "climo_land_subsection": "lndsub"}
c.update(base)
dependencies = []
add_climo_dependencies(c, dependencies, "script_dir")
assert dependencies == ["script_dir/climo_lndsub_1980-1990.status"]
c = {"sets": ["lat_lon_land"]}
c.update(base)
dependencies = []
with pytest.raises(ParameterNotProvidedError):
add_climo_dependencies(c, dependencies, "script_dir")

c = {"sets": ["tc_analysis"]}
c.update(base)
dependencies = []
Expand Down
11 changes: 4 additions & 7 deletions zppy/e3sm_diags.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ def add_climo_dependencies(
depend_on_climo: Set[str] = set(
[
"lat_lon",
# Note: often `lat_lon_land` will require a different climo_subsection
# than the other sets (e.g., a climo subsection that includes land).
# That means this set will often need to be run as a separate subtask.
"lat_lon_land",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. I was unsure about this line, and comment. But reading more of the code, I understand how dependencies handles differently for land vs atm, via "climate_section".

"zonal_mean_xy",
"zonal_mean_2d",
"polar",
Expand Down Expand Up @@ -260,13 +264,6 @@ def add_climo_dependencies(
script_dir, f"climo_{c['climo_diurnal_subsection']}{status_suffix}"
)
)
if "lat_lon_land" in c["sets"]:
check_parameter_defined(c, "climo_land_subsection")
dependencies.append(
os.path.join(
script_dir, f"climo_{c['climo_land_subsection']}{status_suffix}"
)
)
if "tc_analysis" in c["sets"]:
dependencies.append(os.path.join(script_dir, f"tc_analysis{status_suffix}"))

Expand Down
Loading