From fa6a8a7fe7940fa78b78854610f4d3f85053be52 Mon Sep 17 00:00:00 2001 From: Ryan Forsyth Date: Fri, 7 Feb 2025 17:05:57 -0600 Subject: [PATCH] Remove climo_land_subsection --- ..._case_e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg | 2 +- .../test_weekly_comprehensive_v2_chrysalis.cfg | 2 +- .../test_weekly_comprehensive_v3_chrysalis.cfg | 2 +- ...mplate_min_case_e3sm_diags_lat_lon_land_mvm_2.cfg | 2 +- .../integration/template_weekly_comprehensive_v2.cfg | 2 +- .../integration/template_weekly_comprehensive_v3.cfg | 2 +- tests/test_zppy_e3sm_diags.py | 12 +----------- zppy/e3sm_diags.py | 11 ++++------- 8 files changed, 11 insertions(+), 24 deletions(-) diff --git a/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg b/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg index 5c7fd909..425c91c6 100644 --- a/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg +++ b/tests/integration/generated/test_min_case_e3sm_diags_lat_lon_land_mvm_2_chrysalis.cfg @@ -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" diff --git a/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg b/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg index 8e27d5e6..9d605c3d 100644 --- a/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg +++ b/tests/integration/generated/test_weekly_comprehensive_v2_chrysalis.cfg @@ -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" diff --git a/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg b/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg index c3a3d1cf..8a9bda50 100644 --- a/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg +++ b/tests/integration/generated/test_weekly_comprehensive_v3_chrysalis.cfg @@ -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" diff --git a/tests/integration/template_min_case_e3sm_diags_lat_lon_land_mvm_2.cfg b/tests/integration/template_min_case_e3sm_diags_lat_lon_land_mvm_2.cfg index cfce4746..c4e38464 100644 --- a/tests/integration/template_min_case_e3sm_diags_lat_lon_land_mvm_2.cfg +++ b/tests/integration/template_min_case_e3sm_diags_lat_lon_land_mvm_2.cfg @@ -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#" diff --git a/tests/integration/template_weekly_comprehensive_v2.cfg b/tests/integration/template_weekly_comprehensive_v2.cfg index 0de56d5f..940e9496 100644 --- a/tests/integration/template_weekly_comprehensive_v2.cfg +++ b/tests/integration/template_weekly_comprehensive_v2.cfg @@ -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#" diff --git a/tests/integration/template_weekly_comprehensive_v3.cfg b/tests/integration/template_weekly_comprehensive_v3.cfg index 38355bdb..6127e601 100644 --- a/tests/integration/template_weekly_comprehensive_v3.cfg +++ b/tests/integration/template_weekly_comprehensive_v3.cfg @@ -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#" diff --git a/tests/test_zppy_e3sm_diags.py b/tests/test_zppy_e3sm_diags.py index f09d96eb..e35c6a4d 100644 --- a/tests/test_zppy_e3sm_diags.py +++ b/tests/test_zppy_e3sm_diags.py @@ -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", @@ -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 = [] diff --git a/zppy/e3sm_diags.py b/zppy/e3sm_diags.py index 6365121e..5ecb8fc0 100644 --- a/zppy/e3sm_diags.py +++ b/zppy/e3sm_diags.py @@ -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", @@ -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}"))