diff --git a/parm/config/gfs/config.stage_ic b/parm/config/gfs/config.stage_ic index 7aa0c25f32..3acc747555 100644 --- a/parm/config/gfs/config.stage_ic +++ b/parm/config/gfs/config.stage_ic @@ -12,6 +12,10 @@ export BASE_IC="@BASE_IC@" # Platform home for staged ICs export STAGE_IC_YAML_TMPL="${PARMgfs}/stage/master_gfs.yaml.j2" +if [[ "${MODE}" = "cycled" && "${SDATE}" = "${PDY}${cyc}" && ${EXP_WARM_START} = ".false." ]] || [[ "${MODE}" = "forecast-only" && ${EXP_WARM_START} = ".false." ]] ; then + export DOIAU="NO" # Force it off for cold-start +fi + # Set ICSDIR (if not defined) if [[ -z "${ICSDIR}" ]] ; then diff --git a/parm/stage/atmosphere_nest.yaml.j2 b/parm/stage/atmosphere_nest.yaml.j2 index 13ec0ed8c5..a66e1a1b30 100644 --- a/parm/stage/atmosphere_nest.yaml.j2 +++ b/parm/stage/atmosphere_nest.yaml.j2 @@ -12,7 +12,7 @@ atmosphere_nest: {% set imem = mem - first_mem %} {% set COMOUT_ATMOS_RESTART_PREV_MEM = COMOUT_ATMOS_RESTART_PREV_MEM_list[imem] %} {% for ftype in ["ca_data", "fv_core.res", "fv_srf_wnd.res", "fv_tracer.res", "phy_data", "sfc_data"] %} - - ["{{ ICSDIR }}/{{ COMOUT_ATMOS_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ m_prefix }}.{{ ftype }}.tile{{ ntile }}.nc", "{{ COMOUT_ATMOS_RESTART_PREV_MEM }}/{{ m_prefix }}.{{ ftype }}.nest0{{ ntile-5 }}.tile{{ ntile }}.nc"] + - ["{{ ICSDIR }}/{{ COMOUT_ATMOS_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ model_atmos_cur_prefix }}.{{ ftype }}.tile{{ ntile }}.nc", "{{ COMOUT_ATMOS_RESTART_PREV_MEM }}/{{ model_atmos_cur_prefix }}.{{ ftype }}.nest0{{ ntile-5 }}.tile{{ ntile }}.nc"] {% endfor %} {% endfor %} # mem loop {% else %} # cold start diff --git a/parm/stage/atmosphere_perturbation.yaml.j2 b/parm/stage/atmosphere_perturbation.yaml.j2 index 0e097b71dc..e8ebf76d5b 100644 --- a/parm/stage/atmosphere_perturbation.yaml.j2 +++ b/parm/stage/atmosphere_perturbation.yaml.j2 @@ -9,5 +9,5 @@ atmosphere_perturbation: {% for mem in range(first_mem, last_mem + 1) %} {% set imem = mem - first_mem %} {% set COMOUT_ATMOS_ANALYSIS_MEM = COMOUT_ATMOS_ANALYSIS_MEM_list[imem] %} - - ["{{ ICSDIR }}/{{ COMOUT_ATMOS_ANALYSIS_MEM | relpath(ROTDIR) }}/{{ m_prefix }}.fv3_perturbation.nc", "{{ COMOUT_ATMOS_ANALYSIS_MEM }}/{{ RUN }}.t{{ current_cycle_HH }}z.atminc.nc"] + - ["{{ ICSDIR }}/{{ COMOUT_ATMOS_ANALYSIS_MEM | relpath(ROTDIR) }}/{{ model_atmos_cur_prefix }}.fv3_perturbation.nc", "{{ COMOUT_ATMOS_ANALYSIS_MEM }}/{{ RUN }}.t{{ current_cycle_HH }}z.atminc.nc"] {% endfor %} # mem loop diff --git a/parm/stage/atmosphere_warm.yaml.j2 b/parm/stage/atmosphere_warm.yaml.j2 index 14c8615262..f34cdbe590 100644 --- a/parm/stage/atmosphere_warm.yaml.j2 +++ b/parm/stage/atmosphere_warm.yaml.j2 @@ -9,20 +9,20 @@ atmosphere_warm: {% for mem in range(first_mem, last_mem + 1) %} {% set imem = mem - first_mem %} {% set COMOUT_ATMOS_RESTART_PREV_MEM = COMOUT_ATMOS_RESTART_PREV_MEM_list[imem] %} - {% if path_exists(ICSDIR ~ "/" ~ COMOUT_ATMOS_RESTART_PREV_MEM | relpath(ROTDIR) ~ "/" ~ m_prefix ~ ".atm_stoch.res.nc") %} - - ["{{ ICSDIR }}/{{ COMOUT_ATMOS_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ m_prefix }}.atm_stoch.res.nc", "{{ COMOUT_ATMOS_RESTART_PREV_MEM }}"] + {% if path_exists(ICSDIR ~ "/" ~ COMOUT_ATMOS_RESTART_PREV_MEM | relpath(ROTDIR) ~ "/" ~ model_atmos_cur_prefix ~ ".atm_stoch.res.nc") %} + - ["{{ ICSDIR }}/{{ COMOUT_ATMOS_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ model_atmos_cur_prefix }}.atm_stoch.res.nc", "{{ COMOUT_ATMOS_RESTART_PREV_MEM }}"] {% endif %} # path_exists {% for ftype in ["coupler.res", "fv_core.res.nc"] %} - - ["{{ ICSDIR }}/{{ COMOUT_ATMOS_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ m_prefix }}.{{ ftype }}", "{{ COMOUT_ATMOS_RESTART_PREV_MEM }}"] + - ["{{ ICSDIR }}/{{ COMOUT_ATMOS_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ model_atmos_cur_prefix }}.{{ ftype }}", "{{ COMOUT_ATMOS_RESTART_PREV_MEM }}"] {% 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_MEM | relpath(ROTDIR) }}/{{ m_prefix }}.{{ ftype }}.tile{{ ntile }}.nc", "{{ COMOUT_ATMOS_RESTART_PREV_MEM }}"] + - ["{{ ICSDIR }}/{{ COMOUT_ATMOS_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ model_atmos_cur_prefix }}.{{ ftype }}.tile{{ ntile }}.nc", "{{ COMOUT_ATMOS_RESTART_PREV_MEM }}"] {% endfor %} # ntile {% endfor %} # ftype {% for ntile in range(1, ntiles + 1) %} - {% if path_exists(ICSDIR ~ "/" ~ COMOUT_ATMOS_RESTART_PREV_MEM | relpath(ROTDIR) ~ "/" ~ p_prefix ~ ".sfcanl_data.tile" ~ ntile ~ ".nc") %} - - ["{{ ICSDIR }}/{{ COMOUT_ATMOS_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ p_prefix }}.sfcanl_data.tile{{ ntile }}.nc", "{{ COMOUT_ATMOS_RESTART_PREV_MEM }}"] + {% if path_exists(ICSDIR ~ "/" ~ COMOUT_ATMOS_RESTART_PREV_MEM | relpath(ROTDIR) ~ "/" ~ model_atmos_prev_prefix ~ ".sfcanl_data.tile" ~ ntile ~ ".nc") %} + - ["{{ ICSDIR }}/{{ COMOUT_ATMOS_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ model_atmos_prev_prefix }}.sfcanl_data.tile{{ ntile }}.nc", "{{ COMOUT_ATMOS_RESTART_PREV_MEM }}"] {% endif %} # path_exists {% endfor %} # ntile {% endfor %} # mem loop diff --git a/parm/stage/ice.yaml.j2 b/parm/stage/ice.yaml.j2 index 0e0aa40c7f..bd731b7c09 100644 --- a/parm/stage/ice.yaml.j2 +++ b/parm/stage/ice.yaml.j2 @@ -10,7 +10,7 @@ ice: {% for mem in range(first_mem, last_mem + 1) %} {% set imem = mem - first_mem %} {% set COMOUT_ICE_ANALYSIS_MEM = COMOUT_ICE_ANALYSIS_MEM_list[imem] %} - - ["{{ ICSDIR }}/{{ COMOUT_ICE_ANALYSIS_MEM | relpath(ROTDIR) }}/{{ m_prefix }}.cice_model_anl.res.nc", "{{ COMOUT_ICE_ANALYSIS_MEM }}"] + - ["{{ ICSDIR }}/{{ COMOUT_ICE_ANALYSIS_MEM | relpath(ROTDIR) }}/{{ model_ice_cur_prefix }}.cice_model_anl.res.nc", "{{ COMOUT_ICE_ANALYSIS_MEM }}"] {% endfor %} # mem loop {% else %} mkdir: @@ -23,6 +23,6 @@ ice: {% for mem in range(first_mem, last_mem + 1) %} {% set imem = mem - first_mem %} {% set COMOUT_ICE_RESTART_PREV_MEM = COMOUT_ICE_RESTART_PREV_MEM_list[imem] %} - - ["{{ ICSDIR }}/{{ COMOUT_ICE_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ m_prefix }}.cice_model.res.nc", "{{ COMOUT_ICE_RESTART_PREV_MEM }}"] + - ["{{ ICSDIR }}/{{ COMOUT_ICE_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ model_ice_cur_prefix }}.cice_model.res.nc", "{{ COMOUT_ICE_RESTART_PREV_MEM }}"] {% endfor %} # mem loop {% endif %} diff --git a/parm/stage/master_gefs.yaml.j2 b/parm/stage/master_gefs.yaml.j2 index bdd4c8de5f..38c67af7c5 100644 --- a/parm/stage/master_gefs.yaml.j2 +++ b/parm/stage/master_gefs.yaml.j2 @@ -42,8 +42,12 @@ {% set current_cycle_HH = current_cycle | strftime("%H") %} {% set previous_cycle_YMD = previous_cycle | to_YMD %} {% set previous_cycle_HH = previous_cycle | strftime("%H") %} -{% set p_prefix = previous_cycle | strftime("%Y%m%d.%H0000") %} -{% set m_prefix = model_start_date_current_cycle | strftime("%Y%m%d.%H0000") %} +{% set model_atmos_prev_prefix = previous_cycle | strftime("%Y%m%d.%H0000") %} +{% set model_atmos_cur_prefix = model_start_date_current_cycle | strftime("%Y%m%d.%H0000") %} +{% set model_ice_cur_prefix = model_start_date_current_cycle | strftime("%Y%m%d.%H0000") %} +{% set model_med_cur_prefix = model_start_date_current_cycle | strftime("%Y%m%d.%H0000") %} +{% set model_ocean_cur_prefix = model_start_date_current_cycle | strftime("%Y%m%d.%H0000") %} +{% set model_wave_cur_prefix = current_cycle | strftime("%Y%m%d.%H0000") %} # Set first/last mem for loop # --------------------------- diff --git a/parm/stage/master_gfs.yaml.j2 b/parm/stage/master_gfs.yaml.j2 index 5204221c9b..49b46e22a7 100644 --- a/parm/stage/master_gfs.yaml.j2 +++ b/parm/stage/master_gfs.yaml.j2 @@ -42,8 +42,12 @@ {% set current_cycle_HH = current_cycle | strftime("%H") %} {% set previous_cycle_YMD = previous_cycle | to_YMD %} {% set previous_cycle_HH = previous_cycle | strftime("%H") %} -{% set p_prefix = previous_cycle | strftime("%Y%m%d.%H0000") %} -{% set m_prefix = model_start_date_current_cycle | strftime("%Y%m%d.%H0000") %} +{% set model_atmos_prev_prefix = previous_cycle | strftime("%Y%m%d.%H0000") %} +{% set model_atmos_cur_prefix = model_start_date_current_cycle | strftime("%Y%m%d.%H0000") %} +{% set model_ice_cur_prefix = model_start_date_current_cycle | strftime("%Y%m%d.%H0000") %} +{% set model_med_cur_prefix = model_start_date_current_cycle | strftime("%Y%m%d.%H0000") %} +{% set model_ocean_cur_prefix = model_start_date_current_cycle | strftime("%Y%m%d.%H0000") %} +{% set model_wave_cur_prefix = current_cycle | strftime("%Y%m%d.%H0000") %} # Determine restart RUN # --------------------- diff --git a/parm/stage/ocean.yaml.j2 b/parm/stage/ocean.yaml.j2 index b57c36d4ac..b062f523f3 100644 --- a/parm/stage/ocean.yaml.j2 +++ b/parm/stage/ocean.yaml.j2 @@ -9,10 +9,10 @@ ocean: {% for mem in range(first_mem, last_mem + 1) %} {% set imem = mem - first_mem %} {% set COMOUT_OCEAN_RESTART_PREV_MEM = COMOUT_OCEAN_RESTART_PREV_MEM_list[imem] %} - - ["{{ ICSDIR }}/{{ COMOUT_OCEAN_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ m_prefix }}.MOM.res.nc", "{{ COMOUT_OCEAN_RESTART_PREV_MEM }}"] + - ["{{ ICSDIR }}/{{ COMOUT_OCEAN_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ model_ocean_cur_prefix }}.MOM.res.nc", "{{ COMOUT_OCEAN_RESTART_PREV_MEM }}"] {% if OCNRES == "025" %} {% for nn in range(1, 4) %} - - ["{{ ICSDIR }}/{{ COMOUT_OCEAN_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ m_prefix }}.MOM.res_{{ nn }}.nc", "{{ COMOUT_OCEAN_RESTART_PREV_MEM }}"] + - ["{{ ICSDIR }}/{{ COMOUT_OCEAN_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ model_ocean_cur_prefix }}.MOM.res_{{ nn }}.nc", "{{ COMOUT_OCEAN_RESTART_PREV_MEM }}"] {% endfor %} {% endif %} {% endfor %} # mem loop diff --git a/parm/stage/ocean_mediator.yaml.j2 b/parm/stage/ocean_mediator.yaml.j2 index c986b2e746..f0250658ce 100644 --- a/parm/stage/ocean_mediator.yaml.j2 +++ b/parm/stage/ocean_mediator.yaml.j2 @@ -1,4 +1,4 @@ -{% if path_exists(ICSDIR ~ "/" ~ COMOUT_MED_RESTART_PREV_MEM_list[0] | relpath(ROTDIR) ~ "/" ~ m_prefix ~ ".ufs.cpld.cpl.r.nc") %} +{% if path_exists(ICSDIR ~ "/" ~ COMOUT_MED_RESTART_PREV_MEM_list[0] | relpath(ROTDIR) ~ "/" ~ model_med_cur_prefix ~ ".ufs.cpld.cpl.r.nc") %} ocean_mediator: mkdir: {% for mem in range(first_mem, last_mem + 1) %} @@ -10,6 +10,6 @@ ocean_mediator: {% for mem in range(first_mem, last_mem + 1) %} {% set imem = mem - first_mem %} {% set COMOUT_MED_RESTART_PREV_MEM = COMOUT_MED_RESTART_PREV_MEM_list[imem] %} - - ["{{ ICSDIR }}/{{ COMOUT_MED_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ m_prefix }}.ufs.cpld.cpl.r.nc", "{{ COMOUT_MED_RESTART_PREV_MEM }}"] + - ["{{ ICSDIR }}/{{ COMOUT_MED_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ model_med_cur_prefix }}.ufs.cpld.cpl.r.nc", "{{ COMOUT_MED_RESTART_PREV_MEM }}"] {% endfor %} # mem loop {% endif %} # path exists diff --git a/parm/stage/ocean_replay.yaml.j2 b/parm/stage/ocean_replay.yaml.j2 index 8b52108bec..011fbfa329 100644 --- a/parm/stage/ocean_replay.yaml.j2 +++ b/parm/stage/ocean_replay.yaml.j2 @@ -9,5 +9,5 @@ ocean_replay: {% for mem in range(first_mem, last_mem + 1) %} {% set imem = mem - first_mem %} {% set COMOUT_OCEAN_ANALYSIS_MEM = COMOUT_OCEAN_ANALYSIS_MEM_list[imem] %} - - ["{{ ICSDIR }}/{{ COMOUT_OCEAN_ANALYSIS_MEM | relpath(ROTDIR) }}/{{ m_prefix }}.mom6_perturbation.nc", "{{ COMOUT_OCEAN_ANALYSIS_MEM }}/mom6_increment.nc"] + - ["{{ ICSDIR }}/{{ COMOUT_OCEAN_ANALYSIS_MEM | relpath(ROTDIR) }}/{{ model_ocean_cur_prefix }}.mom6_perturbation.nc", "{{ COMOUT_OCEAN_ANALYSIS_MEM }}/mom6_increment.nc"] {% endfor %} # mem loop diff --git a/parm/stage/wave.yaml.j2 b/parm/stage/wave.yaml.j2 index d610430bc7..794a62bd98 100644 --- a/parm/stage/wave.yaml.j2 +++ b/parm/stage/wave.yaml.j2 @@ -9,5 +9,5 @@ wave: {% for mem in range(first_mem, last_mem + 1) %} {% set imem = mem - first_mem %} {% set COMOUT_WAVE_RESTART_PREV_MEM = COMOUT_WAVE_RESTART_PREV_MEM_list[imem] %} - - ["{{ ICSDIR }}/{{ COMOUT_WAVE_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ m_prefix }}.restart.{{ waveGRD }}", "{{ COMOUT_WAVE_RESTART_PREV_MEM }}"] + - ["{{ ICSDIR }}/{{ COMOUT_WAVE_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ model_wave_cur_prefix }}.restart.{{ waveGRD }}", "{{ COMOUT_WAVE_RESTART_PREV_MEM }}"] {% endfor %} # mem loop diff --git a/ush/forecast_det.sh b/ush/forecast_det.sh index 603447f612..634a5271f9 100755 --- a/ush/forecast_det.sh +++ b/ush/forecast_det.sh @@ -6,7 +6,7 @@ UFS_det(){ echo "SUB ${FUNCNAME[0]}: Run type determination for UFS" # Determine if the current cycle is a warm start (based on the availability of restarts) - if [[ -f "${COMIN_ATMOS_RESTART_PREV}/${model_start_date_current_cycle:0:8}.${model_start_date_current_cycle:8:2}0000.coupler.res" ]]; then + if [[ -f "${COMIN_ATMOS_RESTART_PREV}/${model_atmos_start_date_current_cycle:0:8}.${model_atmos_start_date_current_cycle:8:2}0000.coupler.res" ]]; then warm_start=".true." fi @@ -24,7 +24,10 @@ UFS_det(){ # Since warm start is false, we cannot do IAU DOIAU="NO" IAU_OFFSET=0 - model_start_date_current_cycle=${current_cycle} + model_atmos_start_date_current_cycle=${current_cycle} + model_ice_start_date_current_cycle=${current_cycle} + model_med_start_date_current_cycle=${current_cycle} + model_ocean_start_date_current_cycle=${current_cycle} # It is still possible that a restart is available from a previous forecast attempt # So we have to continue checking for restarts diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index 58755d41d9..d4a1432701 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -32,7 +32,7 @@ FV3_postdet() { restart_date="${RERUN_DATE}" restart_dir="${DATArestart}/FV3_RESTART" else # "${RERUN}" == "NO" - restart_date="${model_start_date_current_cycle}" + restart_date="${model_atmos_start_date_current_cycle}" restart_dir="${COMIN_ATMOS_RESTART_PREV}" fi @@ -131,7 +131,7 @@ FV3_postdet() { else local model_start_time="${current_cycle}" fi - local model_current_time="${model_start_date_current_cycle}" + local model_current_time="${model_atmos_start_date_current_cycle}" rm -f "${DATA}/INPUT/coupler.res" cat >> "${DATA}/INPUT/coupler.res" << EOF 3 (Calendar: no_calendar=0, thirty_day_months=1, julian=2, gregorian=3, noleap=4) @@ -291,7 +291,7 @@ FV3_out() { # Copy restarts in the assimilation window for RUN=gdas|enkfgdas|enkfgfs if [[ "${RUN}" =~ "gdas" || "${RUN}" == "enkfgfs" ]]; then - restart_date="${model_start_date_next_cycle}" + restart_date="${model_atmos_start_date_next_cycle}" while (( restart_date <= forecast_end_cycle )); do restart_dates+=("${restart_date:0:8}.${restart_date:8:2}0000") restart_date=$(date --utc -d "${restart_date:0:8} ${restart_date:8:2} + ${restart_interval} hours" +%Y%m%d%H) @@ -334,7 +334,7 @@ WW3_postdet() { restart_date="${RERUN_DATE}" restart_dir="${DATArestart}/WW3_RESTART" else - restart_date="${model_start_date_current_cycle}" + restart_date="${model_wave_start_date_current_cycle}" restart_dir="${COMIN_WAVE_RESTART_PREV}" fi echo "Copying WW3 restarts for 'RUN=${RUN}' at '${restart_date}' from '${restart_dir}'" @@ -433,7 +433,7 @@ MOM6_postdet() { restart_date="${RERUN_DATE}" else # "${RERUN}" == "NO" restart_dir="${COMIN_OCEAN_RESTART_PREV}" - restart_date="${model_start_date_current_cycle}" + restart_date="${model_ocean_start_date_current_cycle}" fi # Copy MOM6 ICs @@ -563,7 +563,7 @@ MOM6_out() { # Copy restarts for the next cycle for RUN=gdas|enkfgdas|enkfgfs if [[ "${RUN}" =~ "gdas" || "${RUN}" == "enkfgfs" ]]; then local restart_date - restart_date="${model_start_date_next_cycle}" + restart_date="${model_ocean_start_date_next_cycle}" echo "Copying MOM6 restarts for 'RUN=${RUN}' at ${restart_date}" for mom6_restart_file in "${mom6_restart_files[@]}"; do restart_file="${restart_date:0:8}.${restart_date:8:2}0000.${mom6_restart_file}" @@ -583,7 +583,7 @@ CICE_postdet() { seconds=$(to_seconds "${restart_date:8:2}0000") # convert HHMMSS to seconds cice_restart_file="${DATArestart}/CICE_RESTART/cice_model.res.${restart_date:0:4}-${restart_date:4:2}-${restart_date:6:2}-${seconds}.nc" else # "${RERUN}" == "NO" - restart_date="${model_start_date_current_cycle}" + restart_date="${model_ice_start_date_current_cycle}" cice_restart_file="${COMIN_ICE_RESTART_PREV}/${restart_date:0:8}.${restart_date:8:2}0000.cice_model.res.nc" if [[ "${DO_JEDIOCNVAR:-NO}" == "YES" ]]; then cice_restart_file="${COMIN_ICE_ANALYSIS}/${restart_date:0:8}.${restart_date:8:2}0000.cice_model_anl.res.nc" @@ -597,8 +597,8 @@ CICE_postdet() { # Link iceh_ic file to COM. This is the initial condition file from CICE (f000) # TODO: Is this file needed in COM? Is this going to be used for generating any products? local vdate seconds vdatestr fhr fhr3 interval last_fhr - seconds=$(to_seconds "${model_start_date_current_cycle:8:2}0000") # convert HHMMSS to seconds - vdatestr="${model_start_date_current_cycle:0:4}-${model_start_date_current_cycle:4:2}-${model_start_date_current_cycle:6:2}-${seconds}" + seconds=$(to_seconds "${model_ice_start_date_current_cycle:8:2}0000") # convert HHMMSS to seconds + vdatestr="${model_ice_start_date_current_cycle:0:4}-${model_ice_start_date_current_cycle:4:2}-${model_ice_start_date_current_cycle:6:2}-${seconds}" ${NLN} "${COMOUT_ICE_HISTORY}/${RUN}.ice.t${cyc}z.ic.nc" "${DATA}/CICE_OUTPUT/iceh_ic.${vdatestr}.nc" # Link CICE forecast output files from DATA/CICE_OUTPUT to COM @@ -659,7 +659,7 @@ CICE_out() { # Copy restarts for next cycle for RUN=gdas|enkfgdas|enkfgfs if [[ "${RUN}" =~ "gdas" || "${RUN}" == "enkfgfs" ]]; then local restart_date - restart_date="${model_start_date_next_cycle}" + restart_date="${model_ice_start_date_next_cycle}" echo "Copying CICE restarts for 'RUN=${RUN}' at ${restart_date}" seconds=$(to_seconds "${restart_date:8:2}0000") # convert HHMMSS to seconds source_file="cice_model.res.${restart_date:0:4}-${restart_date:4:2}-${restart_date:6:2}-${seconds}.nc" @@ -747,7 +747,7 @@ CMEPS_postdet() { seconds=$(to_seconds "${restart_date:8:2}0000") # convert HHMMSS to seconds cmeps_restart_file="${DATArestart}/CMEPS_RESTART/ufs.cpld.cpl.r.${restart_date:0:4}-${restart_date:4:2}-${restart_date:6:2}-${seconds}.nc" else # "${RERUN}" == "NO" - restart_date="${model_start_date_current_cycle}" + restart_date="${model_med_start_date_current_cycle}" cmeps_restart_file="${COMIN_MED_RESTART_PREV}/${restart_date:0:8}.${restart_date:8:2}0000.ufs.cpld.cpl.r.nc" fi @@ -794,7 +794,7 @@ CMEPS_out() { # Copy restarts for the next cycle to COM for RUN=gdas|enkfgdas|enkfgfs if [[ "${RUN}" =~ "gdas" || "${RUN}" == "enkfgfs" ]]; then local restart_date - restart_date="${model_start_date_next_cycle}" + restart_date="${model_med_start_date_next_cycle}" echo "Copying mediator restarts for 'RUN=${RUN}' at ${restart_date}" seconds=$(to_seconds "${restart_date:8:2}"0000) source_file="ufs.cpld.cpl.r.${restart_date:0:4}-${restart_date:4:2}-${restart_date:6:2}-${seconds}.nc" diff --git a/ush/forecast_predet.sh b/ush/forecast_predet.sh index d7c04ea699..4b81a0d270 100755 --- a/ush/forecast_predet.sh +++ b/ush/forecast_predet.sh @@ -91,16 +91,30 @@ common_predet(){ # Define model start date for current_cycle and next_cycle as the time the forecast will start if [[ "${DOIAU:-NO}" == "YES" ]]; then - model_start_date_current_cycle="${current_cycle_begin}" + if [[ "${MODE}" = "cycled" && "${SDATE}" = "${PDY}${cyc}" && ${EXP_WARM_START} = ".false." ]] || [[ "${MODE}" = "forecast-only" && ${EXP_WARM_START} = ".false." ]] ; then + model_start_date_current_cycle="${current_cycle}" + else + model_start_date_current_cycle="${current_cycle_begin}" + fi model_start_date_next_cycle="${next_cycle_begin}" else if [[ "${REPLAY_ICS:-NO}" == "YES" ]]; then - model_start_date_current_cycle=${current_cycle_end} + model_start_date_current_cycle="${current_cycle_end}" else - model_start_date_current_cycle=${current_cycle} + model_start_date_current_cycle="${current_cycle}" fi - model_start_date_next_cycle=${next_cycle} + model_start_date_next_cycle="${next_cycle}" fi + # Define ice/mediator/ocean/wave current_cycle and next_cycle + model_atmos_start_date_current_cycle="${model_start_date_current_cycle}" + model_atmos_start_date_next_cycle="${model_start_date_next_cycle}" + model_ice_start_date_current_cycle="${model_start_date_current_cycle}" + model_ice_start_date_next_cycle="${model_start_date_next_cycle}" + model_med_start_date_current_cycle="${model_start_date_current_cycle}" + model_med_start_date_next_cycle="${model_start_date_next_cycle}" + model_ocean_start_date_current_cycle="${model_start_date_current_cycle}" + model_ocean_start_date_next_cycle="${model_start_date_next_cycle}" + model_wave_start_date_current_cycle="${current_cycle}" FHMIN=${FHMIN:-0} FHMAX=${FHMAX:-9}