Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to use GEFS replay ICs #2559

Merged
merged 100 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
65f9449
running with replay ICs
NeilBarton-NOAA Apr 24, 2024
36316e1
update gdas app hash and turn on C48mx500_3DVarAOWCDA test on hera
JessicaMeixner-NOAA Apr 25, 2024
06dae2f
Bug fix for #2528 from aerorahul
JessicaMeixner-NOAA Apr 25, 2024
2cdc9aa
add additional update from before
JessicaMeixner-NOAA Apr 26, 2024
1cfbe24
remove line that made things "work" but for the wrong reasons
JessicaMeixner-NOAA Apr 26, 2024
2f09626
wave updates
NeilBarton-NOAA Apr 26, 2024
aa9862f
Merge remote-tracking branch 'origin/replay_ics' into SFS_C96X100
NeilBarton-NOAA Apr 26, 2024
e9952b4
Merge remote-tracking branch 'origin/develop' into replay_ics
NeilBarton-NOAA Apr 26, 2024
9b5fe8b
small updates for forecast_postdet.sh
NeilBarton-NOAA Apr 26, 2024
b223067
Merge remote-tracking branch 'origin/replay_ics' into SFS_C96X100
NeilBarton-NOAA Apr 26, 2024
1ba3cc1
updates to run with 3 instead of 4 mom restarts
JessicaMeixner-NOAA Apr 29, 2024
caf09f6
Merge remote-tracking branch 'EMC/develop' into feature/c384wcda
JessicaMeixner-NOAA Apr 29, 2024
a9266f5
update CICE restart copying
JessicaMeixner-NOAA Apr 29, 2024
8e11642
updates for replay ICS after merge of restart cap
NeilBarton-NOAA Apr 30, 2024
cee7a65
Merge remote-tracking branch 'origin/develop' into replay_ics
NeilBarton-NOAA Apr 30, 2024
70abb0c
Merge remote-tracking branch 'origin/replay_ics' into SFS_C96X100
NeilBarton-NOAA Apr 30, 2024
31b9481
Merge remote-tracking branch 'EMC/develop' into feature/c384wcda
JessicaMeixner-NOAA Apr 30, 2024
a67d1b6
update gdas app hash
JessicaMeixner-NOAA Apr 30, 2024
1ffd164
update gdas
JessicaMeixner-NOAA May 1, 2024
eb82d40
updates for GFS CI
NeilBarton-NOAA May 1, 2024
79046c1
addition for GFS test
NeilBarton-NOAA May 1, 2024
080cc9f
fixes before PR
NeilBarton-NOAA May 1, 2024
9e141ea
Merge remote-tracking branch 'origin/replay_ics' into SFS_C96X100
NeilBarton-NOAA May 1, 2024
d709db5
Merge branch 'NOAA-EMC:develop' into feature/c384wcda
JessicaMeixner-NOAA May 1, 2024
71f89d7
Update scripts/exglobal_stage_ic.sh
NeilBarton-NOAA May 1, 2024
8878810
addressing PR comments
NeilBarton-NOAA May 1, 2024
2fbcc06
edits bugs stage_ics
NeilBarton-NOAA May 1, 2024
8e65208
Merge remote-tracking branch 'origin/replay_ics' into SFS_C96X100
NeilBarton-NOAA May 1, 2024
73ab4d4
Merge branch 'NOAA-EMC:develop' into feature/c384wcda
JessicaMeixner-NOAA May 2, 2024
9588c9c
add additional archive switch for ocean/ice DA files for if JEDIOCN i…
JessicaMeixner-NOAA May 2, 2024
1f187e0
Merge remote-tracking branch 'refs/remotes/origin/feature/c384wcda' i…
JessicaMeixner-NOAA May 2, 2024
71022f6
tab to spaces
JessicaMeixner-NOAA May 2, 2024
8cc51d2
remove trailing white space
NeilBarton-NOAA May 3, 2024
6d2c2de
add COPY_FINAL_RESTARTS flag to skip copying restarts at the end
JessicaMeixner-NOAA May 3, 2024
8e82ffd
saving work with NEXTCYC date, likely will use different solution
JessicaMeixner-NOAA May 3, 2024
655a320
updating logic for DOIAU related date changes in fewer places
JessicaMeixner-NOAA May 3, 2024
a2a7fc0
create two new variables that define the start time
JessicaMeixner-NOAA May 3, 2024
ffd4416
Update ush/forecast_predet.sh
JessicaMeixner-NOAA May 6, 2024
ac79c26
Merge remote-tracking branch 'EMC/develop' into feature/c384wcda
JessicaMeixner-NOAA May 6, 2024
8b0b99e
use more descriptive variable name sdate -> model start date
JessicaMeixner-NOAA May 6, 2024
9a8f481
update cice output ic link
JessicaMeixner-NOAA May 6, 2024
290870c
update remove data command - suggestion from Rahul
JessicaMeixner-NOAA May 6, 2024
9ec6345
Update ush/forecast_predet.sh
JessicaMeixner-NOAA May 7, 2024
ccd0b3f
add new parm variable for gefs
JessicaMeixner-NOAA May 7, 2024
fe26095
Merge remote-tracking branch 'EMC/develop' into feature/c384wcda
JessicaMeixner-NOAA May 7, 2024
64dc36a
Merge remote-tracking branch 'EMC/develop' into feature/c384wcda
JessicaMeixner-NOAA May 8, 2024
f1fa27e
updates for 1 degree runs
NeilBarton-NOAA May 8, 2024
b02dd1b
Merge remote-tracking branch 'remotes/JessicaMeixner-NOAA/feature/c38…
NeilBarton-NOAA May 8, 2024
3283d21
edits to stage ICs that start at the end of the update window
NeilBarton-NOAA May 8, 2024
35b2c08
replay ICS with merge
NeilBarton-NOAA May 9, 2024
b1a46a3
get headers in ww3 post output
NeilBarton-NOAA May 9, 2024
b9555b3
updates for pycodestyle
NeilBarton-NOAA May 9, 2024
29cdb5f
more pynorm fixes
NeilBarton-NOAA May 9, 2024
90df2fa
Merge remote-tracking branch 'origin/develop' into SFS_C96X100
NeilBarton-NOAA May 10, 2024
10af079
fix script errors
NeilBarton-NOAA May 10, 2024
61a6121
Merge remote-tracking branch 'origin/SFS_C96X100' into replay_ics
NeilBarton-NOAA May 10, 2024
b6e2114
adding back MOM override option for merge # Please enter the commit m…
NeilBarton-NOAA May 10, 2024
482670a
adding new option to GFS config
NeilBarton-NOAA May 10, 2024
31b2333
Merge remote-tracking branch 'origin/SFS_C96X100' into replay_ics
NeilBarton-NOAA May 13, 2024
acbef7d
remove CDATE
NeilBarton-NOAA May 14, 2024
d220479
Update workflow/rocoto/gefs_tasks.py
NeilBarton-NOAA May 14, 2024
3b8f813
Update workflow/rocoto/gefs_tasks.py
NeilBarton-NOAA May 14, 2024
c3f98c8
Merge branch 'develop' into replay_ics
NeilBarton-NOAA May 14, 2024
5e52498
dtg_prefix
NeilBarton-NOAA May 15, 2024
97e40ff
change variable name for IAU
NeilBarton-NOAA May 17, 2024
19147e0
Merge branch 'NOAA-EMC:develop' into replay_ics
NeilBarton-NOAA May 17, 2024
c6f86ea
fixes for stage_ic
NeilBarton-NOAA May 17, 2024
5cc44b8
Merge branch 'replay_ics' of https://github.com/NeilBarton-NOAA/globa…
NeilBarton-NOAA May 17, 2024
8924e87
Update parm/config/gefs/config.fcst
NeilBarton-NOAA May 24, 2024
56a80e2
Update scripts/exglobal_stage_ic.sh
NeilBarton-NOAA May 24, 2024
a541e2b
Update ush/forecast_postdet.sh
NeilBarton-NOAA May 24, 2024
adbecb5
Update ush/forecast_predet.sh
NeilBarton-NOAA May 24, 2024
26e8796
Update ush/forecast_postdet.sh
NeilBarton-NOAA May 24, 2024
8952916
wip for repay ics
aerorahul May 25, 2024
11833d2
Merge branch 'develop' into feature/replay-1
aerorahul May 28, 2024
c420dd0
Merge remote-tracking branch 'origin/develop' into replay_ics
NeilBarton-NOAA May 28, 2024
079f1eb
replay
aerorahul May 29, 2024
a5cf1f7
replay for control member
aerorahul May 29, 2024
580d015
FHROT is half_window
aerorahul May 29, 2024
1675627
correct comment
aerorahul May 29, 2024
59d2411
replay w/ cold start ics
aerorahul May 29, 2024
d84fcf3
Merge remote-tracking branch 'origin/develop' into replay_ics
NeilBarton-NOAA May 30, 2024
71dafbb
updates for use of coupler.res and merged with dev
NeilBarton-NOAA May 30, 2024
d2e1d68
Merge branch 'develop' into feature/replay-1
aerorahul May 31, 2024
4f5b1d7
update for COMIN/COMOUT changes
aerorahul May 31, 2024
3b229f3
fix wave stage ic issue
NeilBarton-NOAA Jun 3, 2024
1cafcf9
Apply suggestions from code review
aerorahul Jun 4, 2024
20facbd
Merge branch 'develop' into feature/replay-1
aerorahul Jun 4, 2024
68dda32
Merge branch 'develop' into feature/replay-1
aerorahul Jun 4, 2024
6ea65d4
Merge branch 'develop' into replay_ics
aerorahul Jun 4, 2024
5e208cd
Merge branch 'feature/replay-1' into patch/2559-replay1
aerorahul Jun 4, 2024
b020115
Merge branch 'NOAA-EMC:develop' into replay_ics
NeilBarton-NOAA Jun 6, 2024
d528778
Merge pull request #3 from aerorahul/patch/2559-replay1
NeilBarton-NOAA Jun 7, 2024
0f61a64
Rahul's suggested changes
NeilBarton-NOAA Jun 8, 2024
52ad4ae
remove shell errors
NeilBarton-NOAA Jun 8, 2024
9b235c7
update for 3Dvar atmos CI
NeilBarton-NOAA Jun 10, 2024
0024137
Merge branch 'replay_ics' of https://github.com/NeilBarton-NOAA/globa…
NeilBarton-NOAA Jun 10, 2024
f0410de
fix accidental delete
NeilBarton-NOAA Jun 10, 2024
b0571d1
Merge branch 'develop' into replay_ics
WalterKolczynski-NOAA Jun 11, 2024
7a38397
make sure OFFSET is defined
NeilBarton-NOAA Jun 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions parm/config/gefs/config.base
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,9 @@ export MEMDIR="mem${ENSMEM}"

