Skip to content
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
9 changes: 3 additions & 6 deletions jobs/JGDAS_ATMOS_ANALYSIS_DIAG
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,9 @@ mkdir -m 775 -p "${COMOUT_ATMOS_ANALYSIS}"

###############################################################
# Run relevant script
${ANALDIAGSH:-${SCRgfs}/exglobal_diag.sh}
err=$?
if [[ ${err} -ne 0 ]]; then
exit "${err}"
fi

${ANALDIAGSH:-${SCRgfs}/exglobal_diag.sh} && true
export err=$?
err_chk

##############################################
# End JOB SPECIFIC work
Expand Down
9 changes: 3 additions & 6 deletions jobs/JGDAS_ATMOS_CHGRES_FORENKF
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,9 @@ MEMDIR="mem001" YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \

###############################################################
# Run relevant script
${CHGRESFCSTSH:-${SCRgfs}/exgdas_atmos_chgres_forenkf.sh}
err=$?
if [[ ${err} -ne 0 ]]; then
exit "${err}"
fi

${CHGRESFCSTSH:-${SCRgfs}/exgdas_atmos_chgres_forenkf.sh} && true
export err=$?
err_chk

##############################################
# End JOB SPECIFIC work
Expand Down
9 changes: 3 additions & 6 deletions jobs/JGDAS_ATMOS_VERFOZN
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,9 @@ if [[ ! -d ${TANKverf_ozn} ]]; then mkdir -p ${TANKverf_ozn} ; fi
#-------------------------------------------------------
# Execute the script.
#
"${SCRgfs}/exgdas_atmos_verfozn.sh"
err=$?
if (( err != 0 )); then
exit "${err}"
fi

"${SCRgfs}/exgdas_atmos_verfozn.sh" && true
export err=$?
err_chk

################################
# Remove the Working Directory
Expand Down
8 changes: 3 additions & 5 deletions jobs/JGDAS_ATMOS_VERFRAD
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ if [[ ! -d ${TANKverf_rad} ]]; then mkdir -p ${TANKverf_rad} ; fi

########################################################
# Execute the script.
"${SCRgfs}/exgdas_atmos_verfrad.sh"
err=$?
if (( err != 0 )); then
exit "${err}"
fi
"${SCRgfs}/exgdas_atmos_verfrad.sh" && true
export err=$?
err_chk

################################
# Remove the Working Directory
Expand Down
13 changes: 5 additions & 8 deletions jobs/JGDAS_ENKF_DIAG
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ MEMDIR="ensstat" RUN=${GDUMP_ENS} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \

export ATMGES_ENSMEAN="${COMIN_ATMOS_HISTORY_PREV}/${GPREFIX}atmf006.ensmean.nc"
if [ ! -f ${ATMGES_ENSMEAN} ]; then
echo "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = ${ATMGES_ENSMEAN}"
exit 1
export err=1
err_chk "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = ${ATMGES_ENSMEAN}"
fi

# Link observational data
Expand Down Expand Up @@ -99,12 +99,9 @@ done
###############################################################
# Run relevant script

${ANALDIAGSH:-${SCRgfs}/exglobal_diag.sh}
err=$?
if [[ ${err} -ne 0 ]]; then
exit "${err}"
fi

${ANALDIAGSH:-${SCRgfs}/exglobal_diag.sh} && true
export err=$?
err_chk

##############################################
# End JOB SPECIFIC work
Expand Down
9 changes: 3 additions & 6 deletions jobs/JGDAS_ENKF_ECEN
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,9 @@ MEMDIR="ensstat" RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \
###############################################################
# Run relevant script

${ENKFRECENSH:-${SCRgfs}/exgdas_enkf_ecen.sh}
err=$?
if [[ ${err} -ne 0 ]]; then
exit "${err}"
fi

${ENKFRECENSH:-${SCRgfs}/exgdas_enkf_ecen.sh} && true
export err=$?
err_chk

##############################################
# End JOB SPECIFIC work
Expand Down
9 changes: 3 additions & 6 deletions jobs/JGDAS_ENKF_POST
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@ export LEVS=$((LEVS-1))
###############################################################
# Run relevant script

${ENKFPOSTSH:-${SCRgfs}/exgdas_enkf_post.sh}
err=$?
if [[ ${err} -ne 0 ]]; then
exit "${err}"
fi

${ENKFPOSTSH:-${SCRgfs}/exgdas_enkf_post.sh} && true
export err=$?
err_chk

##############################################
# End JOB SPECIFIC work
Expand Down
27 changes: 10 additions & 17 deletions jobs/JGDAS_ENKF_SELECT_OBS
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,14 @@ mkdir -p "${COMOUT_ATMOS_ANALYSIS}"

