Skip to content

Commit

Permalink
Remove climo_land_subsection (#679)
Browse files Browse the repository at this point in the history
  • Loading branch information
forsyth2 authored Feb 7, 2025
1 parent e022501 commit 5d268f1
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 24 deletions.
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",
"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

0 comments on commit 5d268f1

Please sign in to comment.