Skip to content

Commit

Permalink
Cleanup DATA and add missing exit
Browse files Browse the repository at this point in the history
- Resolve more SC2086 shellcheck warnings and cleanup the usage
of the $DATA variable in the GSI monitor JJOB scripts.
- Add missing exit statement to end of JGFS_ATMOS_VMINMON.

Refs NOAA-EMC#1908
  • Loading branch information
KateFriedman-NOAA committed Oct 26, 2023
1 parent b9f0f36 commit 6c621a1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 28 deletions.
6 changes: 1 addition & 5 deletions jobs/JGDAS_ATMOS_VERFOZN
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ err=$?
################################
# Remove the Working Directory
################################
KEEPDATA=${KEEPDATA:-NO}
cd ${DATAROOT}
if [ ${KEEPDATA} = NO ] ; then
rm -rf ${DATA}
fi
[[ "${KEEPDATA}" = "NO" ]] && rm -rf "${DATA}"

exit 0
12 changes: 1 addition & 11 deletions jobs/JGDAS_ATMOS_VERFRAD
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,9 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "verfrad" -c "base verfrad"

export COMPONENT="atmos"

export RAD_DATA_IN=${DATA}

export RADMON_SUFFIX=${RADMON_SUFFIX:-${RUN}}
export CYCLE_INTERVAL=${CYCLE_INTERVAL:-6}

mkdir -p ${RAD_DATA_IN}
cd ${RAD_DATA_IN}

##############################################
# Specify Execution Areas
##############################################
Expand Down Expand Up @@ -91,9 +86,4 @@ fi
################################
# Remove the Working Directory
################################
KEEPDATA=${KEEPDATA:-YES}
cd ${DATAROOT}
if [ ${KEEPDATA} = NO ] ; then
rm -rf ${RAD_DATA_IN}
fi

[[ "${KEEPDATA}" = "NO" ]] && rm -rf "${DATA}"
6 changes: 1 addition & 5 deletions jobs/JGDAS_ATMOS_VMINMON
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ err=$?
################################
# Remove the Working Directory
################################
KEEPDATA=${KEEPDATA:-NO}
cd ${DATAROOT}
if [ ${KEEPDATA} = NO ] ; then
rm -rf ${DATA}
fi
[[ "${KEEPDATA}" = "NO" ]] && rm -rf "${DATA}"

exit 0
9 changes: 2 additions & 7 deletions jobs/JGFS_ATMOS_VMINMON
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ err=$?
################################
# Remove the Working Directory
################################
KEEPDATA=${KEEPDATA:-NO}
cd ${DATAROOT}

if [ ${KEEPDATA} = NO ] ; then
rm -rf ${DATA}
fi

[[ "${KEEPDATA}" = "NO" ]] && rm -rf "${DATA}"

exit 0

0 comments on commit 6c621a1

Please sign in to comment.