export ATMGES_ENSMEAN="${COMIN_ATMOS_HISTORY_PREV}/${GPREFIX}atmf006${GSUFFIX}"
if [[ ! -f ${ATMGES_ENSMEAN} ]]; then
echo "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = ${ATMGES_ENSMEAN}"
exit 1
export err=1
err_chk "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = ${ATMGES_ENSMEAN}"
fi

# Ignore masking of chained commands and possible misspelling warning
# shellcheck disable=SC2153,SC2312
LEVS=$(${NCDUMP} -h "${ATMGES_ENSMEAN}" | grep -i "pfull" | head -1 | awk -F" = " '{print $2}' | awk -F" " '{print $1}') # get LEVS
# shellcheck disable=
err=$?
if [[ ${err} -ne 0 ]]; then
exit "${err}"
fi
LEVS=$(${NCLEN} ${ATMGES} pfull) && true
export err=$?
set_strict

export LEVS

# Link observational data
Expand Down Expand Up @@ -121,12 +117,9 @@ done
###############################################################
# Run relevant script

${INVOBSSH:-${SCRgfs}/exgdas_enkf_select_obs.sh}
err=$?
if [[ ${err} -ne 0 ]]; then
exit "${err}"
fi

${INVOBSSH:-${SCRgfs}/exgdas_enkf_select_obs.sh} && true
export err=$?
err_chk

##############################################
# Send Alerts
Expand All @@ -144,7 +137,7 @@ fi
# Final processing
##############################################
if [[ -e "${pgmout}" ]] ; then
cat ${pgmout}
cat "${pgmout}"
fi

##########################################
Expand Down
9 changes: 3 additions & 6 deletions jobs/JGDAS_ENKF_SFC
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,9 @@ RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \
###############################################################
# Run relevant script

${ENKFRESFCSH:-${SCRgfs}/exgdas_enkf_sfc.sh}
err=$?
if [[ ${err} -ne 0 ]]; then
exit "${err}"
fi

${ENKFRESFCSH:-${SCRgfs}/exgdas_enkf_sfc.sh} && true
export err=$?
err_chk

##############################################
# End JOB SPECIFIC work
Expand Down
9 changes: 3 additions & 6 deletions jobs/JGDAS_ENKF_UPDATE
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,9 @@ MEMDIR="ensstat" RUN="enkfgdas" YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \
###############################################################
# Run relevant script

${ENKFUPDSH:-${SCRgfs}/exgdas_enkf_update.sh}
err=$?
if [[ ${err} -ne 0 ]]; then
exit "${err}"
fi

${ENKFUPDSH:-${SCRgfs}/exgdas_enkf_update.sh} && true
export err=$?
err_chk

##############################################
# Send Alerts
Expand Down
5 changes: 4 additions & 1 deletion jobs/JGLOBAL_ARCHIVE_TARS
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ fi

set +eu
${GLOBALARCHIVESH:-${SCRgfs}/exglobal_archive_tars.py}
export err=$?; err_chk "FATAL ERROR: failed to archive the COM structure"
export err=$?
set +x
err_chk "FATAL ERROR: failed to archive the COM structure"
set_trace
set_strict

##############################################
Expand Down
26 changes: 10 additions & 16 deletions jobs/JGLOBAL_ATMOS_ANALYSIS
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,20 @@ mkdir -p "${COMOUT_ATMOS_ANALYSIS}"

export ATMGES="${COMIN_ATMOS_HISTORY_PREV}/${GPREFIX}atmf006.nc"
if [ ! -f ${ATMGES} ]; then
echo "FATAL ERROR: FILE MISSING: ATMGES = ${ATMGES}"
exit 1
export err=1
err_chk "FATAL ERROR: FILE MISSING: ATMGES = ${ATMGES}"
fi

# Get LEVS
export LEVS=$(${NCLEN} ${ATMGES} pfull)
err=$?
if [[ ${err} -ne 0 ]]; then
exit "${err}"
fi

export LEVS=$(${NCLEN} ${ATMGES} pfull) && true
export err=$?
err_chk

if [ ${DOHYBVAR} = "YES" ]; then
export ATMGES_ENSMEAN="${COMIN_ATMOS_HISTORY_ENS_PREV}/${GPREFIX_ENS}atmf006.ensmean.nc"
if [ ! -f ${ATMGES_ENSMEAN} ]; then
echo "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = ${ATMGES_ENSMEAN}"
exit 2
export err=2
err_chk "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = ${ATMGES_ENSMEAN}"
fi
fi

Expand Down Expand Up @@ -89,12 +86,9 @@ fi
###############################################################
# Run relevant script

${ANALYSISSH:-${SCRgfs}/exglobal_atmos_analysis.sh}
err=$?
if [[ ${err} -ne 0 ]]; then
exit "${err}"
fi

${ANALYSISSH:-${SCRgfs}/exglobal_atmos_analysis.sh} && true
export err=$?
err_chk

