Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
1 change: 1 addition & 0 deletions fix/gsi/gsiparm.anl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ gsi_namelist="
/
&GRIDOPTS
fv3_regional=.true.,grid_ratio_fv3_regional=${grid_ratio_fv3},nvege_type=20,
fv3_io_layout_y=${n_iolayouty},
/
&BKGERR
vs=${bkgerr_vs},
Expand Down
27 changes: 23 additions & 4 deletions scripts/exregional_run_analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ else
fi
fi
# decide background type
if [ -r "${bkpath}/phy_data.nc" ]; then
if [ -r "${bkpath}/coupler.res" ]; then
BKTYPE=0 # warm start
else
BKTYPE=1 # cold start
Expand Down Expand Up @@ -318,6 +318,9 @@ fi
# radar_tten converting code.
#-----------------------------------------------------------------------

n_iolayouty=$(($IO_LAYOUT_Y-1))
list_iolayout=$(seq 0 $n_iolayouty)

ln_vrfy -snf ${fixgriddir}/fv3_akbk fv3_akbk
ln_vrfy -snf ${fixgriddir}/fv3_grid_spec fv3_grid_spec

Expand All @@ -331,9 +334,20 @@ if [ ${BKTYPE} -eq 1 ]; then # cold start uses background from INPUT

fv3lam_bg_type=1
else # cycle uses background from restart
ln_vrfy -snf ${bkpath}/fv_core.res.tile1.nc fv3_dynvars
ln_vrfy -snf ${bkpath}/fv_tracer.res.tile1.nc fv3_tracer
ln_vrfy -snf ${bkpath}/sfc_data.nc fv3_sfcdata
if [ "${IO_LAYOUT_Y}" == "1" ]; then
ln_vrfy -snf ${bkpath}/fv_core.res.tile1.nc fv3_dynvars
ln_vrfy -snf ${bkpath}/fv_tracer.res.tile1.nc fv3_tracer
ln_vrfy -snf ${bkpath}/sfc_data.nc fv3_sfcdata
else
for ii in ${list_iolayout}
do
iii=`printf %4.4i $ii`
ln_vrfy -snf ${bkpath}/fv_core.res.tile1.nc.${iii} fv3_dynvars.${iii}
ln_vrfy -snf ${bkpath}/fv_tracer.res.tile1.nc.${iii} fv3_tracer.${iii}
ln_vrfy -snf ${bkpath}/sfc_data.nc.${iii} fv3_sfcdata.${iii}
ln_vrfy -snf ${fixgriddir}/fv3_grid_spec.${iii} fv3_grid_spec.${iii}
done
fi
fv3lam_bg_type=0
fi

Expand Down Expand Up @@ -558,6 +572,11 @@ if [ ${gsi_type} == "OBSERVER" ]; then
ln -s ../../ensmean/observer_gsi/obs_input.* .
fi
fi
if [ ${BKTYPE} -eq 1 ]; then
n_iolayouty=1
else
n_iolayouty=$(($IO_LAYOUT_Y))
fi

. ${FIX_GSI}/gsiparm.anl.sh
cat << EOF > gsiparm.anl
Expand Down
31 changes: 24 additions & 7 deletions scripts/exregional_run_fcst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ of the current run directory (run_dir), where
..."

BKTYPE=1 # cold start using INPUT
if [ -r ${run_dir}/INPUT/fv_tracer.res.tile1.nc ]; then
if [ -r ${run_dir}/INPUT/coupler.res ] ; then
BKTYPE=0 # cycling using RESTART
fi
print_info_msg "$VERBOSE" "
Expand All @@ -353,18 +353,35 @@ cd_vrfy ${run_dir}/INPUT

relative_or_null=""

n_iolayouty=$(($IO_LAYOUT_Y-1))
list_iolayout=$(seq 0 $n_iolayouty)

if [ ${BKTYPE} -eq 1 ]; then
target="gfs_data.tile${TILE_RGNL}.halo${NH0}.nc"
else
target="fv_core.res.tile1.nc"
fi
symlink="gfs_data.nc"
if [ -f "${target}" ]; then
ln_vrfy -sf ${relative_or_null} $target $symlink
if [ -f "${target}.0000" ]; then
for ii in ${list_iolayout}
do
iii=`printf %4.4i $ii`
if [ -f "${target}.${iii}" ]; then
ln_vrfy -sf ${relative_or_null} $target.${iii} $symlink.${iii}
else
print_err_msg_exit "\
Cannot create symlink because target does not exist:
target = \"$target.$iii\""
fi
done
else
print_err_msg_exit "\
Cannot create symlink because target does not exist:
target = \"$target\""
if [ -f "${target}" ]; then
ln_vrfy -sf ${relative_or_null} $target $symlink
else
print_err_msg_exit "\
Cannot create symlink because target does not exist:
target = \"$target\""
fi
fi

