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

Fix post sounding job #1212

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
4 changes: 3 additions & 1 deletion env/HERA.env
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ elif [[ "${step}" = "init" ]]; then

elif [[ "${step}" = "postsnd" ]]; then

export CFP_MP="YES"

nth_max=$((npe_node_max / npe_node_postsnd))

export NTHREADS_POSTSND=${nth_postsnd:-1}
Expand All @@ -278,7 +280,7 @@ elif [[ "${step}" = "postsnd" ]]; then

export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1}
[[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max}
export APRUN_POSTSNDCFP="${launcher} -n ${npe_postsnd} ${mpmd_opt}"
export APRUN_POSTSNDCFP="${launcher} -n ${npe_postsndcfp} ${mpmd_opt}"

elif [[ "${step}" = "awips" ]]; then

Expand Down
4 changes: 3 additions & 1 deletion env/ORION.env
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ elif [[ "${step}" = "init" ]]; then

elif [[ "${step}" = "postsnd" ]]; then

export CFP_MP="YES"

nth_max=$((npe_node_max / npe_node_postsnd))

export NTHREADS_POSTSND=${nth_postsnd:-1}
Expand All @@ -276,7 +278,7 @@ elif [[ "${step}" = "postsnd" ]]; then

export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1}
[[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max}
export APRUN_POSTSNDCFP="${launcher} -n ${npe_postsnd} ${mpmd_opt}"
export APRUN_POSTSNDCFP="${launcher} -n ${npe_postsndcfp} ${mpmd_opt}"

elif [[ "${step}" = "awips" ]]; then

Expand Down
2 changes: 2 additions & 0 deletions env/S4.env
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ elif [[ ${step} = "init" ]]; then

elif [[ ${step} = "postsnd" ]]; then

export CFP_MP="YES"

npe_node_postsnd=${npe_node_postsnd:-${npe_node_max}}
nth_max=$((npe_node_max / npe_node_postsnd))

Expand Down
27 changes: 8 additions & 19 deletions scripts/exgfs_atmos_postsnd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,34 +137,23 @@ fi
# Create Regional Collectives of BUFR data and
# add appropriate WMO Headers.
########################################
collect=' 1 2 3 4 5 6 7 8 9'
if [ $machine == "HERA" -o $machine == "JET" ]; then
for m in ${collect}
do
sh $USHbufrsnd/gfs_sndp.sh $m
done

################################################
# Convert the bufr soundings into GEMPAK files
################################################
sh $USHbufrsnd/gfs_bfr2gpk.sh

else
rm -rf poe_col
for m in ${collect}
do
echo "sh $USHbufrsnd/gfs_sndp.sh $m " >> poe_col
for (( m = 1; m <10 ; m++ )); do
echo "sh ${USHbufrsnd}/gfs_sndp.sh ${m} " >> poe_col
done

mv poe_col cmdfile
if [[ ${CFP_MP:-"NO"} == "YES" ]]; then
nl -n ln -v 0 poe_col > cmdfile
else
mv poe_col cmdfile
fi

cat cmdfile
chmod +x cmdfile

${APRUN_POSTSNDCFP} cmdfile

sh $USHbufrsnd/gfs_bfr2gpk.sh
fi
sh "${USHbufrsnd}/gfs_bfr2gpk.sh"


############## END OF SCRIPT #######################
15 changes: 6 additions & 9 deletions ush/gfs_bufr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,12 @@ cat << EOF > gfsparm
/
EOF

hh=${FSTART}
while (( hh <= FEND )); do
hh2=$(printf %02i ${hh})
hh3=$(printf %03i ${hh})
for (( hr = 10#${FSTART}; hr <= 10#${FEND}; hr = hr + 10#${FINT} )); do
hh2=$(printf %02i "${hr}")
hh3=$(printf %03i "${hr}")

#---------------------------------------------------------
# Make sure all files are available:
#---------------------------------------------------------
# Make sure all files are available:
ic=0
while (( ic < 1000 )); do
if [ ! -f "${COMIN}/${RUN}.${cycle}.logf${hh3}.${logfm}" ]; then
Expand All @@ -71,11 +70,9 @@ while (( hh <= FEND )); do
exit 2
fi
done
#------------------------------------------------------------------
#------------------------------------------------------------------
ln -sf "${COMIN}/${RUN}.${cycle}.atmf${hh3}.${atmfm}" "sigf${hh2}"
ln -sf "${COMIN}/${RUN}.${cycle}.sfcf${hh3}.${atmfm}" "flxf${hh2}"

hh=$((hh + FINT))
done

# define input BUFR table file.
Expand Down