Skip to content

Commit

Permalink
Add { } to variables
Browse files Browse the repository at this point in the history
 On branch feature/gefs_v13_822_add_atm_fcst
 Changes to be committed:
	modified:   scripts/exgdas_enkf_fcst.sh
	modified:   ush/forecast_predet.sh

Refs: NOAA-EMC#822
  • Loading branch information
XianwuXue-NOAA committed Jan 17, 2023
1 parent c95d4a6 commit 119e5b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/exgdas_enkf_fcst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export LEVS=${LEVS_ENKF:-${LEVS:-64}}

# nggps_diag_nml
export FHOUT=${FHOUT_ENKF:-3}
if [[ $CDUMP == "gfs" ]]; then
if [[ ${CDUMP} == "gfs" ]]; then
export FHOUT=${FHOUT_ENKF_GFS:-${FHOUT_ENKF:${FHOUT:-3}}}
fi
# model_configure
Expand Down
8 changes: 4 additions & 4 deletions ush/forecast_predet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ FV3_GFS_predet(){
print_freq=${print_freq:-6}

#-------------------------------------------------------
if [[ $CDUMP = "gfs" || $RUN = "gefs" ]] && [ $rst_invt1 -gt 0 ]; then
if [[ ${CDUMP} = "gfs" || ${RUN} = "gefs" ]] && [ ${rst_invt1} -gt 0 ]; then
RSTDIR_ATM=${RSTDIR_ATM:-${RSTDIR:-$ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos/RERUN_RESTART}
if [ ! -d $RSTDIR_ATM ]; then mkdir -p $RSTDIR_ATM ; fi
$NLN $RSTDIR_ATM RESTART
Expand All @@ -232,7 +232,7 @@ FV3_GFS_predet(){

#-------------------------------------------------------
# member directory
if [[ $MEMBER -lt 0 || $RUN = "gefs" ]]; then
if [[ ${MEMBER} -lt 0 || ${RUN} = "gefs" ]]; then
prefix=$CDUMP
rprefix=$rCDUMP
memchar=""
Expand All @@ -241,13 +241,13 @@ FV3_GFS_predet(){
rprefix=enkf$rCDUMP
memchar=mem$(printf %03i $MEMBER)
fi
memdir=${memdir:-$ROTDIR/${prefix}.$PDY/$cyc/$memchar/atmos}
memdir=${memdir:-${ROTDIR}/${prefix}.${PDY}/${cyc}/${memchar}/atmos}
if [ ! -d $memdir ]; then mkdir -p $memdir; fi

GDATE=$($NDATE -$assim_freq $CDATE)
gPDY=$(echo $GDATE | cut -c1-8)
gcyc=$(echo $GDATE | cut -c9-10)
gmemdir=${gmemdir:-$ROTDIR/${rprefix}.$gPDY/$gcyc/$memchar/atmos}
gmemdir=${gmemdir:-${ROTDIR}/${rprefix}.${gPDY}/${gcyc}/${memchar}/atmos}

if [[ "$DOIAU" = "YES" ]]; then
sCDATE=$($NDATE -3 $CDATE)
Expand Down

0 comments on commit 119e5b7

Please sign in to comment.