From 4a92a107e0604f803a2d96beca0d2b85fb59b729 Mon Sep 17 00:00:00 2001 From: "Kate.Friedman" Date: Fri, 31 May 2024 18:06:04 +0000 Subject: [PATCH] Remove yamls not yet needed Also clean up unneeded python imports Refs #2475 --- parm/stage/fv3_nest.yaml.j2 | 44 ------------------------------------ parm/stage/fv3_warm.yaml.j2 | 15 ------------ parm/stage/mediator.yaml.j2 | 8 ------- scripts/exglobal_stage_ic.py | 7 +----- 4 files changed, 1 insertion(+), 73 deletions(-) delete mode 100644 parm/stage/fv3_nest.yaml.j2 delete mode 100644 parm/stage/fv3_warm.yaml.j2 delete mode 100644 parm/stage/mediator.yaml.j2 diff --git a/parm/stage/fv3_nest.yaml.j2 b/parm/stage/fv3_nest.yaml.j2 deleted file mode 100644 index bc33eb729a..0000000000 --- a/parm/stage/fv3_nest.yaml.j2 +++ /dev/null @@ -1,44 +0,0 @@ -#WARM -# for ftype in ca_data fv_core.res fv_srf_wnd.res fv_tracer.res phy_data sfc_data; do -# src="${BASE_CPLIC}/${CPL_ATMIC:-}/${PDY}${cyc}/${MEMDIR}/atmos/${PDY}.${cyc}0000.${ftype}.tile${tt}.nc" -# if (( tt > 6 )) ; then -# tgt="${COM_ATMOS_RESTART_PREV}/${PDY}.${cyc}0000.${ftype}.nest0$((tt-5)).tile${tt}.nc" -# fi -#COLD -# for ftype in gfs_data sfc_data; do -# for ((tt = 1; tt <= ntiles; tt++)); do -# src="${BASE_CPLIC}/${CPL_ATMIC:-}/${PDY}${cyc}/${MEMDIR}/atmos/${ftype}.tile${tt}.nc" -# tgt="${COM_ATMOS_INPUT}/${ftype}.tile${tt}.nc" -# if (( ntiles > 6 )); then -# ${NLN} "${COM_ATMOS_INPUT}/${ftype}.tile7.nc" "${COM_ATMOS_INPUT}/${ftype}.nest02.tile7.nc" -{% 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: - #--------------- - # WARM START - #--------------- - {% if EXP_WARM_START %} - {% set head = "{{ BASE_CPLIC }}/{{ CPL_ATMIC }}/{{ cycle_YMD }}{{ cycle_HH }}/{{ MEMDIR }}/atmos/{{ cycle_YMD }}.{{ cycle_HH }}0000." %} - {% set ntile = 7 %} - {% for ftype in ca_data fv_core.res fv_srf_wnd.res fv_tracer.res phy_data sfc_data %} - #TODO: figure out how to copy one name to the other in here - - "{{ head }}{{ ftype }}.nest0{{ ntile-5 }}.tile{{ ntile }}.nc" - {% endfor %} # ftype - #--------------- # end warm start - {% else %} - #--------------- - # COLD START - #--------------- - {% set head = "{{ COM_ATMOS_INPUT | relpath(ROTDIR) }}" %} - - "{{ head }}/gfs_ctrl.nc" - {% for ftype in gfs_data sfc_data %} - #TODO: figure out how to copy one name to the other in here - - "{{ head }}/{{ ftype }}.tile{{ ntile }}.nc" - {% endfor %} # ftype - #--------------- # end cold start - {% endif %} diff --git a/parm/stage/fv3_warm.yaml.j2 b/parm/stage/fv3_warm.yaml.j2 deleted file mode 100644 index 7f97d6c571..0000000000 --- a/parm/stage/fv3_warm.yaml.j2 +++ /dev/null @@ -1,15 +0,0 @@ -{% 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) %} - - ["{{ 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/parm/stage/mediator.yaml.j2 b/parm/stage/mediator.yaml.j2 deleted file mode 100644 index 5f1e4d20ba..0000000000 --- a/parm/stage/mediator.yaml.j2 +++ /dev/null @@ -1,8 +0,0 @@ -{% set cycle_HH = current_cycle | strftime("%H") %} -{% set cycle_YMD = current_cycle | to_YMD %} -{% set cycle_YMDH = current_cycle | to_YMDH %} -mediator: - mkdir: - - "{{ COM_MED_RESTART_PREV }}" - copy: - - ["{{ BASE_CPLIC }}/{{ CPL_MEDIC }}/{{ cycle_YMDH }}/{{ MEMDIR }}/med/{{ cycle_YMD }}.{{ cycle_HH }}0000.ufs.cpld.cpl.r.nc", "{{ COM_MED_RESTART_PREV }}/{{ cycle_YMD }}.{{ cycle_HH }}0000.ufs.cpld.cpl.r.nc"] diff --git a/scripts/exglobal_stage_ic.py b/scripts/exglobal_stage_ic.py index aad20252ea..4fbcf1f8cf 100755 --- a/scripts/exglobal_stage_ic.py +++ b/scripts/exglobal_stage_ic.py @@ -3,7 +3,7 @@ import os from pygfs.task.stage import Stage -from wxflow import AttrDict, Logger, cast_strdict_as_dtypedict, chdir, logit +from wxflow import AttrDict, Logger, cast_strdict_as_dtypedict, logit # Initialize root logger logger = Logger(level=os.environ.get("LOGGING_LEVEL", "DEBUG"), colored_log=True) @@ -21,7 +21,6 @@ def main(): 'current_cycle','EXP_WARM_START','CDUMP','rCDUMP', 'ROTDIR','PARMgfs','ntiles','MEMDIR', 'BASE_CPLIC','waveGRD','OCNRES','USE_OCN_PERTURB_FILES', - #TODO: Need this for mediator#'CPL_MEDIC', 'CPL_ATMIC','CPL_ICEIC','CPL_OCNIC','CPL_WAVIC'] stage_dict = AttrDict() @@ -33,10 +32,6 @@ def main(): if key.startswith("COM"): stage_dict[key] = stage.task_config[key] - #TEST PRINT - for key in stage_dict: - print(f'{key} = {stage_dict[key]}') - # Add the os.path.exists function to the dict for yaml parsing stage_dict['path_exists'] = os.path.exists