# initialize ocean ensemble members with perturbations
# if true, only occurs for members greater than zero
export USE_REPLAY_ICS=@USE_REPLAY_ICS@
export USE_OCN_PERTURB_FILES=@USE_OCN_PERTURB_FILES@
export USE_ATM_PERTURB_FILES=@USE_ATM_PERTURB_FILES@

export DOIAU="NO" # While we are not doing IAU, we may want to warm start w/ IAU in the future
# Check if cycle is cold starting
Expand Down
3 changes: 3 additions & 0 deletions parm/config/gefs/config.fcst
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ else
export io_layout="1,1"
fi

if [[ ${USE_REPLAY_ICS} == "true" ]]; then
export reforecast="YES"
fi
# Remember config.efcs will over-ride these values for ensemble forecasts
# if these variables are re-defined there.
# Otherwise, the ensemble forecast will inherit from config.fcst
Expand Down
2 changes: 2 additions & 0 deletions parm/config/gefs/config.stage_ic
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ case "${CASE}" in
export CPL_ICEIC=""
export CPL_OCNIC=""
export CPL_WAVIC=""
export CPL_MEDIC=""
;;
"C48")
export CPL_ATMIC="gefs_test"
export CPL_ICEIC="gefs_test"
export CPL_OCNIC="gefs_test"
export CPL_WAVIC="gefs_test"
export CPL_MEDIC="gefs_test"
;;
*)
echo "FATAL ERROR Unrecognized resolution: ${CASE}"
Expand Down
6 changes: 5 additions & 1 deletion parm/config/gefs/config.wave
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ export WAVEWND_FID=
# The start time reflects the number of hindcast hours prior to the cycle initial time
export FHMAX_WAV=${FHMAX_GFS}
export WAVHINDH=0
export FHMIN_WAV=0
if [[ "${USE_REPLAY_ICS:-"false"}" == "true" ]]; then
export FHMIN_WAV=3
else
export FHMIN_WAV=0
fi
export FHOUT_WAV=3
export FHMAX_HF_WAV=120
export FHOUT_HF_WAV=1
Expand Down
2 changes: 2 additions & 0 deletions parm/config/gefs/yaml/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ base:
DO_MERGENSST: "NO"
KEEPDATA: "NO"
FHMAX_GFS: 120
USE_REPLAY_ICS: "false"
USE_ATM_PERTURB_FILES: "false"
USE_OCN_PERTURB_FILES: "false"

