Skip to content

Commit

Permalink
correct shellcheck errors (NOAA-EMC#2294)
Browse files Browse the repository at this point in the history
  • Loading branch information
RussTreadon-NOAA committed Feb 13, 2024
1 parent 91b9308 commit c102c6f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion parm/config/gfs/config.esfc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if [ $DOIAU_ENKF = "YES" ]; then
fi

# Turn off NST in JEDIATMENS
if [ $DO_JEDIATMENS = "YES" ]; then
if [[ "${DO_JEDIATMENS}" == "YES" ]]; then
export DONST="NO"
fi

Expand Down
2 changes: 1 addition & 1 deletion parm/config/gfs/config.nsst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ echo "BEGIN: config.nsst"
export NST_MODEL=2

# Set NST_MODEL for JEDIATMVAR or JEDIATMENS
if [[ $DO_JEDIATMVAR = "YES" || $DO_JEDIATMENS = "YES" ]]; then
if [[ "${DO_JEDIATMVAR}" == "YES" || "${DO_JEDIATMENS}" == "YES" ]]; then
export NST_MODEL=1
fi

Expand Down
2 changes: 1 addition & 1 deletion parm/config/gfs/config.sfcanl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ echo "BEGIN: config.sfcanl"
. $EXPDIR/config.resources sfcanl

# Turn off NST in JEDIATMVAR
if [ $DO_JEDIATMVAR = "YES" ]; then
if [[ "${DO_JEDIATMVAR}" == "YES" ]]; then
export DONST="NO"
fi

Expand Down
2 changes: 1 addition & 1 deletion parm/config/gfs/config.stage_ic
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ esac
fi # End block for coupled ICs

# Stage ICs for cycled runs
if [[ "$MODE" = "cycled" ]]; then
if [[ "${MODE}" == "cycled" ]]; then
export CPL_ATMIC="C48C48"
export CPL_ATMDAIC="C48C48"
fi
Expand Down
20 changes: 10 additions & 10 deletions scripts/exglobal_stage_ic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ done # for MEMDIR in "${MEMDIR_ARRAY[@]}"; do
else
# Stage deterministic ICs from previous cycle
RUN=${rCDUMP} YMD=${gPDY} HH=${gcyc} generate_com COM_TOP:COM_TOP_TMPL
COM_TOP_BASE=$(dirname $COM_TOP)
COM_TOP_BASE=$(dirname "${COM_TOP}")
[[ ! -d "${COM_TOP_BASE}" ]] && mkdir -p "${COM_TOP_BASE}"
[[ -d "${COM_TOP_BASE}/${gcyc}" ]] && rm -rf "${COM_TOP_BASE}/${gcyc}"
[[ -d "${COM_TOP_BASE}/${gcyc}" ]] && rm -f "${COM_TOP_BASE:-}/${gcyc:-}"
src="${BASE_CPLIC}/${CPL_ATMIC:-}/${RUN}.${gPDY}/${gcyc}"
tgt="${COM_TOP_BASE}/"
${NLN} "${src}" "${tgt}"
Expand All @@ -171,9 +171,9 @@ else
# Stage ensemble ICs from previous cycle
if [[ "${DOHYBVAR}" == "YES" ]]; then
RUN=enkf${rCDUMP} YMD=${gPDY} HH=${gcyc} generate_com COM_TOP:COM_TOP_TMPL
COM_TOP_BASE=$(dirname $COM_TOP)
COM_TOP_BASE=$(dirname "${COM_TOP}")
[[ ! -d "${COM_TOP_BASE}" ]] && mkdir -p "${COM_TOP_BASE}"
[[ -d "${COM_TOP_BASE}/${gcyc}" ]] && rm -rf "${COM_TOP_BASE}/${gcyc}"
[[ -d "${COM_TOP_BASE}/${gcyc}" ]] && rm -rf "${COM_TOP_BASE:-}/${gcyc:-}"
src="${BASE_CPLIC}/${CPL_ATMIC:-}/enkf${RUN}.${gPDY}/${gcyc}"
tgt="${COM_TOP_BASE}/"
${NLN} "${src}" "${tgt}"
Expand All @@ -192,17 +192,17 @@ else
else
flist="abias abias_air abias_pc radstat"
fi
for ftype in $flist; do
file=${rCDUMP}.t${cyc}z.$ftype
${NCP} "${src}/$file" "${tgt}"
for ftype in ${flist}; do
file=${rCDUMP}.t${cyc}z.${ftype}
${NCP} "${src}"/"${file}" "${tgt}"
rc=$?
((rc != 0)) && error_message "${src}" "${tgt}" "${rc}"
err=$((err + rc))
done
if [[ "${DO_JEDIATMVAR}" == "YES" || "${DO_JEDIATMENS}" == "YES" ]]; then
cd ${tgt}
tar -xvf ${rCDUMP}.t${cyc}z.radbcor
cd ${DATA}
cd "${tgt}" || exit
tar -xvf "${rCDUMP}".t"${cyc}"z.radbcor
cd "${DATA}" || exit
fi

fi
Expand Down

0 comments on commit c102c6f

Please sign in to comment.