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

Update fbwind for COM refactor #2479

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
21 changes: 11 additions & 10 deletions jobs/JGFS_ATMOS_FBWIND
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,34 @@ export COMPONENT="atmos"
##############################################
# Define COM directories
##############################################
export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}}
export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/${COMPONENT}}
export COMOUTwmo=${COMOUTwmo:-${COMOUT}/wmo}

GRID="0p25" YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COMIN_ATMOS_GRIB_0p25:COM_ATMOS_GRIB_GRID_TMPL
YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COMOUT:COM_ATMOS_WMO_TMPL
Comment on lines +21 to +22
Copy link
Contributor

Choose a reason for hiding this comment

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

Using COMIN and COMOUT to clearly identify input and output directories. Thanks!

if [[ ! -d "${COMOUT}" ]]; then
mkdir -m 775 -p "${COMOUT}"
fi

export SENDDBN=${SENDDBN:-NO}
export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn}

mkdir -m 775 -p ${COMOUT} ${COMOUTwmo}


########################################################
# Execute the script.
${SCRgfs}/exgfs_atmos_fbwind.sh
"${SCRgfs}/exgfs_atmos_fbwind.sh"
export err=$?;err_chk
########################################################

############################################
# print exec I/O output
############################################
if [ -e "${pgmout}" ] ; then
cat ${pgmout}
if [[ -e "${pgmout}" ]] ; then
cat "${pgmout}"
fi

###################################
# Remove temp directories
###################################
if [ "${KEEPDATA}" != "YES" ] ; then
rm -rf ${DATA}
if [[ "${KEEPDATA}" != "YES" ]] ; then
rm -rf "${DATA}"
fi

53 changes: 20 additions & 33 deletions scripts/exgfs_atmos_fbwind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
# echo " Nov 2019 - B Vuong Removed WINTEMV bulletin (retired)"
#####################################################################

source "${USHgfs}/preamble.sh"
source "${HOMEgfs}/ush/preamble.sh"

cd $DATA
cd "${DATA}" || exit 2

######################
# Set up Here Files.
######################

job_name=$(echo $job|sed 's/[jpt]gfs/gfs/')
outfile_name="${COMOUT}/${RUN}.atmos.t${cyc}z.fbwind.pacific.ascii"

set +x
echo " "
Expand All @@ -34,20 +34,17 @@ echo " "
set_trace

export pgm=bulls_fbwndgfs
. prep_step

for fhr in 006 012 024
do

cp $COMIN/gfs.${cycle}.pgrb2.0p25.f${fhr} tmp_pgrb2_0p25${fhr}
cp $COMIN/gfs.${cycle}.pgrb2b.0p25.f${fhr} tmp_pgrb2b_0p25${fhr}
cat tmp_pgrb2_0p25${fhr} tmp_pgrb2b_0p25${fhr} > tmp0p25filef${fhr}
$WGRIB2 tmp0p25filef${fhr} | grep -F -f ${PARMgfs}/product/gfs_fbwnd_parmlist_g2 | $WGRIB2 -i -grib tmpfilef${fhr} tmp0p25filef${fhr}
$CNVGRIB -g21 tmpfilef${fhr} tmpfilef${fhr}.grib1
$GRBINDEX tmpfilef${fhr}.grib1 tmpfilef${fhr}.grib1i
mv tmpfilef${fhr}.grib1 gfs.t${cyc}z.grbf${fhr}_grb1
mv tmpfilef${fhr}.grib1i gfs.t${cyc}z.grbif${fhr}_grb1

source prep_step

for fhr3 in 006 012 024; do
cp "${COMIN_ATMOS_GRIB_0p25}/gfs.${cycle}.pgrb2.0p25.f${fhr3}" "tmp_pgrb2_0p25${fhr3}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Just making a note that these filenames will be updated in the near future to adhere to EE2 conventions.

cp "${COMIN_ATMOS_GRIB_0p25}/gfs.${cycle}.pgrb2b.0p25.f${fhr3}" "tmp_pgrb2b_0p25${fhr3}"
cat "tmp_pgrb2_0p25${fhr3}" "tmp_pgrb2b_0p25${fhr3}" > "tmp0p25filef${fhr3}"
# shellcheck disable=SC2312
${WGRIB2} "tmp0p25filef${fhr3}" | grep -F -f "${PARMgfs}/product/gfs_fbwnd_parmlist_g2" | \
${WGRIB2} -i -grib "tmpfilef${fhr3}" "tmp0p25filef${fhr3}"
${CNVGRIB} -g21 "tmpfilef${fhr3}" "gfs.t${cyc}z.grbf${fhr3}_grb1"
${GRBINDEX} "gfs.t${cyc}z.grbf${fhr3}_grb1" "gfs.t${cyc}z.grbf${fhr3}_grb1.idx"
done

export FORT11="gfs.t${cyc}z.grbf006_grb1"
Expand All @@ -56,31 +53,21 @@ export FORT13="gfs.t${cyc}z.grbf024_grb1"

# GFS grib index files

export FORT31="gfs.t${cyc}z.grbif006_grb1"
export FORT32="gfs.t${cyc}z.grbif012_grb1"
export FORT33="gfs.t${cyc}z.grbif024_grb1"
export FORT31="gfs.t${cyc}z.grbf006_grb1.idx"
export FORT32="gfs.t${cyc}z.grbf012_grb1.idx"
export FORT33="gfs.t${cyc}z.grbf024_grb1.idx"

#
# 1280 byte transmission file
#

export FORT51="tran.fbwnd_pacific"

startmsg
cp "${PARMgfs}/product/fbwnd_pacific.stnlist" fbwnd_pacific.stnlist

$EXECgfs/fbwndgfs < ${PARMgfs}/product/fbwnd_pacific.stnlist >> $pgmout 2> errfile
"${EXECgfs}/fbwndgfs.x" < fbwnd_pacific.stnlist >> "${pgmout}" 2> errfile
export err=$?; err_chk


cp tran.fbwnd_pacific ${COMOUTwmo}/tran.fbwnd_pacific.$job_name

if test "$SENDDBN" = 'YES'
then
# 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

#####################################################################

"${USHgfs}/make_ntc_bull.pl" WMOBH NONE KWNO NONE tran.fbwnd_pacific "${outfile_name}"

############################### END OF SCRIPT #######################
2 changes: 1 addition & 1 deletion sorc/gfs_utils.fd
Loading