5 changes: 3 additions & 2 deletions scripts/exgfs_wave_post_pnt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,9 @@ source "${USHgfs}/preamble.sh"
-e "s/FORMAT/F/g" \
ww3_outp_spec.inp.tmpl > ww3_outp.inp

${NLN} mod_def.$waveuoutpGRD mod_def.ww3
HMS="${cyc}0000"
ln -s mod_def.$waveuoutpGRD mod_def.ww3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please retain the use of ${NLN}

HH=$(date --utc -d "${PDY:0:8} ${cyc} + ${FHMIN_WAV} hours" +%H)
HMS="${HH}0000"
if [[ -f "${COM_WAVE_HISTORY}/${WAV_MOD_TAG}.out_pnt.${waveuoutpGRD}.${PDY}.${HMS}" ]]; then
${NLN} "${COM_WAVE_HISTORY}/${WAV_MOD_TAG}.out_pnt.${waveuoutpGRD}.${PDY}.${HMS}" \
"./out_pnt.${waveuoutpGRD}"
Expand Down
44 changes: 33 additions & 11 deletions scripts/exglobal_stage_ic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,25 @@ for MEMDIR in "${MEMDIR_ARRAY[@]}"; do
# Stage the FV3 restarts to ROTDIR (warm start)
RUN=${rCDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl COM_ATMOS_RESTART_PREV:COM_ATMOS_RESTART_TMPL
[[ ! -d "${COM_ATMOS_RESTART_PREV}" ]] && mkdir -p "${COM_ATMOS_RESTART_PREV}"
for ftype in coupler.res fv_core.res.nc; do
src="${BASE_CPLIC}/${CPL_ATMIC:-}/${PDY}${cyc}/${MEMDIR}/atmos/${PDY}.${cyc}0000.${ftype}"
tgt="${COM_ATMOS_RESTART_PREV}/${PDY}.${cyc}0000.${ftype}"
${NCP} "${src}" "${tgt}"
rc=$?
((rc != 0)) && error_message "${src}" "${tgt}" "${rc}"
err=$((err + rc))
done

# fv_core.res.nc file
src="${BASE_CPLIC}/${CPL_ATMIC:-}/${PDY}${cyc}/${MEMDIR}/atmos/${PDY}.${cyc}0000.fv_core.res.nc"
tgt="${COM_ATMOS_RESTART_PREV}/${PDY}.${cyc}0000.fv_core.res.nc"
${NCP} "${src}" "${tgt}"
rc=$?
((rc != 0)) && error_message "${src}" "${tgt}" "${rc}"
err=$((err + rc))

# coupler.res file
if [[ "${USE_REPLAY_ICS:-"false"}" == "false" ]]; then
src="${BASE_CPLIC}/${CPL_ATMIC:-}/${PDY}${cyc}/${MEMDIR}/atmos/${PDY}.${cyc}0000.coupler.res"
tgt="${COM_ATMOS_RESTART_PREV}/${PDY}.${cyc}0000.coupler.res"
${NCP} "${src}" "${tgt}"
rc=$?
((rc != 0)) && error_message "${src}" "${tgt}" "${rc}"
err=$((err + rc))
fi

NeilBarton-NOAA marked this conversation as resolved.
Show resolved Hide resolved
for ftype in ca_data fv_core.res fv_srf_wnd.res fv_tracer.res phy_data sfc_data; do
for ((tt = 1; tt <= 6; tt++)); do
src="${BASE_CPLIC}/${CPL_ATMIC:-}/${PDY}${cyc}/${MEMDIR}/atmos/${PDY}.${cyc}0000.${ftype}.tile${tt}.nc"
Expand Down Expand Up @@ -72,6 +83,17 @@ for MEMDIR in "${MEMDIR_ARRAY[@]}"; do
done
done
fi

# Atmosphere Perturbation Files (usually used with replay ICS)
# Extra zero on MEMDIR ensure we have a number even if the string is empty
if (( 0${MEMDIR:3} > 0 )) && [[ "${USE_ATM_PERTURB_FILES:-false}" == "true" ]]; then
src="${BASE_CPLIC}/${CPL_OCNIC:-}/${PDY}${cyc}/${MEMDIR}/atmos/${PDY}.${cyc}0000.fv3_perturbation.nc"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are atmosphere perturbations coming from the ocean IC directory? Doesn't matter right now since they are identical, but this should use CPL_ATMIC.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error in coping and pasting. Updated

tgt="${COM_ATMOS_RESTART_PREV}/${PDY}.${cyc}0000.fv3_perturbation.nc"
${NCP} "${src}" "${tgt}"
rc=${?}
((rc != 0)) && error_message "${src}" "${tgt}" "${rc}"
err=$((err + rc))
fi

# Stage ocean initial conditions to ROTDIR (warm start)
if [[ "${DO_OCN:-}" = "YES" ]]; then
Expand Down Expand Up @@ -107,8 +129,8 @@ for MEMDIR in "${MEMDIR_ARRAY[@]}"; do
# Ocean Perturbation Files
# Extra zero on MEMDIR ensure we have a number even if the string is empty
if (( 0${MEMDIR:3} > 0 )) && [[ "${USE_OCN_PERTURB_FILES:-false}" == "true" ]]; then
src="${BASE_CPLIC}/${CPL_OCNIC:-}/${PDY}${cyc}/${MEMDIR}/ocean/${PDY}.${cyc}0000.mom6_increment.nc"
tgt="${COM_OCEAN_RESTART_PREV}/${PDY}.${cyc}0000.mom6_increment.nc"
src="${BASE_CPLIC}/${CPL_OCNIC:-}/${PDY}${cyc}/${MEMDIR}/ocean/${PDY}.${cyc}0000.mom6_perturbation.nc"
tgt="${COM_OCEAN_RESTART_PREV}/${PDY}.${cyc}0000.mom6_perturbation.nc"
${NCP} "${src}" "${tgt}"
rc=${?}
((rc != 0)) && error_message "${src}" "${tgt}" "${rc}"
Expand Down Expand Up @@ -149,7 +171,7 @@ for MEMDIR in "${MEMDIR_ARRAY[@]}"; do

# Stage the WW3 initial conditions to ROTDIR (warm start; TODO: these should be placed in $RUN.$gPDY/$gcyc)
if [[ "${DO_WAVE:-}" = "YES" ]]; then
YMD=${PDY} HH=${cyc} declare_from_tmpl COM_WAVE_RESTART
YMD=${gPDY} HH=${gcyc} declare_from_tmpl COM_WAVE_RESTART
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is now going to use the previous cycle's date, the variable name should be changed to COM_WAVE_RESTART_PREV to be consistent.

Also, I believe this will break the existing GEFS test.

[[ ! -d "${COM_WAVE_RESTART}" ]] && mkdir -p "${COM_WAVE_RESTART}"
for grdID in ${waveGRD}; do # TODO: check if this is a bash array; if so adjust
src="${BASE_CPLIC}/${CPL_WAVIC:-}/${PDY}${cyc}/${MEMDIR}/wave/${PDY}.${cyc}0000.restart.${grdID}"
Expand Down
5 changes: 4 additions & 1 deletion ush/forecast_det.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ 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 [[ "${DOIAU:-}" == "YES" ]]; then
USE_REPLAY_ICS=${USE_REPLAY_ICS:-'false'}
if [[ "${USE_REPLAY_ICS}" == "true" ]]; then
warm_start=".true."
elif [[ "${DOIAU:-}" == "YES" ]]; then
if [[ -f "${COM_ATMOS_RESTART_PREV}/${current_cycle_begin:0:8}.${current_cycle_begin:8:2}0000.coupler.res" ]]; then
warm_start=".true."
fi
Expand Down
27 changes: 24 additions & 3 deletions ush/forecast_postdet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ FV3_postdet() {

# Create an array of FV3 restart files
local fv3_restart_files tile_files fv3_restart_file restart_file
fv3_restart_files=(coupler.res fv_core.res.nc)
fv3_restart_files=(fv_core.res.nc)
if [[ "${USE_REPLAY_ICS}" == "false" ]]; then
fv_restart_files+=(coupler.res)
fi
tile_files=(fv_core.res fv_srf_wnd.res fv_tracer.res phy_data sfc_data ca_data)
local nn tt
for (( nn = 1; nn <= ntiles; nn++ )); do
Expand Down Expand Up @@ -97,16 +100,28 @@ FV3_postdet() {
local model_start_time="${current_cycle}"
local model_current_time="${current_cycle}"
fi
if [[ "${USE_REPLAY_ICS}" != "true" ]]; then
rm -f "${DATA}/INPUT/coupler.res"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please indent this block (except the EOF)

cat >> "${DATA}/INPUT/coupler.res" << EOF
3 (Calendar: no_calendar=0, thirty_day_months=1, julian=2, gregorian=3, noleap=4)
${model_start_time:0:4} ${model_start_time:4:2} ${model_start_time:6:2} ${model_start_time:8:2} 0 0 Model start time: year, month, day, hour, minute, second
${model_current_time:0:4} ${model_current_time:4:2} ${model_current_time:6:2} ${model_current_time:8:2} 0 0 Current model time: year, month, day, hour, minute, second
EOF
fi

# Create a array of increment files
local inc_files inc_file iaufhrs iaufhr
if [[ "${DOIAU}" == "YES" ]]; then
if [[ "${USE_REPLAY_ICS}" == "true" ]]; then
if (( MEMBER > 0 )) && [[ "${USE_ATM_PERTURB_FILES:-false}" == "true" ]]; then
increment_file="${COM_ATMOS_RESTART_PREV}/${current_cycle:0:8}.${current_cycle:8:2}0000.fv3_perturbation.nc"
${NCP} "${increment_file}" "${DATA}/INPUT/fv3_perturbation.nc" \
|| ( echo "FATAL ERROR: Unable to copy FV3 perturbation file, ABORT!"; exit 1 )
read_increment=".true."
res_latlon_dynamics="fv3_perturbation.nc"
fi
elif [[ "${RUN}" == "gefs" ]]; then
inc_files=()
elif [[ "${DOIAU}" == "YES" ]]; then
# create an array of inc_files for each IAU hour
IFS=',' read -ra iaufhrs <<< "${IAUFHRS}"
inc_files=()
Expand Down Expand Up @@ -407,7 +422,7 @@ MOM6_postdet() {
# TODO if [[ $RUN} == "gefs" ]] block maybe be needed
# to ensure it does not interfere with the GFS when ensemble is updated in the GFS
if (( MEMBER > 0 )) && [[ "${ODA_INCUPD:-False}" == "True" ]]; then
${NCP} "${COM_OCEAN_RESTART_PREV}/${restart_date:0:8}.${restart_date:0:8}0000.mom6_increment.nc" "${DATA}/INPUT/mom6_increment.nc" \
${NCP} "${COM_OCEAN_RESTART_PREV}/${restart_date:0:8}.${restart_date:8:2}0000.mom6_perturbation.nc" "${DATA}/INPUT/mom6_increment.nc" \
|| ( echo "FATAL ERROR: Unable to copy ensemble MOM6 increment, ABORT!"; exit 1 )
fi
fi # if [[ "${RERUN}" == "NO" ]]; then
Expand Down Expand Up @@ -490,6 +505,7 @@ MOM6_out() {
esac

# Copy MOM6 restarts at the end of the forecast segment to COM for RUN=gfs|gefs
if [[ "${USE_REPLAY_ICS}" != "true" ]]; then
local restart_file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please indent this block.

if [[ "${RUN}" == "gfs" || "${RUN}" == "gefs" ]]; then
echo "Copying MOM6 restarts for 'RUN=${RUN}' at ${forecast_end_cycle}"
Expand All @@ -499,6 +515,7 @@ MOM6_out() {
"${COM_OCEAN_RESTART}/${restart_file}"
done
fi
fi

# Copy restarts at the beginning/middle of the next assimilation cycle to COM for RUN=gdas|enkfgdas|enkfgfs
if [[ "${RUN}" =~ "gdas" || "${RUN}" == "enkfgfs" ]]; then
Expand Down Expand Up @@ -590,6 +607,7 @@ CICE_out() {
${NCP} "${DATA}/ice_in" "${COM_CONF}/ufs.ice_in"

# Copy CICE restarts at the end of the forecast segment to COM for RUN=gfs|gefs
if [[ "${USE_REPLAY_ICS}" != "true" ]]; then
local seconds source_file target_file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please indent this block.

if [[ "${RUN}" == "gfs" || "${RUN}" == "gefs" ]]; then
echo "Copying CICE restarts for 'RUN=${RUN}' at ${forecast_end_cycle}"
Expand All @@ -599,6 +617,7 @@ CICE_out() {
${NCP} "${DATArestart}/CICE_RESTART/${source_file}" \
"${COM_ICE_RESTART}/${target_file}"
fi
fi

# Copy restarts at the beginning/middle of the next assimilation cycle to COM for RUN=gdas|enkfgdas|enkfgfs
if [[ "${RUN}" =~ "gdas" || "${RUN}" == "enkfgfs" ]]; then
Expand Down Expand Up @@ -729,6 +748,7 @@ CMEPS_out() {
echo "SUB ${FUNCNAME[0]}: Copying output data for CMEPS mediator"

# Copy mediator restarts at the end of the forecast segment to COM for RUN=gfs|gefs
if [[ "${USE_REPLAY_ICS}" != "true" ]]; then
echo "Copying mediator restarts for 'RUN=${RUN}' at ${forecast_end_cycle}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please indent this block.

local seconds source_file target_file
seconds=$(to_seconds "${forecast_end_cycle:8:2}"0000)
Expand All @@ -740,6 +760,7 @@ CMEPS_out() {
else
echo "Mediator restart '${DATArestart}/CMEPS_RESTART/${source_file}' not found."
fi
fi

# Copy restarts at the beginning/middle of the next assimilation cycle to COM for RUN=gdas|enkfgdas|enkfgfs
if [[ "${RUN}" =~ "gdas" || "${RUN}" == "enkfgfs" ]]; then
Expand Down
6 changes: 5 additions & 1 deletion ush/parsing_model_configure_FV3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ local SMONTH=${model_start_date:4:2}
local SDAY=${model_start_date:6:2}
local SHOUR=${model_start_date:8:2}
# FHMAX
local FHROT=${IAU_FHROT:-0}
if [[ "${USE_REPLAY_ICS:-"false"}" == "true" ]]; then
local FHROT=3
else
local FHROT=${IAU_FHROT:-0}
fi
local DT_ATMOS=${DELTIM}
local RESTART_INTERVAL="${FV3_RESTART_FH[*]}"
# QUILTING
Expand Down
2 changes: 1 addition & 1 deletion ush/parsing_namelists_WW3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ WW3_namelists(){
fi
# Set time stamps for model start and output
# For special case when IAU is on but this is an initial half cycle
if [ $IAU_OFFSET = 0 ]; then
if [ ${IAU_OFFSET:-0} = 0 ]; then
ymdh_beg=$YMDH
else
ymdh_beg=$($NDATE -$WAVHINDH $YMDH)
Expand Down
30 changes: 20 additions & 10 deletions workflow/rocoto/gefs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,31 @@ def __init__(self, app_config: AppConfig, cdump: str) -> None:
super().__init__(app_config, cdump)

def stage_ic(self):

cpl_ic = self._configs['stage_ic']

deps = []

cpl_ic = self._configs['stage_ic']
deps = []
# Atm ICs
if self.app_config.do_atm:
prefix = f"{cpl_ic['BASE_CPLIC']}/{cpl_ic['CPL_ATMIC']}/@Y@m@d@H/mem000/atmos"
for file in ['gfs_ctrl.nc'] + \
[f'{datatype}_data.tile{tile}.nc'
for datatype in ['gfs', 'sfc']
for tile in range(1, self.n_tiles + 1)]:
data = f"{prefix}/{file}"
if self._base['EXP_WARM_START']:
for file in ['fv_core.res.nc'] + \
[f'{datatype}.tile{tile}.nc'
for datatype in ['ca_data', 'fv_core.res', 'fv_srf_wnd.res', 'fv_tracer.res', 'phy_data', 'sfc_data']
for tile in range(1, self.n_tiles + 1)]:
data = f"{prefix}/@Y@m@d.@H0000.{file}"
dep_dict = {'type': 'data', 'data': data}
deps.append(rocoto.add_dependency(dep_dict))
prefix = f"{cpl_ic['BASE_CPLIC']}/{cpl_ic['CPL_ATMIC']}/@Y@m@d@H/mem000/med"
data = f"{prefix}/@Y@m@d.@H0000.ufs.cpld.cpl.r.nc"
dep_dict = {'type': 'data', 'data': data}
deps.append(rocoto.add_dependency(dep_dict))
else:
for file in ['gfs_ctrl.nc'] + \
[f'{datatype}_data.tile{tile}.nc'
for datatype in ['gfs', 'sfc']
for tile in range(1, self.n_tiles + 1)]:
data = f"{prefix}/{file}"
dep_dict = {'type': 'data', 'data': data}
deps.append(rocoto.add_dependency(dep_dict))

# Ocean ICs
if self.app_config.do_ocean:
Expand Down
Loading