From 87302c2a1abfa08cbce14ea38818e01ba4f75ed9 Mon Sep 17 00:00:00 2001 From: "Kate.Friedman" Date: Mon, 3 Jun 2024 14:25:51 +0000 Subject: [PATCH] Add fv3_warm and fv3_nest yamls back in - Add DO_NEST back into stage.py - Add back in reworked yamls for fv3_warm and the nest Refs #2475 --- parm/stage/fv3_nest.yaml.j2 | 17 +++++++++++++++++ parm/stage/fv3_warm.yaml.j2 | 15 +++++++++++++++ ush/python/pygfs/task/stage.py | 3 +++ 3 files changed, 35 insertions(+) create mode 100644 parm/stage/fv3_nest.yaml.j2 create mode 100644 parm/stage/fv3_warm.yaml.j2 diff --git a/parm/stage/fv3_nest.yaml.j2 b/parm/stage/fv3_nest.yaml.j2 new file mode 100644 index 0000000000..22d5c98490 --- /dev/null +++ b/parm/stage/fv3_nest.yaml.j2 @@ -0,0 +1,17 @@ +{% set cycle_HH = current_cycle | strftime("%H") %} +{% set cycle_YMD = current_cycle | to_YMD %} +{% set cycle_YMDH = current_cycle | to_YMDH %} +{% set ntile = 7 %} +fv3_nest: + mkdir: + - "{{ COM_ATMOS_RESTART_PREV }}" + copy: + {% if EXP_WARM_START %} + {% for ftype in ca_data fv_core.res fv_srf_wnd.res fv_tracer.res phy_data sfc_data %} + - ["{{ BASE_CPLIC }}/{{ CPL_ATMIC }}/{{ cycle_YMDH }}/{{ MEMDIR }}/atmos/{{ cycle_YMD }}.{{ cycle_HH }}0000.{{ ftype }}.tile{{ ntile }}.nc", "{{ COM_ATMOS_RESTART_PREV }}/{{ cycle_YMD }}.{{ cycle_HH }}0000.{{ ftype }}.nest0{{ ntile-5 }}.tile{{ ntile }}.nc"] + {% endfor %} # ftype + {% else %} + {% for ftype in gfs_data sfc_data %} + - ["{{ COM_ATMOS_INPUT }}/{{ ftype }}.tile{{ ntile }}.nc", "{{ COM_ATMOS_INPUT }}/{{ ftype }}.nest02.tile{{ ntile }}.nc"] + {% endfor %} # ftype + {% endif %} # cold-start diff --git a/parm/stage/fv3_warm.yaml.j2 b/parm/stage/fv3_warm.yaml.j2 new file mode 100644 index 0000000000..9a460b78f1 --- /dev/null +++ b/parm/stage/fv3_warm.yaml.j2 @@ -0,0 +1,15 @@ +{% set cycle_HH = current_cycle | strftime("%H") %} +{% set cycle_YMD = current_cycle | to_YMD %} +{% set cycle_YMDH = current_cycle | to_YMDH %} +fv3_warm: + mkdir: + - "{{ COM_ATMOS_RESTART_PREV }}" + copy: + {% for ftype in ["coupler.res", "fv_core.res.nc"] %} + - ["{{ BASE_CPLIC }}/{{ CPL_ATMIC }}/{{ cycle_YMDH }}/{{ MEMDIR }}/atmos/{{ cycle_YMD }}.{{ cycle_HH }}0000.{{ ftype }}", "{{ COM_ATMOS_RESTART_PREV }}"] + {% endfor %} + {% for ftype in ["ca_data", "fv_core.res", "fv_srf_wnd.res", "fv_tracer.res", "phy_data sfc_data"] %} + {% for ntile in range(1, ntiles + 1) %} + - ["{{ BASE_CPLIC }}/{{ CPL_ATMIC }}/{{ cycle_YMDH }}/{{ MEMDIR }}/atmos/{{ cycle_YMD }}.{{ cycle_HH }}0000.{{ ftype }}.tile{{ ntile }}.nc", "{{ COM_ATMOS_RESTART_PREV }}"] + {% endfor %} # ntile + {% endfor %} # ftype diff --git a/ush/python/pygfs/task/stage.py b/ush/python/pygfs/task/stage.py index 895306bcde..9a1bd977fe 100644 --- a/ush/python/pygfs/task/stage.py +++ b/ush/python/pygfs/task/stage.py @@ -66,6 +66,9 @@ def determine_stage(self, stage_dict: Dict[str, Any]) -> List[str]: if stage_dict.DO_ICE: stage_sets.append("ice.yaml.j2") + if stage_dict.DO_NEST: + stage_sets.append("fv3_nest.yaml.j2") + return stage_sets @logit(logger)