if [ ${BKTYPE} -eq 1 ]; then
Expand All @@ -378,7 +395,7 @@ if [ ${BKTYPE} -eq 1 ]; then
target = \"$target\""
fi
else
if [ -f "sfc_data.nc" ]; then
if [ -f "sfc_data.nc.0000" ] || [ -f "sfc_data.nc" ]; then
print_info_msg "$VERBOSE" "
sfc_data.nc is available at INPUT directory"
else
Expand Down
34 changes: 32 additions & 2 deletions scripts/exregional_run_post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,11 @@ EOF
# stage the restart files for a long time.
#-----------------------------------------------------------------------
#
filelist="fv_core.res.nc fv_core.res.tile1.nc fv_srf_wnd.res.tile1.nc fv_tracer.res.tile1.nc phy_data.nc sfc_data.nc coupler.res"
filelist="fv_core.res.nc coupler.res"
filelistn="fv_core.res.tile1.nc fv_srf_wnd.res.tile1.nc fv_tracer.res.tile1.nc phy_data.nc sfc_data.nc"
n_iolayouty=$(($IO_LAYOUT_Y-1))
list_iolayout=$(seq 0 $n_iolayouty)

restart_prefix=${post_yyyy}${post_mm}${post_dd}.${post_hh}0000
if [ ! -r ${nwges_dir}/INPUT/gfs_ctrl.nc ]; then
cp_vrfy $run_dir/INPUT/gfs_ctrl.nc ${nwges_dir}/INPUT/gfs_ctrl.nc
Expand All @@ -221,6 +225,19 @@ if [ -r "$run_dir/RESTART/${restart_prefix}.coupler.res" ]; then
for file in ${filelist}; do
mv_vrfy $run_dir/RESTART/${restart_prefix}.${file} ${nwges_dir}/RESTART/${restart_prefix}.${file}
done
if [ "${IO_LAYOUT_Y}" == "1" ]; then
for file in ${filelistn}; do
mv_vrfy $run_dir/RESTART/${restart_prefix}.${file} ${nwges_dir}/RESTART/${restart_prefix}.${file}
done
else
for file in ${filelistn}; do
for ii in ${list_iolayout}
do
iii=`printf %4.4i $ii`
mv_vrfy $run_dir/RESTART/${restart_prefix}.${file}.${iii} ${nwges_dir}/RESTART/${restart_prefix}.${file}.${iii}
done
done
fi
echo " ${fhr} forecast from ${yyyymmdd}${hh} is ready " #> ${nwges_dir}/RESTART/restart_done_f${fhr}
else

Expand All @@ -239,8 +256,21 @@ else

if [ -r "$run_dir/RESTART/coupler.res" ] && [ ${fhr} -eq ${FCST_LEN_HRS_thiscycle} ] ; then
for file in ${filelist}; do
mv_vrfy $run_dir/RESTART/${file} ${nwges_dir}/RESTART/${restart_prefix}.${file}
mv_vrfy $run_dir/RESTART/${file} ${nwges_dir}/RESTART/${restart_prefix}.${file}
done
if [ "${IO_LAYOUT_Y}" == "1" ]; then
for file in ${filelistn}; do
mv_vrfy $run_dir/RESTART/${file} ${nwges_dir}/RESTART/${restart_prefix}.${file}
done
else
for file in ${filelistn}; do
for ii in ${list_iolayout}
do
iii=`printf %4.4i $ii`
mv_vrfy $run_dir/RESTART/${file}.${iii} ${nwges_dir}/RESTART/${restart_prefix}.${file}.${iii}
done
done
fi
echo " ${fhr} forecast from ${yyyymmdd}${hh} is ready " #> ${nwges_dir}/RESTART/restart_done_f${fhr}
else
echo "This forecast hour does not need to save restart: ${yyyymmdd}${hh}f${fhr}"
Expand Down
Loading