Skip to content

Commit

Permalink
Minor fix to recenter task (NOAA-EMC#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
chunhuazhou authored Jun 15, 2022
1 parent 9287dbb commit 4e83d65
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
5 changes: 1 addition & 4 deletions jobs/JREGIONAL_RUN_RECENTER
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,8 @@ the specified cycle.
CYCLE_TYPE=${CYCLE_TYPE:-prod}
if [ ${CYCLE_TYPE} == "spinup" ]; then
recenterdir=${CYCLE_DIR}/recenter/fcst_fv3lam_spinup/INPUT
controldir=${ENSCTRL_CYCLE_DIR}/fcst_fv3lam_spinup/INPUT
else
recenterdir=${CYCLE_DIR}/recenter/fcst_fv3lam/INPUT
controldir=${ENSCTRL_CYCLE_DIR}/fcst_fv3lam/INPUT
fi
rm -fr ${recenterdir}
mkdir_vrfy -p ${recenterdir}
Expand All @@ -86,8 +84,7 @@ mkdir_vrfy -p ${recenterdir}
#
$SCRIPTSDIR/exregional_run_recenter.sh \
cycle_type="${CYCLE_TYPE}" \
recenterdir="${recenterdir}" \
controldir="${controldir}" || \
recenterdir="${recenterdir}" || \
print_err_msg_exit "\
Call to ex-script corresponding to J-job \"${scrfunc_fn}\" failed."
#
Expand Down
20 changes: 13 additions & 7 deletions scripts/exregional_run_recenter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ specified cycle.
#
#-----------------------------------------------------------------------
#
valid_args=( "cycle_type" "recenterdir" "controldir" )
valid_args=( "cycle_type" "recenterdir" )
process_args valid_args "$@"
#
#-----------------------------------------------------------------------
Expand Down Expand Up @@ -203,14 +203,20 @@ cp_vrfy -f ./fv3sar_tile1_mem001_sfcvar fv3sar_tile1_sfcvar
#
# link the control member
#
dynvarfile_control=${controldir}/fv_core.res.tile1.nc
tracerfile_control=${controldir}/fv_tracer.res.tile1.nc
dynvarfile_control=${ENSCTRL_CYCLE_DIR}/fcst_fv3lam/INPUT/fv_core.res.tile1.nc
tracerfile_control=${ENSCTRL_CYCLE_DIR}/fcst_fv3lam/INPUT/fv_tracer.res.tile1.nc
dynvarfile_control_spinup=${ENSCTRL_CYCLE_DIR}/fcst_fv3lam_spinup/INPUT/fv_core.res.tile1.nc
tracerfile_control_spinup=${ENSCTRL_CYCLE_DIR}/fcst_fv3lam_spinup/INPUT/fv_tracer.res.tile1.nc
if [ -r "${dynvarfile_control}" ] && [ -r "${tracerfile_control}" ] ; then
ln -sf ${controldir}/fv_core.res.tile1.nc ./control_dynvar
ln -sf ${controldir}/fv_tracer.res.tile1.nc ./control_tracer
ln -sf ${controldir}/sfc_data.nc ./control_sfcvar
ln -sf ${ENSCTRL_CYCLE_DIR}/fcst_fv3lam/INPUT/fv_core.res.tile1.nc ./control_dynvar
ln -sf ${ENSCTRL_CYCLE_DIR}/fcst_fv3lam/INPUT/fv_tracer.res.tile1.nc ./control_tracer
ln -sf ${ENSCTRL_CYCLE_DIR}/fcst_fv3lam/INPUT/sfc_data.nc ./control_sfcvar
elif [ -r "${dynvarfile_control_spinup}" ] && [ -r "${tracerfile_control_spinup}" ] ; then
ln -sf ${ENSCTRL_CYCLE_DIR}/fcst_fv3lam_spinup/INPUT/fv_core.res.tile1.nc ./control_dynvar
ln -sf ${ENSCTRL_CYCLE_DIR}/fcst_fv3lam_spinup/INPUT/fv_tracer.res.tile1.nc ./control_tracer
ln -sf ${ENSCTRL_CYCLE_DIR}/fcst_fv3lam_spinup/INPUT/sfc_data.nc ./control_sfcvar
else
print_err_msg_exit "Error: cannot find background: ${dynvarfile_control}"
print_err_msg_exit "Error: cannot find background: ${dynvarfile_control} or ${dynvarfile_control_spinup}"
fi

#
Expand Down

0 comments on commit 4e83d65

Please sign in to comment.