diff --git a/fre/gfdl_msd_schemas b/fre/gfdl_msd_schemas index ee6a34da8..68138197d 160000 --- a/fre/gfdl_msd_schemas +++ b/fre/gfdl_msd_schemas @@ -1 +1 @@ -Subproject commit ee6a34da83d89988c6813b24f87807099a572aee +Subproject commit 68138197dfdbb74c8bb1759150457f82d8f9a3dd diff --git a/fre/pp/configure_script_yaml.py b/fre/pp/configure_script_yaml.py index 0b1c77286..f95eca58f 100644 --- a/fre/pp/configure_script_yaml.py +++ b/fre/pp/configure_script_yaml.py @@ -75,8 +75,6 @@ def rose_init(experiment: str, platform: str, target: str) -> metomi.rose.config rose_suite = metomi.rose.config.ConfigNode() # disagreeable; these should be optional rose_suite.set(keys=['template variables', 'DO_ANALYSIS_ONLY'], value='False') - rose_suite.set(keys=['template variables', 'DO_MDTF'], value='False') - rose_suite.set(keys=['template variables', 'PP_DEFAULT_XYINTERP'], value='0,0') # set some rose suite vars rose_suite.set(keys=['template variables', 'EXPERIMENT'], value=f'"{experiment}"') @@ -122,7 +120,7 @@ def set_rose_suite(yamlfile: dict, rose_suite: metomi.rose.config.ConfigNode) -> """ pp=yamlfile.get("postprocess") dirs=yamlfile.get("directories") - analysis=yamlfile.get("analysis") + analysis=yamlfile.get("final-step-user-scripts") if dirs is not None: for key,value in dirs.items(): @@ -148,9 +146,9 @@ def set_rose_suite(yamlfile: dict, rose_suite: metomi.rose.config.ConfigNode) -> # Account for multiple scripts for refinediag # Fail if multiple scripts defined for preanalysis (not implemented yet) - if pp_key == "preanalysis": + if pp_key == "first-step-user-scripts": for k2, v2 in pp_value.items(): - switch = v2["do_preanalysis"] + switch = v2["user_script_on"] if switch is True: script = v2["script"] @@ -162,9 +160,9 @@ def set_rose_suite(yamlfile: dict, rose_suite: metomi.rose.config.ConfigNode) -> pa_scripts += f"{script} " - if pp_key == "refinediag": + if pp_key == "refinediag-user-scripts": for k2, v2 in pp_value.items(): - switch = v2["do_refinediag"] + switch = v2["user_script_on"] if switch is True: script = v2["script"] rd_scripts += f"{script} " @@ -205,16 +203,14 @@ def set_rose_suite(yamlfile: dict, rose_suite: metomi.rose.config.ConfigNode) -> do_analysis_switch = [] for an_key, an_value in analysis.items(): - an_workflow_info = an_value["workflow"] - # if analysis_on key is actually set, evaluate and save its value in a list - if "analysis_on" in an_workflow_info: - do_analysis_switch.append(an_workflow_info["analysis_on"]) - #if analysis_on key is NOT set, save its value as True in the list + # if user_script_on key is set, save its value in a list + if "user_script_on" in an_value: + do_analysis_switch.append(an_value["user_script_on"]) + # if it's not set, save its value as True (i.e. default on) else: do_analysis_switch.append("True") - # if ANY of the analysis components do not set analysis_on or set analysis_on as True, - # set DO_ANALYSIS=True in the rose_suite.conf + # if ANY of the analysis components are on set DO_ANALYSIS=True in the rose_suite.conf if any(do_analysis_switch): rose_suite.set( keys = ['template variables', 'DO_ANALYSIS'], value = 'True' ) diff --git a/fre/pp/tests/AM5_example/yaml_include/settings.yaml b/fre/pp/tests/AM5_example/yaml_include/settings.yaml index 1057fc6d5..7a63c30fa 100644 --- a/fre/pp/tests/AM5_example/yaml_include/settings.yaml +++ b/fre/pp/tests/AM5_example/yaml_include/settings.yaml @@ -19,19 +19,19 @@ postprocess: switches: &shared_switches clean_work: True do_atmos_plevel_masking: True - preanalysis: + first-step-user-scripts: vitals: script: "/path/to/vitals-script" inputs: ['atmos_month', 'aerosol_month'] - do_preanalysis: True - refinediag: + user_script_on: True + refinediag-user-scripts: ocean: script: "/path/to/ocean-script" inputs: ['ocean_monthly', 'ocean_bgc'] outputs: ['ocean_refined'] - do_refinediag: True + user_script_on: True aerosol: script: "/path/to/aerosol-script" inputs: ['aerosol_month'] outputs: ['aerosol_refined'] - do_refinediag: True + user_script_on: True diff --git a/fre/yamltools/tests/AM5_example/am5.yaml b/fre/yamltools/tests/AM5_example/am5.yaml index c34be59f3..1f0d78137 100644 --- a/fre/yamltools/tests/AM5_example/am5.yaml +++ b/fre/yamltools/tests/AM5_example/am5.yaml @@ -52,7 +52,7 @@ experiments: pp: - "pp_yamls/pp.c96_amip.yaml" - "pp_yamls/pp-TEST.c96_amip.yaml" - analysis: + final-step-user-scripts: - "analysis_yamls/clouds.yaml" - "analysis_yamls/land.yaml" cmor: # cmor-tool development, not part of official am5.yaml (yet)