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

GFS-UTILS update for build and ush scripts #1082

Merged
merged 8 commits into from
Oct 22, 2022
2 changes: 1 addition & 1 deletion gempak/ush/gempak_gfs_f00_gif.sh
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ if [ $SENDCOM = YES ]; then
export input=${COMOUT}/${hgttmp500dev}
export HEADER=YES
export OUTPATH=$DATA/gfs_500_hgt_tmp_nh_anl_${cyc}.tif
${UTILgfs}/ush/make_tif.sh
${USHgfs}/make_tif.sh
fi

msg=" GEMPAK_GIF ${fhr} hour completed normally"
Expand Down
2 changes: 1 addition & 1 deletion parm/config/config.gldas
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ echo "BEGIN: config.gldas"
export GLDASSH=$HOMEgfs/scripts/exgdas_atmos_gldas.sh
export gldas_spinup_hours=72
export CPCGAUGE=$DMPDIR
export FINDDATE=$HOMEgfs/util/ush/finddate.sh
export FINDDATE=$USHgfs/finddate.sh

echo "END: config.gldas"
2 changes: 1 addition & 1 deletion scripts/exgfs_atmos_fbwind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ fi
if test "$SENDDBN" = 'YES'
then
# make_ntc_bull.pl WMOBH NONE KWNO NONE tran.fbwnd_pacific ${COMOUTwmo}/tran.fbwnd_pacific.$job_name
${UTILgfs}/ush/make_ntc_bull.pl WMOBH NONE KWNO NONE tran.fbwnd_pacific ${COMOUTwmo}/tran.fbwnd_pacific.$job_name
${USHgfs}/make_ntc_bull.pl WMOBH NONE KWNO NONE tran.fbwnd_pacific ${COMOUTwmo}/tran.fbwnd_pacific.$job_name
fi

#####################################################################
Expand Down
16 changes: 10 additions & 6 deletions sorc/build_gfs_utils.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#! /usr/bin/env bash
set -eux

function _usage() {
function usage() {
cat << EOF
Builds all of the global-workflow components by calling the individual build
scripts in sequence.
Builds the GFS utility programs.

Usage: ${BASH_SOURCE[0]} [-d][-h][-v]
-d:
Expand All @@ -24,18 +23,23 @@ while getopts ":dv" option; do
case "${option}" in
d) export BUILD_TYPE="DEBUG";;
v) export BUILD_VERBOSE="YES";;
h)
Fixed Show fixed Hide fixed
usage
;;
:)
echo "[${BASH_SOURCE[0]}]: ${option} requires an argument"
usage
;;
*)
echo "[${BASH_SOURCE[0]}]: Unrecognized option: ${option}"
usage
;;
;;
esac
done
shift $((OPTIND-1))

"${cwd}/gfs_utils.fd/sorc/build_gfs_utils.sh"
BUILD_TYPE=${BUILD_TYPE:-"Release"} \
BUILD_VERBOSE=${BUILD_VERBOSE:-"NO"} \
${cwd}/gfs_utils.fd/ush/build.sh
Fixed Show fixed Hide fixed

exit
exit
9 changes: 6 additions & 3 deletions sorc/link_workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ top_dir=$(cd "$(dirname "${script_dir}")" &> /dev/null && pwd)
cd ${script_dir}

# shellcheck disable=SC1091
source gfs_utils.fd/ush/machine-setup.sh > /dev/null 2>&1
source gfs_utils.fd/ush/detect_machine.sh # (sets MACHINE_ID)
# shellcheck disable=
machine="${target:?}"
machine=$(echo $MACHINE_ID | cut -d. -f1)
Fixed Show fixed Hide fixed

#------------------------------
#--model fix fields
Expand Down Expand Up @@ -139,6 +139,9 @@ cd "${top_dir}/ush" || exit 8
emcsfc_snow.sh fv3gfs_filter_topo.sh global_cycle.sh fv3gfs_make_grid.sh ; do
${LINK} "${script_dir}/ufs_utils.fd/ush/${file}" .
done
for file in finddate.sh make_ntc_bull.pl make_NTC_file.pl make_tif.sh month_name.sh ; do
${LINK} "${script_dir}/gfs_utils.fd/ush/${file}" .
done

#-----------------------------------
#--add gfs_wafs link if checked out
Expand Down Expand Up @@ -227,7 +230,7 @@ for utilexe in fbwndgfs.x gaussian_sfcanl.x gfs_bufr.x regrid_nemsio.x supvit.x
syndat_maksynrc.x syndat_qctropcy.x tocsbufr.x enkf_chgres_recenter.x \
enkf_chgres_recenter_nc.x fv3nc2nemsio.x tave.x vint.x reg2grb2.x ; do
[[ -s "${utilexe}" ]] && rm -f "${utilexe}"
${LINK} "${script_dir}/gfs_utils.fd/sorc/install/bin/${utilexe}" .
${LINK} "${script_dir}/gfs_utils.fd/install/bin/${utilexe}" .
done

[[ -s "ufs_model.x" ]] && rm -f ufs_model.x
Expand Down