diff --git a/jobs/JGLOBAL_STAGE_IC b/jobs/JGLOBAL_STAGE_IC index a1707b18a0..0d3fe2e11d 100755 --- a/jobs/JGLOBAL_STAGE_IC +++ b/jobs/JGLOBAL_STAGE_IC @@ -18,7 +18,6 @@ previous_cycle=$(date --utc -d "${current_cycle:0:8} ${current_cycle:8:2} - ${as current_cycle_begin=$(date --utc -d "${current_cycle:0:8} ${current_cycle:8:2} - ${half_window} hours" +%Y%m%d%H) current_cycle_end=$(date --utc -d "${current_cycle:0:8} ${current_cycle:8:2} + ${half_window} hours" +%Y%m%d%H) current_cycle_offset=$(date --utc -d "${PDY} ${cyc} + ${OFFSET_START_HOUR} hours" +%Y%m%d%H) -export current_cycle_offset # Define model start date for current_cycle as the time the forecast will start if [[ "${DOIAU:-NO}" == "YES" ]]; then @@ -30,7 +29,7 @@ else model_start_date_current_cycle=${current_cycle} fi fi -export model_start_date_current_cycle +export previous_cycle current_cycle_offset model_start_date_current_cycle # Define MEMDIR_ARRAY MEMDIR_ARRAY=() diff --git a/parm/stage/stage.yaml.j2 b/parm/stage/stage.yaml.j2 index bfa1da217f..a8e86a8899 100644 --- a/parm/stage/stage.yaml.j2 +++ b/parm/stage/stage.yaml.j2 @@ -22,6 +22,7 @@ {% set cycle_HH = current_cycle | strftime("%H") %} {% set m_prefix = model_start_date_current_cycle | to_YMD + "." + model_start_date_current_cycle | strftime("%H") + "0000" %} {% set o_prefix = current_cycle_offset | to_YMD + "." + current_cycle_offset | strftime("%H") + "0000" %} +{% set p_prefix = previous_cycle | to_YMD + "." + previous_cycle | strftime("%H") + "0000" %} ############################################################# # Initial condition to stage @@ -44,13 +45,16 @@ atmosphere_warm: - "{{ COMOUT_ATMOS_RESTART_PREV }}" copy: {% for ftype in ["coupler.res", "fv_core.res.nc"] %} - - ["{{ ICSDIR }}/{{ COMOUT_ATMOS_RESTART_PREV | relpath(ROTDIR) }}/{{ m_prefix }}.{{ ftype }}", "{{ COMOUT_ATMOS_RESTART_PREV }}"] + - ["{{ ICSDIR }}/{{ COMOUT_ATMOS_RESTART_PREV | relpath(ROTDIR) }}/{{ o_prefix }}.{{ ftype }}", "{{ COMOUT_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) %} - - ["{{ ICSDIR }}/{{ COMOUT_ATMOS_RESTART_PREV | relpath(ROTDIR) }}/{{ m_prefix }}.{{ ftype }}.tile{{ ntile }}.nc", "{{ COMOUT_ATMOS_RESTART_PREV }}"] + - ["{{ ICSDIR }}/{{ COMOUT_ATMOS_RESTART_PREV | relpath(ROTDIR) }}/{{ o_prefix }}.{{ ftype }}.tile{{ ntile }}.nc", "{{ COMOUT_ATMOS_RESTART_PREV }}"] {% endfor %} # ntile {% endfor %} # ftype + {% for ntile in range(1, ntiles + 1) %} + - ["{{ ICSDIR }}/{{ COMOUT_ATMOS_RESTART_PREV | relpath(ROTDIR) }}/{{ p_prefix }}.sfcanl_data.tile{{ ntile }}.nc", "{{ COMOUT_ATMOS_RESTART_PREV }}"] + {% endfor %} # ntile {% else %} atmosphere_cold: mkdir: @@ -80,7 +84,7 @@ atmosphere_nest: copy: {% if EXP_WARM_START == True %} {% for ftype in ["ca_data", "fv_core.res", "fv_srf_wnd.res", "fv_tracer.res", "phy_data", "sfc_data"] %} - - ["{{ ICSDIR }}/{{ COMOUT_ATMOS_RESTART_PREV | relpath(ROTDIR) }}/{{ m_prefix }}.{{ ftype }}.tile{{ ntile }}.nc", "{{ COMOUT_ATMOS_RESTART_PREV }}/{{ m_prefix }}.{{ ftype }}.nest0{{ ntile-5 }}.tile{{ ntile }}.nc"] + - ["{{ ICSDIR }}/{{ COMOUT_ATMOS_RESTART_PREV | relpath(ROTDIR) }}/{{ o_prefix }}.{{ ftype }}.tile{{ ntile }}.nc", "{{ COMOUT_ATMOS_RESTART_PREV }}/{{ o_prefix }}.{{ ftype }}.nest0{{ ntile-5 }}.tile{{ ntile }}.nc"] {% endfor %} # ftype {% else %} {% for ftype in ["gfs_data", "sfc_data"] %} diff --git a/scripts/exglobal_stage_ic.py b/scripts/exglobal_stage_ic.py index 02b3b62973..d5be8e8ee1 100755 --- a/scripts/exglobal_stage_ic.py +++ b/scripts/exglobal_stage_ic.py @@ -18,7 +18,8 @@ def main(): stage = Stage(config) # Pull out all the configuration keys needed to run stage job - keys = ['RUN', 'MODE', 'EXP_WARM_START', 'current_cycle', + keys = ['RUN', 'MODE', 'EXP_WARM_START', + 'previous_cycle', 'current_cycle', 'current_cycle_offset', 'model_start_date_current_cycle', 'ROTDIR', 'ICSDIR', 'STAGE_IC_YAML_TMPL', 'OCNRES', 'waveGRD', 'ntiles',