##############################################
# Send Alerts
Expand Down
22 changes: 8 additions & 14 deletions jobs/JGLOBAL_ATMOS_ANALYSIS_CALC
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,14 @@ RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} declare_from_tmpl -rx \

export ATMGES="${COMIN_ATMOS_HISTORY_PREV}/${GPREFIX}atmf006.nc"
if [ ! -f ${ATMGES} ]; then
echo "FATAL ERROR: FILE MISSING: ATMGES = ${ATMGES}"
exit 1
export err=1
err_chk "FATAL ERROR: FILE MISSING: ATMGES = ${ATMGES}"
fi

# Get LEVS
export LEVS=$(${NCLEN} ${ATMGES} pfull)
err=$?
if [[ ${err} -ne 0 ]]; then
exit "${err}"
fi

export LEVS=$(${NCLEN} ${ATMGES} pfull) && true
export err=$?
err_chk

# Generate Gaussian surface analysis # TODO: Should this be removed now that sfcanl is its own job?
export DOGAUSFCANL=${DOGAUSFCANL:-"YES"}
Expand All @@ -60,12 +57,9 @@ export DOGAUSFCANL=${DOGAUSFCANL:-"YES"}
###############################################################
# Run relevant script

${ANALCALCSH:-${SCRgfs}/exglobal_atmos_analysis_calc.sh}
err=$?
if [[ ${err} -ne 0 ]]; then
exit "${err}"
fi

${ANALCALCSH:-${SCRgfs}/exglobal_atmos_analysis_calc.sh} && true
export err=$?
err_chk

##############################################
# End JOB SPECIFIC work
Expand Down
9 changes: 3 additions & 6 deletions jobs/JGLOBAL_ATMOS_SFCANL
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,9 @@ mkdir -p "${COMOUT_ATMOS_RESTART}"
###############################################################
# Run relevant script

${SFCANALSH:-${SCRgfs}/exglobal_atmos_sfcanl.sh}
err=$?
if [[ ${err} -ne 0 ]]; then
exit "${err}"
fi

${SFCANALSH:-${SCRgfs}/exglobal_atmos_sfcanl.sh} && true
export err=$?
err_chk

##############################################
# End JOB SPECIFIC work
Expand Down
8 changes: 3 additions & 5 deletions jobs/JGLOBAL_ATMOS_VMINMON
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ if [[ ! -d ${M_TANKverf} ]]; then mkdir -p "${M_TANKverf}" ; fi

########################################################
# Execute the script.
"${SCRgfs}/exglobal_atmos_vminmon.sh"
err=$?
if (( err != 0 )); then
exit "${err}"
fi
"${SCRgfs}/exglobal_atmos_vminmon.sh" && true
export err=$?
err_chk

################################
# Remove the Working Directory
Expand Down
5 changes: 4 additions & 1 deletion jobs/JGLOBAL_ENS_ARCHIVE_TARS
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ if [[ ! -d ${COMOUT_CONF} ]]; then mkdir -p "${COMOUT_CONF}"; fi
# Calls an external bash command; do not fail on unassigned/error
set +eu
"${SCRgfs}/exgdas_enkf_earc_tars.py"
export err=$?; err_chk "FATAL ERROR Failed to archive the ensemble COM structure"
export err=$?
set +x
err_chk "FATAL ERROR Failed to archive the ensemble COM structure"
set_trace
set_strict

###############################################################
Expand Down
10 changes: 6 additions & 4 deletions scripts/exgdas_atmos_chgres_forenkf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,9 @@ EOF
export pgm=$CHGRESNCEXEC
. prep_step

$APRUN_CHGRES $CHGRESNCEXEC chgres_nc_gauss0$FHR.nml
export err=$?; err_chk
${APRUN_CHGRES} "${CHGRESNCEXEC}" "chgres_nc_gauss0${FHR}.nml" && true
export err=$?
err_chk
fi
done

Expand All @@ -169,8 +170,9 @@ EOF
export pgm=$CHGRESNCEXEC
. prep_step

$APRUNCFP_CHGRES $DATA/mp_chgres.sh
export err=$?; err_chk
${APRUNCFP_CHGRES} "${DATA}/mp_chgres.sh" && true
export err=$?
err_chk
fi
fi

Expand Down
12 changes: 6 additions & 6 deletions scripts/exgdas_atmos_verfozn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# (OznMon) DA package.
#
################################################################################
err=0
export err=0

data_available=0

Expand Down Expand Up @@ -36,13 +36,13 @@ if [[ -s ${oznstat} ]]; then

export OZNMON_NETCDF=${netcdf}

"${USHgfs}/ozn_xtrct.sh"
err=$?
"${USHgfs}/ozn_xtrct.sh" && true
export err=$?

else
# oznstat file not found
err=1
export err=1
fi

exit ${err}

err_chk
exit 0
Loading