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

Enforce decimal math in atmos post #1171

Merged
merged 3 commits into from
Dec 12, 2022
Merged
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
14 changes: 8 additions & 6 deletions scripts/exgdas_atmos_post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ else ## not_anl if_stimes
############################################################

for fhr in ${post_times}; do
# Enforce decimal math expressions
d_fhr=$((10#$fhr))
Fixed Show fixed Hide fixed
###############################
# Start Looping for the
# existence of the restart files
Expand Down Expand Up @@ -219,7 +221,7 @@ else ## not_anl if_stimes
export FLXINP=flxfile
fi

if (( fhr > 0 )); then
if (( d_fhr > 0 )); then
export IGEN=${IGEN_FCST}
else
export IGEN=${IGEN_ANL}
Expand All @@ -243,20 +245,20 @@ else ## not_anl if_stimes
export PostFlatFile="${PARMpost}/postxconfig-NT-GFS.txt"
if [ "${RUN}" = gfs ]; then
export IGEN="${IGEN_GFS}"
if (( fhr > 0 )); then export IGEN="${IGEN_FCST}" ; fi
if (( d_fhr > 0 )); then export IGEN="${IGEN_FCST}" ; fi
else
export IGEN="${IGEN_GDAS_ANL}"
if (( fhr > 0 )); then export IGEN="${IGEN_FCST}" ; fi
if (( d_fhr > 0 )); then export IGEN="${IGEN_FCST}" ; fi
fi
if [[ "${RUN}" = gfs ]]; then
if (( fhr == 0 )); then
if (( d_fhr == 0 )); then
export PostFlatFile="${PARMpost}/postxconfig-NT-GFS-F00.txt"
export CTLFILE="${PARMpost}/postcntrl_gfs_f00.xml"
else
export CTLFILE="${CTLFILEGFS:-${PARMpost}/postcntrl_gfs.xml}"
fi
else
if (( fhr == 0 )); then
if (( d_fhr == 0 )); then
export PostFlatFile="${PARMpost}/postxconfig-NT-GFS-F00.txt"
export CTLFILE="${CTLFILEGFS:-${PARMpost}/postcntrl_gfs_f00.xml}"
else
Expand Down Expand Up @@ -317,7 +319,7 @@ else ## not_anl if_stimes
if (( OUTTYP == 4 )) ; then
export NEMSINP=${COMIN}/${PREFIX}atmf${fhr}${SUFFIX}
export FLXINP=${COMIN}/${PREFIX}sfcf${fhr}${SUFFIX}
if (( fhr == 0 )); then
if (( d_fhr == 0 )); then
export PostFlatFile=${PARMpost}/postxconfig-NT-GFS-FLUX-F00.txt
export CTLFILE=${PARMpost}/postcntrl_gfs_flux_f00.xml
else
Expand Down