From 1119a684a8decbd9de72a7085788bfb35fc08b51 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Tue, 11 Oct 2022 17:15:50 -0400 Subject: [PATCH 01/30] wip. fixes for forecast jobs --- env/HERA.env | 4 -- env/JET.env | 5 +-- env/ORION.env | 3 -- env/S4.env | 6 +-- env/WCOSS2.env | 3 -- jobs/JGDAS_ATMOS_ANALYSIS_DIAG | 52 +++++++++++----------- jobs/JGDAS_ENKF_FCST | 49 ++++++++++----------- jobs/JGLOBAL_FORECAST | 69 +++++------------------------- jobs/rocoto/efcs.sh | 3 ++ jobs/rocoto/fcst.sh | 3 ++ parm/config/config.base.emc.dyn | 9 ++-- scripts/exglobal_atmos_analysis.sh | 2 +- workflow/rocoto/workflow_tasks.py | 5 ++- 13 files changed, 75 insertions(+), 138 deletions(-) diff --git a/env/HERA.env b/env/HERA.env index 954f25a322..25c5942367 100755 --- a/env/HERA.env +++ b/env/HERA.env @@ -32,10 +32,6 @@ export NTHSTACK=1024000000 ulimit -s unlimited ulimit -a -export job=${PBS_JOBNAME:-$step} -export jobid=${job}.${PBS_JOBID:-$$} - - if [ $step = "prep" -o $step = "prepbufr" ]; then nth_max=$(($npe_node_max / $npe_node_prep)) diff --git a/env/JET.env b/env/JET.env index 21321b23c9..de942eb721 100755 --- a/env/JET.env +++ b/env/JET.env @@ -1,4 +1,4 @@ -#!/bin/ksh -x +#!/usr/bin/env bash if [ $# -ne 1 ]; then @@ -28,9 +28,6 @@ export NTHSTACK=1024000000 ulimit -s unlimited ulimit -a -export job=${PBS_JOBNAME:-$step} -export jobid=${job}.${PBS_JOBID:-$$} - if [ $step = "prep" -o $step = "prepbufr" ]; then nth_max=$(($npe_node_max / $npe_node_prep)) diff --git a/env/ORION.env b/env/ORION.env index 04bae19e0e..4b170cfdda 100755 --- a/env/ORION.env +++ b/env/ORION.env @@ -32,9 +32,6 @@ export NTHSTACK=1024000000 ulimit -s unlimited ulimit -a -export job=${PBS_JOBNAME:-$step} -export jobid=${job}.${PBS_JOBID:-$$} - if [ $step = "prep" -o $step = "prepbufr" ]; then nth_max=$(($npe_node_max / $npe_node_prep)) diff --git a/env/S4.env b/env/S4.env index a3faabaecf..0c108d5c81 100755 --- a/env/S4.env +++ b/env/S4.env @@ -1,4 +1,4 @@ -#!/bin/bash -x +#!/usr/bin/env bash if [ $# -ne 1 ]; then @@ -29,10 +29,6 @@ export NTHSTACK=1024000000 ulimit -s unlimited ulimit -a -export job=${PBS_JOBNAME:-${step}} -export jobid=${job}.${PBS_JOBID:-$$} - - if [[ ${step} = "prep" || ${step} = "prepbufr" ]]; then npe_node_prep=${npe_node_prep:-${npe_node_max}} diff --git a/env/WCOSS2.env b/env/WCOSS2.env index 71f967181c..0dd88356f6 100755 --- a/env/WCOSS2.env +++ b/env/WCOSS2.env @@ -21,9 +21,6 @@ export mpmd="--cpu-bind verbose,core cfp" export npe_node_max=128 -export job=${PBS_JOBNAME:-$step} -export jobid=${job}.${PBS_JOBID:-$$} - if [ $step = "prep" -o $step = "prepbufr" ]; then nth_max=$(($npe_node_max / $npe_node_prep)) diff --git a/jobs/JGDAS_ATMOS_ANALYSIS_DIAG b/jobs/JGDAS_ATMOS_ANALYSIS_DIAG index 9dfff86867..ff1138b476 100755 --- a/jobs/JGDAS_ATMOS_ANALYSIS_DIAG +++ b/jobs/JGDAS_ATMOS_ANALYSIS_DIAG @@ -2,7 +2,29 @@ source "$HOMEgfs/ush/preamble.sh" -export RUN_ENVIR=${RUN_ENVIR:-"nco"} +############################################## +# make temp directory +############################################## +export DATA=${DATAROOT}/${jobid} +mkdir -p $DATA +cd $DATA + + +############################################## +# Run setpdy and initialize PDY variables +############################################## +setpdy.sh +. ./PDY + + +############################################## +# Determine Job Output Name on System +############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + ############################# # Source relevant config files @@ -25,39 +47,13 @@ status=$? [[ $status -ne 0 ]] && exit $status -############################################## -# Obtain unique process id (pid) and make temp directory -############################################## -export pid=${pid:-$$} -export outid=${outid:-"LL$job"} - -export DATA=${DATA:-${DATAROOT}/${jobid:?}} -mkdir -p $DATA -cd $DATA - - -############################################## -# Run setpdy and initialize PDY variables -############################################## -export cycle="t${cyc}z" -setpdy.sh -. ./PDY - - -############################################## -# Determine Job Output Name on System -############################################## -export pgmout="OUTPUT.${pid}" -export pgmerr=errfile - - ############################################## # Set variables used in the script ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gfs"}} export COMPONENT=${COMPONENT:-atmos} -export DO_CALC_ANALYSIS=${DO_CALC_ANALYSIS:-"YES"} +export DO_CALC_ANALYSIS=${DO_CALC_ANALYSIS:-"YES"} ############################################## diff --git a/jobs/JGDAS_ENKF_FCST b/jobs/JGDAS_ENKF_FCST index e57ff1d09b..b59de4dcf5 100755 --- a/jobs/JGDAS_ENKF_FCST +++ b/jobs/JGDAS_ENKF_FCST @@ -2,7 +2,29 @@ source "$HOMEgfs/ush/preamble.sh" -export RUN_ENVIR=${RUN_ENVIR:-"nco"} +############################################## +# make temp directory +############################################## +export DATA=${DATAROOT}/${jobid} +mkdir -p $DATA +cd $DATA + + +############################################## +# Run setpdy and initialize PDY variables +############################################## +setpdy.sh +. ./PDY + + +############################################## +# Determine Job Output Name on System +############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + ############################# # Source relevant config files @@ -25,31 +47,6 @@ status=$? [[ $status -ne 0 ]] && exit $status -############################################## -# Obtain unique process id (pid) and make temp directory -############################################## -export pid=${pid:-$$} -export outid=${outid:-"LL$job"} -export DATA=${DATA:-${DATAROOT}/${jobid:?}} -mkdir -p $DATA -cd $DATA - - -############################################## -# Run setpdy and initialize PDY variables -############################################## -export cycle="t${cyc}z" -setpdy.sh -. ./PDY - - -############################################## -# Determine Job Output Name on System -############################################## -export pgmout="OUTPUT.${pid}" -export pgmerr=errfile - - ############################################## # Set variables used in the script ############################################## diff --git a/jobs/JGLOBAL_FORECAST b/jobs/JGLOBAL_FORECAST index 7f6dbd9a26..4d6c392aa2 100755 --- a/jobs/JGLOBAL_FORECAST +++ b/jobs/JGLOBAL_FORECAST @@ -2,54 +2,17 @@ source "$HOMEgfs/ush/preamble.sh" -export RUN_ENVIR=${RUN_ENVIR:-"nco"} - -#-------------------------------- -if [ $RUN_ENVIR = "emc" ]; then -#-------------------------------- - -############################################## -# Set variables used in the exglobal script -############################################## -export CDATE=${CDATE:-${PDY}${cyc}} -export CDUMP=${CDUMP:-${RUN:-"gfs"}} - -############################# -# Source relevant config files -############################# -configs="base fcst" -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config - status=$? - [[ $status -ne 0 ]] && exit $status -done - -########################################## -# Source machine runtime environment -########################################## -. $HOMEgfs/env/${machine}.env fcst -status=$? -[[ $status -ne 0 ]] && exit $status - -#-------------------------------- -fi -#-------------------------------- - ############################################## -# Obtain unique process id (pid) and make temp directory +# make temp directory ############################################## -export pid=${pid:-$$} -export outid=${outid:-"LL$job"} -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATAROOT}/${jobid} mkdir -p $DATA cd $DATA + ############################################## # Run setpdy and initialize PDY variables ############################################## -export cycle="t${cyc}z" setpdy.sh . ./PDY @@ -57,34 +20,25 @@ setpdy.sh ############################################## # Determine Job Output Name on System ############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile -#-------------------------------- -if [ $RUN_ENVIR = "nco" ]; then -#-------------------------------- - ############################# # Source relevant config files ############################# -configs="base fcst" export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +configs="base fcst" +[[ ${DO_WAVE:-"NO"} = "YES" ]] && configs+=" wave" for config in $configs; do . $config_path/config.$config status=$? [[ $status -ne 0 ]] && exit $status done -# Source additional configs -if [ ${DO_WAVE:-"NO"} = "YES" ]; then - configs="wave" - for config in $configs; do - . $config_path/config.$config - status=$? - [[ $status -ne 0 ]] && exit $status - done -fi + ########################################## # Source machine runtime environment @@ -93,11 +47,10 @@ fi status=$? [[ $status -ne 0 ]] && exit $status -#-------------------------------- -fi -#-------------------------------- - +############################################## +# Set variables used in the script +############################################## # Set wave variables if [ ${DO_WAVE:-"NO"} = "YES" ]; then # WAVE component directory diff --git a/jobs/rocoto/efcs.sh b/jobs/rocoto/efcs.sh index 4454ad6c8b..f83263deef 100755 --- a/jobs/rocoto/efcs.sh +++ b/jobs/rocoto/efcs.sh @@ -8,6 +8,9 @@ source "$HOMEgfs/ush/preamble.sh" status=$? [[ $status -ne 0 ]] && exit $status +export job="efcs" +export jobid="${job}.$$" + ############################################################### # Execute the JJOB $HOMEgfs/jobs/JGDAS_ENKF_FCST diff --git a/jobs/rocoto/fcst.sh b/jobs/rocoto/fcst.sh index d59872c60c..0a26196738 100755 --- a/jobs/rocoto/fcst.sh +++ b/jobs/rocoto/fcst.sh @@ -8,6 +8,9 @@ source "$HOMEgfs/ush/preamble.sh" status=$? [[ $status -ne 0 ]] && exit $status +export job="fcst" +export jobid="${job}.$$" + ############################################################### # Execute the JJOB $HOMEgfs/jobs/JGLOBAL_FORECAST diff --git a/parm/config/config.base.emc.dyn b/parm/config/config.base.emc.dyn index 0633db18f5..c462c3fdc5 100755 --- a/parm/config/config.base.emc.dyn +++ b/parm/config/config.base.emc.dyn @@ -37,11 +37,10 @@ export FIXreg2grb2=$HOMEgfs/fix/reg2grb2 ######################################################################## # GLOBAL static environment parameters -export PACKAGEROOT="@PACKAGEROOT@" -export COMROOT="@COMROOT@" +export PACKAGEROOT="@PACKAGEROOT@" # TODO: set via prod_envir in Ops +export COMROOT="@COMROOT@" # TODO: set via prod_envir in Ops export COMINsyn="@COMINsyn@" export DMPDIR="@DMPDIR@" -export RTMFIX=$CRTM_FIX # USER specific paths export HOMEDIR="@HOMEDIR@" @@ -110,8 +109,8 @@ export DUMP_SUFFIX="" if [[ "$CDATE" -ge "2019092100" && "$CDATE" -le "2019110700" ]]; then export DUMP_SUFFIX="p" # Use dumps from NCO GFS v15.3 parallel fi -export RUNDIR="$STMP/RUNDIRS/$PSLOT" -export DATAROOT="$RUNDIR/$CDATE/$CDUMP" +export DATAROOT="${STMP}/RUNDIRS/${PSLOT}" # TODO: set via prod_envir in Ops +export RUNDIR="${DATAROOT}" # TODO: Should be removed; use DATAROOT instead export ARCDIR="$NOSCRUB/archive/$PSLOT" export ICSDIR="@ICSDIR@" export ATARDIR="@ATARDIR@" diff --git a/scripts/exglobal_atmos_analysis.sh b/scripts/exglobal_atmos_analysis.sh index 7970b9b3d8..e263487975 100755 --- a/scripts/exglobal_atmos_analysis.sh +++ b/scripts/exglobal_atmos_analysis.sh @@ -317,7 +317,7 @@ else fi # GSI Fix files -RTMFIX=${RTMFIX:-${CRTM_FIX}} +RTMFIX=${CRTM_FIX} BERROR=${BERROR:-${FIXgsi}/Big_Endian/global_berror.l${LEVS}y${NLAT_A}.f77} SATANGL=${SATANGL:-${FIXgsi}/global_satangbias.txt} SATINFO=${SATINFO:-${FIXgsi}/global_satinfo.txt} diff --git a/workflow/rocoto/workflow_tasks.py b/workflow/rocoto/workflow_tasks.py index 5ec1dbb39c..8551235a7e 100644 --- a/workflow/rocoto/workflow_tasks.py +++ b/workflow/rocoto/workflow_tasks.py @@ -41,7 +41,10 @@ def __init__(self, app_config: AppConfig, cdump: str) -> None: 'CDUMP': self.cdump, 'CDATE': '@Y@m@d@H', 'PDY': '@Y@m@d', - 'cyc': '@H'} + 'cyc': '@H', + 'cycle': 't@Hz', + 'COMROOT': self._base.get('COMROOT'), + 'DATAROOT': self._base.get('DATAROOT')} self.envars = self._set_envars(envar_dict) @staticmethod From d73bb88216b21fd98b868ccb552efb8ae0b67117 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Tue, 11 Oct 2022 22:46:31 -0400 Subject: [PATCH 02/30] fix echgres --- jobs/JGDAS_ATMOS_CHGRES_FORENKF | 50 +++++++++++++++------------------ jobs/rocoto/echgres.sh | 3 ++ 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/jobs/JGDAS_ATMOS_CHGRES_FORENKF b/jobs/JGDAS_ATMOS_CHGRES_FORENKF index d8ff0686d0..010326798d 100755 --- a/jobs/JGDAS_ATMOS_CHGRES_FORENKF +++ b/jobs/JGDAS_ATMOS_CHGRES_FORENKF @@ -2,7 +2,29 @@ source "$HOMEgfs/ush/preamble.sh" -export RUN_ENVIR=${RUN_ENVIR:-"nco"} +############################################## +# make temp directory +############################################## +export DATA=${DATAROOT}/${jobid} +mkdir -p $DATA +cd $DATA + + +############################################## +# Run setpdy and initialize PDY variables +############################################## +setpdy.sh +. ./PDY + + +############################################## +# Determine Job Output Name on System +############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + ############################# # Source relevant config files @@ -25,32 +47,6 @@ status=$? [[ $status -ne 0 ]] && exit $status -############################################## -# Obtain unique process id (pid) and make temp directory -############################################## -export pid=${pid:-$$} -export outid=${outid:-"LL$job"} - -export DATA=${DATA:-${DATAROOT}/${jobid:?}} -mkdir -p $DATA -cd $DATA - - -############################################## -# Run setpdy and initialize PDY variables -############################################## -export cycle="t${cyc}z" -setpdy.sh -. ./PDY - - -############################################## -# Determine Job Output Name on System -############################################## -export pgmout="OUTPUT.${pid}" -export pgmerr=errfile - - ############################################## # Set variables used in the script ############################################## diff --git a/jobs/rocoto/echgres.sh b/jobs/rocoto/echgres.sh index 3171388f6a..0f86975b58 100755 --- a/jobs/rocoto/echgres.sh +++ b/jobs/rocoto/echgres.sh @@ -8,6 +8,9 @@ source "$HOMEgfs/ush/preamble.sh" status=$? [[ $status -ne 0 ]] && exit $status +export job="echgres" +export jobid="${job}.$$" + ############################################################### # Execute the JJOB $HOMEgfs/jobs/JGDAS_ATMOS_CHGRES_FORENKF From 72b39456a7e2919a43680a56d0ca8f84e4ee6888 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Tue, 11 Oct 2022 23:05:35 -0400 Subject: [PATCH 03/30] fix epos --- jobs/JGDAS_ENKF_POST | 49 +++++++++++++++++++++----------------------- jobs/rocoto/epos.sh | 5 +++-- 2 files changed, 26 insertions(+), 28 deletions(-) diff --git a/jobs/JGDAS_ENKF_POST b/jobs/JGDAS_ENKF_POST index 5b9926b95c..07e7cd5cf2 100755 --- a/jobs/JGDAS_ENKF_POST +++ b/jobs/JGDAS_ENKF_POST @@ -2,7 +2,29 @@ source "$HOMEgfs/ush/preamble.sh" -export RUN_ENVIR=${RUN_ENVIR:-"nco"} +############################################## +# make temp directory +############################################## +export DATA=${DATAROOT}/${jobid} +mkdir -p $DATA +cd $DATA + + +############################################## +# Run setpdy and initialize PDY variables +############################################## +setpdy.sh +. ./PDY + + +############################################## +# Determine Job Output Name on System +############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + ############################# # Source relevant config files @@ -25,31 +47,6 @@ status=$? [[ $status -ne 0 ]] && exit $status -############################################## -# Obtain unique process id (pid) and make temp directory -############################################## -export pid=${pid:-$$} -export outid=${outid:-"LL$job"} -export DATA=${DATA:-${DATAROOT}/${jobid:?}} -mkdir -p $DATA -cd $DATA - - -############################################## -# Run setpdy and initialize PDY variables -############################################## -export cycle="t${cyc}z" -setpdy.sh -. ./PDY - - -############################################## -# Determine Job Output Name on System -############################################## -export pgmout="OUTPUT.${pid}" -export pgmerr=errfile - - ############################################## # Set variables used in the script ############################################## diff --git a/jobs/rocoto/epos.sh b/jobs/rocoto/epos.sh index 1039b8ab20..c67c4a09ba 100755 --- a/jobs/rocoto/epos.sh +++ b/jobs/rocoto/epos.sh @@ -13,12 +13,13 @@ status=$? fhrlst=$(echo $FHRLST | sed -e 's/_/ /g; s/f/ /g; s/,/ /g') for fhr in $fhrlst; do - + export FHMIN_EPOS=$fhr export FHMAX_EPOS=$fhr export FHOUT_EPOS=$fhr export job=epos${fhr} - + export jobid="${job}.$$" + $HOMEgfs/jobs/JGDAS_ENKF_POST status=$? [[ $status -ne 0 ]] && exit $status From 4bf4f975537d2e2ae7484fd6f850857fd9846a80 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Tue, 11 Oct 2022 23:22:43 -0400 Subject: [PATCH 04/30] fix post --- jobs/JGLOBAL_ATMOS_POST | 48 ++++++++++++++++++++--------------------- jobs/rocoto/post.sh | 4 +++- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/jobs/JGLOBAL_ATMOS_POST b/jobs/JGLOBAL_ATMOS_POST index ab75918aa6..eee54a377c 100755 --- a/jobs/JGLOBAL_ATMOS_POST +++ b/jobs/JGLOBAL_ATMOS_POST @@ -2,7 +2,29 @@ source "${HOMEgfs}/ush/preamble.sh" -export RUN_ENVIR=${RUN_ENVIR:-"nco"} +############################################## +# make temp directory +############################################## +export DATA=${DATAROOT}/${jobid} +mkdir -p "${DATA}" +cd "${DATA}" || exit 1 + + +############################################## +# Run setpdy and initialize PDY variables +############################################## +setpdy.sh +. ./PDY + + +############################################## +# Determine Job Output Name on System +############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL${job}"} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + ############################# # Source relevant config files @@ -25,30 +47,6 @@ status=$? (( status != 0 )) && exit "${status}" -############################################## -# Obtain unique process id (pid) and make temp directory -############################################## -export pid=${pid:-$$} -export outid=${outid:-"LL${job}"} -export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p "${DATA}" -cd "${DATA}" || exit 1 - - -############################################## -# Run setpdy and initialize PDY variables -############################################## -export cycle="t${cyc}z" -setpdy.sh -. ./PDY - - -############################################## -# Determine Job Output Name on System -############################################## -export pgmout="OUTPUT.${pid}" -export pgmerr=errfile - #################################### # Specify version numbers #################################### diff --git a/jobs/rocoto/post.sh b/jobs/rocoto/post.sh index a6dfb0fbaf..49cfa0303d 100755 --- a/jobs/rocoto/post.sh +++ b/jobs/rocoto/post.sh @@ -13,7 +13,7 @@ source "$HOMEgfs/ush/preamble.sh" status=$? [[ $status -ne 0 ]] && exit $status -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" if [ $FHRGRP = 'anl' ]; then fhrlst="anl" @@ -27,6 +27,8 @@ fi #--------------------------------------------------------------- for fhr in $fhrlst; do export post_times=$fhr + export job="post${post_times}" + export jobid="${job}.$$" $HOMEgfs/jobs/JGLOBAL_ATMOS_POST status=$? [[ $status -ne 0 ]] && exit $status From 4a452a84806993bc6425e3756b623d0415620708 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Wed, 12 Oct 2022 09:31:55 -0400 Subject: [PATCH 05/30] fix vrfy --- jobs/rocoto/vrfy.sh | 52 ++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/jobs/rocoto/vrfy.sh b/jobs/rocoto/vrfy.sh index 584961e7ff..4d87d2a38f 100755 --- a/jobs/rocoto/vrfy.sh +++ b/jobs/rocoto/vrfy.sh @@ -2,25 +2,38 @@ source "$HOMEgfs/ush/preamble.sh" -############################################################### -## Abstract: -## Inline verification and diagnostics driver script -## RUN_ENVIR : runtime environment (emc | nco) -## HOMEgfs : /full/path/to/workflow -## EXPDIR : /full/path/to/config/files -## CDATE : current analysis date (YYYYMMDDHH) -## CDUMP : cycle name (gdas / gfs) -## PDY : current date (YYYYMMDD) -## cyc : current cycle (HH) -############################################################### - -############################################################### echo echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" . $HOMEgfs/ush/load_fv3gfs_modules.sh status=$? [[ $status -ne 0 ]] && exit $status +export job="vrfy" +export jobid="${job}.$$" + + +############################################## +# make temp directory +############################################## +export DATA="${DATAROOT}/${jobid}" +mkdir -p $DATA +cd $DATA + + +############################################## +# Run setpdy and initialize PDY variables +############################################## +setpdy.sh +. ./PDY + +############################################## +# Determine Job Output Name on System +############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + ############################################################### echo @@ -41,16 +54,11 @@ status=$? [[ $status -ne 0 ]] && exit $status ############################################################### -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" export CDATEm1=$($NDATE -24 $CDATE) export PDYm1=$(echo $CDATEm1 | cut -c1-8) -export pid=${pid:-$$} -export jobid=${job}.${pid} export COMIN="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT" -export DATAROOT="$RUNDIR/$CDATE/$CDUMP/vrfy.${jobid}" -[[ -d $DATAROOT ]] && rm -rf $DATAROOT -mkdir -p $DATAROOT ############################################################### @@ -79,7 +87,7 @@ fi echo echo "=============== START TO RUN MOS ===============" if [ $RUNMOS = "YES" -a $CDUMP = "gfs" ]; then - $RUNGFSMOSSH $PDY$cyc + $RUNGFSMOSSH $PDY$cyc fi @@ -158,7 +166,7 @@ if [ $VRFYTRAK = "YES" ]; then export COMINsyn=${COMINsyn:-$(compath.py ${envir}/com/gfs/${gfs_ver})/syndat} - $TRACKERSH + $TRACKERSH fi @@ -180,7 +188,7 @@ fi ############################################################### # Force Exit out cleanly -if [ ${KEEPDATA:-"NO"} = "NO" ] ; then rm -rf $DATAROOT ; fi +if [ ${KEEPDATA:-"NO"} = "NO" ] ; then rm -rf $DATA ; fi exit 0 From 3bf4e585d60990c474eaa46b647e2d35d8b108b3 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Wed, 12 Oct 2022 10:44:14 -0400 Subject: [PATCH 06/30] fix anal --- jobs/JGLOBAL_ATMOS_ANALYSIS | 56 +++++++++++++++++-------------------- jobs/rocoto/anal.sh | 3 ++ 2 files changed, 29 insertions(+), 30 deletions(-) diff --git a/jobs/JGLOBAL_ATMOS_ANALYSIS b/jobs/JGLOBAL_ATMOS_ANALYSIS index 3d4e26c84e..b273a51f49 100755 --- a/jobs/JGLOBAL_ATMOS_ANALYSIS +++ b/jobs/JGLOBAL_ATMOS_ANALYSIS @@ -2,7 +2,29 @@ source "$HOMEgfs/ush/preamble.sh" -export RUN_ENVIR=${RUN_ENVIR:-"nco"} +############################################## +# Obtain unique process id (pid) and make temp directory +############################################## +export DATA=${DATAROOT}/${jobid} +mkdir -p $DATA +cd $DATA + + +############################################## +# Run setpdy and initialize PDY variables +############################################## +setpdy.sh +. ./PDY + + +############################################## +# Determine Job Output Name on System +############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + ############################# # Source relevant config files @@ -25,39 +47,13 @@ status=$? [[ $status -ne 0 ]] && exit $status -############################################## -# Obtain unique process id (pid) and make temp directory -############################################## -export pid=${pid:-$$} -export outid=${outid:-"LL$job"} - -export DATA=${DATA:-${DATAROOT}/${jobid:?}} -mkdir -p $DATA -cd $DATA - - -############################################## -# Run setpdy and initialize PDY variables -############################################## -export cycle="t${cyc}z" -setpdy.sh -. ./PDY - - -############################################## -# Determine Job Output Name on System -############################################## -export pgmout="OUTPUT.${pid}" -export pgmerr=errfile - - ############################################## # Set variables used in the script ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gfs"}} export COMPONENT=${COMPONENT:-atmos} -export DO_CALC_ANALYSIS=${DO_CALC_ANALYSIS:-"YES"} +export DO_CALC_ANALYSIS=${DO_CALC_ANALYSIS:-"YES"} export MAKE_NSSTBUFR=${MAKE_NSSTBUFR:-"NO"} export MAKE_ACFTBUFR=${MAKE_ACFTBUFR:-"NO"} @@ -103,7 +99,7 @@ fi # Get LEVS if [ ${GSUFFIX} = ".nc" ]; then - export LEVS=$($NCLEN $ATMGES pfull) + export LEVS=$($NCLEN $ATMGES pfull) status=$? else export LEVS=$($NEMSIOGET $ATMGES dimz | awk '{print $2}') @@ -141,7 +137,7 @@ else export PREPQCPF="${COMIN_OBS}/${OPREFIX}prepbufr.acft_profiles" fi -# Copy fix file for obsproc +# Copy fix file for obsproc # TODO: Why is this necessary? if [ $RUN = "gfs" ]; then mkdir -p $ROTDIR/fix cp $FIXgsi/prepobs_errtable.global $ROTDIR/fix/ diff --git a/jobs/rocoto/anal.sh b/jobs/rocoto/anal.sh index cd7fdc932a..be50a547e3 100755 --- a/jobs/rocoto/anal.sh +++ b/jobs/rocoto/anal.sh @@ -8,6 +8,9 @@ source "$HOMEgfs/ush/preamble.sh" status=$? [[ $status -ne 0 ]] && exit $status +export job="anal" +export jobid="${job}.$$" + ############################################################### # Execute the JJOB $HOMEgfs/jobs/JGLOBAL_ATMOS_ANALYSIS From d783c31a194bd817a9ad78462f325ad5dacb01a5 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Wed, 12 Oct 2022 11:23:36 -0400 Subject: [PATCH 07/30] fix eobs, sfcanl. cycle variable should be set in j-job --- jobs/JGDAS_ENKF_SELECT_OBS | 50 +++++++++++++++---------------- jobs/JGLOBAL_ATMOS_SFCANL | 49 ++++++++++++++---------------- jobs/rocoto/eobs.sh | 3 ++ jobs/rocoto/sfcanl.sh | 3 ++ workflow/rocoto/workflow_tasks.py | 1 - 5 files changed, 53 insertions(+), 53 deletions(-) diff --git a/jobs/JGDAS_ENKF_SELECT_OBS b/jobs/JGDAS_ENKF_SELECT_OBS index 0bb1bdc3bc..40915b3394 100755 --- a/jobs/JGDAS_ENKF_SELECT_OBS +++ b/jobs/JGDAS_ENKF_SELECT_OBS @@ -2,7 +2,30 @@ source "$HOMEgfs/ush/preamble.sh" -export RUN_ENVIR=${RUN_ENVIR:-"nco"} +############################################## +# make temp directory +############################################## +export DATA=${DATAROOT}/${jobid} +mkdir -p $DATA +cd $DATA + + +############################################## +# Run setpdy and initialize PDY variables +############################################## +export cycle="t${cyc}z" +setpdy.sh +. ./PDY + + +############################################## +# Determine Job Output Name on System +############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + ############################# # Source relevant config files @@ -25,31 +48,6 @@ status=$? [[ $status -ne 0 ]] && exit $status -############################################## -# Obtain unique process id (pid) and make temp directory -############################################## -export pid=${pid:-$$} -export outid=${outid:-"LL$job"} -export DATA=${DATA:-${DATAROOT}/${jobid:?}} -mkdir -p $DATA -cd $DATA - - -############################################## -# Run setpdy and initialize PDY variables -############################################## -export cycle="t${cyc}z" -setpdy.sh -. ./PDY - - -############################################## -# Determine Job Output Name on System -############################################## -export pgmout="OUTPUT.${pid}" -export pgmerr=errfile - - ############################################## # Set variables used in the script ############################################## diff --git a/jobs/JGLOBAL_ATMOS_SFCANL b/jobs/JGLOBAL_ATMOS_SFCANL index 2e8e8a7160..9a30075a9b 100755 --- a/jobs/JGLOBAL_ATMOS_SFCANL +++ b/jobs/JGLOBAL_ATMOS_SFCANL @@ -2,35 +2,10 @@ source "$HOMEgfs/ush/preamble.sh" -export RUN_ENVIR=${RUN_ENVIR:-"nco"} - -############################# -# Source relevant config files -############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -configs="base sfcanl" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config - status=$? - [[ $status -ne 0 ]] && exit $status -done - -########################################## -# Source machine runtime environment -########################################## -. $HOMEgfs/env/${machine}.env sfcanl -status=$? -[[ $status -ne 0 ]] && exit $status - - ############################################## # Obtain unique process id (pid) and make temp directory ############################################## -export pid=${pid:-$$} -export outid=${outid:-"LL$job"} - -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATAROOT}/${jobid} mkdir -p $DATA cd $DATA @@ -46,10 +21,32 @@ setpdy.sh ############################################## # Determine Job Output Name on System ############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile +############################# +# Source relevant config files +############################# +export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +configs="base sfcanl" +config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +for config in $configs; do + . $config_path/config.$config + status=$? + [[ $status -ne 0 ]] && exit $status +done + +########################################## +# Source machine runtime environment +########################################## +. $HOMEgfs/env/${machine}.env sfcanl +status=$? +[[ $status -ne 0 ]] && exit $status + + ############################################## # Set variables used in the script ############################################## diff --git a/jobs/rocoto/eobs.sh b/jobs/rocoto/eobs.sh index f6dc275578..51c8239a1d 100755 --- a/jobs/rocoto/eobs.sh +++ b/jobs/rocoto/eobs.sh @@ -8,6 +8,9 @@ source "$HOMEgfs/ush/preamble.sh" status=$? [[ $status -ne 0 ]] && exit $status +export job="eobs" +export jobid="${job}.$$" + ############################################################### # Execute the JJOB $HOMEgfs/jobs/JGDAS_ENKF_SELECT_OBS diff --git a/jobs/rocoto/sfcanl.sh b/jobs/rocoto/sfcanl.sh index 7b9812f37b..e2e83d10a0 100755 --- a/jobs/rocoto/sfcanl.sh +++ b/jobs/rocoto/sfcanl.sh @@ -8,6 +8,9 @@ source "$HOMEgfs/ush/preamble.sh" status=$? [[ $status -ne 0 ]] && exit $status +export job="sfcanl" +export jobid="${job}.$$" + ############################################################### # Execute the JJOB $HOMEgfs/jobs/JGLOBAL_ATMOS_SFCANL diff --git a/workflow/rocoto/workflow_tasks.py b/workflow/rocoto/workflow_tasks.py index 8551235a7e..c07925a921 100644 --- a/workflow/rocoto/workflow_tasks.py +++ b/workflow/rocoto/workflow_tasks.py @@ -42,7 +42,6 @@ def __init__(self, app_config: AppConfig, cdump: str) -> None: 'CDATE': '@Y@m@d@H', 'PDY': '@Y@m@d', 'cyc': '@H', - 'cycle': 't@Hz', 'COMROOT': self._base.get('COMROOT'), 'DATAROOT': self._base.get('DATAROOT')} self.envars = self._set_envars(envar_dict) From b8a92928667a1a709f8191c809e534cbb4cf4d0e Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Wed, 12 Oct 2022 11:42:44 -0400 Subject: [PATCH 08/30] cycle variable is defined in j-job not the job-card --- jobs/JGDAS_ATMOS_CHGRES_FORENKF | 1 + jobs/JGDAS_ENKF_FCST | 1 + jobs/JGDAS_ENKF_POST | 1 + jobs/JGLOBAL_ATMOS_ANALYSIS | 1 + jobs/JGLOBAL_ATMOS_POST | 1 + jobs/JGLOBAL_FORECAST | 1 + 6 files changed, 6 insertions(+) diff --git a/jobs/JGDAS_ATMOS_CHGRES_FORENKF b/jobs/JGDAS_ATMOS_CHGRES_FORENKF index 010326798d..8c4c670f6e 100755 --- a/jobs/JGDAS_ATMOS_CHGRES_FORENKF +++ b/jobs/JGDAS_ATMOS_CHGRES_FORENKF @@ -13,6 +13,7 @@ cd $DATA ############################################## # Run setpdy and initialize PDY variables ############################################## +export cycle="t${cyc}z" setpdy.sh . ./PDY diff --git a/jobs/JGDAS_ENKF_FCST b/jobs/JGDAS_ENKF_FCST index b59de4dcf5..9552e484bb 100755 --- a/jobs/JGDAS_ENKF_FCST +++ b/jobs/JGDAS_ENKF_FCST @@ -13,6 +13,7 @@ cd $DATA ############################################## # Run setpdy and initialize PDY variables ############################################## +export cycle="t${cyc}z" setpdy.sh . ./PDY diff --git a/jobs/JGDAS_ENKF_POST b/jobs/JGDAS_ENKF_POST index 07e7cd5cf2..7f01823a2d 100755 --- a/jobs/JGDAS_ENKF_POST +++ b/jobs/JGDAS_ENKF_POST @@ -13,6 +13,7 @@ cd $DATA ############################################## # Run setpdy and initialize PDY variables ############################################## +export cycle="t${cyc}z" setpdy.sh . ./PDY diff --git a/jobs/JGLOBAL_ATMOS_ANALYSIS b/jobs/JGLOBAL_ATMOS_ANALYSIS index b273a51f49..ec9211bd5c 100755 --- a/jobs/JGLOBAL_ATMOS_ANALYSIS +++ b/jobs/JGLOBAL_ATMOS_ANALYSIS @@ -13,6 +13,7 @@ cd $DATA ############################################## # Run setpdy and initialize PDY variables ############################################## +export cycle="t${cyc}z" setpdy.sh . ./PDY diff --git a/jobs/JGLOBAL_ATMOS_POST b/jobs/JGLOBAL_ATMOS_POST index eee54a377c..ef7f65f757 100755 --- a/jobs/JGLOBAL_ATMOS_POST +++ b/jobs/JGLOBAL_ATMOS_POST @@ -13,6 +13,7 @@ cd "${DATA}" || exit 1 ############################################## # Run setpdy and initialize PDY variables ############################################## +export cycle="t${cyc}z" setpdy.sh . ./PDY diff --git a/jobs/JGLOBAL_FORECAST b/jobs/JGLOBAL_FORECAST index 4d6c392aa2..c4e1b9ca1c 100755 --- a/jobs/JGLOBAL_FORECAST +++ b/jobs/JGLOBAL_FORECAST @@ -13,6 +13,7 @@ cd $DATA ############################################## # Run setpdy and initialize PDY variables ############################################## +export cycle="t${cyc}z" setpdy.sh . ./PDY From e140e4958be874376be711a678ef231bce3a5f84 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Wed, 12 Oct 2022 13:04:56 -0400 Subject: [PATCH 09/30] fix analcalc --- jobs/JGLOBAL_ATMOS_ANALYSIS_CALC | 59 +++++++++++++++----------------- jobs/rocoto/analcalc.sh | 3 ++ 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC b/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC index 2af443b8bf..84785899f4 100755 --- a/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC +++ b/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC @@ -2,36 +2,10 @@ source "$HOMEgfs/ush/preamble.sh" -export RUN_ENVIR=${RUN_ENVIR:-"nco"} - -############################# -# Source relevant config files -############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -configs="base anal analcalc" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config - status=$? - [[ $status -ne 0 ]] && exit $status -done - - -########################################## -# Source machine runtime environment -########################################## -. $HOMEgfs/env/${machine}.env analcalc -status=$? -[[ $status -ne 0 ]] && exit $status - - ############################################## # Obtain unique process id (pid) and make temp directory ############################################## -export pid=${pid:-$$} -export outid=${outid:-"LL$job"} - -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATAROOT}/${jobid} mkdir -p $DATA cd $DATA @@ -47,17 +21,40 @@ setpdy.sh ############################################## # Determine Job Output Name on System ############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile +############################# +# Source relevant config files +############################# +export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +configs="base anal analcalc" +config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +for config in $configs; do + . $config_path/config.$config + status=$? + [[ $status -ne 0 ]] && exit $status +done + + +########################################## +# Source machine runtime environment +########################################## +. $HOMEgfs/env/${machine}.env analcalc +status=$? +[[ $status -ne 0 ]] && exit $status + + ############################################## # Set variables used in the script ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gfs"}} -export COMPONENT=${COMPONENT:-atmos} -export DO_CALC_ANALYSIS=${DO_CALC_ANALYSIS:-"YES"} +export COMPONENT="atmos" +export DO_CALC_ANALYSIS=${DO_CALC_ANALYSIS:-"YES"} ############################################## @@ -101,7 +98,7 @@ fi # Get LEVS if [ ${GSUFFIX} = ".nc" ]; then - export LEVS=$($NCLEN $ATMGES pfull) + export LEVS=$($NCLEN $ATMGES pfull) status=$? else export LEVS=$($NEMSIOGET $ATMGES dimz | awk '{print $2}') @@ -119,7 +116,7 @@ if [ $DOHYBVAR = "YES" ]; then fi -# Generate Gaussian surface analysis +# Generate Gaussian surface analysis # TODO: Should this be removed now that sfcanl is its own job? export DOGAUSFCANL=${DOGAUSFCANL:-"YES"} diff --git a/jobs/rocoto/analcalc.sh b/jobs/rocoto/analcalc.sh index d80756cfc7..5e5bf2fc73 100755 --- a/jobs/rocoto/analcalc.sh +++ b/jobs/rocoto/analcalc.sh @@ -8,6 +8,9 @@ source "$HOMEgfs/ush/preamble.sh" status=$? [[ $status -ne 0 ]] && exit $status +export job="analcalc" +export jobid="${job}.$$" + ############################################################### # Execute the JJOB $HOMEgfs/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC From b9625667b5d16296a8352e0bfc96e56c3b004f57 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Wed, 12 Oct 2022 13:27:04 -0400 Subject: [PATCH 10/30] COMPONENT variable is/cannot be set from above in a JJob --- jobs/JGDAS_ATMOS_ANALYSIS_DIAG | 3 ++- jobs/JGDAS_ATMOS_CHGRES_FORENKF | 2 +- jobs/JGDAS_ATMOS_GEMPAK | 2 +- jobs/JGDAS_ATMOS_GEMPAK_META_NCDC | 2 +- jobs/JGDAS_ATMOS_GLDAS | 2 +- jobs/JGDAS_ATMOS_VERFOZN | 2 +- jobs/JGDAS_ATMOS_VERFRAD | 12 ++++++------ jobs/JGDAS_ATMOS_VMINMON | 4 ++-- jobs/JGDAS_EFSOI | 2 +- jobs/JGDAS_EFSOI_ECEN | 4 ++-- jobs/JGDAS_EFSOI_FCST | 4 ++-- jobs/JGDAS_EFSOI_POST | 2 +- jobs/JGDAS_EFSOI_SFC | 2 +- jobs/JGDAS_EFSOI_UPDATE | 2 +- jobs/JGDAS_ENKF_DIAG | 2 +- jobs/JGDAS_ENKF_ECEN | 2 +- jobs/JGDAS_ENKF_FCST | 2 +- jobs/JGDAS_ENKF_POST | 2 +- jobs/JGDAS_ENKF_SELECT_OBS | 2 +- jobs/JGDAS_ENKF_SFC | 2 +- jobs/JGDAS_ENKF_UPDATE | 2 +- jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST | 2 +- jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP | 2 +- jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN | 2 +- jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST | 2 +- jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP | 2 +- jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN | 2 +- jobs/JGFS_ATMOS_AWIPS_20KM_1P0DEG | 2 +- jobs/JGFS_ATMOS_AWIPS_G2 | 2 +- jobs/JGFS_ATMOS_CYCLONE_GENESIS | 2 +- jobs/JGFS_ATMOS_CYCLONE_TRACKER | 2 +- jobs/JGFS_ATMOS_FBWIND | 2 +- jobs/JGFS_ATMOS_FSU_GENESIS | 4 ++-- jobs/JGFS_ATMOS_GEMPAK | 2 +- jobs/JGFS_ATMOS_GEMPAK_META | 2 +- jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF | 2 +- jobs/JGFS_ATMOS_GEMPAK_PGRB2_SPEC | 2 +- jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS | 2 +- jobs/JGFS_ATMOS_VMINMON | 6 +++--- jobs/JGLOBAL_ATMOS_ANALYSIS | 2 +- jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP | 2 +- jobs/JGLOBAL_ATMOS_POST | 2 +- jobs/JGLOBAL_ATMOS_POST_MANAGER | 8 ++++---- jobs/JGLOBAL_ATMOS_SFCANL | 2 +- jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC | 2 +- jobs/JGLOBAL_WAVE_GEMPAK | 2 +- jobs/JGLOBAL_WAVE_INIT | 6 +++--- jobs/JGLOBAL_WAVE_POST_BNDPNT | 8 ++++---- jobs/JGLOBAL_WAVE_POST_BNDPNTBLL | 2 +- jobs/JGLOBAL_WAVE_POST_PNT | 8 ++++---- jobs/JGLOBAL_WAVE_POST_SBS | 2 +- jobs/JGLOBAL_WAVE_PRDGEN_BULLS | 6 ++---- jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED | 6 ++---- jobs/JGLOBAL_WAVE_PREP | 10 +++++----- jobs/rocoto/analdiag.sh | 3 +++ 55 files changed, 86 insertions(+), 86 deletions(-) diff --git a/jobs/JGDAS_ATMOS_ANALYSIS_DIAG b/jobs/JGDAS_ATMOS_ANALYSIS_DIAG index ff1138b476..490e23df0c 100755 --- a/jobs/JGDAS_ATMOS_ANALYSIS_DIAG +++ b/jobs/JGDAS_ATMOS_ANALYSIS_DIAG @@ -13,6 +13,7 @@ cd $DATA ############################################## # Run setpdy and initialize PDY variables ############################################## +export cycle="t${cyc}z" setpdy.sh . ./PDY @@ -52,7 +53,7 @@ status=$? ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gfs"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" export DO_CALC_ANALYSIS=${DO_CALC_ANALYSIS:-"YES"} diff --git a/jobs/JGDAS_ATMOS_CHGRES_FORENKF b/jobs/JGDAS_ATMOS_CHGRES_FORENKF index 8c4c670f6e..35be64603c 100755 --- a/jobs/JGDAS_ATMOS_CHGRES_FORENKF +++ b/jobs/JGDAS_ATMOS_CHGRES_FORENKF @@ -53,7 +53,7 @@ status=$? ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gfs"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" export DO_CALC_ANALYSIS=${DO_CALC_ANALYSIS:-"YES"} diff --git a/jobs/JGDAS_ATMOS_GEMPAK b/jobs/JGDAS_ATMOS_GEMPAK index 2655b34069..8c6cf70528 100755 --- a/jobs/JGDAS_ATMOS_GEMPAK +++ b/jobs/JGDAS_ATMOS_GEMPAK @@ -70,7 +70,7 @@ export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn} export NET=${NET:-gfs} export RUN=${RUN:-gdas} export model=${model:-gdas} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## # Define COM directories diff --git a/jobs/JGDAS_ATMOS_GEMPAK_META_NCDC b/jobs/JGDAS_ATMOS_GEMPAK_META_NCDC index 367f0a0c83..36e9bcfe2d 100755 --- a/jobs/JGDAS_ATMOS_GEMPAK_META_NCDC +++ b/jobs/JGDAS_ATMOS_GEMPAK_META_NCDC @@ -48,7 +48,7 @@ cp $FIXgempak/datatype.tbl datatype.tbl #################################### export NET=${NET:-gfs} export RUN=${RUN:-gdas} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" export MODEL=GDAS export GRID_NAME=gdas export fend=09 diff --git a/jobs/JGDAS_ATMOS_GLDAS b/jobs/JGDAS_ATMOS_GLDAS index 61e055a66d..53ef2647d6 100755 --- a/jobs/JGDAS_ATMOS_GLDAS +++ b/jobs/JGDAS_ATMOS_GLDAS @@ -75,7 +75,7 @@ export pgmerr=errfile ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gdas"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## diff --git a/jobs/JGDAS_ATMOS_VERFOZN b/jobs/JGDAS_ATMOS_VERFOZN index aa1454440d..cb96652a8a 100755 --- a/jobs/JGDAS_ATMOS_VERFOZN +++ b/jobs/JGDAS_ATMOS_VERFOZN @@ -10,7 +10,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################## export NET=${NET:-gfs} export RUN=${RUN:-gdas} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ########################################################### # obtain unique process id (pid) and make temp directories diff --git a/jobs/JGDAS_ATMOS_VERFRAD b/jobs/JGDAS_ATMOS_VERFRAD index accf9f88f8..77006611aa 100755 --- a/jobs/JGDAS_ATMOS_VERFRAD +++ b/jobs/JGDAS_ATMOS_VERFRAD @@ -10,9 +10,9 @@ source "$HOMEgfs/ush/preamble.sh" ############################## export NET=${NET:-gfs} export RUN=${RUN:-gdas} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" -########################################################### +########################################################### # obtain unique process id (pid) and make temp directories ########################################################### export pid=$$ @@ -60,7 +60,7 @@ parm_file=${parm_file:-${PARMmon}/da_mon.parm} if [[ $MY_MACHINE != "HERA" && $MY_MACHINE != "hera" ]]; then setpdy.sh . ./PDY -fi +fi ############################################# # determine PDY and cyc for previous cycle @@ -84,8 +84,8 @@ export COMIN=${COMIN:-${COM_IN}/${RUN}.${PDY}/${cyc}/$COMPONENT} ################################ # backwards compatibility for -# gfs v15 which doesn't have -# a $COMPONENT in output path +# gfs v15 which doesn't have +# a $COMPONENT in output path ################################ if [[ ! -d ${COMIN} ]]; then export COMIN=${COM_IN}/${RUN}.${PDY}/${cyc} @@ -125,7 +125,7 @@ fi ################################ KEEPDATA=${KEEPDATA:-YES} cd $DATAROOT -if [ ${KEEPDATA} = NO ] ; then +if [ ${KEEPDATA} = NO ] ; then rm -rf $RAD_DATA_IN fi diff --git a/jobs/JGDAS_ATMOS_VMINMON b/jobs/JGDAS_ATMOS_VMINMON index fcd341e76e..69a4e5f462 100755 --- a/jobs/JGDAS_ATMOS_VMINMON +++ b/jobs/JGDAS_ATMOS_VMINMON @@ -10,7 +10,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################## export NET=${NET:-gfs} export RUN=${RUN:-gdas} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ########################################################### # obtain unique process id (pid) and make temp directories @@ -23,7 +23,7 @@ mkdir -p $DATA cd $DATA -########################################################### +########################################################### # obtain unique process id (pid) and make temp directories ########################################################### export MINMON_SUFFIX=${MINMON_SUFFIX:-${NET}} diff --git a/jobs/JGDAS_EFSOI b/jobs/JGDAS_EFSOI index 0fa38dc3e1..cc3ac4e94d 100755 --- a/jobs/JGDAS_EFSOI +++ b/jobs/JGDAS_EFSOI @@ -58,7 +58,7 @@ export pgmerr=errfile ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gdas"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" if [ $RUN_ENVIR = "nco" ]; then export ROTDIR=${COMROOT:?}/$NET/$envir fi diff --git a/jobs/JGDAS_EFSOI_ECEN b/jobs/JGDAS_EFSOI_ECEN index c4d63bcc70..c3a46531fc 100755 --- a/jobs/JGDAS_EFSOI_ECEN +++ b/jobs/JGDAS_EFSOI_ECEN @@ -55,7 +55,7 @@ export pgmerr=errfile ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gdas"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" if [ $RUN_ENVIR = "nco" ]; then export ROTDIR=${COMROOT:?}/$NET/$envir fi @@ -97,7 +97,7 @@ fi # COMIN, COMIN_ENS and COMIN_GES_ENS are used in script export COMIN="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT" -export COMIN_ENS="$ROTDIR/efsoi$CDUMP_ENKF.$PDY/$cyc/$COMPONENT" +export COMIN_ENS="$ROTDIR/efsoi$CDUMP_ENKF.$PDY/$cyc/$COMPONENT" export COMOUT_ENS="$ROTDIR/efsoi$CDUMP.$PDY/$cyc/$COMPONENT" export COMIN_GES_ENS="$ROTDIR/enkf$CDUMP.$gPDY/$gcyc/$COMPONENT" diff --git a/jobs/JGDAS_EFSOI_FCST b/jobs/JGDAS_EFSOI_FCST index a4b67d3428..9ed279988e 100755 --- a/jobs/JGDAS_EFSOI_FCST +++ b/jobs/JGDAS_EFSOI_FCST @@ -55,13 +55,13 @@ export pgmerr=errfile ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gdas"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" if [ $RUN_ENVIR = "nco" ]; then export ROTDIR=${COMROOT:?}/$NET/$envir fi # tells the forecast script to use efsoi ensemble -export EFSOI_TASK="YES" +export EFSOI_TASK="YES" ############################################## # Begin JOB SPECIFIC work diff --git a/jobs/JGDAS_EFSOI_POST b/jobs/JGDAS_EFSOI_POST index f096aff28e..c368eb9cdc 100755 --- a/jobs/JGDAS_EFSOI_POST +++ b/jobs/JGDAS_EFSOI_POST @@ -55,7 +55,7 @@ export pgmerr=errfile ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gdas"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" if [ $RUN_ENVIR = "nco" ]; then export ROTDIR=${COMROOT:?}/$NET/$envir fi diff --git a/jobs/JGDAS_EFSOI_SFC b/jobs/JGDAS_EFSOI_SFC index 18a9c24c7f..c3e56047f6 100755 --- a/jobs/JGDAS_EFSOI_SFC +++ b/jobs/JGDAS_EFSOI_SFC @@ -55,7 +55,7 @@ export pgmerr=errfile ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gdas"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" if [ $RUN_ENVIR = "nco" ]; then export ROTDIR=${COMROOT:?}/$NET/$envir fi diff --git a/jobs/JGDAS_EFSOI_UPDATE b/jobs/JGDAS_EFSOI_UPDATE index c0f491dcd5..0a27de8284 100755 --- a/jobs/JGDAS_EFSOI_UPDATE +++ b/jobs/JGDAS_EFSOI_UPDATE @@ -58,7 +58,7 @@ export pgmerr=errfile ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gdas"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" if [ $RUN_ENVIR = "nco" ]; then export ROTDIR=${COMROOT:?}/$NET/$envir fi diff --git a/jobs/JGDAS_ENKF_DIAG b/jobs/JGDAS_ENKF_DIAG index 83e3e6b366..366555ce4b 100755 --- a/jobs/JGDAS_ENKF_DIAG +++ b/jobs/JGDAS_ENKF_DIAG @@ -55,7 +55,7 @@ export pgmerr=errfile ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gdas"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" export MAKE_NSSTBUFR=${MAKE_NSSTBUFR:-"NO"} export MAKE_ACFTBUFR=${MAKE_ACFTBUFR:-"NO"} diff --git a/jobs/JGDAS_ENKF_ECEN b/jobs/JGDAS_ENKF_ECEN index 90773d7a1e..db3d64cca9 100755 --- a/jobs/JGDAS_ENKF_ECEN +++ b/jobs/JGDAS_ENKF_ECEN @@ -55,7 +55,7 @@ export pgmerr=errfile ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gdas"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## diff --git a/jobs/JGDAS_ENKF_FCST b/jobs/JGDAS_ENKF_FCST index 9552e484bb..5958dc4ed3 100755 --- a/jobs/JGDAS_ENKF_FCST +++ b/jobs/JGDAS_ENKF_FCST @@ -53,7 +53,7 @@ status=$? ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gdas"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## diff --git a/jobs/JGDAS_ENKF_POST b/jobs/JGDAS_ENKF_POST index 7f01823a2d..394d4d97eb 100755 --- a/jobs/JGDAS_ENKF_POST +++ b/jobs/JGDAS_ENKF_POST @@ -53,7 +53,7 @@ status=$? ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gdas"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## diff --git a/jobs/JGDAS_ENKF_SELECT_OBS b/jobs/JGDAS_ENKF_SELECT_OBS index 40915b3394..3938a6406f 100755 --- a/jobs/JGDAS_ENKF_SELECT_OBS +++ b/jobs/JGDAS_ENKF_SELECT_OBS @@ -53,7 +53,7 @@ status=$? ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gdas"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" export MAKE_NSSTBUFR=${MAKE_NSSTBUFR:-"NO"} export MAKE_ACFTBUFR=${MAKE_ACFTBUFR:-"NO"} diff --git a/jobs/JGDAS_ENKF_SFC b/jobs/JGDAS_ENKF_SFC index cc41e7622f..63aa9d79c4 100755 --- a/jobs/JGDAS_ENKF_SFC +++ b/jobs/JGDAS_ENKF_SFC @@ -55,7 +55,7 @@ export pgmerr=errfile ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gdas"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## diff --git a/jobs/JGDAS_ENKF_UPDATE b/jobs/JGDAS_ENKF_UPDATE index fab0726a16..d091e289c9 100755 --- a/jobs/JGDAS_ENKF_UPDATE +++ b/jobs/JGDAS_ENKF_UPDATE @@ -55,7 +55,7 @@ export pgmerr=errfile ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gdas"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST index 68063c591d..655afc4645 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST +++ b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST @@ -54,7 +54,7 @@ export pgmerr=errfile ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gfs"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## # Begin JOB SPECIFIC work diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP index b09cd49963..c61d426189 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP +++ b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP @@ -54,7 +54,7 @@ export pgmerr=errfile ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gfs"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## # Begin JOB SPECIFIC work diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN index 491aaf8554..835f73c1d7 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN +++ b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN @@ -54,7 +54,7 @@ export pgmerr=errfile ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gfs"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## # Begin JOB SPECIFIC work diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST index 997ad26739..5d652a0f8a 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST +++ b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST @@ -54,7 +54,7 @@ export pgmerr=errfile ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gfs"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## # Begin JOB SPECIFIC work diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP index bdb78d0c13..ab50273f8f 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP +++ b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP @@ -54,7 +54,7 @@ export pgmerr=errfile ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gfs"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## # Begin JOB SPECIFIC work diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN index 95fbed8868..3cd91cf797 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN +++ b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN @@ -54,7 +54,7 @@ export pgmerr=errfile ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gfs"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## # Begin JOB SPECIFIC work diff --git a/jobs/JGFS_ATMOS_AWIPS_20KM_1P0DEG b/jobs/JGFS_ATMOS_AWIPS_20KM_1P0DEG index 0971ec6bff..adf3751d38 100755 --- a/jobs/JGFS_ATMOS_AWIPS_20KM_1P0DEG +++ b/jobs/JGFS_ATMOS_AWIPS_20KM_1P0DEG @@ -43,7 +43,7 @@ export FIXgfs=${FIXgfs:-$HOMEgfs/fix} export NET=${NET:-gfs} export RUN=${RUN:-gfs} export model=${model:-gfs} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## # Define COM directories diff --git a/jobs/JGFS_ATMOS_AWIPS_G2 b/jobs/JGFS_ATMOS_AWIPS_G2 index db4e984b6a..14482b7db1 100755 --- a/jobs/JGFS_ATMOS_AWIPS_G2 +++ b/jobs/JGFS_ATMOS_AWIPS_G2 @@ -44,7 +44,7 @@ export UTILgfs=${UTILgfs:-$HOMEgfs/util} export NET=${NET:-gfs} export RUN=${RUN:-gfs} export model=${model:-gfs} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## # Define COM directories diff --git a/jobs/JGFS_ATMOS_CYCLONE_GENESIS b/jobs/JGFS_ATMOS_CYCLONE_GENESIS index 7641c0dbfd..a200bf37f1 100755 --- a/jobs/JGFS_ATMOS_CYCLONE_GENESIS +++ b/jobs/JGFS_ATMOS_CYCLONE_GENESIS @@ -51,7 +51,7 @@ setpdy.sh #################################### export NET=${NET:-gfs} export RUN=${RUN:-gfs} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## # Determine Job Output Name on System diff --git a/jobs/JGFS_ATMOS_CYCLONE_TRACKER b/jobs/JGFS_ATMOS_CYCLONE_TRACKER index 727bf3e590..2227651d76 100755 --- a/jobs/JGFS_ATMOS_CYCLONE_TRACKER +++ b/jobs/JGFS_ATMOS_CYCLONE_TRACKER @@ -51,7 +51,7 @@ setpdy.sh #################################### export NET=${NET:-gfs} export RUN=${RUN:-gfs} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## diff --git a/jobs/JGFS_ATMOS_FBWIND b/jobs/JGFS_ATMOS_FBWIND index df8d3bc0c1..69e5de4b1c 100755 --- a/jobs/JGFS_ATMOS_FBWIND +++ b/jobs/JGFS_ATMOS_FBWIND @@ -42,7 +42,7 @@ export UTILgfs=${UTILgfs:-$HOMEgfs/util} export NET=${NET:-gfs} export RUN=${RUN:-gfs} export model=${model:-gfs} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## # Define COM directories diff --git a/jobs/JGFS_ATMOS_FSU_GENESIS b/jobs/JGFS_ATMOS_FSU_GENESIS index d403a76fe2..f51311e68f 100755 --- a/jobs/JGFS_ATMOS_FSU_GENESIS +++ b/jobs/JGFS_ATMOS_FSU_GENESIS @@ -52,7 +52,7 @@ setpdy.sh #################################### export NET=${NET:-gfs} export RUN=${RUN:-gfs} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## @@ -105,7 +105,7 @@ if [ $RUN_ENVIR = "nco" ]; then export COMOUTatcf=${COMROOTp1:?}/nhc/${envir}/atcf mkdir -m 775 -p $COMOUThur $COMOUTatcf else -# export COMOUThur=$COMOUT +# export COMOUThur=$COMOUT # export COMOUTatcf=$COMOUT export COMOUThur=$DATA export COMOUTatcf=$DATA diff --git a/jobs/JGFS_ATMOS_GEMPAK b/jobs/JGFS_ATMOS_GEMPAK index 1e93982cd1..6171799896 100755 --- a/jobs/JGFS_ATMOS_GEMPAK +++ b/jobs/JGFS_ATMOS_GEMPAK @@ -85,7 +85,7 @@ export DBN_ALERT_TYPE=${DBN_ALERT_TYPE:-GFS_GEMPAK} export NET=${NET:-gfs} export RUN=${RUN:-gfs} export model=${model:-gfs} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## # Define COM directories diff --git a/jobs/JGFS_ATMOS_GEMPAK_META b/jobs/JGFS_ATMOS_GEMPAK_META index 707537f3f1..15fe02c547 100755 --- a/jobs/JGFS_ATMOS_GEMPAK_META +++ b/jobs/JGFS_ATMOS_GEMPAK_META @@ -60,7 +60,7 @@ export fhinc=12 export NET=${NET:-gfs} export RUN=${RUN:-gfs} export model=${model:-gfs} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## # Set up model and cycle specific variables diff --git a/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF b/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF index 82667654d1..9f56de584a 100755 --- a/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF +++ b/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF @@ -63,7 +63,7 @@ export fstart=00 export NET=${NET:-gfs} export RUN=${RUN:-gfs} export model=${model:-gfs} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## # Define COM directories diff --git a/jobs/JGFS_ATMOS_GEMPAK_PGRB2_SPEC b/jobs/JGFS_ATMOS_GEMPAK_PGRB2_SPEC index f7080fb523..044150a1a2 100755 --- a/jobs/JGFS_ATMOS_GEMPAK_PGRB2_SPEC +++ b/jobs/JGFS_ATMOS_GEMPAK_PGRB2_SPEC @@ -43,7 +43,7 @@ export SRCgfs=${SRCgfs:-$HOMEgfs/scripts} #################################### export NET=gfs export RUN=gfs -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" export finc=3 export model=gfs export EXT="" diff --git a/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS b/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS index 74b4695f28..9573218cbf 100755 --- a/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS +++ b/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS @@ -44,7 +44,7 @@ export FIXgfs=${FIXgfs:-$HOMEgfs/fix} export NET=${NET:-gfs} export RUN=${RUN:-gfs} export model=${model:-gfs} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## # Define COM directories diff --git a/jobs/JGFS_ATMOS_VMINMON b/jobs/JGFS_ATMOS_VMINMON index 3087d0ecc3..921e8e0732 100755 --- a/jobs/JGFS_ATMOS_VMINMON +++ b/jobs/JGFS_ATMOS_VMINMON @@ -10,7 +10,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################## export NET=${NET:-gfs} export RUN=${RUN:-gfs} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ########################################################### @@ -23,7 +23,7 @@ mkdir -p $DATA cd $DATA -########################################################### +########################################################### # obtain unique process id (pid) and make temp directories ########################################################### export MINMON_SUFFIX=${MINMON_SUFFIX:-GFS} @@ -64,7 +64,7 @@ export M_TANKverfM1=${M_TANKverfM1:-${COM_IN}/${RUN}.${P_PDY}/${p_cyc}/${COMPONE export COMIN=${COMIN:-$COM_IN/${RUN}.${PDY}/${cyc}/$COMPONENT} mkdir -p -m 775 $M_TANKverf - + ######################################## # Set necessary environment variables diff --git a/jobs/JGLOBAL_ATMOS_ANALYSIS b/jobs/JGLOBAL_ATMOS_ANALYSIS index ec9211bd5c..2b2d578b99 100755 --- a/jobs/JGLOBAL_ATMOS_ANALYSIS +++ b/jobs/JGLOBAL_ATMOS_ANALYSIS @@ -53,7 +53,7 @@ status=$? ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gfs"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" export DO_CALC_ANALYSIS=${DO_CALC_ANALYSIS:-"YES"} export MAKE_NSSTBUFR=${MAKE_NSSTBUFR:-"NO"} export MAKE_ACFTBUFR=${MAKE_ACFTBUFR:-"NO"} diff --git a/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP b/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP index d40a22da0f..14291f56f5 100755 --- a/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP +++ b/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP @@ -54,7 +54,7 @@ PDY_m6hrs=$(echo $GDATE | cut -c1-8) cyc_m6hrs=$(echo $GDATE | cut -c9-10) export cycle_m6hrs=t${cyc_m6hrs}z -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/$COMPONENT} export COMINobsproc=${COMINobsproc:-$(compath.py ${envir}/obsproc/${obsproc_ver})/${RUN}.${PDY}/${cyc}/$COMPONENT} diff --git a/jobs/JGLOBAL_ATMOS_POST b/jobs/JGLOBAL_ATMOS_POST index ef7f65f757..e074633873 100755 --- a/jobs/JGLOBAL_ATMOS_POST +++ b/jobs/JGLOBAL_ATMOS_POST @@ -61,7 +61,7 @@ export g2tmpl_ver=${g2tmpl_ver:-v1.5.0} ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gfs"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## diff --git a/jobs/JGLOBAL_ATMOS_POST_MANAGER b/jobs/JGLOBAL_ATMOS_POST_MANAGER index 01323846db..463032a0d9 100755 --- a/jobs/JGLOBAL_ATMOS_POST_MANAGER +++ b/jobs/JGLOBAL_ATMOS_POST_MANAGER @@ -32,7 +32,7 @@ set -xue # #### 07/30/1999 ################### # SET SHELL PROCESSING VARIABLES # ################################### -export PS4='$SECONDS + ' +export PS4='$SECONDS + ' date #################################### @@ -40,15 +40,15 @@ date #################################### export NET=${NET:-gfs} export RUN=${RUN:-gfs} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" -#################################### +#################################### # obtain unique process id (pid) and make temp directories #################################### export pid=${pid:-$$} export DATA=${DATA:-${DATAROOT}/${jobid:?}} mkdir $DATA -cd $DATA +cd $DATA #################################### # Determine Job Output Name on System diff --git a/jobs/JGLOBAL_ATMOS_SFCANL b/jobs/JGLOBAL_ATMOS_SFCANL index 9a30075a9b..58cf770a3c 100755 --- a/jobs/JGLOBAL_ATMOS_SFCANL +++ b/jobs/JGLOBAL_ATMOS_SFCANL @@ -52,7 +52,7 @@ status=$? ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gfs"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" if [ $RUN_ENVIR = "nco" ]; then export ROTDIR=${COMROOT:?}/$NET/$envir fi diff --git a/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC b/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC index e9c9b9db1e..39cfb4abb6 100755 --- a/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC +++ b/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC @@ -55,7 +55,7 @@ export pgmerr=errfile ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gfs"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################## diff --git a/jobs/JGLOBAL_WAVE_GEMPAK b/jobs/JGLOBAL_WAVE_GEMPAK index baf2f437f1..8d86093dfc 100755 --- a/jobs/JGLOBAL_WAVE_GEMPAK +++ b/jobs/JGLOBAL_WAVE_GEMPAK @@ -18,7 +18,7 @@ setpdy.sh # export NET=${NET:-gfs} export RUN=${RUN:-gfs} -export COMPONENT=${COMPONENT:-wave} +export COMPONENT="wave" export machine=${machine:-WCOSS2} export HOMEgfs=${HOMEgfs:-$(dirname $(dirname $0))} diff --git a/jobs/JGLOBAL_WAVE_INIT b/jobs/JGLOBAL_WAVE_INIT index 52fbc80110..ca7a0f326a 100755 --- a/jobs/JGLOBAL_WAVE_INIT +++ b/jobs/JGLOBAL_WAVE_INIT @@ -26,7 +26,7 @@ status=$? # PATH for working directory export NET=${NET:-gfs} export RUN=${RUN:-gfs} -export COMPONENT=${COMPONENT:-wave} +export COMPONENT="wave" # Add default errchk = err_chk export errchk=${errchk:-err_chk} @@ -38,7 +38,7 @@ cd $DATA cyc=${cyc:-00} export cycle=${cycle:-t${cyc}z} - + # Set PDY setpdy.sh . ./PDY @@ -66,7 +66,7 @@ fi export wavempexec=${wavempexec:-"mpirun -n"} export wave_mpmd=${mpmd:-"cfp"} -# Execute the Script +# Execute the Script $HOMEgfs/scripts/exgfs_wave_init.sh ########################################## diff --git a/jobs/JGLOBAL_WAVE_POST_BNDPNT b/jobs/JGLOBAL_WAVE_POST_BNDPNT index 0f0370c940..8a585d3f23 100755 --- a/jobs/JGLOBAL_WAVE_POST_BNDPNT +++ b/jobs/JGLOBAL_WAVE_POST_BNDPNT @@ -26,7 +26,7 @@ status=$? # PATH for working directory export NET=${NET:-gfs} export RUN=${RUN:-gfs} -export COMPONENT=${COMPONENT:-wave} +export COMPONENT="wave" export HOMEgefs=${HOMEgefs:-$PACKAGEROOT/$NET.${gefs_ver}} export HOMEgfs=${HOMEgfs:-$PACKAGEROOT/$NET.${gfs_ver}} @@ -41,7 +41,7 @@ cd $DATA export cyc=${cyc:-00} export cycle=${cycle:-t${cyc}z} - + # Set PDY setpdy.sh . ./PDY @@ -65,7 +65,7 @@ export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/$COMPONENT} mkdir -p $COMOUT/station -# Set wave model ID tag to include member number +# Set wave model ID tag to include member number # if ensemble; waveMEMB var empty in deterministic membTAG='p' if [ "${waveMEMB}" == "00" ]; then membTAG='c'; fi @@ -80,7 +80,7 @@ export DOSPC_WAV='YES' # Spectral post export DOBLL_WAV='NO' # Bulletin post export DOBNDPNT_WAV='YES' #not boundary points -# Execute the Script +# Execute the Script $HOMEgfs/scripts/exgfs_wave_post_pnt.sh err=$? if [ $err -ne 0 ]; then diff --git a/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL b/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL index 8b5819a954..04ff9782c1 100755 --- a/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL +++ b/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL @@ -26,7 +26,7 @@ status=$? # PATH for working directory export NET=${NET:-gfs} export RUN=${RUN:-gfs} -export COMPONENT=${COMPONENT:-wave} +export COMPONENT="wave" export HOMEgefs=${HOMEgefs:-$PACKAGEROOT/$NET.${gefs_ver}} export HOMEgfs=${HOMEgfs:-$PACKAGEROOT/$NET.${gfs_ver}} diff --git a/jobs/JGLOBAL_WAVE_POST_PNT b/jobs/JGLOBAL_WAVE_POST_PNT index 1a2d394a6f..119eafb6af 100755 --- a/jobs/JGLOBAL_WAVE_POST_PNT +++ b/jobs/JGLOBAL_WAVE_POST_PNT @@ -26,7 +26,7 @@ status=$? # PATH for working directory export NET=${NET:-gfs} export RUN=${RUN:-gfs} -export COMPONENT=${COMPONENT:-wave} +export COMPONENT="wave" export HOMEgefs=${HOMEgefs:-${PACKAGEROOT:-}/$NET.${gefs_ver:-}} export HOMEgfs=${HOMEgfs:-${PACKAGEROOT:-}/$NET.${gfs_ver}} @@ -41,7 +41,7 @@ cd $DATA export cyc=${cyc:-00} export cycle=${cycle:-t${cyc}z} - + # Set PDY setpdy.sh . ./PDY @@ -65,7 +65,7 @@ export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/$COMPONENT} mkdir -p $COMOUT/station -# Set wave model ID tag to include member number +# Set wave model ID tag to include member number # if ensemble; waveMEMB var empty in deterministic # Set wave model ID tag to include member number # if ensemble; waveMEMB var empty in deterministic @@ -82,7 +82,7 @@ export DOBLL_WAV='YES' # Bulletin post export DOBNDPNT_WAV='NO' #not boundary points -# Execute the Script +# Execute the Script $HOMEgfs/scripts/exgfs_wave_post_pnt.sh err=$? if [ $err -ne 0 ]; then diff --git a/jobs/JGLOBAL_WAVE_POST_SBS b/jobs/JGLOBAL_WAVE_POST_SBS index aca8e03f36..ff9bd90750 100755 --- a/jobs/JGLOBAL_WAVE_POST_SBS +++ b/jobs/JGLOBAL_WAVE_POST_SBS @@ -26,7 +26,7 @@ status=$? # PATH for working directory export NET=${NET:-gfs} export RUN=${RUN:-gfs} -export COMPONENT=${COMPONENT:-wave} +export COMPONENT="wave" export HOMEgefs=${HOMEgefs:-${PACKAGEROOT:-}/$NET.${gefs_ver:-}} export HOMEgfs=${HOMEgfs:-${PACKAGEROOT:-}/$NET.${gfs_ver}} diff --git a/jobs/JGLOBAL_WAVE_PRDGEN_BULLS b/jobs/JGLOBAL_WAVE_PRDGEN_BULLS index 52481f848a..45fe7376ae 100755 --- a/jobs/JGLOBAL_WAVE_PRDGEN_BULLS +++ b/jobs/JGLOBAL_WAVE_PRDGEN_BULLS @@ -10,14 +10,12 @@ cd $DATA # Set up the cycle variable ###################################### export cycle=${cycle:-t${cyc}z} - -# Set PDY setpdy.sh . ./PDY export NET=${NET:-gfs} export RUN=${RUN:-gfs} -export COMPONENT=${COMPONENT:-wave} +export COMPONENT="wave" export HOMEgfs=${HOMEgfs:-$(dirname $(dirname $0))} # parent directory of current job card # Add default errchk = err_chk @@ -41,7 +39,7 @@ fi ################################### -# Execute the Script +# Execute the Script $HOMEgfs/scripts/exgfs_wave_prdgen_bulls.sh status=$? diff --git a/jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED b/jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED index 7a54c87ccc..ecd04aad9f 100755 --- a/jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED +++ b/jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED @@ -10,15 +10,13 @@ cd $DATA # Set up the cycle variable ###################################### export cycle=${cycle:-t${cyc}z} - -# Set PDY setpdy.sh . ./PDY # PATH for working directory export NET=${NET:-gfs} export RUN=${RUN:-gfs} -export COMPONENT=${COMPONENT:-wave} +export COMPONENT="wave" export HOMEgfs=${HOMEgfs:-$(dirname $(dirname $0))} # parent directory of current job card # Add default errchk = err_chk @@ -41,7 +39,7 @@ if [ $SENDCOM = YES ]; then fi ################################### -# Execute the Script +# Execute the Script ################################### $HOMEgfs/scripts/exgfs_wave_prdgen_gridded.sh status=$? diff --git a/jobs/JGLOBAL_WAVE_PREP b/jobs/JGLOBAL_WAVE_PREP index eba4af8784..188b888106 100755 --- a/jobs/JGLOBAL_WAVE_PREP +++ b/jobs/JGLOBAL_WAVE_PREP @@ -26,7 +26,7 @@ status=$? # PATH for working directory export NET=${NET:-gfs} export RUN=${RUN:-gfs} -export COMPONENT=${COMPONENT:-wave} +export COMPONENT="wave" export HOMEgfs=${HOMEgfs:-$PACKAGEROOT/gfs.${gfs_ver}} @@ -40,7 +40,7 @@ cd $DATA cyc=${cyc:-00} export cycle=${cycle:-t${cyc}z} - + # Set PDY setpdy.sh . ./PDY @@ -79,13 +79,13 @@ else $NLN $DMPDIR/${WAVECUR_DID}.${BRPDY} $ROTDIR/${WAVECUR_DID}.${BRPDY} fi export COMIN_WAV_RTOFS=${COMIN_WAV_RTOFS:-$ROTDIR} - fi - if [ $WW3ICEINP = "YES" ]; then + fi + if [ $WW3ICEINP = "YES" ]; then if [ ! -L $ROTDIR/${CDUMP}.${PDY}/${cyc}/atmos/${WAVICEFILE} ]; then # Check if symlink already exists in ROTDIR $NLN $DMPDIR/$CDUMP.${PDY}/$cyc/atmos/${WAVICEFILE} $ROTDIR/$CDUMP.${PDY}/$cyc/atmos/${WAVICEFILE} fi export COMIN_WAV_ICE=${COMIN_WAV_ICE:-$ROTDIR/$RUN.$PDY/$cyc/atmos} - fi + fi fi # Execute the Script diff --git a/jobs/rocoto/analdiag.sh b/jobs/rocoto/analdiag.sh index f9d97360c6..442251db2d 100755 --- a/jobs/rocoto/analdiag.sh +++ b/jobs/rocoto/analdiag.sh @@ -8,6 +8,9 @@ source "$HOMEgfs/ush/preamble.sh" status=$? [[ $status -ne 0 ]] && exit $status +export job="analdiag" +export jobid="${job}.$$" + ############################################################### # Execute the JJOB $HOMEgfs/jobs/JGDAS_ATMOS_ANALYSIS_DIAG From ad67dcadb96f9ff3eb5f6e4d6bc7d9f21179c0cc Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Wed, 12 Oct 2022 14:11:04 -0400 Subject: [PATCH 11/30] fix ediag --- jobs/JGDAS_ENKF_DIAG | 50 +++++++++++++++++++++----------------------- jobs/rocoto/ediag.sh | 3 +++ 2 files changed, 27 insertions(+), 26 deletions(-) diff --git a/jobs/JGDAS_ENKF_DIAG b/jobs/JGDAS_ENKF_DIAG index 366555ce4b..dc89383697 100755 --- a/jobs/JGDAS_ENKF_DIAG +++ b/jobs/JGDAS_ENKF_DIAG @@ -2,7 +2,30 @@ source "$HOMEgfs/ush/preamble.sh" -export RUN_ENVIR=${RUN_ENVIR:-"nco"} +############################################## +# make temp directory +############################################## +export DATA=${DATAROOT}/${jobid} +mkdir -p $DATA +cd $DATA + + +############################################## +# Run setpdy and initialize PDY variables +############################################## +export cycle="t${cyc}z" +setpdy.sh +. ./PDY + + +############################################## +# Determine Job Output Name on System +############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + ############################# # Source relevant config files @@ -25,31 +48,6 @@ status=$? [[ $status -ne 0 ]] && exit $status -############################################## -# Obtain unique process id (pid) and make temp directory -############################################## -export pid=${pid:-$$} -export outid=${outid:-"LL$job"} -export DATA=${DATA:-${DATAROOT}/${jobid:?}} -mkdir -p $DATA -cd $DATA - - -############################################## -# Run setpdy and initialize PDY variables -############################################## -export cycle="t${cyc}z" -setpdy.sh -. ./PDY - - -############################################## -# Determine Job Output Name on System -############################################## -export pgmout="OUTPUT.${pid}" -export pgmerr=errfile - - ############################################## # Set variables used in the script ############################################## diff --git a/jobs/rocoto/ediag.sh b/jobs/rocoto/ediag.sh index b09a7f4963..f0d03ca2bd 100755 --- a/jobs/rocoto/ediag.sh +++ b/jobs/rocoto/ediag.sh @@ -8,6 +8,9 @@ source "$HOMEgfs/ush/preamble.sh" status=$? [[ $status -ne 0 ]] && exit $status +export job="ediag" +export jobid="${job}.$$" + ############################################################### # Execute the JJOB $HOMEgfs/jobs/JGDAS_ENKF_DIAG From 703cad0342d3fbdd722fc94218ed0693e038140a Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Wed, 12 Oct 2022 14:43:39 -0400 Subject: [PATCH 12/30] fix ecen, esfc and eupd --- jobs/JGDAS_ENKF_ECEN | 50 ++++++++++++++++++++---------------------- jobs/JGDAS_ENKF_SFC | 50 ++++++++++++++++++++---------------------- jobs/JGDAS_ENKF_UPDATE | 50 ++++++++++++++++++++---------------------- jobs/rocoto/ecen.sh | 1 + jobs/rocoto/esfc.sh | 3 +++ jobs/rocoto/eupd.sh | 3 +++ jobs/rocoto/vrfy.sh | 1 + 7 files changed, 80 insertions(+), 78 deletions(-) diff --git a/jobs/JGDAS_ENKF_ECEN b/jobs/JGDAS_ENKF_ECEN index db3d64cca9..dab7cccfe3 100755 --- a/jobs/JGDAS_ENKF_ECEN +++ b/jobs/JGDAS_ENKF_ECEN @@ -2,35 +2,10 @@ source "$HOMEgfs/ush/preamble.sh" -export RUN_ENVIR=${RUN_ENVIR:-"nco"} - -############################# -# Source relevant config files -############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -configs="base ecen" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config - status=$? - [[ $status -ne 0 ]] && exit $status -done - - -########################################## -# Source machine runtime environment -########################################## -. $HOMEgfs/env/${machine}.env ecen -status=$? -[[ $status -ne 0 ]] && exit $status - - ############################################## # Obtain unique process id (pid) and make temp directory ############################################## -export pid=${pid:-$$} -export outid=${outid:-"LL$job"} -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATAROOT}/${jobid} mkdir -p $DATA cd $DATA @@ -46,10 +21,33 @@ setpdy.sh ############################################## # Determine Job Output Name on System ############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile +############################# +# Source relevant config files +############################# +export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +configs="base ecen" +config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +for config in $configs; do + . $config_path/config.$config + status=$? + [[ $status -ne 0 ]] && exit $status +done + + +########################################## +# Source machine runtime environment +########################################## +. $HOMEgfs/env/${machine}.env ecen +status=$? +[[ $status -ne 0 ]] && exit $status + + ############################################## # Set variables used in the script ############################################## diff --git a/jobs/JGDAS_ENKF_SFC b/jobs/JGDAS_ENKF_SFC index 63aa9d79c4..37145da214 100755 --- a/jobs/JGDAS_ENKF_SFC +++ b/jobs/JGDAS_ENKF_SFC @@ -2,7 +2,30 @@ source "$HOMEgfs/ush/preamble.sh" -export RUN_ENVIR=${RUN_ENVIR:-"nco"} +############################################## +# make temp directory +############################################## +export DATA=${DATAROOT}/${jobid} +mkdir -p $DATA +cd $DATA + + +############################################## +# Run setpdy and initialize PDY variables +############################################## +export cycle="t${cyc}z" +setpdy.sh +. ./PDY + + +############################################## +# Determine Job Output Name on System +############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + ############################# # Source relevant config files @@ -25,31 +48,6 @@ status=$? [[ $status -ne 0 ]] && exit $status -############################################## -# Obtain unique process id (pid) and make temp directory -############################################## -export pid=${pid:-$$} -export outid=${outid:-"LL$job"} -export DATA=${DATA:-${DATAROOT}/${jobid:?}} -mkdir -p $DATA -cd $DATA - - -############################################## -# Run setpdy and initialize PDY variables -############################################## -export cycle="t${cyc}z" -setpdy.sh -. ./PDY - - -############################################## -# Determine Job Output Name on System -############################################## -export pgmout="OUTPUT.${pid}" -export pgmerr=errfile - - ############################################## # Set variables used in the script ############################################## diff --git a/jobs/JGDAS_ENKF_UPDATE b/jobs/JGDAS_ENKF_UPDATE index d091e289c9..3c9226f01e 100755 --- a/jobs/JGDAS_ENKF_UPDATE +++ b/jobs/JGDAS_ENKF_UPDATE @@ -2,7 +2,30 @@ source "$HOMEgfs/ush/preamble.sh" -export RUN_ENVIR=${RUN_ENVIR:-"nco"} +############################################## +# make temp directory +############################################## +export DATA=${DATAROOT}/${jobid} +mkdir -p $DATA +cd $DATA + + +############################################## +# Run setpdy and initialize PDY variables +############################################## +export cycle="t${cyc}z" +setpdy.sh +. ./PDY + + +############################################## +# Determine Job Output Name on System +############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + ############################# # Source relevant config files @@ -25,31 +48,6 @@ status=$? [[ $status -ne 0 ]] && exit $status -############################################## -# Obtain unique process id (pid) and make temp directory -############################################## -export pid=${pid:-$$} -export outid=${outid:-"LL$job"} -export DATA=${DATA:-${DATAROOT}/${jobid:?}} -mkdir -p $DATA -cd $DATA - - -############################################## -# Run setpdy and initialize PDY variables -############################################## -export cycle="t${cyc}z" -setpdy.sh -. ./PDY - - -############################################## -# Determine Job Output Name on System -############################################## -export pgmout="OUTPUT.${pid}" -export pgmerr=errfile - - ############################################## # Set variables used in the script ############################################## diff --git a/jobs/rocoto/ecen.sh b/jobs/rocoto/ecen.sh index dd4a8ac8a6..08abb97fd8 100755 --- a/jobs/rocoto/ecen.sh +++ b/jobs/rocoto/ecen.sh @@ -17,6 +17,7 @@ for fhr in $fhrlst; do export FHMAX_ECEN=$fhr export FHOUT_ECEN=$fhr export job=ecen${fhr} + export jobid="${job}.$$" $HOMEgfs/jobs/JGDAS_ENKF_ECEN status=$? diff --git a/jobs/rocoto/esfc.sh b/jobs/rocoto/esfc.sh index d830c59c50..76ca22b4bc 100755 --- a/jobs/rocoto/esfc.sh +++ b/jobs/rocoto/esfc.sh @@ -8,6 +8,9 @@ source "$HOMEgfs/ush/preamble.sh" status=$? [[ $status -ne 0 ]] && exit $status +export job="esfc" +export jobid="${job}.$$" + ############################################################### # Execute the JJOB $HOMEgfs/jobs/JGDAS_ENKF_SFC diff --git a/jobs/rocoto/eupd.sh b/jobs/rocoto/eupd.sh index d202c45aef..33bea5f972 100755 --- a/jobs/rocoto/eupd.sh +++ b/jobs/rocoto/eupd.sh @@ -8,6 +8,9 @@ source "$HOMEgfs/ush/preamble.sh" status=$? [[ $status -ne 0 ]] && exit $status +export job="eupd" +export jobid="${job}.$$" + ############################################################### # Execute the JJOB $HOMEgfs/jobs/JGDAS_ENKF_UPDATE diff --git a/jobs/rocoto/vrfy.sh b/jobs/rocoto/vrfy.sh index 4d87d2a38f..6e39aa1703 100755 --- a/jobs/rocoto/vrfy.sh +++ b/jobs/rocoto/vrfy.sh @@ -23,6 +23,7 @@ cd $DATA ############################################## # Run setpdy and initialize PDY variables ############################################## +export cycle="t${cyc}z" setpdy.sh . ./PDY From fd26cb3d8a86c90d622a539633bebb0b1fb6a060 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Wed, 12 Oct 2022 15:13:33 -0400 Subject: [PATCH 13/30] bring GSI monitoring jobs up --- jobs/JGDAS_ATMOS_VERFOZN | 41 ++++++++++++--------- jobs/JGDAS_ATMOS_VERFRAD | 47 +++++++++++++----------- jobs/JGDAS_ATMOS_VMINMON | 39 +++++++++++++------- jobs/JGLOBAL_ATMOS_POST_MANAGER | 63 ++++++++++++++------------------- 4 files changed, 102 insertions(+), 88 deletions(-) diff --git a/jobs/JGDAS_ATMOS_VERFOZN b/jobs/JGDAS_ATMOS_VERFOZN index cb96652a8a..889957b913 100755 --- a/jobs/JGDAS_ATMOS_VERFOZN +++ b/jobs/JGDAS_ATMOS_VERFOZN @@ -5,34 +5,40 @@ ############################################################# source "$HOMEgfs/ush/preamble.sh" -############################### -# Specify NET, RUN, and COMPONENT name -############################## -export NET=${NET:-gfs} -export RUN=${RUN:-gdas} -export COMPONENT="atmos" - ########################################################### -# obtain unique process id (pid) and make temp directories +# make temp directories ########################################################### -export pid=$$ -export outid=${outid:-"LL$job"} -export DATA=${DATA:-${DATAROOT}/${jobid:?}} - -export OZNMON_SUFFIX=${OZNMON_SUFFIX:-${NET}} - +export DATA=${DATAROOT}/${jobid} mkdir -p ${DATA} cd ${DATA} +############################################## +# Run setpdy and initialize PDY variables +############################################## +export cycle="t${cyc}z" +setpdy.sh +. ./PDY + + #################################### # Determine Job Output Name on System #################################### +export pid=$$ +export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile -export cycle=t${cyc}z +############################### +# Specify NET, RUN, and COMPONENT name +############################## +export NET=${NET:-gfs} +export RUN=${RUN:-gdas} +export COMPONENT="atmos" + +export OZNMON_SUFFIX=${OZNMON_SUFFIX:-${NET}} + #--------------------------------------------- # Specify Execution Areas # @@ -76,7 +82,7 @@ export COMIN=${COMIN:-${COM_IN}/${RUN}.${PDY}/${cyc}/${COMPONENT}} if [[ ! -d ${TANKverf_ozn} ]]; then mkdir -p -m 775 ${TANKverf_ozn} fi - + #--------------------------------------- # set up validation file # @@ -102,9 +108,10 @@ err=$? ################################ # Remove the Working Directory ################################ -KEEPDATA=${KEEPDATA:-YES} +KEEPDATA=${KEEPDATA:-NO} cd $DATAROOT if [ ${KEEPDATA} = NO ] ; then rm -rf $DATA fi +exit 0 diff --git a/jobs/JGDAS_ATMOS_VERFRAD b/jobs/JGDAS_ATMOS_VERFRAD index 77006611aa..db0e21a04e 100755 --- a/jobs/JGDAS_ATMOS_VERFRAD +++ b/jobs/JGDAS_ATMOS_VERFRAD @@ -5,6 +5,31 @@ ############################################################# source "$HOMEgfs/ush/preamble.sh" +########################################################### +# make temp directories +########################################################### +export DATA=${DATAROOT}/${jobid} +mkdir -p ${DATA} +cd ${DATA} + + +############################################## +# Run setpdy and initialize PDY variables +############################################## +export cycle="t${cyc}z" +setpdy.sh +. ./PDY + + +#################################### +# Determine Job Output Name on System +#################################### +export pid=$$ +export outid=${outid:-"LL$job"} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + + ############################### # Specify NET, RUN, and COMPONENT name ############################## @@ -12,12 +37,7 @@ export NET=${NET:-gfs} export RUN=${RUN:-gdas} export COMPONENT="atmos" -########################################################### -# obtain unique process id (pid) and make temp directories -########################################################### -export pid=$$ -export outid=${outid:-"LL$job"} -export RAD_DATA_IN=${RAD_DATA_IN:-${DATAROOT}/${jobid:?}} +export RAD_DATA_IN=${DATA} export RADMON_SUFFIX=${RADMON_SUFFIX:-${RUN}} export CYCLE_INTERVAL=${CYCLE_INTERVAL:-6} @@ -25,13 +45,6 @@ export CYCLE_INTERVAL=${CYCLE_INTERVAL:-6} mkdir -p $RAD_DATA_IN cd $RAD_DATA_IN -#################################### -# Determine Job Output Name on System -#################################### -export pgmout="OUTPUT.${pid}" -export pgmerr=errfile -export cycle=t${cyc}z - ############################################## # Specify Execution Areas ############################################## @@ -54,14 +67,6 @@ parm_file=${parm_file:-${PARMmon}/da_mon.parm} . ${parm_file} -############################################# -# Run setpdy and initialize PDY variables -############################################# -if [[ $MY_MACHINE != "HERA" && $MY_MACHINE != "hera" ]]; then - setpdy.sh - . ./PDY -fi - ############################################# # determine PDY and cyc for previous cycle ############################################# diff --git a/jobs/JGDAS_ATMOS_VMINMON b/jobs/JGDAS_ATMOS_VMINMON index 69a4e5f462..2ae937420f 100755 --- a/jobs/JGDAS_ATMOS_VMINMON +++ b/jobs/JGDAS_ATMOS_VMINMON @@ -5,23 +5,37 @@ ########################################################### source "$HOMEgfs/ush/preamble.sh" -############################### -# Specify NET, RUN, and COMPONENT name -############################## -export NET=${NET:-gfs} -export RUN=${RUN:-gdas} -export COMPONENT="atmos" - ########################################################### -# obtain unique process id (pid) and make temp directories +# make temp directories ########################################################### +export DATA=${DATAROOT}/${jobid} +mkdir -p ${DATA} +cd ${DATA} + + +############################################## +# Run setpdy and initialize PDY variables +############################################## +export cycle="t${cyc}z" +setpdy.sh +. ./PDY + + +#################################### +# Determine Job Output Name on System +#################################### export pid=$$ export outid=${outid:-"LL$job"} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile -export DATA=${DATA:-${DATAROOT}/${jobid:?}} -mkdir -p $DATA -cd $DATA +############################### +# Specify NET, RUN, and COMPONENT name +############################## +export NET=${NET:-gfs} +export RUN=${RUN:-gdas} +export COMPONENT="atmos" ########################################################### # obtain unique process id (pid) and make temp directories @@ -87,9 +101,8 @@ err=$? ################################ KEEPDATA=${KEEPDATA:-NO} cd ${DATAROOT} - if [ ${KEEPDATA} = NO ] ; then rm -rf ${DATA} fi - +exit 0 diff --git a/jobs/JGLOBAL_ATMOS_POST_MANAGER b/jobs/JGLOBAL_ATMOS_POST_MANAGER index 463032a0d9..df350a5c98 100755 --- a/jobs/JGLOBAL_ATMOS_POST_MANAGER +++ b/jobs/JGLOBAL_ATMOS_POST_MANAGER @@ -2,18 +2,41 @@ source "$HOMEgfs/ush/preamble.sh" +#################################### +# make temp directories +#################################### +export DATA=${DATAROOT}/${jobid} +mkdir -p $DATA +cd $DATA + + +########################################### +# Run setpdy and initialize PDY variables +########################################### +export cycle=t${cyc}z +setpdy.sh +. ./PDY + + +#################################### +# Determine Job Output Name on System +#################################### +export pid=${pid:-$$} +export outid="LL$job" +export jobid="${outid}.o${pid}" +export pgmout="OUTPUT.${pid}" + + ######################################## # GFS post manager ######################################## -export RUN_ENVIR=${RUN_ENVIR:-"nco"} - ############################# # Source relevant config files ############################# -configs="base post" export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +configs="base post" for config in $configs; do . $config_path/config.$config status=$? @@ -28,12 +51,6 @@ done status=$? [[ $status -ne 0 ]] && exit $status -set -xue -# #### 07/30/1999 ################### -# SET SHELL PROCESSING VARIABLES -# ################################### -export PS4='$SECONDS + ' -date #################################### # Specify NET and RUN Name and model @@ -42,20 +59,6 @@ export NET=${NET:-gfs} export RUN=${RUN:-gfs} export COMPONENT="atmos" -#################################### -# obtain unique process id (pid) and make temp directories -#################################### -export pid=${pid:-$$} -export DATA=${DATA:-${DATAROOT}/${jobid:?}} -mkdir $DATA -cd $DATA - -#################################### -# Determine Job Output Name on System -#################################### -export outid="LL$job" -export jobid="${outid}.o${pid}" -export pgmout="OUTPUT.${pid}" #################################### # Specify version numbers @@ -76,20 +79,6 @@ export USHgfs=${HOMEgfs:-$HOMEgfs/ush} ########################### export EXT_FCST=NO -################################### -# Set up the UTILITIES -################################### -# export HOMEutil=${HOMEutil:-/nw${envir}/util.${util_ver}} -# export utilscript=${utilscript:-$HOMEutil/ush} -# export utilexec=${utilexec:-$HOMEutil/exec} - -########################################### -# Run setpdy and initialize PDY variables -########################################### -export cycle=t${cyc}z -setpdy.sh -. ./PDY - export ROTDIR=${ROTDIR:-${COMROOT:?}/$NET/$envir} export COMIN=${COMIN:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT} export COMOUT=${COMOUT:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT} From 7c71198bc2448c6086ff7ab99c509606d9cf3876 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Wed, 12 Oct 2022 15:14:32 -0400 Subject: [PATCH 14/30] jobs/JGDAS_ENKF_INNOVATE_OBS does not exist. There is no need for eomg.sh --- jobs/rocoto/eomg.sh | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100755 jobs/rocoto/eomg.sh diff --git a/jobs/rocoto/eomg.sh b/jobs/rocoto/eomg.sh deleted file mode 100755 index de981c02bb..0000000000 --- a/jobs/rocoto/eomg.sh +++ /dev/null @@ -1,17 +0,0 @@ -#! /usr/bin/env bash - -source "$HOMEgfs/ush/preamble.sh" - -############################################################### -# Source FV3GFS workflow modules -. $HOMEgfs/ush/load_fv3gfs_modules.sh -status=$? -[[ $status -ne 0 ]] && exit $status - -############################################################### -# Execute the JJOB -$HOMEgfs/jobs/JGDAS_ENKF_INNOVATE_OBS -status=$? - - -exit $status From a5aeb1759aa8bcad44362f0e0bcc235e9a241a85 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Wed, 12 Oct 2022 16:28:59 -0400 Subject: [PATCH 15/30] fix jedi tasks --- jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST | 51 +++++++++++++-------------- jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP | 51 +++++++++++++-------------- jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN | 51 +++++++++++++-------------- jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST | 51 +++++++++++++-------------- jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP | 51 +++++++++++++-------------- jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN | 51 +++++++++++++-------------- jobs/rocoto/atmanalpost.sh | 3 ++ jobs/rocoto/atmanalprep.sh | 3 ++ jobs/rocoto/atmanalrun.sh | 3 ++ jobs/rocoto/atmensanalpost.sh | 3 ++ jobs/rocoto/atmensanalprep.sh | 3 ++ jobs/rocoto/atmensanalrun.sh | 3 ++ 12 files changed, 168 insertions(+), 156 deletions(-) diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST index 655afc4645..cdb86fd8d8 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST +++ b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST @@ -2,34 +2,10 @@ source "$HOMEgfs/ush/preamble.sh" -############################# -# Source relevant config files -############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -configs="base atmanal atmanalpost" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config - status=$? - [[ $status -ne 0 ]] && exit $status -done - - -########################################## -# Source machine runtime environment -########################################## -. $HOMEgfs/env/${machine}.env atmanalpost -status=$? -[[ $status -ne 0 ]] && exit $status - - ############################################## -# Obtain unique process id (pid) and make temp directory +# make temp directory ############################################## -export pid=${pid:-$$} -export outid=${outid:-"LL$job"} - -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATAROOT}/${jobid} mkdir -p $DATA cd $DATA || (echo "$DATA does not exist. ABORT!"; exit 1) @@ -45,10 +21,33 @@ setpdy.sh ############################################## # Determine Job Output Name on System ############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile +############################# +# Source relevant config files +############################# +export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +configs="base atmanal atmanalpost" +for config in $configs; do + . $config_path/config.$config + status=$? + [[ $status -ne 0 ]] && exit $status +done + + +########################################## +# Source machine runtime environment +########################################## +. $HOMEgfs/env/${machine}.env atmanalpost +status=$? +[[ $status -ne 0 ]] && exit $status + + ############################################## # Set variables used in the script ############################################## diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP index c61d426189..a8f0090add 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP +++ b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP @@ -2,34 +2,10 @@ source "$HOMEgfs/ush/preamble.sh" -############################# -# Source relevant config files -############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -configs="base atmanal atmanalprep" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config - status=$? - [[ $status -ne 0 ]] && exit $status -done - - -########################################## -# Source machine runtime environment -########################################## -. $HOMEgfs/env/${machine}.env atmanalprep -status=$? -[[ $status -ne 0 ]] && exit $status - - ############################################## -# Obtain unique process id (pid) and make temp directory +# make temp directory ############################################## -export pid=${pid:-$$} -export outid=${outid:-"LL$job"} - -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATAROOT}/${jobid} mkdir -p $DATA cd $DATA || (echo "$DATA does not exist. ABORT!"; exit 1) @@ -45,10 +21,33 @@ setpdy.sh ############################################## # Determine Job Output Name on System ############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile +############################# +# Source relevant config files +############################# +export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +configs="base atmanal atmanalprep" +for config in $configs; do + . $config_path/config.$config + status=$? + [[ $status -ne 0 ]] && exit $status +done + + +########################################## +# Source machine runtime environment +########################################## +. $HOMEgfs/env/${machine}.env atmanalprep +status=$? +[[ $status -ne 0 ]] && exit $status + + ############################################## # Set variables used in the script ############################################## diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN index 835f73c1d7..4c113e904a 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN +++ b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN @@ -2,34 +2,10 @@ source "$HOMEgfs/ush/preamble.sh" -############################# -# Source relevant config files -############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -configs="base atmanal atmanalrun" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config - status=$? - [[ $status -ne 0 ]] && exit $status -done - - -########################################## -# Source machine runtime environment -########################################## -. $HOMEgfs/env/${machine}.env atmanalrun -status=$? -[[ $status -ne 0 ]] && exit $status - - ############################################## -# Obtain unique process id (pid) and make temp directory +# make temp directory ############################################## -export pid=${pid:-$$} -export outid=${outid:-"LL$job"} - -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATAROOT}/${jobid} mkdir -p $DATA cd $DATA || (echo "$DATA does not exist. ABORT!"; exit 1) @@ -45,10 +21,33 @@ setpdy.sh ############################################## # Determine Job Output Name on System ############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile +############################# +# Source relevant config files +############################# +export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +configs="base atmanal atmanalrun" +for config in $configs; do + . $config_path/config.$config + status=$? + [[ $status -ne 0 ]] && exit $status +done + + +########################################## +# Source machine runtime environment +########################################## +. $HOMEgfs/env/${machine}.env atmanalrun +status=$? +[[ $status -ne 0 ]] && exit $status + + ############################################## # Set variables used in the script ############################################## diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST index 5d652a0f8a..fee0cd7c02 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST +++ b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST @@ -2,34 +2,10 @@ source "$HOMEgfs/ush/preamble.sh" -############################# -# Source relevant config files -############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -configs="base atmensanal atmensanalpost" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config - status=$? - [[ $status -ne 0 ]] && exit $status -done - - -########################################## -# Source machine runtime environment -########################################## -. $HOMEgfs/env/${machine}.env atmensanalpost -status=$? -[[ $status -ne 0 ]] && exit $status - - ############################################## -# Obtain unique process id (pid) and make temp directory +# make temp directory ############################################## -export pid=${pid:-$$} -export outid=${outid:-"LL$job"} - -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATAROOT}/${jobid} mkdir -p $DATA cd $DATA || (echo "$DATA does not exist. ABORT!"; exit 1) @@ -45,10 +21,33 @@ setpdy.sh ############################################## # Determine Job Output Name on System ############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile +############################# +# Source relevant config files +############################# +export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +configs="base atmensanal atmensanalpost" +for config in $configs; do + . $config_path/config.$config + status=$? + [[ $status -ne 0 ]] && exit $status +done + + +########################################## +# Source machine runtime environment +########################################## +. $HOMEgfs/env/${machine}.env atmensanalpost +status=$? +[[ $status -ne 0 ]] && exit $status + + ############################################## # Set variables used in the script ############################################## diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP index ab50273f8f..966d6f06cd 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP +++ b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP @@ -2,34 +2,10 @@ source "$HOMEgfs/ush/preamble.sh" -############################# -# Source relevant config files -############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -configs="base atmensanal atmensanalprep" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config - status=$? - [[ $status -ne 0 ]] && exit $status -done - - -########################################## -# Source machine runtime environment -########################################## -. $HOMEgfs/env/${machine}.env atmensanalprep -status=$? -[[ $status -ne 0 ]] && exit $status - - ############################################## -# Obtain unique process id (pid) and make temp directory +# make temp directory ############################################## -export pid=${pid:-$$} -export outid=${outid:-"LL$job"} - -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATAROOT}/${jobid} mkdir -p $DATA cd $DATA || (echo "$DATA does not exist. ABORT!"; exit 1) @@ -45,10 +21,33 @@ setpdy.sh ############################################## # Determine Job Output Name on System ############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile +############################# +# Source relevant config files +############################# +export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +configs="base atmensanal atmensanalprep" +for config in $configs; do + . $config_path/config.$config + status=$? + [[ $status -ne 0 ]] && exit $status +done + + +########################################## +# Source machine runtime environment +########################################## +. $HOMEgfs/env/${machine}.env atmensanalprep +status=$? +[[ $status -ne 0 ]] && exit $status + + ############################################## # Set variables used in the script ############################################## diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN index 3cd91cf797..aa603a7c3e 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN +++ b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN @@ -2,34 +2,10 @@ source "$HOMEgfs/ush/preamble.sh" -############################# -# Source relevant config files -############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -configs="base atmensanal atmensanalrun" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config - status=$? - [[ $status -ne 0 ]] && exit $status -done - - -########################################## -# Source machine runtime environment -########################################## -. $HOMEgfs/env/${machine}.env atmensanalrun -status=$? -[[ $status -ne 0 ]] && exit $status - - ############################################## -# Obtain unique process id (pid) and make temp directory +# make temp directory ############################################## -export pid=${pid:-$$} -export outid=${outid:-"LL$job"} - -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATAROOT}/${jobid} mkdir -p $DATA cd $DATA || (echo "$DATA does not exist. ABORT!"; exit 1) @@ -45,10 +21,33 @@ setpdy.sh ############################################## # Determine Job Output Name on System ############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile +############################# +# Source relevant config files +############################# +export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +configs="base atmensanal atmensanalrun" +for config in $configs; do + . $config_path/config.$config + status=$? + [[ $status -ne 0 ]] && exit $status +done + + +########################################## +# Source machine runtime environment +########################################## +. $HOMEgfs/env/${machine}.env atmensanalrun +status=$? +[[ $status -ne 0 ]] && exit $status + + ############################################## # Set variables used in the script ############################################## diff --git a/jobs/rocoto/atmanalpost.sh b/jobs/rocoto/atmanalpost.sh index a54b7d5a7d..b5dc756656 100755 --- a/jobs/rocoto/atmanalpost.sh +++ b/jobs/rocoto/atmanalpost.sh @@ -8,6 +8,9 @@ source "$HOMEgfs/ush/preamble.sh" status=$? [[ $status -ne 0 ]] && exit $status +export job="atmanalpost" +export jobid="${job}.$$" + ############################################################### # Execute the JJOB $HOMEgfs/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST diff --git a/jobs/rocoto/atmanalprep.sh b/jobs/rocoto/atmanalprep.sh index c6df5287d7..8bc1388290 100755 --- a/jobs/rocoto/atmanalprep.sh +++ b/jobs/rocoto/atmanalprep.sh @@ -8,6 +8,9 @@ source "$HOMEgfs/ush/preamble.sh" status=$? [[ $status -ne 0 ]] && exit $status +export job="atmanalprep" +export jobid="${job}.$$" + ############################################################### # Execute the JJOB $HOMEgfs/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP diff --git a/jobs/rocoto/atmanalrun.sh b/jobs/rocoto/atmanalrun.sh index 0768f2f55d..cabc406a73 100755 --- a/jobs/rocoto/atmanalrun.sh +++ b/jobs/rocoto/atmanalrun.sh @@ -8,6 +8,9 @@ source "$HOMEgfs/ush/preamble.sh" status=$? [[ $status -ne 0 ]] && exit $status +export job="atmanalrun" +export jobid="${job}.$$" + ############################################################### # Execute the JJOB $HOMEgfs/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN diff --git a/jobs/rocoto/atmensanalpost.sh b/jobs/rocoto/atmensanalpost.sh index f06f5aa01c..d31d982a71 100755 --- a/jobs/rocoto/atmensanalpost.sh +++ b/jobs/rocoto/atmensanalpost.sh @@ -8,6 +8,9 @@ source "$HOMEgfs/ush/preamble.sh" status=$? [[ $status -ne 0 ]] && exit $status +export job="atmensanalpost" +export jobid="${job}.$$" + ############################################################### # Execute the JJOB $HOMEgfs/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST diff --git a/jobs/rocoto/atmensanalprep.sh b/jobs/rocoto/atmensanalprep.sh index 19ec88f87c..4addf1de9a 100755 --- a/jobs/rocoto/atmensanalprep.sh +++ b/jobs/rocoto/atmensanalprep.sh @@ -8,6 +8,9 @@ source "$HOMEgfs/ush/preamble.sh" status=$? [[ $status -ne 0 ]] && exit $status +export job="atmensanalprep" +export jobid="${job}.$$" + ############################################################### # Execute the JJOB $HOMEgfs/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP diff --git a/jobs/rocoto/atmensanalrun.sh b/jobs/rocoto/atmensanalrun.sh index 5899eeaf40..d34bc68ced 100755 --- a/jobs/rocoto/atmensanalrun.sh +++ b/jobs/rocoto/atmensanalrun.sh @@ -8,6 +8,9 @@ source "$HOMEgfs/ush/preamble.sh" status=$? [[ $status -ne 0 ]] && exit $status +export job="atmensanalrun" +export jobid="${job}.$$" + ############################################################### # Execute the JJOB $HOMEgfs/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN From 1706714a2e8331350c19d31a7a3b1e22dfcc611f Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Wed, 12 Oct 2022 16:34:59 -0400 Subject: [PATCH 16/30] update ATMOS_GEMPAK without testing --- jobs/JGDAS_ATMOS_GEMPAK | 48 ++++++++++++++++++------------------- jobs/JGFS_ATMOS_GEMPAK | 53 +++++++++++++---------------------------- 2 files changed, 40 insertions(+), 61 deletions(-) diff --git a/jobs/JGDAS_ATMOS_GEMPAK b/jobs/JGDAS_ATMOS_GEMPAK index 8c6cf70528..2174100cfe 100755 --- a/jobs/JGDAS_ATMOS_GEMPAK +++ b/jobs/JGDAS_ATMOS_GEMPAK @@ -2,11 +2,28 @@ source "$HOMEgfs/ush/preamble.sh" -############################################ -# GDAS GEMPAK PRODUCT GENERATION -############################################ -configs="base gempak" +########################################################## +# make temp directory +########################################################## +export DATA=${DATAROOT}/${jobid} +mkdir -p $DATA +cd $DATA + +########################################### +# Run setpdy and initialize PDY variables +########################################### +export cycle=${cycle:-t${cyc}z} +setpdy.sh +. ./PDY + +export pgmout=OUTPUT.$$ + +############################# +# Source relevant config files +############################# export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +configs="base gempak" for config in $configs; do . $EXPDIR/config.${config} status=$? @@ -18,28 +35,10 @@ done status=$? [[ $status -ne 0 ]] && exit $status -########################################################## -# obtain unique process id (pid) and make temp directory -########################################################## -export DATA=${DATA:-${DATAROOT}/${jobid:?}} -mkdir -p $DATA -cd $DATA - -###################################### -# Set up the cycle variable -###################################### -export cycle=${cycle:-t${cyc}z} - -########################################### -# Run setpdy and initialize PDY variables -########################################### -setpdy.sh -. ./PDY - ################################ # Set up the HOME directory ################################ -export HOMEgfs=${HOMEgfs:-${PACKAGEROOT}/gfs.${gfs_ver}} +export HOMEgfs=${HOMEgfs:-${PACKAGEROOT}/gfs.${gfs_ver}} # TODO: remove these as they are already defined in config.base export EXECgfs=${EXECgfs:-$HOMEgfs/exec} export PARMgfs=${PARMgfs:-$HOMEgfs/parm} export PARMwmo=${PARMwmo:-$HOMEgfs/parm/wmo} @@ -82,9 +81,8 @@ if [ $SENDCOM = YES ] ; then mkdir -m 775 -p $COMOUT fi -export pgmout=OUTPUT.$$ - +# TODO: These actions belong in an ex-script not a j-job if [ -f $DATA/poescrip ]; then rm $DATA/poescript fi diff --git a/jobs/JGFS_ATMOS_GEMPAK b/jobs/JGFS_ATMOS_GEMPAK index 6171799896..cd62083c4a 100755 --- a/jobs/JGFS_ATMOS_GEMPAK +++ b/jobs/JGFS_ATMOS_GEMPAK @@ -2,28 +2,28 @@ source "$HOMEgfs/ush/preamble.sh" -############################################ -# GFS GEMPAK PRODUCT GENERATION -############################################ -configs="base gempak" -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -for config in $configs; do - . $EXPDIR/config.${config} - status=$? - [[ $status -ne 0 ]] && exit $status -done +########################################################## +# make temp directory +########################################################## +export DATA=${DATAROOT}/${jobid} +mkdir -p $DATA +cd $DATA -############################################################### -. $BASE_ENV/${machine}.env gempak -status=$? -[[ $status -ne 0 ]] && exit $status +########################################### +# Run setpdy and initialize PDY variables +########################################### +export cycle=${cycle:-t${cyc}z} +setpdy.sh +. ./PDY + +export pgmout=OUTPUT.$$ ############################# # Source relevant config files ############################# -configs="base gempak" export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +configs="base gempak" for config in $configs; do . $config_path/config.$config status=$? @@ -37,28 +37,10 @@ done status=$? [[ $status -ne 0 ]] && exit $status -########################################################## -# obtain unique process id (pid) and make temp directory -########################################################## -export DATA=${DATA:-${DATAROOT}/${jobid:?}} -mkdir -p $DATA -cd $DATA - -###################################### -# Set up the cycle variable -###################################### -export cycle=${cycle:-t${cyc}z} - -########################################### -# Run setpdy and initialize PDY variables -########################################### -setpdy.sh -. ./PDY - ################################ # Set up the HOME directory ################################ -export HOMEgfs=${HOMEgfs:-${PACKAGEROOT}/gfs.${gfs_ver}} +export HOMEgfs=${HOMEgfs:-${PACKAGEROOT}/gfs.${gfs_ver}} # TODO: These should be removed as they are defined in config.base export EXECgfs=${EXECgfs:-$HOMEgfs/exec} export PARMgfs=${PARMgfs:-$HOMEgfs/parm} export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} @@ -100,9 +82,8 @@ if [ $SENDCOM = YES ] ; then mkdir -m 775 -p $COMOUT fi -export pgmout=OUTPUT.$$ - +# TODO: These actions belong in an ex-script not a j-job if [ -f poescript ]; then rm -f poescript fi From e55869ff0d141c3dba5272daaed96b6ef5d2f4a8 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Wed, 12 Oct 2022 16:59:19 -0400 Subject: [PATCH 17/30] update to wave jobs. some wave jobs do not source config.base. need to fix that --- jobs/JGLOBAL_WAVE_GEMPAK | 29 +++++++++++++++------- jobs/JGLOBAL_WAVE_INIT | 41 +++++++++++++++++++------------ jobs/JGLOBAL_WAVE_POST_BNDPNT | 41 +++++++++++++++++++------------ jobs/JGLOBAL_WAVE_POST_BNDPNTBLL | 42 +++++++++++++++++++------------- jobs/JGLOBAL_WAVE_POST_PNT | 42 +++++++++++++++++++------------- jobs/JGLOBAL_WAVE_POST_SBS | 42 +++++++++++++++++++------------- jobs/JGLOBAL_WAVE_PRDGEN_BULLS | 30 ++++++++++++++++------- jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED | 28 +++++++++++++++------ jobs/JGLOBAL_WAVE_PREP | 42 +++++++++++++++++++------------- 9 files changed, 212 insertions(+), 125 deletions(-) diff --git a/jobs/JGLOBAL_WAVE_GEMPAK b/jobs/JGLOBAL_WAVE_GEMPAK index 8d86093dfc..5f9dd99147 100755 --- a/jobs/JGLOBAL_WAVE_GEMPAK +++ b/jobs/JGLOBAL_WAVE_GEMPAK @@ -2,25 +2,35 @@ source "$HOMEgfs/ush/preamble.sh" -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +############################################## +# make temp directory +############################################## +export DATA=${DATAROOT}/${jobid} mkdir -p $DATA cd $DATA -###################################### -# Set up the cycle variable -###################################### -export cycle=${cycle:-t${cyc}z} - +############################################## +# Run setpdy and initialize PDY variables +############################################## +export cycle="t${cyc}z" setpdy.sh . ./PDY -# + +############################################## +# Determine Job Output Name on System +############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + + export NET=${NET:-gfs} export RUN=${RUN:-gfs} export COMPONENT="wave" export machine=${machine:-WCOSS2} -export HOMEgfs=${HOMEgfs:-$(dirname $(dirname $0))} # Add default errchk = err_chk export errchk=${errchk:-err_chk} @@ -49,9 +59,10 @@ ${HOMEgfs}/scripts/exgfs_wave_nawips.sh status=$? [[ $status -ne 0 ]] && exit $status ################################### + # Remove temp directories +cd $DATAROOT if [ "$KEEPDATA" != "YES" ]; then - cd $DATAROOT rm -rf $DATA fi diff --git a/jobs/JGLOBAL_WAVE_INIT b/jobs/JGLOBAL_WAVE_INIT index ca7a0f326a..8a30ed6317 100755 --- a/jobs/JGLOBAL_WAVE_INIT +++ b/jobs/JGLOBAL_WAVE_INIT @@ -2,14 +2,37 @@ source "$HOMEgfs/ush/preamble.sh" -export RUN_ENVIR=${RUN_ENVIR:-"nco"} +############################################## +# make temp directory +############################################## +export DATA=${DATAROOT}/${jobid} +mkdir -p $DATA +cd $DATA + + +############################################## +# Run setpdy and initialize PDY variables +############################################## +export cycle="t${cyc}z" +setpdy.sh +. ./PDY + + +############################################## +# Determine Job Output Name on System +############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + ############################# # Source relevant config files ############################# -configs="base wave waveinit" export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +configs="base wave waveinit" for config in $configs; do . $config_path/config.$config status=$? @@ -31,20 +54,6 @@ export COMPONENT="wave" # Add default errchk = err_chk export errchk=${errchk:-err_chk} -# Create and go to DATA directory -export DATA=${DATA:-${DATAROOT:?}/${jobid}} -mkdir -p $DATA -cd $DATA - -cyc=${cyc:-00} -export cycle=${cycle:-t${cyc}z} - -# Set PDY -setpdy.sh -. ./PDY - -export pgmout=OUTPUT.$$ - export MP_PULSE=0 # Path to HOME Directory diff --git a/jobs/JGLOBAL_WAVE_POST_BNDPNT b/jobs/JGLOBAL_WAVE_POST_BNDPNT index 8a585d3f23..d5bb226294 100755 --- a/jobs/JGLOBAL_WAVE_POST_BNDPNT +++ b/jobs/JGLOBAL_WAVE_POST_BNDPNT @@ -2,14 +2,37 @@ source "$HOMEgfs/ush/preamble.sh" -export RUN_ENVIR=${RUN_ENVIR:-"nco"} +############################################## +# make temp directory +############################################## +export DATA=${DATAROOT}/${jobid} +mkdir -p $DATA +cd $DATA + + +############################################## +# Run setpdy and initialize PDY variables +############################################## +export cycle="t${cyc}z" +setpdy.sh +. ./PDY + + +############################################## +# Determine Job Output Name on System +############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + ############################# # Source relevant config files ############################# -configs="base wave wavepostsbs wavepostbndpnt" export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +configs="base wave wavepostsbs wavepostbndpnt" for config in $configs; do . $config_path/config.$config status=$? @@ -34,22 +57,8 @@ export HOMEgfs=${HOMEgfs:-$PACKAGEROOT/$NET.${gfs_ver}} # Add default errchk = err_chk export errchk=${errchk:-err_chk} -# Create and go to DATA directory -export DATA=${DATA:-${DATAROOT:?}/${jobid}} -mkdir -p $DATA -cd $DATA - -export cyc=${cyc:-00} -export cycle=${cycle:-t${cyc}z} - -# Set PDY -setpdy.sh -. ./PDY - export CDATE=$PDY$cyc -export pgmout=OUTPUT.$$ - export MP_PULSE=0 # Path to HOME Directory diff --git a/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL b/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL index 04ff9782c1..7db6311736 100755 --- a/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL +++ b/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL @@ -2,14 +2,37 @@ source "$HOMEgfs/ush/preamble.sh" -export RUN_ENVIR=${RUN_ENVIR:-"nco"} +############################################## +# make temp directory +############################################## +export DATA=${DATAROOT}/${jobid} +mkdir -p $DATA +cd $DATA + + +############################################## +# Run setpdy and initialize PDY variables +############################################## +export cycle="t${cyc}z" +setpdy.sh +. ./PDY + + +############################################## +# Determine Job Output Name on System +############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + ############################# # Source relevant config files ############################# -configs="base wave wavepostsbs wavepostbndpntbll" export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +configs="base wave wavepostsbs wavepostbndpntbll" for config in $configs; do . $config_path/config.$config status=$? @@ -29,27 +52,12 @@ export RUN=${RUN:-gfs} export COMPONENT="wave" export HOMEgefs=${HOMEgefs:-$PACKAGEROOT/$NET.${gefs_ver}} -export HOMEgfs=${HOMEgfs:-$PACKAGEROOT/$NET.${gfs_ver}} # Add default errchk = err_chk export errchk=${errchk:-err_chk} -# Create and go to DATA directory -export DATA=${DATA:-${DATAROOT:?}/${jobid}} -mkdir -p $DATA -cd $DATA - -export cyc=${cyc:-00} -export cycle=${cycle:-t${cyc}z} - -# Set PDY -setpdy.sh -. ./PDY - export CDATE=$PDY$cyc -export pgmout=OUTPUT.$$ - export MP_PULSE=0 # Path to HOME Directory diff --git a/jobs/JGLOBAL_WAVE_POST_PNT b/jobs/JGLOBAL_WAVE_POST_PNT index 119eafb6af..8ec90f304d 100755 --- a/jobs/JGLOBAL_WAVE_POST_PNT +++ b/jobs/JGLOBAL_WAVE_POST_PNT @@ -2,14 +2,37 @@ source "$HOMEgfs/ush/preamble.sh" -export RUN_ENVIR=${RUN_ENVIR:-"nco"} +############################################## +# make temp directory +############################################## +export DATA=${DATAROOT}/${jobid} +mkdir -p $DATA +cd $DATA + + +############################################## +# Run setpdy and initialize PDY variables +############################################## +export cycle="t${cyc}z" +setpdy.sh +. ./PDY + + +############################################## +# Determine Job Output Name on System +############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + ############################# # Source relevant config files ############################# -configs="base wave wavepostsbs wavepostpnt" export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} config_path=${EXPDIR:-${PACKAGEROOT:-}/gfs.${gfs_ver}/parm/config} +configs="base wave wavepostsbs wavepostpnt" for config in $configs; do . $config_path/config.$config status=$? @@ -29,27 +52,12 @@ export RUN=${RUN:-gfs} export COMPONENT="wave" export HOMEgefs=${HOMEgefs:-${PACKAGEROOT:-}/$NET.${gefs_ver:-}} -export HOMEgfs=${HOMEgfs:-${PACKAGEROOT:-}/$NET.${gfs_ver}} # Add default errchk = err_chk export errchk=${errchk:-err_chk} -# Create and go to DATA directory -export DATA=${DATA:-${DATAROOT:?}/${jobid}} -mkdir -p $DATA -cd $DATA - -export cyc=${cyc:-00} -export cycle=${cycle:-t${cyc}z} - -# Set PDY -setpdy.sh -. ./PDY - export CDATE=$PDY$cyc -export pgmout=OUTPUT.$$ - export MP_PULSE=0 # Path to HOME Directory diff --git a/jobs/JGLOBAL_WAVE_POST_SBS b/jobs/JGLOBAL_WAVE_POST_SBS index ff9bd90750..b053cd3eef 100755 --- a/jobs/JGLOBAL_WAVE_POST_SBS +++ b/jobs/JGLOBAL_WAVE_POST_SBS @@ -2,14 +2,37 @@ source "$HOMEgfs/ush/preamble.sh" -export RUN_ENVIR=${RUN_ENVIR:-"nco"} +############################################## +# make temp directory +############################################## +export DATA=${DATAROOT}/${jobid} +mkdir -p $DATA +cd $DATA + + +############################################## +# Run setpdy and initialize PDY variables +############################################## +export cycle="t${cyc}z" +setpdy.sh +. ./PDY + + +############################################## +# Determine Job Output Name on System +############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + ############################# # Source relevant config files ############################# -configs="base wave wavepostsbs" export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} config_path=${EXPDIR:-${PACKAGEROOT:-}/gfs.${gfs_ver}/parm/config} +configs="base wave wavepostsbs" for config in $configs; do . $config_path/config.$config status=$? @@ -29,27 +52,12 @@ export RUN=${RUN:-gfs} export COMPONENT="wave" export HOMEgefs=${HOMEgefs:-${PACKAGEROOT:-}/$NET.${gefs_ver:-}} -export HOMEgfs=${HOMEgfs:-${PACKAGEROOT:-}/$NET.${gfs_ver}} # Add default errchk = err_chk export errchk=${errchk:-err_chk} -# Create and go to DATA directory -export DATA=${DATA:-${DATAROOT:?}/${jobid}} -mkdir -p $DATA -cd $DATA - -export cyc=${cyc:-00} -export cycle=${cycle:-t${cyc}z} - -# Set PDY -setpdy.sh -. ./PDY - export CDATE=$PDY$cyc -export pgmout=OUTPUT.$$ - export MP_PULSE=0 # Path to HOME Directory diff --git a/jobs/JGLOBAL_WAVE_PRDGEN_BULLS b/jobs/JGLOBAL_WAVE_PRDGEN_BULLS index 45fe7376ae..e2f8fde470 100755 --- a/jobs/JGLOBAL_WAVE_PRDGEN_BULLS +++ b/jobs/JGLOBAL_WAVE_PRDGEN_BULLS @@ -2,21 +2,34 @@ source "$HOMEgfs/ush/preamble.sh" -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +############################################## +# make temp directory +############################################## +export DATA=${DATAROOT}/${jobid} mkdir -p $DATA cd $DATA -###################################### -# Set up the cycle variable -###################################### -export cycle=${cycle:-t${cyc}z} + +############################################## +# Run setpdy and initialize PDY variables +############################################## +export cycle="t${cyc}z" setpdy.sh . ./PDY + +############################################## +# Determine Job Output Name on System +############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + + export NET=${NET:-gfs} export RUN=${RUN:-gfs} export COMPONENT="wave" -export HOMEgfs=${HOMEgfs:-$(dirname $(dirname $0))} # parent directory of current job card # Add default errchk = err_chk export errchk=${errchk:-err_chk} @@ -44,14 +57,13 @@ fi $HOMEgfs/scripts/exgfs_wave_prdgen_bulls.sh status=$? [[ $status -ne 0 ]] && exit $status + ################################### # Remove temp directories - +cd $DATAROOT if [ "$KEEPDATA" != "YES" ]; then - cd $DATAROOT rm -rf $DATA fi exit 0 - diff --git a/jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED b/jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED index ecd04aad9f..11f168bef8 100755 --- a/jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED +++ b/jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED @@ -2,22 +2,35 @@ source "$HOMEgfs/ush/preamble.sh" -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +############################################## +# make temp directory +############################################## +export DATA=${DATAROOT}/${jobid} mkdir -p $DATA cd $DATA -###################################### -# Set up the cycle variable -###################################### -export cycle=${cycle:-t${cyc}z} + +############################################## +# Run setpdy and initialize PDY variables +############################################## +export cycle="t${cyc}z" setpdy.sh . ./PDY + +############################################## +# Determine Job Output Name on System +############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + + # PATH for working directory export NET=${NET:-gfs} export RUN=${RUN:-gfs} export COMPONENT="wave" -export HOMEgfs=${HOMEgfs:-$(dirname $(dirname $0))} # parent directory of current job card # Add default errchk = err_chk export errchk=${errchk:-err_chk} @@ -44,11 +57,12 @@ fi $HOMEgfs/scripts/exgfs_wave_prdgen_gridded.sh status=$? [[ $status -ne 0 ]] && exit $status + ################################### # Remove temp directories ################################### +cd $DATAROOT if [ "$KEEPDATA" != "YES" ]; then - cd $DATAROOT rm -rf $DATA fi diff --git a/jobs/JGLOBAL_WAVE_PREP b/jobs/JGLOBAL_WAVE_PREP index 188b888106..6c605c2c1e 100755 --- a/jobs/JGLOBAL_WAVE_PREP +++ b/jobs/JGLOBAL_WAVE_PREP @@ -2,14 +2,37 @@ source "$HOMEgfs/ush/preamble.sh" -export RUN_ENVIR=${RUN_ENVIR:-"nco"} +############################################## +# make temp directory +############################################## +export DATA=${DATAROOT}/${jobid} +mkdir -p $DATA +cd $DATA + + +############################################## +# Run setpdy and initialize PDY variables +############################################## +export cycle="t${cyc}z" +setpdy.sh +. ./PDY + + +############################################## +# Determine Job Output Name on System +############################################## +export pid=${pid:-$$} +export outid=${outid:-"LL$job"} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + ############################# # Source relevant config files ############################# -configs="base wave waveprep" export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +configs="base wave waveprep" for config in $configs; do . $config_path/config.$config status=$? @@ -28,27 +51,12 @@ export NET=${NET:-gfs} export RUN=${RUN:-gfs} export COMPONENT="wave" -export HOMEgfs=${HOMEgfs:-$PACKAGEROOT/gfs.${gfs_ver}} - # Add default errchk = err_chk export errchk=${errchk:-err_chk} -# Create and go to DATA directory -export DATA=${DATA:-${DATAROOT:?}/${jobid}} -mkdir -p $DATA -cd $DATA - -cyc=${cyc:-00} -export cycle=${cycle:-t${cyc}z} - -# Set PDY -setpdy.sh -. ./PDY # Set rtofs PDY export RPDY=$PDY -export pgmout=OUTPUT.$$ - export MP_PULSE=0 # CDO required for processing RTOFS currents From fc8bd5ce1264a808c4d7f598a4040203063be5e1 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Wed, 12 Oct 2022 22:07:37 -0400 Subject: [PATCH 18/30] fix some rocoto/wave jobs that call jjobs --- jobs/rocoto/waveinit.sh | 3 +++ jobs/rocoto/wavepostbndpnt.sh | 3 +++ jobs/rocoto/wavepostbndpntbll.sh | 3 +++ jobs/rocoto/wavepostpnt.sh | 3 +++ jobs/rocoto/wavepostsbs.sh | 3 +++ jobs/rocoto/waveprep.sh | 3 +++ 6 files changed, 18 insertions(+) diff --git a/jobs/rocoto/waveinit.sh b/jobs/rocoto/waveinit.sh index 5995b85302..af3192c4df 100755 --- a/jobs/rocoto/waveinit.sh +++ b/jobs/rocoto/waveinit.sh @@ -9,6 +9,9 @@ echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" status=$? [[ $status -ne 0 ]] && exit $status +export job="waveinit" +export jobid="${job}.$$" + ############################################################### echo echo "=============== START TO RUN WAVE INIT ===============" diff --git a/jobs/rocoto/wavepostbndpnt.sh b/jobs/rocoto/wavepostbndpnt.sh index fe0e2a0723..2a07e9be7e 100755 --- a/jobs/rocoto/wavepostbndpnt.sh +++ b/jobs/rocoto/wavepostbndpnt.sh @@ -9,6 +9,9 @@ echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" status=$? [[ $status -ne 0 ]] && exit $status +export job="wavepostbndpnt" +export jobid="${job}.$$" + ############################################################### echo echo "=============== START TO RUN WAVE_POST_BNDPNT ===============" diff --git a/jobs/rocoto/wavepostbndpntbll.sh b/jobs/rocoto/wavepostbndpntbll.sh index cea3c0bc6b..d14a71bbcf 100755 --- a/jobs/rocoto/wavepostbndpntbll.sh +++ b/jobs/rocoto/wavepostbndpntbll.sh @@ -9,6 +9,9 @@ echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" status=$? [[ $status -ne 0 ]] && exit $status +export job="wavepostbndpntbll" +export jobid="${job}.$$" + ############################################################### echo echo "=============== START TO RUN WAVE_POST_BNDPNT ===============" diff --git a/jobs/rocoto/wavepostpnt.sh b/jobs/rocoto/wavepostpnt.sh index 1b1d8c9765..3885f7755f 100755 --- a/jobs/rocoto/wavepostpnt.sh +++ b/jobs/rocoto/wavepostpnt.sh @@ -9,6 +9,9 @@ echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" status=$? [[ $status -ne 0 ]] && exit $status +export job="wavepostpnt" +export jobid="${job}.$$" + ############################################################### echo echo "=============== START TO RUN WAVE_POST_PNT ===============" diff --git a/jobs/rocoto/wavepostsbs.sh b/jobs/rocoto/wavepostsbs.sh index fb4fdfbd8b..814e114b4b 100755 --- a/jobs/rocoto/wavepostsbs.sh +++ b/jobs/rocoto/wavepostsbs.sh @@ -9,6 +9,9 @@ echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" status=$? [[ $status -ne 0 ]] && exit $status +export job="wavepostsbs" +export jobid="${job}.$$" + ############################################################### echo echo "=============== START TO RUN WAVE POST_SBS ===============" diff --git a/jobs/rocoto/waveprep.sh b/jobs/rocoto/waveprep.sh index c55c8526d9..2c40ec621a 100755 --- a/jobs/rocoto/waveprep.sh +++ b/jobs/rocoto/waveprep.sh @@ -9,6 +9,9 @@ echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" status=$? [[ $status -ne 0 ]] && exit $status +export job="waveprep" +export jobid="${job}.$$" + ############################################################### echo echo "=============== START TO RUN WAVE PREP ===============" From bffbf23311de3a50fe976bba930a3ff107a9b960 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Thu, 13 Oct 2022 15:49:57 -0400 Subject: [PATCH 19/30] fix metp --- jobs/rocoto/metp.sh | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/jobs/rocoto/metp.sh b/jobs/rocoto/metp.sh index 80138b9026..b2b93e7314 100755 --- a/jobs/rocoto/metp.sh +++ b/jobs/rocoto/metp.sh @@ -23,6 +23,23 @@ echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" status=$? [[ $status -ne 0 ]] && exit $status +export job="metp${METPCASE}" +export jobid="${job}.$$" + +############################################## +# make temp directory +############################################## +export DATA=${DATAROOT}/${jobid} +mkdir -p $DATA +cd $DATA + + +############################################## +# Run setpdy and initialize PDY variables +############################################## +export cycle="t${cyc}z" +setpdy.sh +. ./PDY ############################################################### echo @@ -43,16 +60,15 @@ status=$? [[ $status -ne 0 ]] && exit $status ############################################################### -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" export VDATE="$(echo $($NDATE -${VRFYBACK_HRS} $CDATE) | cut -c1-8)" - -export pid=${pid:-$$} -export jobid=${job}.${pid} export COMIN="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT" -export DATAROOT="$RUNDIR/$CDATE/$CDUMP/metp.${jobid}" -[[ -d $DATAROOT ]] && rm -rf $DATAROOT -mkdir -p $DATAROOT +# TODO: This should not be permitted as DATAROOT is set at the job-card level. +# TODO: DATAROOT is being used as DATA in metp jobs. This should be rectified in metp. +# TODO: The temporary directory is DATA and is created at the top of the J-Job. +# TODO: remove this line +export DATAROOT=$DATA ############################################################### echo @@ -61,7 +77,7 @@ if [ $CDUMP = "gfs" ]; then if [ $RUN_GRID2GRID_STEP1 = "YES" -o $RUN_GRID2OBS_STEP1 = "YES" -o $RUN_PRECIP_STEP1 = "YES" ]; then - $VERIF_GLOBALSH + $VERIF_GLOBALSH status=$? [[ $status -ne 0 ]] && exit $status [[ $status -eq 0 ]] && echo "Succesfully ran $VERIF_GLOBALSH" @@ -74,7 +90,7 @@ if [ $CDUMP = "gdas" ]; then fi ############################################################### # Force Exit out cleanly -if [ ${KEEPDATA:-"NO"} = "NO" ] ; then rm -rf $DATAROOT ; fi +if [ ${KEEPDATA:-"NO"} = "NO" ] ; then rm -rf $DATAROOT ; fi # TODO: This should be $DATA exit 0 From e9178c40d0cd8755cd567cba064ab7a3cff383b7 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Thu, 13 Oct 2022 19:28:01 -0400 Subject: [PATCH 20/30] WAFS toggle in config.base is WAFSF and not DO_WAFS --- sorc/checkout.sh | 2 +- sorc/link_workflow.sh | 2 +- workflow/applications.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sorc/checkout.sh b/sorc/checkout.sh index 441cd78124..28c582b437 100755 --- a/sorc/checkout.sh +++ b/sorc/checkout.sh @@ -19,7 +19,7 @@ Usage: $BASH_SOURCE [-c][-h][-m ufs_hash][-o] Check out this UFS hash instead of the default -o: Check out operational-only code (GTG and WAFS) - -g: + -g: Check out GSI for GSI-based DA -u: Check out GDASApp for UFS-based DA diff --git a/sorc/link_workflow.sh b/sorc/link_workflow.sh index 15c09168d9..d876c78841 100755 --- a/sorc/link_workflow.sh +++ b/sorc/link_workflow.sh @@ -27,7 +27,7 @@ OPTIND=1 while getopts ":ho" option; do case "${option}" in h) usage ;; - o) + o) echo "-o option received, configuring for NCO" RUN_ENVIR="nco";; :) diff --git a/workflow/applications.py b/workflow/applications.py index 713c68727c..fe41a0a836 100644 --- a/workflow/applications.py +++ b/workflow/applications.py @@ -103,7 +103,7 @@ def __init__(self, configuration: Configuration) -> None: self.do_bufrsnd = _base.get('DO_BUFRSND', False) self.do_gempak = _base.get('DO_GEMPAK', False) self.do_awips = _base.get('DO_AWIPS', False) - self.do_wafs = _base.get('DO_WAFS', False) + self.do_wafs = _base.get('WAFSF', False) self.do_vrfy = _base.get('DO_VRFY', True) self.do_metp = _base.get('DO_METP', False) self.do_jedivar = _base.get('DO_JEDIVAR', False) From bca4e0f483e8a2ac6a2c7e7dda21f16413f8e23e Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Thu, 13 Oct 2022 23:06:27 -0400 Subject: [PATCH 21/30] remove trailing whitespace and incorrect quotes that caused wgrib2 to fail --- scripts/exgfs_atmos_post.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/exgfs_atmos_post.sh b/scripts/exgfs_atmos_post.sh index 6777b1a380..fc44274502 100755 --- a/scripts/exgfs_atmos_post.sh +++ b/scripts/exgfs_atmos_post.sh @@ -206,7 +206,7 @@ if [ "${stime}" = "anl" ]; then wafsgrid="latlon 0:1440:0.25 90:721:-0.25" ${WGRIB2} "${PGBOUT}" -set_grib_type same -new_grid_winds earth \ -new_grid_interpolation bilinear -set_bitmap 1 \ - -new_grid "${wafsgrid}" "${PGBOUT}.tmp" + -new_grid ${wafsgrid} "${PGBOUT}.tmp" if [ "${SENDCOM}" = "YES" ]; then cp "${PGBOUT}.tmp" "${COMOUT}/${PREFIX}wafs.0p25.anl" @@ -437,7 +437,7 @@ else ## not_anl if_stime "${USHgfs}/link_crtm_fix.sh" "${FIXCRTM}" if [ "${GRIBVERSION}" = 'grib2' ]; then - export PostFlatFile="${PARMpost}/postxconfig-NT-GFS-GOES.txt " + export PostFlatFile="${PARMpost}/postxconfig-NT-GFS-GOES.txt" export CTLFILE="${PARMpost}/postcntrl_gfs_goes.xml" fi export FLXINP=flxfile From 0b457b37db9c1a02f0588e93fabef6512029a9e8 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Fri, 14 Oct 2022 15:45:46 -0400 Subject: [PATCH 22/30] fix wafs. There are FATAL_ERRORs noticed in these jobs when run on Orion, and yet the task returns with an exit status 0. --- jobs/JGLOBAL_ATMOS_ANALYSIS | 1 - jobs/rocoto/wafs.sh | 25 ++++++------------------- jobs/rocoto/wafsgcip.sh | 19 +++++++------------ 3 files changed, 13 insertions(+), 32 deletions(-) diff --git a/jobs/JGLOBAL_ATMOS_ANALYSIS b/jobs/JGLOBAL_ATMOS_ANALYSIS index 2b2d578b99..2f955622f8 100755 --- a/jobs/JGLOBAL_ATMOS_ANALYSIS +++ b/jobs/JGLOBAL_ATMOS_ANALYSIS @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/rocoto/wafs.sh b/jobs/rocoto/wafs.sh index 8aab955cc8..592baa02c4 100755 --- a/jobs/rocoto/wafs.sh +++ b/jobs/rocoto/wafs.sh @@ -9,7 +9,12 @@ echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" status=$? [[ $status -ne 0 ]] && exit $status +export job="wafs" +export jobid="${job}.$$" + +############################################################### ############################################################### +# TODO: sourcing configs should be in the j-job echo "=============== BEGIN TO SOURCE RELEVANT CONFIGS ===============" configs="base wafs" for config in $configs; do @@ -20,15 +25,6 @@ done ############################################################### -export pid=${pid:-$$} -export jobid=${job}.${pid} -export DATAROOT="$RUNDIR/$CDATE/$CDUMP/wafs.$jobid" -[[ -d $DATAROOT ]] && rm -rf $DATAROOT -mkdir -p $DATAROOT - -export DATA="${DATAROOT}/$job" - -############################################################### echo echo "=============== START TO RUN WAFS ===============" @@ -36,11 +32,7 @@ echo "=============== START TO RUN WAFS ===============" hr=0 while [ $hr -le 120 ]; do - if [ $hr -le 100 ]; then - export fcsthrs="$(printf "%02d" $(( 10#$hr )) )" - else - export fcsthrs=$hr - fi + export fcsthrs=$(printf "%03d" $hr) # Execute the JJOB $HOMEgfs/jobs/JGFS_ATMOS_WAFS @@ -51,9 +43,4 @@ while [ $hr -le 120 ]; do done -############################################################### -# Force Exit out cleanly -if [ ${KEEPDATA:-"NO"} = "NO" ] ; then rm -rf $DATAROOT ; fi - - exit 0 diff --git a/jobs/rocoto/wafsgcip.sh b/jobs/rocoto/wafsgcip.sh index 53cfd90da5..b1e0ef94bd 100755 --- a/jobs/rocoto/wafsgcip.sh +++ b/jobs/rocoto/wafsgcip.sh @@ -9,7 +9,12 @@ echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" status=$? [[ $status -ne 0 ]] && exit $status +export job="wafsgcip" +export jobid="${job}.$$" + +# ############################################################### +# TODO: sourcing configs should be in the j-job echo "=============== BEGIN TO SOURCE RELEVANT CONFIGS ===============" configs="base wafsgcip" for config in $configs; do @@ -27,24 +32,14 @@ status=$? ############################################################### -export DATAROOT="$RUNDIR/$CDATE/$CDUMP/wafsgcip" -[[ -d $DATAROOT ]] && rm -rf $DATAROOT -mkdir -p $DATAROOT - -export pid=${pid:-$$} -export jobid=${job}.${pid} -export DATA="${DATAROOT}/$job" - ############################################################### echo echo "=============== START TO RUN WAFSGCIP ===============" # Execute the JJOB $HOMEgfs/jobs/JGFS_ATMOS_WAFS_GCIP status=$? +[[ $status -ne 0 ]] && exit $status ############################################################### -# Force Exit out cleanly -if [ ${KEEPDATA:-"NO"} = "NO" ] ; then rm -rf $DATAROOT ; fi - -exit $status +exit 0 From f819a3904db03faf6e964ee80fa3609d5087cff4 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Fri, 14 Oct 2022 15:53:43 -0400 Subject: [PATCH 23/30] fix wafsgrib2 and wafsgrib20p25. These jobs depend on some data that is not available on Orion. They need to be tested on wcoss2. asking @yalimao-noaa would be help --- jobs/rocoto/wafsgrib2.sh | 21 ++++++++------------- jobs/rocoto/wafsgrib20p25.sh | 20 +++++++------------- 2 files changed, 15 insertions(+), 26 deletions(-) diff --git a/jobs/rocoto/wafsgrib2.sh b/jobs/rocoto/wafsgrib2.sh index c7dbead30d..4e9e0ca4b0 100755 --- a/jobs/rocoto/wafsgrib2.sh +++ b/jobs/rocoto/wafsgrib2.sh @@ -9,7 +9,11 @@ echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" status=$? [[ $status -ne 0 ]] && exit $status +export job="wafsgrib2" +export jobid=${job}.$$ + ############################################################### +# TODO: Sourcing configs should be done in the j-job echo "=============== BEGIN TO SOURCE RELEVANT CONFIGS ===============" configs="base wafsgrib2" for config in $configs; do @@ -18,26 +22,17 @@ for config in $configs; do [[ $status -ne 0 ]] && exit $status done -############################################################### - -export DATAROOT="$RUNDIR/$CDATE/$CDUMP/wafsgrib2" -[[ -d $DATAROOT ]] && rm -rf $DATAROOT -mkdir -p $DATAROOT - -export pid=${pid:-$$} -export jobid=${job}.${pid} -export DATA="${DATAROOT}/$job" +# TODO: Missing sourcing of $MACHINE.env ############################################################### + echo echo "=============== START TO RUN WAFSGRIB2 ===============" # Execute the JJOB $HOMEgfs/jobs/JGFS_ATMOS_WAFS_GRIB2 status=$? +[[ $status -ne 0 ]] && exit $status ############################################################### -# Force Exit out cleanly -if [ ${KEEPDATA:-"NO"} = "NO" ] ; then rm -rf $DATAROOT ; fi - -exit $status +exit 0 diff --git a/jobs/rocoto/wafsgrib20p25.sh b/jobs/rocoto/wafsgrib20p25.sh index e99ee210d9..161c0fa3cc 100755 --- a/jobs/rocoto/wafsgrib20p25.sh +++ b/jobs/rocoto/wafsgrib20p25.sh @@ -9,7 +9,11 @@ echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" status=$? [[ $status -ne 0 ]] && exit $status +export job="wafsgrib20p25" +export jobid="${job}.$$" + ############################################################### +# TODO: sourcing configs should be in the j-job echo "=============== BEGIN TO SOURCE RELEVANT CONFIGS ===============" configs="base wafsgrib20p25" for config in $configs; do @@ -18,15 +22,7 @@ for config in $configs; do [[ $status -ne 0 ]] && exit $status done -############################################################### - -export DATAROOT="$RUNDIR/$CDATE/$CDUMP/wafsgrib20p25" -[[ -d $DATAROOT ]] && rm -rf $DATAROOT -mkdir -p $DATAROOT - -export pid=${pid:-$$} -export jobid=${job}.${pid} -export DATA="${DATAROOT}/$job" +# TODO: missing sourcing $MACHINE.env ############################################################### echo @@ -34,10 +30,8 @@ echo "=============== START TO RUN WAFSGRIB20p25 ===============" # Execute the JJOB $HOMEgfs/jobs/JGFS_ATMOS_WAFS_GRIB2_0P25 status=$? +[[ $status -ne 0 ]] && exit $status ############################################################### -# Force Exit out cleanly -if [ ${KEEPDATA:-"NO"} = "NO" ] ; then rm -rf $DATAROOT ; fi - -exit $status +exit 0 From be74f743409ebd1b19bd0d5117d9d0dbc230c09e Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Fri, 14 Oct 2022 15:58:28 -0400 Subject: [PATCH 24/30] fix wafsblending jobs. They depend on wafsgrib2 jobs which were not run on Orion. --- jobs/rocoto/wafsblending.sh | 21 ++++++++------------- jobs/rocoto/wafsblending0p25.sh | 21 ++++++++------------- 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/jobs/rocoto/wafsblending.sh b/jobs/rocoto/wafsblending.sh index 2793986e80..5f2b2688c4 100755 --- a/jobs/rocoto/wafsblending.sh +++ b/jobs/rocoto/wafsblending.sh @@ -9,7 +9,11 @@ echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" status=$? [[ $status -ne 0 ]] && exit $status +export job="wafsblending" +export jobid="${job}.$$" + ############################################################### +# TODO: sourcing configs should be in the j-job echo "=============== BEGIN TO SOURCE RELEVANT CONFIGS ===============" configs="base wafsblending" for config in $configs; do @@ -18,26 +22,17 @@ for config in $configs; do [[ $status -ne 0 ]] && exit $status done -############################################################### - -export DATAROOT="$RUNDIR/$CDATE/$CDUMP/wafsblending" -[[ -d $DATAROOT ]] && rm -rf $DATAROOT -mkdir -p $DATAROOT - -export pid=${pid:-$$} -export jobid=${job}.${pid} -export DATA="${DATAROOT}/$job" +# TODO: Mising source machine runtime environment ############################################################### + echo echo "=============== START TO RUN WAFSBLENDING ===============" # Execute the JJOB $HOMEgfs/jobs/JGFS_ATMOS_WAFS_BLENDING status=$? +[[ $status -ne 0 ]] && exit $status ############################################################### -# Force Exit out cleanly -if [ ${KEEPDATA:-"NO"} = "NO" ] ; then rm -rf $DATAROOT ; fi - -exit $status +exit 0 diff --git a/jobs/rocoto/wafsblending0p25.sh b/jobs/rocoto/wafsblending0p25.sh index fb06284f55..3be6d8553b 100755 --- a/jobs/rocoto/wafsblending0p25.sh +++ b/jobs/rocoto/wafsblending0p25.sh @@ -2,6 +2,9 @@ source "$HOMEgfs/ush/preamble.sh" +export job="wafsblending0p25" +export jobid="${job}.$$" + ############################################################### echo echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" @@ -10,6 +13,7 @@ status=$? [[ $status -ne 0 ]] && exit $status ############################################################### +# TODO: sourcing configs should be in the j-job echo "=============== BEGIN TO SOURCE RELEVANT CONFIGS ===============" configs="base wafsblending0p25" for config in $configs; do @@ -18,26 +22,17 @@ for config in $configs; do [[ $status -ne 0 ]] && exit $status done -############################################################### - -export DATAROOT="$RUNDIR/$CDATE/$CDUMP/wafsblending0p25" -[[ -d $DATAROOT ]] && rm -rf $DATAROOT -mkdir -p $DATAROOT - -export pid=${pid:-$$} -export jobid=${job}.${pid} -export DATA="${DATAROOT}/$job" +# TODO: Mising source machine runtime environment ############################################################### + echo echo "=============== START TO RUN WAFSBLENDING0P25 ===============" # Execute the JJOB $HOMEgfs/jobs/JGFS_ATMOS_WAFS_BLENDING_0P25 status=$? +[[ $status -ne 0 ]] && exit $status ############################################################### -# Force Exit out cleanly -if [ ${KEEPDATA:-"NO"} = "NO" ] ; then rm -rf $DATAROOT ; fi - -exit $status +exit 0 From 87322f908039a98767e1bf69c6cb431e4b9e8980 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Mon, 17 Oct 2022 13:20:17 -0400 Subject: [PATCH 25/30] fix postsnd --- jobs/JGFS_ATMOS_POSTSND | 47 +++++++++++++++++++---------------------- jobs/rocoto/postsnd.sh | 2 ++ 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/jobs/JGFS_ATMOS_POSTSND b/jobs/JGFS_ATMOS_POSTSND index 859811e753..770b4bcfb7 100755 --- a/jobs/JGFS_ATMOS_POSTSND +++ b/jobs/JGFS_ATMOS_POSTSND @@ -2,7 +2,28 @@ source "$HOMEgfs/ush/preamble.sh" -export RUN_ENVIR=${RUN_ENVIR:-"nco"} +############################################## +# make temp directory +############################################## +export DATA=${DATAROOT}/${jobid} +mkdir -p $DATA +cd $DATA + + +############################################## +# Run setpdy and initialize PDY variables +############################################## +export cycle="t${cyc}z" +setpdy.sh +. ./PDY + +############################################## +# Determine Job Output Name on System +############################################## +export pid=${pid:-$$} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + ############################# # Source relevant config files @@ -25,30 +46,6 @@ status=$? [[ $status -ne 0 ]] && exit $status -############################################## -# Obtain unique process id (pid) and make temp directory -############################################## -export pid=${pid:-$$} -export outid=${outid:-"LL$job"} -export DATA=${DATA:-${DATAROOT}/${jobid:?}} -mkdir -p $DATA -cd $DATA - - -############################################## -# Run setpdy and initialize PDY variables -############################################## -export cycle="t${cyc}z" -setpdy.sh -. ./PDY - -############################################## -# Determine Job Output Name on System -############################################## -export pgmout="OUTPUT.${pid}" -export pgmerr=errfile - - ############################################## # Set variables used in the exglobal script ############################################## diff --git a/jobs/rocoto/postsnd.sh b/jobs/rocoto/postsnd.sh index fadfaa6d9e..24aa65ed86 100755 --- a/jobs/rocoto/postsnd.sh +++ b/jobs/rocoto/postsnd.sh @@ -9,6 +9,8 @@ source "$HOMEgfs/ush/preamble.sh" status=$? [[ $status -ne 0 ]] && exit $status +export job="postsnd" +export jobid="${job}.$$" ############################################################### # Execute the JJOB From 23fbb5abe8e696509fd181d0db243b7666f49fca Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Mon, 17 Oct 2022 21:36:51 -0400 Subject: [PATCH 26/30] fix ocnpost --- jobs/rocoto/ocnpost.sh | 91 +++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 49 deletions(-) diff --git a/jobs/rocoto/ocnpost.sh b/jobs/rocoto/ocnpost.sh index 7f242ea2a5..4c1f1f18b0 100755 --- a/jobs/rocoto/ocnpost.sh +++ b/jobs/rocoto/ocnpost.sh @@ -3,7 +3,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################################### -## CICE5/MOM6 post driver script +## CICE5/MOM6 post driver script ## FHRGRP : forecast hour group to post-process (e.g. 0, 1, 2 ...) ## FHRLST : forecast hourlist to be post-process (e.g. anl, f000, f000_f001_f002, ...) ############################################################### @@ -13,43 +13,15 @@ source "$HOMEgfs/ush/preamble.sh" status=$? [[ $status -ne 0 ]] && exit $status -############################# -# Source relevant config files -############################# -configs="base ocnpost" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config - status=$? - [[ $status -ne 0 ]] && exit $status -done - - -########################################## -# Source machine runtime environment -########################################## -. $HOMEgfs/env/${machine}.env ocnpost -status=$? -[[ $status -ne 0 ]] && exit $status - +export job="ocnpost" +export jobid=${job}.$$ ############################################## -# Obtain unique process id (pid) and make temp directory +# make temp directory ############################################## -export job=${job:-"ocnpost"} -export pid=${pid:-$$} -export outid=${outid:-"LL$job"} -export jobid=${jobid:-"${outid}.o${pid}"} - -export DATAROOT="$RUNDIR/$CDATE/$CDUMP" -[[ ! -d $DATAROOT ]] && mkdir -p $DATAROOT - -export DATA="$DATAROOT/${job}.${pid}" -# DATA dir not used for now. - +export DATA="$DATAROOT/${jobid}" [[ -d $DATA ]] && rm -rf $DATA -mkdir -p $DATA -cd $DATA +mkdir -p $DATA && cd $DATA ############################################## # Run setpdy and initialize PDY variables @@ -61,10 +33,31 @@ setpdy.sh ############################################## # Determine Job Output Name on System ############################################## +export pid=${pid:-$$} export pgmout="OUTPUT.${pid}" export pgmerr=errfile +############################# +# Source relevant config files +############################# +config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +configs="base ocnpost" +for config in $configs; do + . $config_path/config.$config + status=$? + [[ $status -ne 0 ]] && exit $status +done + + +########################################## +# Source machine runtime environment +########################################## +. $HOMEgfs/env/${machine}.env ocnpost +status=$? +[[ $status -ne 0 ]] && exit $status + + ############################################## # Set variables used in the exglobal script ############################################## @@ -106,33 +99,33 @@ for fhr in $fhrlst; do $MOM6REGRID/scripts/run_reg2grb2.sh status=$? [[ $status -ne 0 ]] && exit $status - - #break up ocn netcdf into multiple files: - if [ -f $COMOUTocean/ocn_2D_$VDATE.$ENSMEM.$IDATE.nc ]; then + + #break up ocn netcdf into multiple files: + if [ -f $COMOUTocean/ocn_2D_$VDATE.$ENSMEM.$IDATE.nc ]; then echo "File $COMOUTocean/ocn_2D_$VDATE.$ENSMEM.$IDATE.nc already exists" else ncks -x -v vo,uo,so,temp $COMOUTocean/ocn$VDATE.$ENSMEM.$IDATE.nc $COMOUTocean/ocn_2D_$VDATE.$ENSMEM.$IDATE.nc status=$? [[ $status -ne 0 ]] && exit $status - fi - if [ -f $COMOUTocean/ocn_3D_$VDATE.$ENSMEM.$IDATE.nc ]; then - echo "File $COMOUTocean/ocn_3D_$VDATE.$ENSMEM.$IDATE.nc already exists" - else + fi + if [ -f $COMOUTocean/ocn_3D_$VDATE.$ENSMEM.$IDATE.nc ]; then + echo "File $COMOUTocean/ocn_3D_$VDATE.$ENSMEM.$IDATE.nc already exists" + else ncks -x -v Heat_PmE,LW,LwLatSens,MLD_003,MLD_0125,SSH,SSS,SST,SSU,SSV,SW,cos_rot,ePBL,evap,fprec,frazil,latent,lprec,lrunoff,sensible,sin_rot,speed,taux,tauy,wet_c,wet_u,wet_v $COMOUTocean/ocn$VDATE.$ENSMEM.$IDATE.nc $COMOUTocean/ocn_3D_$VDATE.$ENSMEM.$IDATE.nc status=$? [[ $status -ne 0 ]] && exit $status - fi - if [ -f $COMOUTocean/ocn-temp-EQ_$VDATE.$ENSMEM.$IDATE.nc ]; then - echo "File $COMOUTocean/ocn-temp-EQ_$VDATE.$ENSMEM.$IDATE.nc already exists" - else + fi + if [ -f $COMOUTocean/ocn-temp-EQ_$VDATE.$ENSMEM.$IDATE.nc ]; then + echo "File $COMOUTocean/ocn-temp-EQ_$VDATE.$ENSMEM.$IDATE.nc already exists" + else ncks -v temp -d yh,503 -d xh,-299.92,60.03 $COMOUTocean/ocn_3D_$VDATE.$ENSMEM.$IDATE.nc $COMOUTocean/ocn-temp-EQ_$VDATE.$ENSMEM.$IDATE.nc status=$? [[ $status -ne 0 ]] && exit $status - fi - if [ -f $COMOUTocean/ocn-uo-EQ_$VDATE.$ENSMEM.$IDATE.nc ]; then - echo "File $COMOUTocean/ocn-uo-EQ_$VDATE.$ENSMEM.$IDATE.nc already exists" - else + fi + if [ -f $COMOUTocean/ocn-uo-EQ_$VDATE.$ENSMEM.$IDATE.nc ]; then + echo "File $COMOUTocean/ocn-uo-EQ_$VDATE.$ENSMEM.$IDATE.nc already exists" + else ncks -v uo -d yh,503 -d xh,-299.92,60.03 $COMOUTocean/ocn_3D_$VDATE.$ENSMEM.$IDATE.nc $COMOUTocean/ocn-uo-EQ_$VDATE.$ENSMEM.$IDATE.nc status=$? [[ $status -ne 0 ]] && exit $status From c7a3db5ffa165319ea2f27735c4e9fb64ce12056 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Mon, 17 Oct 2022 21:57:53 -0400 Subject: [PATCH 27/30] fix cyc, jobid and DATA --- jobs/JGDAS_ATMOS_ANALYSIS_DIAG | 3 +- jobs/JGDAS_ATMOS_CHGRES_FORENKF | 3 +- jobs/JGDAS_ATMOS_GEMPAK | 8 ++-- jobs/JGDAS_ATMOS_GEMPAK_META_NCDC | 14 +++---- jobs/JGDAS_ATMOS_GLDAS | 56 +++++++++++++-------------- jobs/JGDAS_ATMOS_VERFOZN | 3 +- jobs/JGDAS_ATMOS_VERFRAD | 3 +- jobs/JGDAS_ATMOS_VMINMON | 3 +- jobs/JGDAS_EFSOI | 5 +-- jobs/JGDAS_EFSOI_ECEN | 5 +-- jobs/JGDAS_EFSOI_FCST | 5 +-- jobs/JGDAS_EFSOI_POST | 5 +-- jobs/JGDAS_EFSOI_SFC | 5 +-- jobs/JGDAS_EFSOI_UPDATE | 5 +-- jobs/JGDAS_ENKF_DIAG | 3 +- jobs/JGDAS_ENKF_ECEN | 3 +- jobs/JGDAS_ENKF_FCST | 3 +- jobs/JGDAS_ENKF_POST | 3 +- jobs/JGDAS_ENKF_SELECT_OBS | 3 +- jobs/JGDAS_ENKF_SFC | 3 +- jobs/JGDAS_ENKF_UPDATE | 3 +- jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST | 3 +- jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP | 3 +- jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN | 3 +- jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST | 3 +- jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP | 3 +- jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN | 3 +- jobs/JGFS_ATMOS_AWIPS_20KM_1P0DEG | 4 +- jobs/JGFS_ATMOS_AWIPS_G2 | 4 +- jobs/JGFS_ATMOS_CYCLONE_GENESIS | 4 +- jobs/JGFS_ATMOS_CYCLONE_TRACKER | 8 ++-- jobs/JGFS_ATMOS_FBWIND | 4 +- jobs/JGFS_ATMOS_FSU_GENESIS | 8 ++-- jobs/JGFS_ATMOS_GEMPAK | 4 +- jobs/JGFS_ATMOS_GEMPAK_META | 4 +- jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF | 10 ++--- jobs/JGFS_ATMOS_GEMPAK_PGRB2_SPEC | 4 +- jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS | 4 +- jobs/JGFS_ATMOS_POSTSND | 2 +- jobs/JGFS_ATMOS_VMINMON | 3 +- jobs/JGLOBAL_ATMOS_ANALYSIS | 2 +- jobs/JGLOBAL_ATMOS_ANALYSIS_CALC | 3 +- jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP | 3 +- jobs/JGLOBAL_ATMOS_POST | 3 +- jobs/JGLOBAL_ATMOS_POST_MANAGER | 5 +-- jobs/JGLOBAL_ATMOS_SFCANL | 3 +- jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC | 3 +- jobs/JGLOBAL_FORECAST | 3 +- jobs/JGLOBAL_WAVE_GEMPAK | 3 +- jobs/JGLOBAL_WAVE_INIT | 3 +- jobs/JGLOBAL_WAVE_POST_BNDPNT | 3 +- jobs/JGLOBAL_WAVE_POST_BNDPNTBLL | 3 +- jobs/JGLOBAL_WAVE_POST_PNT | 3 +- jobs/JGLOBAL_WAVE_POST_SBS | 3 +- jobs/JGLOBAL_WAVE_PRDGEN_BULLS | 3 +- jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED | 3 +- jobs/JGLOBAL_WAVE_PREP | 3 +- jobs/rocoto/metp.sh | 2 +- jobs/rocoto/vrfy.sh | 1 - 59 files changed, 116 insertions(+), 164 deletions(-) diff --git a/jobs/JGDAS_ATMOS_ANALYSIS_DIAG b/jobs/JGDAS_ATMOS_ANALYSIS_DIAG index 490e23df0c..9d4f57d678 100755 --- a/jobs/JGDAS_ATMOS_ANALYSIS_DIAG +++ b/jobs/JGDAS_ATMOS_ANALYSIS_DIAG @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGDAS_ATMOS_CHGRES_FORENKF b/jobs/JGDAS_ATMOS_CHGRES_FORENKF index 35be64603c..48c088e675 100755 --- a/jobs/JGDAS_ATMOS_CHGRES_FORENKF +++ b/jobs/JGDAS_ATMOS_CHGRES_FORENKF @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGDAS_ATMOS_GEMPAK b/jobs/JGDAS_ATMOS_GEMPAK index 2174100cfe..69380a69a3 100755 --- a/jobs/JGDAS_ATMOS_GEMPAK +++ b/jobs/JGDAS_ATMOS_GEMPAK @@ -5,18 +5,20 @@ source "$HOMEgfs/ush/preamble.sh" ########################################################## # make temp directory ########################################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA ########################################### # Run setpdy and initialize PDY variables ########################################### -export cycle=${cycle:-t${cyc}z} +export cycle="t${cyc}z" setpdy.sh . ./PDY -export pgmout=OUTPUT.$$ +export pid=${pid:-$$} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile ############################# # Source relevant config files diff --git a/jobs/JGDAS_ATMOS_GEMPAK_META_NCDC b/jobs/JGDAS_ATMOS_GEMPAK_META_NCDC index 36e9bcfe2d..f418ff714f 100755 --- a/jobs/JGDAS_ATMOS_GEMPAK_META_NCDC +++ b/jobs/JGDAS_ATMOS_GEMPAK_META_NCDC @@ -7,23 +7,23 @@ source "$HOMEgfs/ush/preamble.sh" ############################################ ########################################################## -# obtain unique process id (pid) and make temp directory +# make temp directory ########################################################## -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA -###################################### -# Set up the cycle variable -###################################### -export cycle=${cycle:-t${cyc}z} - ########################################### # Run setpdy and initialize PDY variables ########################################### +export cycle="t${cyc}z" setpdy.sh . ./PDY +export pid=${pid:-$$} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + ################################ # Set up the HOME directory ################################ diff --git a/jobs/JGDAS_ATMOS_GLDAS b/jobs/JGDAS_ATMOS_GLDAS index 53ef2647d6..d03d48c75e 100755 --- a/jobs/JGDAS_ATMOS_GLDAS +++ b/jobs/JGDAS_ATMOS_GLDAS @@ -2,14 +2,38 @@ source "${HOMEgfs:?}/ush/preamble.sh" -export RUN_ENVIR=${RUN_ENVIR:-"nco"} +############################################## +# Obtain unique process id (pid) and make temp directory +############################################## +export DATA=${DATA:-${DATAROOT}/${jobid}} +mkdir -p "${DATA}" +cd "${DATA}" || exit 1 + + +############################################## +# Run setpdy and initialize PDY variables +############################################## +export cycle="t${cyc}z" +setpdy.sh +# shellcheck disable=SC1091 +. ./PDY +# shellcheck disable= + + +############################################## +# Determine Job Output Name on System +############################################## +export pid=${pid:-$$} +export pgmout="OUTPUT.${pid}" +export pgmerr=errfile + ############################# # Source relevant config files ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -configs="base gldas" config_path=${EXPDIR:-${NWROOT}/gfs.${gfs_ver}/parm/config} +configs="base gldas" for config in ${configs}; do # shellcheck disable=SC1090-SC1091 . "${config_path}/config.${config}" @@ -42,34 +66,6 @@ status=$? [[ ${status} -ne 0 ]] && exit "${status}" -############################################## -# Obtain unique process id (pid) and make temp directory -############################################## -export pid=${pid:-$$} -export outid=${outid:-"LL${job}"} - -export DATA=${DATA:-${DATAROOT}/${jobid:?}} -mkdir -p "${DATA}" -cd "${DATA}" || exit 1 - - -############################################## -# Run setpdy and initialize PDY variables -############################################## -export cycle="t${cyc}z" -setpdy.sh -# shellcheck disable=SC1091 -. ./PDY -# shellcheck disable= - - -############################################## -# Determine Job Output Name on System -############################################## -export pgmout="OUTPUT.${pid}" -export pgmerr=errfile - - ############################################## # Set variables used in the exglobal script ############################################## diff --git a/jobs/JGDAS_ATMOS_VERFOZN b/jobs/JGDAS_ATMOS_VERFOZN index 889957b913..27052d5507 100755 --- a/jobs/JGDAS_ATMOS_VERFOZN +++ b/jobs/JGDAS_ATMOS_VERFOZN @@ -8,7 +8,7 @@ source "$HOMEgfs/ush/preamble.sh" ########################################################### # make temp directories ########################################################### -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p ${DATA} cd ${DATA} @@ -25,7 +25,6 @@ setpdy.sh # Determine Job Output Name on System #################################### export pid=$$ -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGDAS_ATMOS_VERFRAD b/jobs/JGDAS_ATMOS_VERFRAD index db0e21a04e..f4cb30f13d 100755 --- a/jobs/JGDAS_ATMOS_VERFRAD +++ b/jobs/JGDAS_ATMOS_VERFRAD @@ -8,7 +8,7 @@ source "$HOMEgfs/ush/preamble.sh" ########################################################### # make temp directories ########################################################### -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p ${DATA} cd ${DATA} @@ -25,7 +25,6 @@ setpdy.sh # Determine Job Output Name on System #################################### export pid=$$ -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGDAS_ATMOS_VMINMON b/jobs/JGDAS_ATMOS_VMINMON index 2ae937420f..a32e668382 100755 --- a/jobs/JGDAS_ATMOS_VMINMON +++ b/jobs/JGDAS_ATMOS_VMINMON @@ -8,7 +8,7 @@ source "$HOMEgfs/ush/preamble.sh" ########################################################### # make temp directories ########################################################### -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p ${DATA} cd ${DATA} @@ -25,7 +25,6 @@ setpdy.sh # Determine Job Output Name on System #################################### export pid=$$ -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGDAS_EFSOI b/jobs/JGDAS_EFSOI index cc3ac4e94d..770567a18b 100755 --- a/jobs/JGDAS_EFSOI +++ b/jobs/JGDAS_EFSOI @@ -32,8 +32,7 @@ status=$? # Obtain unique process id (pid) and make temp directory ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -60,7 +59,7 @@ export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gdas"}} export COMPONENT="atmos" if [ $RUN_ENVIR = "nco" ]; then - export ROTDIR=${COMROOT:?}/$NET/$envir + export ROTDIR=${COMROOT}/$NET/$envir fi diff --git a/jobs/JGDAS_EFSOI_ECEN b/jobs/JGDAS_EFSOI_ECEN index c3a46531fc..f93212c6ca 100755 --- a/jobs/JGDAS_EFSOI_ECEN +++ b/jobs/JGDAS_EFSOI_ECEN @@ -29,8 +29,7 @@ status=$? # Obtain unique process id (pid) and make temp directory ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -57,7 +56,7 @@ export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gdas"}} export COMPONENT="atmos" if [ $RUN_ENVIR = "nco" ]; then - export ROTDIR=${COMROOT:?}/$NET/$envir + export ROTDIR=${COMROOT}/$NET/$envir fi diff --git a/jobs/JGDAS_EFSOI_FCST b/jobs/JGDAS_EFSOI_FCST index 9ed279988e..4e94153f4b 100755 --- a/jobs/JGDAS_EFSOI_FCST +++ b/jobs/JGDAS_EFSOI_FCST @@ -29,8 +29,7 @@ status=$? # Obtain unique process id (pid) and make temp directory ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -57,7 +56,7 @@ export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gdas"}} export COMPONENT="atmos" if [ $RUN_ENVIR = "nco" ]; then - export ROTDIR=${COMROOT:?}/$NET/$envir + export ROTDIR=${COMROOT}/$NET/$envir fi # tells the forecast script to use efsoi ensemble diff --git a/jobs/JGDAS_EFSOI_POST b/jobs/JGDAS_EFSOI_POST index c368eb9cdc..d574f4b70f 100755 --- a/jobs/JGDAS_EFSOI_POST +++ b/jobs/JGDAS_EFSOI_POST @@ -29,8 +29,7 @@ status=$? # Obtain unique process id (pid) and make temp directory ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -57,7 +56,7 @@ export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gdas"}} export COMPONENT="atmos" if [ $RUN_ENVIR = "nco" ]; then - export ROTDIR=${COMROOT:?}/$NET/$envir + export ROTDIR=${COMROOT}/$NET/$envir fi diff --git a/jobs/JGDAS_EFSOI_SFC b/jobs/JGDAS_EFSOI_SFC index c3e56047f6..e26ec1b114 100755 --- a/jobs/JGDAS_EFSOI_SFC +++ b/jobs/JGDAS_EFSOI_SFC @@ -29,8 +29,7 @@ status=$? # Obtain unique process id (pid) and make temp directory ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -57,7 +56,7 @@ export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gdas"}} export COMPONENT="atmos" if [ $RUN_ENVIR = "nco" ]; then - export ROTDIR=${COMROOT:?}/$NET/$envir + export ROTDIR=${COMROOT}/$NET/$envir fi diff --git a/jobs/JGDAS_EFSOI_UPDATE b/jobs/JGDAS_EFSOI_UPDATE index 0a27de8284..63c49b99c1 100755 --- a/jobs/JGDAS_EFSOI_UPDATE +++ b/jobs/JGDAS_EFSOI_UPDATE @@ -32,8 +32,7 @@ status=$? # Obtain unique process id (pid) and make temp directory ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -60,7 +59,7 @@ export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gdas"}} export COMPONENT="atmos" if [ $RUN_ENVIR = "nco" ]; then - export ROTDIR=${COMROOT:?}/$NET/$envir + export ROTDIR=${COMROOT}/$NET/$envir fi diff --git a/jobs/JGDAS_ENKF_DIAG b/jobs/JGDAS_ENKF_DIAG index dc89383697..b62e7193d3 100755 --- a/jobs/JGDAS_ENKF_DIAG +++ b/jobs/JGDAS_ENKF_DIAG @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGDAS_ENKF_ECEN b/jobs/JGDAS_ENKF_ECEN index dab7cccfe3..6dcacb7eba 100755 --- a/jobs/JGDAS_ENKF_ECEN +++ b/jobs/JGDAS_ENKF_ECEN @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # Obtain unique process id (pid) and make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGDAS_ENKF_FCST b/jobs/JGDAS_ENKF_FCST index 5958dc4ed3..08ee5d8243 100755 --- a/jobs/JGDAS_ENKF_FCST +++ b/jobs/JGDAS_ENKF_FCST @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGDAS_ENKF_POST b/jobs/JGDAS_ENKF_POST index 394d4d97eb..da36fe7d3d 100755 --- a/jobs/JGDAS_ENKF_POST +++ b/jobs/JGDAS_ENKF_POST @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGDAS_ENKF_SELECT_OBS b/jobs/JGDAS_ENKF_SELECT_OBS index 3938a6406f..9a5da91789 100755 --- a/jobs/JGDAS_ENKF_SELECT_OBS +++ b/jobs/JGDAS_ENKF_SELECT_OBS @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGDAS_ENKF_SFC b/jobs/JGDAS_ENKF_SFC index 37145da214..7f394736a7 100755 --- a/jobs/JGDAS_ENKF_SFC +++ b/jobs/JGDAS_ENKF_SFC @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGDAS_ENKF_UPDATE b/jobs/JGDAS_ENKF_UPDATE index 3c9226f01e..ea1666167d 100755 --- a/jobs/JGDAS_ENKF_UPDATE +++ b/jobs/JGDAS_ENKF_UPDATE @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST index cdb86fd8d8..9a47c52be8 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST +++ b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA || (echo "$DATA does not exist. ABORT!"; exit 1) @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP index a8f0090add..3dda554b97 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP +++ b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA || (echo "$DATA does not exist. ABORT!"; exit 1) @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN index 4c113e904a..ce13bc4c0b 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN +++ b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA || (echo "$DATA does not exist. ABORT!"; exit 1) @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST index fee0cd7c02..f15e37650d 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST +++ b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA || (echo "$DATA does not exist. ABORT!"; exit 1) @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP index 966d6f06cd..bd98cf3a5d 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP +++ b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA || (echo "$DATA does not exist. ABORT!"; exit 1) @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN index aa603a7c3e..05c9af08e1 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN +++ b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA || (echo "$DATA does not exist. ABORT!"; exit 1) @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGFS_ATMOS_AWIPS_20KM_1P0DEG b/jobs/JGFS_ATMOS_AWIPS_20KM_1P0DEG index adf3751d38..b22e245c66 100755 --- a/jobs/JGFS_ATMOS_AWIPS_20KM_1P0DEG +++ b/jobs/JGFS_ATMOS_AWIPS_20KM_1P0DEG @@ -11,14 +11,14 @@ export OMP_NUM_THREADS=${OMP_NUM_THREADS:-1} ######################################################### # obtain unique process id (pid) and make temp directory ######################################################### -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA ###################################### # Set up the cycle variable ###################################### -export cycle=${cycle:-t${cyc}z} +export cycle="t${cyc}z" ########################################### # Run setpdy and initialize PDY variables diff --git a/jobs/JGFS_ATMOS_AWIPS_G2 b/jobs/JGFS_ATMOS_AWIPS_G2 index 14482b7db1..a858213cc7 100755 --- a/jobs/JGFS_ATMOS_AWIPS_G2 +++ b/jobs/JGFS_ATMOS_AWIPS_G2 @@ -11,14 +11,14 @@ export OMP_NUM_THREADS=${OMP_NUM_THREADS:-1} ########################################################## # obtain unique process id (pid) and make temp directory ########################################################## -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA ###################################### # Set up the cycle variable ###################################### -export cycle=${cycle:-t${cyc}z} +export cycle="t${cyc}z" ########################################### # Run setpdy and initialize PDY variables diff --git a/jobs/JGFS_ATMOS_CYCLONE_GENESIS b/jobs/JGFS_ATMOS_CYCLONE_GENESIS index a200bf37f1..ae609d36a2 100755 --- a/jobs/JGFS_ATMOS_CYCLONE_GENESIS +++ b/jobs/JGFS_ATMOS_CYCLONE_GENESIS @@ -28,7 +28,7 @@ status=$? # Obtain unique process id (pid) and make temp directory ############################################## if [ $RUN_ENVIR = "nco" ]; then - export DATA=${DATA:-${DATAROOT}/${jobid:?}} + export DATA=${DATA:-${DATAROOT}/${jobid}} else export job="gfs_cyclone_genesis" export DATA="$DATAROOT/${job}$$" @@ -77,7 +77,7 @@ export SENDECF=${SENDECF:-NO} #################################### # Specify Execution Areas #################################### -export HOMEens_tracker=${HOMEens_tracker:-${PACKAGEROOT:?}/ens_tracker.${ens_tracker_ver}} +export HOMEens_tracker=${HOMEens_tracker:-${PACKAGEROOT}/ens_tracker.${ens_tracker_ver}} export EXECens_tracker=${EXECens_tracker:-$HOMEens_tracker/exec} export FIXens_tracker=${FIXens_tracker:-$HOMEens_tracker/fix} export USHens_tracker=${USHens_tracker:-$HOMEens_tracker/ush} diff --git a/jobs/JGFS_ATMOS_CYCLONE_TRACKER b/jobs/JGFS_ATMOS_CYCLONE_TRACKER index 2227651d76..a10ef07e4f 100755 --- a/jobs/JGFS_ATMOS_CYCLONE_TRACKER +++ b/jobs/JGFS_ATMOS_CYCLONE_TRACKER @@ -28,7 +28,7 @@ status=$? # Obtain unique process id (pid) and make temp directory ############################################## if [ $RUN_ENVIR = "nco" ]; then - export DATA=${DATA:-${DATAROOT}/${jobid:?}} + export DATA=${DATA:-${DATAROOT}/${jobid}} else export job="gfs_cyclone_tracker" export DATA="$DATAROOT/${job}$$" @@ -79,7 +79,7 @@ export SENDECF=${SENDECF:-NO} #################################### # Specify Execution Areas #################################### -export HOMEens_tracker=${HOMEens_tracker:-${PACKAGEROOT:?}/ens_tracker.${ens_tracker_ver}} +export HOMEens_tracker=${HOMEens_tracker:-${PACKAGEROOT}/ens_tracker.${ens_tracker_ver}} export EXECens_tracker=${EXECens_tracker:-$HOMEens_tracker/exec} export FIXens_tracker=${FIXens_tracker:-$HOMEens_tracker/fix} export USHens_tracker=${USHens_tracker:-$HOMEens_tracker/ush} @@ -97,8 +97,8 @@ export COMOUT=${ROTDIR}/${RUN}.${PDY}/${cyc}/$COMPONENT export COMINsyn=${COMINsyn:-$(compath.py ${envir}/com/gfs/${gfs_ver})/syndat} if [ $RUN_ENVIR = "nco" ]; then - export COMOUThur=${COMROOTp1:?}/hur/${envir}/global - export COMOUTatcf=${COMROOTp1:?}/nhc/${envir}/atcf + export COMOUThur=${COMROOTp1}/hur/${envir}/global + export COMOUTatcf=${COMROOTp1}/nhc/${envir}/atcf mkdir -m 775 -p $COMOUThur $COMOUTatcf else # export COMOUThur=$COMOUT diff --git a/jobs/JGFS_ATMOS_FBWIND b/jobs/JGFS_ATMOS_FBWIND index 69e5de4b1c..1c3fe1df71 100755 --- a/jobs/JGFS_ATMOS_FBWIND +++ b/jobs/JGFS_ATMOS_FBWIND @@ -9,14 +9,14 @@ source "$HOMEgfs/ush/preamble.sh" ########################################################### # obtain unique process id (pid) and make temp directory ########################################################### -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA ###################################### # Set up the cycle variable ###################################### -export cycle=${cycle:-t${cyc}z} +export cycle="t${cyc}z" ########################################### # Run setpdy and initialize PDY variables diff --git a/jobs/JGFS_ATMOS_FSU_GENESIS b/jobs/JGFS_ATMOS_FSU_GENESIS index f51311e68f..baa54b65c9 100755 --- a/jobs/JGFS_ATMOS_FSU_GENESIS +++ b/jobs/JGFS_ATMOS_FSU_GENESIS @@ -29,7 +29,7 @@ status=$? # Obtain unique process id (pid) and make temp directory ############################################## if [ $RUN_ENVIR = "nco" ]; then - export DATA=${DATA:-${DATAROOT}/${jobid:?}} + export DATA=${DATA:-${DATAROOT}/${jobid}} else export job="gfs_fsu_genesis" export DATA="$DATAROOT/${job}$$" @@ -80,7 +80,7 @@ export SENDECF=${SENDECF:-NO} #################################### # Specify Execution Areas #################################### -export HOMEens_tracker=${HOMEens_tracker:-${PACKAGEROOT:?}/ens_tracker.${ens_tracker_ver}} +export HOMEens_tracker=${HOMEens_tracker:-${PACKAGEROOT}/ens_tracker.${ens_tracker_ver}} export EXECens_tracker=${EXECens_tracker:-$HOMEens_tracker/exec} export FIXens_tracker=${FIXens_tracker:-$HOMEens_tracker/fix} export USHens_tracker=${USHens_tracker:-$HOMEens_tracker/ush} @@ -101,8 +101,8 @@ export COMOUT=${ROTDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT} export COMINsyn=${COMINsyn:-$(compath.py ${envir}/com/gfs/${gfs_ver})/syndat} if [ $RUN_ENVIR = "nco" ]; then - export COMOUThur=${COMROOTp1:?}/hur/${envir}/global - export COMOUTatcf=${COMROOTp1:?}/nhc/${envir}/atcf + export COMOUThur=${COMROOTp1}/hur/${envir}/global + export COMOUTatcf=${COMROOTp1}/nhc/${envir}/atcf mkdir -m 775 -p $COMOUThur $COMOUTatcf else # export COMOUThur=$COMOUT diff --git a/jobs/JGFS_ATMOS_GEMPAK b/jobs/JGFS_ATMOS_GEMPAK index cd62083c4a..37a2edad86 100755 --- a/jobs/JGFS_ATMOS_GEMPAK +++ b/jobs/JGFS_ATMOS_GEMPAK @@ -5,14 +5,14 @@ source "$HOMEgfs/ush/preamble.sh" ########################################################## # make temp directory ########################################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA ########################################### # Run setpdy and initialize PDY variables ########################################### -export cycle=${cycle:-t${cyc}z} +export cycle="t${cyc}z" setpdy.sh . ./PDY diff --git a/jobs/JGFS_ATMOS_GEMPAK_META b/jobs/JGFS_ATMOS_GEMPAK_META index 15fe02c547..948b11b180 100755 --- a/jobs/JGFS_ATMOS_GEMPAK_META +++ b/jobs/JGFS_ATMOS_GEMPAK_META @@ -19,14 +19,14 @@ export MP_DEBUG_NOTIMEOUT=yes ########################################################## # obtain unique process id (pid) and make temp directory ########################################################## -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA ###################################### # Set up the cycle variable ###################################### -export cycle=${cycle:-t${cyc}z} +export cycle="t${cyc}z" ########################################### # Run setpdy and initialize PDY variables diff --git a/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF b/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF index 9f56de584a..e80ed658b4 100755 --- a/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF +++ b/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF @@ -9,18 +9,14 @@ source "$HOMEgfs/ush/preamble.sh" ########################################################## # obtain unique process id (pid) and make temp directory ########################################################## -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA -###################################### -# Set up the cycle variable -###################################### -export cycle=${cycle:-t${cyc}z} - ########################################### # Run setpdy and initialize PDY variables ########################################### +export cycle="t${cyc}z" setpdy.sh . ./PDY @@ -45,7 +41,7 @@ export USHgempak=${USHgempak:-$HOMEgempak/ush} export MP_PULSE=0 export MP_TIMEOUT=2000 -export cycle=t${cyc}z + # # Set up model and cycle specific variables diff --git a/jobs/JGFS_ATMOS_GEMPAK_PGRB2_SPEC b/jobs/JGFS_ATMOS_GEMPAK_PGRB2_SPEC index 044150a1a2..7167e313c5 100755 --- a/jobs/JGFS_ATMOS_GEMPAK_PGRB2_SPEC +++ b/jobs/JGFS_ATMOS_GEMPAK_PGRB2_SPEC @@ -9,14 +9,14 @@ source "$HOMEgfs/ush/preamble.sh" ######################################################### # obtain unique process id (pid) and make temp directory ######################################################### -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA ###################################### # Set up the cycle variable ###################################### -export cycle=${cycle:-t${cyc}z} +export cycle="t${cyc}z" ########################################### # Run setpdy and initialize PDY variables diff --git a/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS b/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS index 9573218cbf..2bf174177c 100755 --- a/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS +++ b/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS @@ -11,14 +11,14 @@ export OMP_NUM_THREADS=${OMP_NUM_THREADS:-1} ########################################################## # obtain unique process id (pid) and make temp directory ########################################################## -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA ###################################### # Set up the cycle variable ###################################### -export cycle=${cycle:-t${cyc}z} +export cycle="t${cyc}z" ########################################### # Run setpdy and initialize PDY variables diff --git a/jobs/JGFS_ATMOS_POSTSND b/jobs/JGFS_ATMOS_POSTSND index 770b4bcfb7..6603095a39 100755 --- a/jobs/JGFS_ATMOS_POSTSND +++ b/jobs/JGFS_ATMOS_POSTSND @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA diff --git a/jobs/JGFS_ATMOS_VMINMON b/jobs/JGFS_ATMOS_VMINMON index 921e8e0732..674e0d00f4 100755 --- a/jobs/JGFS_ATMOS_VMINMON +++ b/jobs/JGFS_ATMOS_VMINMON @@ -17,8 +17,7 @@ export COMPONENT="atmos" # obtain unique process id (pid) and make temp directories ########################################################### export pid=$$ -export outid=${outid:-"LL$job"} -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA diff --git a/jobs/JGLOBAL_ATMOS_ANALYSIS b/jobs/JGLOBAL_ATMOS_ANALYSIS index 2f955622f8..df1b24f8b1 100755 --- a/jobs/JGLOBAL_ATMOS_ANALYSIS +++ b/jobs/JGLOBAL_ATMOS_ANALYSIS @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # Obtain unique process id (pid) and make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA diff --git a/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC b/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC index 84785899f4..c8f7aa4809 100755 --- a/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC +++ b/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # Obtain unique process id (pid) and make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP b/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP index 14291f56f5..18cc0ca893 100755 --- a/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP +++ b/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP @@ -21,8 +21,7 @@ done # Obtain unique process id (pid) and make temp directory ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA diff --git a/jobs/JGLOBAL_ATMOS_POST b/jobs/JGLOBAL_ATMOS_POST index e074633873..3fb56b4f45 100755 --- a/jobs/JGLOBAL_ATMOS_POST +++ b/jobs/JGLOBAL_ATMOS_POST @@ -5,7 +5,7 @@ source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p "${DATA}" cd "${DATA}" || exit 1 @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL${job}"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGLOBAL_ATMOS_POST_MANAGER b/jobs/JGLOBAL_ATMOS_POST_MANAGER index df350a5c98..746190bd4b 100755 --- a/jobs/JGLOBAL_ATMOS_POST_MANAGER +++ b/jobs/JGLOBAL_ATMOS_POST_MANAGER @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" #################################### # make temp directories #################################### -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -13,7 +13,7 @@ cd $DATA ########################################### # Run setpdy and initialize PDY variables ########################################### -export cycle=t${cyc}z +export cycle="t${cyc}z" setpdy.sh . ./PDY @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System #################################### export pid=${pid:-$$} -export outid="LL$job" export jobid="${outid}.o${pid}" export pgmout="OUTPUT.${pid}" diff --git a/jobs/JGLOBAL_ATMOS_SFCANL b/jobs/JGLOBAL_ATMOS_SFCANL index 58cf770a3c..359dd05ecc 100755 --- a/jobs/JGLOBAL_ATMOS_SFCANL +++ b/jobs/JGLOBAL_ATMOS_SFCANL @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # Obtain unique process id (pid) and make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC b/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC index 39cfb4abb6..b04aa589b3 100755 --- a/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC +++ b/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC @@ -29,8 +29,7 @@ status=$? # Obtain unique process id (pid) and make temp directory ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} -export DATA=${DATA:-${DATAROOT}/${jobid:?}} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA diff --git a/jobs/JGLOBAL_FORECAST b/jobs/JGLOBAL_FORECAST index c4e1b9ca1c..e8c0957c75 100755 --- a/jobs/JGLOBAL_FORECAST +++ b/jobs/JGLOBAL_FORECAST @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGLOBAL_WAVE_GEMPAK b/jobs/JGLOBAL_WAVE_GEMPAK index 5f9dd99147..305da14bc3 100755 --- a/jobs/JGLOBAL_WAVE_GEMPAK +++ b/jobs/JGLOBAL_WAVE_GEMPAK @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGLOBAL_WAVE_INIT b/jobs/JGLOBAL_WAVE_INIT index 8a30ed6317..0e041c74af 100755 --- a/jobs/JGLOBAL_WAVE_INIT +++ b/jobs/JGLOBAL_WAVE_INIT @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGLOBAL_WAVE_POST_BNDPNT b/jobs/JGLOBAL_WAVE_POST_BNDPNT index d5bb226294..d4aa6f093e 100755 --- a/jobs/JGLOBAL_WAVE_POST_BNDPNT +++ b/jobs/JGLOBAL_WAVE_POST_BNDPNT @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL b/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL index 7db6311736..a0de082255 100755 --- a/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL +++ b/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGLOBAL_WAVE_POST_PNT b/jobs/JGLOBAL_WAVE_POST_PNT index 8ec90f304d..0a1fae9813 100755 --- a/jobs/JGLOBAL_WAVE_POST_PNT +++ b/jobs/JGLOBAL_WAVE_POST_PNT @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGLOBAL_WAVE_POST_SBS b/jobs/JGLOBAL_WAVE_POST_SBS index b053cd3eef..37131930c6 100755 --- a/jobs/JGLOBAL_WAVE_POST_SBS +++ b/jobs/JGLOBAL_WAVE_POST_SBS @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGLOBAL_WAVE_PRDGEN_BULLS b/jobs/JGLOBAL_WAVE_PRDGEN_BULLS index e2f8fde470..b24055d2f7 100755 --- a/jobs/JGLOBAL_WAVE_PRDGEN_BULLS +++ b/jobs/JGLOBAL_WAVE_PRDGEN_BULLS @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED b/jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED index 11f168bef8..2fb1c58174 100755 --- a/jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED +++ b/jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/JGLOBAL_WAVE_PREP b/jobs/JGLOBAL_WAVE_PREP index 6c605c2c1e..bac83135a2 100755 --- a/jobs/JGLOBAL_WAVE_PREP +++ b/jobs/JGLOBAL_WAVE_PREP @@ -5,7 +5,7 @@ source "$HOMEgfs/ush/preamble.sh" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA @@ -22,7 +22,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile diff --git a/jobs/rocoto/metp.sh b/jobs/rocoto/metp.sh index b2b93e7314..3359eeee45 100755 --- a/jobs/rocoto/metp.sh +++ b/jobs/rocoto/metp.sh @@ -29,7 +29,7 @@ export jobid="${job}.$$" ############################################## # make temp directory ############################################## -export DATA=${DATAROOT}/${jobid} +export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA cd $DATA diff --git a/jobs/rocoto/vrfy.sh b/jobs/rocoto/vrfy.sh index 6e39aa1703..e5d2eb4cf2 100755 --- a/jobs/rocoto/vrfy.sh +++ b/jobs/rocoto/vrfy.sh @@ -31,7 +31,6 @@ setpdy.sh # Determine Job Output Name on System ############################################## export pid=${pid:-$$} -export outid=${outid:-"LL$job"} export pgmout="OUTPUT.${pid}" export pgmerr=errfile From 13102c0260279b585fa241585a4075d79fad7d29 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Wed, 16 Nov 2022 10:51:07 -0500 Subject: [PATCH 28/30] run shellcheck with SC2250 on these scripts --- env/HERA.env | 244 +++++----- env/JET.env | 214 ++++----- env/ORION.env | 244 +++++----- env/WCOSS2.env | 258 +++++------ jobs/JGDAS_ATMOS_ANALYSIS_DIAG | 78 ++-- jobs/JGDAS_ATMOS_CHGRES_FORENKF | 68 +-- jobs/JGDAS_ATMOS_GEMPAK | 76 ++-- jobs/JGDAS_ATMOS_GEMPAK_META_NCDC | 52 +-- jobs/JGDAS_ATMOS_VERFOZN | 20 +- jobs/JGDAS_ATMOS_VERFRAD | 36 +- jobs/JGDAS_ATMOS_VMINMON | 18 +- jobs/JGDAS_ENKF_DIAG | 106 ++--- jobs/JGDAS_ENKF_ECEN | 66 +-- jobs/JGDAS_ENKF_FCST | 60 +-- jobs/JGDAS_ENKF_POST | 36 +- jobs/JGDAS_ENKF_SELECT_OBS | 114 ++--- jobs/JGDAS_ENKF_SFC | 68 +-- jobs/JGDAS_ENKF_UPDATE | 50 +-- jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST | 48 +- jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP | 48 +- jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN | 48 +- jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST | 54 +-- jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP | 54 +-- jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN | 54 +-- jobs/JGFS_ATMOS_AWIPS_20KM_1P0DEG | 36 +- jobs/JGFS_ATMOS_AWIPS_G2 | 40 +- jobs/JGFS_ATMOS_CYCLONE_GENESIS | 48 +- jobs/JGFS_ATMOS_CYCLONE_TRACKER | 52 +-- jobs/JGFS_ATMOS_FBWIND | 38 +- jobs/JGFS_ATMOS_FSU_GENESIS | 50 +-- jobs/JGFS_ATMOS_GEMPAK | 120 ++--- jobs/JGFS_ATMOS_GEMPAK_META | 38 +- jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF | 48 +- jobs/JGFS_ATMOS_GEMPAK_PGRB2_SPEC | 54 +-- jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS | 64 +-- jobs/JGFS_ATMOS_POSTSND | 54 +-- jobs/JGFS_ATMOS_VMINMON | 22 +- jobs/JGLOBAL_ATMOS_ANALYSIS | 106 ++--- jobs/JGLOBAL_ATMOS_ANALYSIS_CALC | 84 ++-- jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP | 38 +- jobs/JGLOBAL_ATMOS_POST_MANAGER | 36 +- jobs/JGLOBAL_ATMOS_SFCANL | 74 ++-- jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC | 42 +- jobs/JGLOBAL_FORECAST | 46 +- jobs/JGLOBAL_WAVE_GEMPAK | 22 +- jobs/JGLOBAL_WAVE_INIT | 44 +- jobs/JGLOBAL_WAVE_POST_BNDPNT | 50 +-- jobs/JGLOBAL_WAVE_POST_BNDPNTBLL | 48 +- jobs/JGLOBAL_WAVE_POST_PNT | 44 +- jobs/JGLOBAL_WAVE_POST_SBS | 46 +- jobs/JGLOBAL_WAVE_PRDGEN_BULLS | 24 +- jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED | 24 +- jobs/JGLOBAL_WAVE_PREP | 68 +-- jobs/rocoto/anal.sh | 8 +- jobs/rocoto/analcalc.sh | 10 +- jobs/rocoto/analdiag.sh | 10 +- jobs/rocoto/atmanalpost.sh | 10 +- jobs/rocoto/atmanalprep.sh | 10 +- jobs/rocoto/atmanalrun.sh | 10 +- jobs/rocoto/atmensanalpost.sh | 10 +- jobs/rocoto/atmensanalprep.sh | 10 +- jobs/rocoto/atmensanalrun.sh | 10 +- jobs/rocoto/ecen.sh | 20 +- jobs/rocoto/echgres.sh | 8 +- jobs/rocoto/ediag.sh | 10 +- jobs/rocoto/efcs.sh | 10 +- jobs/rocoto/eobs.sh | 10 +- jobs/rocoto/epos.sh | 20 +- jobs/rocoto/esfc.sh | 10 +- jobs/rocoto/eupd.sh | 10 +- jobs/rocoto/fcst.sh | 10 +- jobs/rocoto/metp.sh | 40 +- jobs/rocoto/ocnpost.sh | 100 ++--- jobs/rocoto/post.sh | 22 +- jobs/rocoto/postsnd.sh | 10 +- jobs/rocoto/sfcanl.sh | 10 +- jobs/rocoto/vrfy.sh | 82 ++-- jobs/rocoto/wafs.sh | 22 +- jobs/rocoto/wafsblending.sh | 16 +- jobs/rocoto/wafsblending0p25.sh | 16 +- jobs/rocoto/wafsgcip.sh | 20 +- jobs/rocoto/wafsgrib2.sh | 16 +- jobs/rocoto/wafsgrib20p25.sh | 16 +- jobs/rocoto/waveinit.sh | 10 +- jobs/rocoto/wavepostbndpnt.sh | 10 +- jobs/rocoto/wavepostbndpntbll.sh | 10 +- jobs/rocoto/wavepostpnt.sh | 10 +- jobs/rocoto/wavepostsbs.sh | 10 +- jobs/rocoto/waveprep.sh | 10 +- scripts/exglobal_atmos_analysis.sh | 616 +++++++++++++------------- 90 files changed, 2408 insertions(+), 2408 deletions(-) diff --git a/env/HERA.env b/env/HERA.env index 45a4878cef..051f0da68f 100755 --- a/env/HERA.env +++ b/env/HERA.env @@ -32,257 +32,257 @@ export NTHSTACK=1024000000 ulimit -s unlimited ulimit -a -if [ $step = "prep" -o $step = "prepbufr" ]; then +if [ ${step} = "prep" -o ${step} = "prepbufr" ]; then - nth_max=$(($npe_node_max / $npe_node_prep)) + nth_max=$((${npe_node_max} / ${npe_node_prep})) export POE="NO" export BACK="NO" export sys_tp="HERA" export launcher_PREP="srun" -elif [ $step = "waveinit" -o $step = "waveprep" -o $step = "wavepostsbs" -o $step = "wavepostbndpnt" -o $step = "wavepostbndpntbll" -o $step = "wavepostpnt" ]; then +elif [ ${step} = "waveinit" -o ${step} = "waveprep" -o ${step} = "wavepostsbs" -o ${step} = "wavepostbndpnt" -o ${step} = "wavepostbndpntbll" -o ${step} = "wavepostpnt" ]; then export mpmd="--multi-prog" export CFP_MP="YES" - if [ $step = "waveprep" ]; then export MP_PULSE=0 ; fi + if [ ${step} = "waveprep" ]; then export MP_PULSE=0 ; fi export wavempexec=${launcher} export wave_mpmd=${mpmd} -elif [ $step = "atmanalrun" ]; then +elif [ ${step} = "atmanalrun" ]; then export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} - export APRUNCFP="$launcher -n \$ncmd --multi-prog" + export APRUNCFP="${launcher} -n \$ncmd --multi-prog" - nth_max=$(($npe_node_max / $npe_node_atmanalrun)) + nth_max=$((${npe_node_max} / ${npe_node_atmanalrun})) - export NTHREADS_ATMANAL=${nth_atmanalrun:-$nth_max} - [[ $NTHREADS_ATMANAL -gt $nth_max ]] && export NTHREADS_ATMANAL=$nth_max - export APRUN_ATMANAL="$launcher -n $npe_atmanalrun" + export NTHREADS_ATMANAL=${nth_atmanalrun:-${nth_max}} + [[ ${NTHREADS_ATMANAL} -gt ${nth_max} ]] && export NTHREADS_ATMANAL=${nth_max} + export APRUN_ATMANAL="${launcher} -n ${npe_atmanalrun}" -elif [ $step = "atmensanalrun" ]; then +elif [ ${step} = "atmensanalrun" ]; then export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} - export APRUNCFP="$launcher -n \$ncmd --multi-prog" + export APRUNCFP="${launcher} -n \$ncmd --multi-prog" - nth_max=$(($npe_node_max / $npe_node_atmensanalrun)) + nth_max=$((${npe_node_max} / ${npe_node_atmensanalrun})) - export NTHREADS_ATMENSANAL=${nth_atmensanalrun:-$nth_max} - [[ $NTHREADS_ATMENSANAL -gt $nth_max ]] && export NTHREADS_ATMENSANAL=$nth_max - export APRUN_ATMENSANAL="$launcher -n $npe_atmensanalrun" + export NTHREADS_ATMENSANAL=${nth_atmensanalrun:-${nth_max}} + [[ ${NTHREADS_ATMENSANAL} -gt ${nth_max} ]] && export NTHREADS_ATMENSANAL=${nth_max} + export APRUN_ATMENSANAL="${launcher} -n ${npe_atmensanalrun}" -elif [ $step = "aeroanlrun" ]; then +elif [ ${step} = "aeroanlrun" ]; then - export APRUNCFP="$launcher -n \$ncmd --multi-prog" + export APRUNCFP="${launcher} -n \$ncmd --multi-prog" - nth_max=$(($npe_node_max / $npe_node_aeroanlrun)) + nth_max=$((${npe_node_max} / ${npe_node_aeroanlrun})) - export NTHREADS_AEROANL=${nth_aeroanlrun:-$nth_max} - [[ $NTHREADS_AEROANL -gt $nth_max ]] && export NTHREADS_AEROANL=$nth_max - export APRUN_AEROANL="$launcher -n $npe_aeroanlrun" + export NTHREADS_AEROANL=${nth_aeroanlrun:-${nth_max}} + [[ ${NTHREADS_AEROANL} -gt ${nth_max} ]] && export NTHREADS_AEROANL=${nth_max} + export APRUN_AEROANL="${launcher} -n ${npe_aeroanlrun}" -elif [ $step = "anal" -o $step = "analcalc" ]; then +elif [ ${step} = "anal" -o ${step} = "analcalc" ]; then export MKL_NUM_THREADS=4 export MKL_CBWR=AUTO export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} - export APRUNCFP="$launcher -n \$ncmd --multi-prog" + export APRUNCFP="${launcher} -n \$ncmd --multi-prog" - nth_max=$(($npe_node_max / $npe_node_anal)) + nth_max=$((${npe_node_max} / ${npe_node_anal})) - export NTHREADS_GSI=${nth_anal:-$nth_max} - [[ $NTHREADS_GSI -gt $nth_max ]] && export NTHREADS_GSI=$nth_max - export APRUN_GSI="$launcher" + export NTHREADS_GSI=${nth_anal:-${nth_max}} + [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} + export APRUN_GSI="${launcher}" export NTHREADS_CALCINC=${nth_calcinc:-1} - [[ $NTHREADS_CALCINC -gt $nth_max ]] && export NTHREADS_CALCINC=$nth_max - export APRUN_CALCINC="$launcher" + [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} + export APRUN_CALCINC="${launcher}" export NTHREADS_CYCLE=${nth_cycle:-12} - [[ $NTHREADS_CYCLE -gt $npe_node_max ]] && export NTHREADS_CYCLE=$npe_node_max + [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} npe_cycle=${ntiles:-6} - export APRUN_CYCLE="$launcher -n $npe_cycle" + export APRUN_CYCLE="${launcher} -n ${npe_cycle}" export NTHREADS_GAUSFCANL=1 npe_gausfcanl=${npe_gausfcanl:-1} - export APRUN_GAUSFCANL="$launcher -n $npe_gausfcanl" + export APRUN_GAUSFCANL="${launcher} -n ${npe_gausfcanl}" -elif [ $step = "sfcanl" ]; then - nth_max=$(($npe_node_max / $npe_node_sfcanl)) +elif [ ${step} = "sfcanl" ]; then + nth_max=$((${npe_node_max} / ${npe_node_sfcanl})) export NTHREADS_CYCLE=${nth_sfcanl:-14} - [[ $NTHREADS_CYCLE -gt $npe_node_max ]] && export NTHREADS_CYCLE=$npe_node_max + [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} npe_sfcanl=${ntiles:-6} - export APRUN_CYCLE="$launcher -n $npe_sfcanl" + export APRUN_CYCLE="${launcher} -n ${npe_sfcanl}" -elif [ $step = "gldas" ]; then +elif [ ${step} = "gldas" ]; then export USE_CFP="NO" export CFP_MP="YES" - nth_max=$(($npe_node_max / $npe_node_gldas)) + nth_max=$((${npe_node_max} / ${npe_node_gldas})) - export NTHREADS_GLDAS=${nth_gldas:-$nth_max} - [[ $NTHREADS_GLDAS -gt $nth_max ]] && export NTHREADS_GLDAS=$nth_max - export APRUN_GLDAS="$launcher -n $npe_gldas" + export NTHREADS_GLDAS=${nth_gldas:-${nth_max}} + [[ ${NTHREADS_GLDAS} -gt ${nth_max} ]] && export NTHREADS_GLDAS=${nth_max} + export APRUN_GLDAS="${launcher} -n ${npe_gldas}" export NTHREADS_GAUSSIAN=${nth_gaussian:-1} - [[ $NTHREADS_GAUSSIAN -gt $nth_max ]] && export NTHREADS_GAUSSIAN=$nth_max - export APRUN_GAUSSIAN="$launcher -n $npe_gaussian" + [[ ${NTHREADS_GAUSSIAN} -gt ${nth_max} ]] && export NTHREADS_GAUSSIAN=${nth_max} + export APRUN_GAUSSIAN="${launcher} -n ${npe_gaussian}" # Must run data processing with exactly the number of tasks as time # periods being processed. - npe_gldas_data_proc=$(($gldas_spinup_hours + 12)) - export APRUN_GLDAS_DATA_PROC="$launcher -n $npe_gldas_data_proc --multi-prog" + npe_gldas_data_proc=$((${gldas_spinup_hours} + 12)) + export APRUN_GLDAS_DATA_PROC="${launcher} -n ${npe_gldas_data_proc} --multi-prog" -elif [ $step = "eobs" ]; then +elif [ ${step} = "eobs" ]; then export MKL_NUM_THREADS=4 export MKL_CBWR=AUTO - nth_max=$(($npe_node_max / $npe_node_eobs)) + nth_max=$((${npe_node_max} / ${npe_node_eobs})) - export NTHREADS_GSI=${nth_eobs:-$nth_max} - [[ $NTHREADS_GSI -gt $nth_max ]] && export NTHREADS_GSI=$nth_max - export APRUN_GSI="$launcher" + export NTHREADS_GSI=${nth_eobs:-${nth_max}} + [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} + export APRUN_GSI="${launcher}" export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} - export APRUNCFP="$launcher -n \$ncmd --multi-prog" + export APRUNCFP="${launcher} -n \$ncmd --multi-prog" -elif [ $step = "eupd" ]; then +elif [ ${step} = "eupd" ]; then - nth_max=$(($npe_node_max / $npe_node_eupd)) + nth_max=$((${npe_node_max} / ${npe_node_eupd})) - export NTHREADS_ENKF=${nth_eupd:-$nth_max} - [[ $NTHREADS_ENKF -gt $nth_max ]] && export NTHREADS_ENKF=$nth_max - export APRUN_ENKF="$launcher" + export NTHREADS_ENKF=${nth_eupd:-${nth_max}} + [[ ${NTHREADS_ENKF} -gt ${nth_max} ]] && export NTHREADS_ENKF=${nth_max} + export APRUN_ENKF="${launcher}" export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} - export APRUNCFP="$launcher -n \$ncmd --multi-prog" + export APRUNCFP="${launcher} -n \$ncmd --multi-prog" -elif [ $step = "fcst" ]; then +elif [ ${step} = "fcst" ]; then #PEs and PEs/node can differ for GFS and GDAS forecasts if threading differs - if [[ $CDUMP == "gfs" ]]; then - npe_fcst=$npe_fcst_gfs - npe_node_fcst=$npe_node_fcst_gfs - nth_fv3=$nth_fv3_gfs + if [[ ${CDUMP} == "gfs" ]]; then + npe_fcst=${npe_fcst_gfs} + npe_node_fcst=${npe_node_fcst_gfs} + nth_fv3=${nth_fv3_gfs} fi - nth_max=$(($npe_node_max / $npe_node_fcst)) + nth_max=$((${npe_node_max} / ${npe_node_fcst})) - export NTHREADS_FV3=${nth_fv3:-$nth_max} - [[ $NTHREADS_FV3 -gt $nth_max ]] && export NTHREADS_FV3=$nth_max - export cores_per_node=$npe_node_max - export APRUN_FV3="$launcher -n $npe_fcst" + export NTHREADS_FV3=${nth_fv3:-${nth_max}} + [[ ${NTHREADS_FV3} -gt ${nth_max} ]] && export NTHREADS_FV3=${nth_max} + export cores_per_node=${npe_node_max} + export APRUN_FV3="${launcher} -n ${npe_fcst}" export NTHREADS_REGRID_NEMSIO=${nth_regrid_nemsio:-1} - [[ $NTHREADS_REGRID_NEMSIO -gt $nth_max ]] && export NTHREADS_REGRID_NEMSIO=$nth_max - export APRUN_REGRID_NEMSIO="$launcher" + [[ ${NTHREADS_REGRID_NEMSIO} -gt ${nth_max} ]] && export NTHREADS_REGRID_NEMSIO=${nth_max} + export APRUN_REGRID_NEMSIO="${launcher}" export NTHREADS_REMAP=${nth_remap:-2} - [[ $NTHREADS_REMAP -gt $nth_max ]] && export NTHREADS_REMAP=$nth_max - export APRUN_REMAP="$launcher" + [[ ${NTHREADS_REMAP} -gt ${nth_max} ]] && export NTHREADS_REMAP=${nth_max} + export APRUN_REMAP="${launcher}" export I_MPI_DAPL_UD="enable" -elif [ $step = "efcs" ]; then +elif [ ${step} = "efcs" ]; then - nth_max=$(($npe_node_max / $npe_node_efcs)) + nth_max=$((${npe_node_max} / ${npe_node_efcs})) - export NTHREADS_FV3=${nth_efcs:-$nth_max} - [[ $NTHREADS_FV3 -gt $nth_max ]] && export NTHREADS_FV3=$nth_max - export cores_per_node=$npe_node_max - export APRUN_FV3="$launcher -n $npe_efcs" + export NTHREADS_FV3=${nth_efcs:-${nth_max}} + [[ ${NTHREADS_FV3} -gt ${nth_max} ]] && export NTHREADS_FV3=${nth_max} + export cores_per_node=${npe_node_max} + export APRUN_FV3="${launcher} -n ${npe_efcs}" export NTHREADS_REGRID_NEMSIO=${nth_regrid_nemsio:-1} - [[ $NTHREADS_REGRID_NEMSIO -gt $nth_max ]] && export NTHREADS_REGRID_NEMSIO=$nth_max - export APRUN_REGRID_NEMSIO="$launcher $LEVS" + [[ ${NTHREADS_REGRID_NEMSIO} -gt ${nth_max} ]] && export NTHREADS_REGRID_NEMSIO=${nth_max} + export APRUN_REGRID_NEMSIO="${launcher} ${LEVS}" -elif [ $step = "post" ]; then +elif [ ${step} = "post" ]; then - nth_max=$(($npe_node_max / $npe_node_post)) + nth_max=$((${npe_node_max} / ${npe_node_post})) export NTHREADS_NP=${nth_np:-1} - [[ $NTHREADS_NP -gt $nth_max ]] && export NTHREADS_NP=$nth_max - export APRUN_NP="$launcher" + [[ ${NTHREADS_NP} -gt ${nth_max} ]] && export NTHREADS_NP=${nth_max} + export APRUN_NP="${launcher}" export NTHREADS_DWN=${nth_dwn:-1} - [[ $NTHREADS_DWN -gt $nth_max ]] && export NTHREADS_DWN=$nth_max - export APRUN_DWN="$launcher" + [[ ${NTHREADS_DWN} -gt ${nth_max} ]] && export NTHREADS_DWN=${nth_max} + export APRUN_DWN="${launcher}" -elif [ $step = "ecen" ]; then +elif [ ${step} = "ecen" ]; then - nth_max=$(($npe_node_max / $npe_node_ecen)) + nth_max=$((${npe_node_max} / ${npe_node_ecen})) - export NTHREADS_ECEN=${nth_ecen:-$nth_max} - [[ $NTHREADS_ECEN -gt $nth_max ]] && export NTHREADS_ECEN=$nth_max - export APRUN_ECEN="$launcher" + export NTHREADS_ECEN=${nth_ecen:-${nth_max}} + [[ ${NTHREADS_ECEN} -gt ${nth_max} ]] && export NTHREADS_ECEN=${nth_max} + export APRUN_ECEN="${launcher}" export NTHREADS_CHGRES=${nth_chgres:-12} - [[ $NTHREADS_CHGRES -gt $npe_node_max ]] && export NTHREADS_CHGRES=$npe_node_max + [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} export APRUN_CHGRES="time" export NTHREADS_CALCINC=${nth_calcinc:-1} - [[ $NTHREADS_CALCINC -gt $nth_max ]] && export NTHREADS_CALCINC=$nth_max - export APRUN_CALCINC="$launcher" + [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} + export APRUN_CALCINC="${launcher}" -elif [ $step = "esfc" ]; then +elif [ ${step} = "esfc" ]; then - nth_max=$(($npe_node_max / $npe_node_esfc)) + nth_max=$((${npe_node_max} / ${npe_node_esfc})) - export NTHREADS_ESFC=${nth_esfc:-$nth_max} - [[ $NTHREADS_ESFC -gt $nth_max ]] && export NTHREADS_ESFC=$nth_max - export APRUN_ESFC="$launcher -n $npe_esfc" + export NTHREADS_ESFC=${nth_esfc:-${nth_max}} + [[ ${NTHREADS_ESFC} -gt ${nth_max} ]] && export NTHREADS_ESFC=${nth_max} + export APRUN_ESFC="${launcher} -n ${npe_esfc}" export NTHREADS_CYCLE=${nth_cycle:-14} - [[ $NTHREADS_CYCLE -gt $npe_node_max ]] && export NTHREADS_CYCLE=$npe_node_max - export APRUN_CYCLE="$launcher -n $npe_esfc" + [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} + export APRUN_CYCLE="${launcher} -n ${npe_esfc}" -elif [ $step = "epos" ]; then +elif [ ${step} = "epos" ]; then - nth_max=$(($npe_node_max / $npe_node_epos)) + nth_max=$((${npe_node_max} / ${npe_node_epos})) - export NTHREADS_EPOS=${nth_epos:-$nth_max} - [[ $NTHREADS_EPOS -gt $nth_max ]] && export NTHREADS_EPOS=$nth_max - export APRUN_EPOS="$launcher" + export NTHREADS_EPOS=${nth_epos:-${nth_max}} + [[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max} + export APRUN_EPOS="${launcher}" -elif [ $step = "init" ]; then +elif [ ${step} = "init" ]; then - export APRUN="$launcher" + export APRUN="${launcher}" -elif [ $step = "postsnd" ]; then +elif [ ${step} = "postsnd" ]; then - nth_max=$(($npe_node_max / $npe_node_postsnd)) + nth_max=$((${npe_node_max} / ${npe_node_postsnd})) export NTHREADS_POSTSND=${nth_postsnd:-1} - [[ $NTHREADS_POSTSND -gt $nth_max ]] && export NTHREADS_POSTSND=$nth_max - export APRUN_POSTSND="$launcher" + [[ ${NTHREADS_POSTSND} -gt ${nth_max} ]] && export NTHREADS_POSTSND=${nth_max} + export APRUN_POSTSND="${launcher}" export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} - [[ $NTHREADS_POSTSNDCFP -gt $nth_max ]] && export NTHREADS_POSTSNDCFP=$nth_max - export APRUN_POSTSNDCFP="$launcher" + [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} + export APRUN_POSTSNDCFP="${launcher}" -elif [ $step = "awips" ]; then +elif [ ${step} = "awips" ]; then - nth_max=$(($npe_node_max / $npe_node_awips)) + nth_max=$((${npe_node_max} / ${npe_node_awips})) export NTHREADS_AWIPS=${nth_awips:-2} - [[ $NTHREADS_AWIPS -gt $nth_max ]] && export NTHREADS_AWIPS=$nth_max - export APRUN_AWIPSCFP="$launcher -n $npe_awips --multi-prog" + [[ ${NTHREADS_AWIPS} -gt ${nth_max} ]] && export NTHREADS_AWIPS=${nth_max} + export APRUN_AWIPSCFP="${launcher} -n ${npe_awips} --multi-prog" -elif [ $step = "gempak" ]; then +elif [ ${step} = "gempak" ]; then - nth_max=$(($npe_node_max / $npe_node_gempak)) + nth_max=$((${npe_node_max} / ${npe_node_gempak})) export NTHREADS_GEMPAK=${nth_gempak:-1} - [[ $NTHREADS_GEMPAK -gt $nth_max ]] && export NTHREADS_GEMPAK=$nth_max - export APRUN="$launcher -n $npe_gempak --multi-prog" + [[ ${NTHREADS_GEMPAK} -gt ${nth_max} ]] && export NTHREADS_GEMPAK=${nth_max} + export APRUN="${launcher} -n ${npe_gempak} --multi-prog" fi diff --git a/env/JET.env b/env/JET.env index de942eb721..fd7b6fd358 100755 --- a/env/JET.env +++ b/env/JET.env @@ -14,9 +14,9 @@ fi step=$1 -if [[ "$PARTITION_BATCH" = "xjet" ]]; then +if [[ "${PARTITION_BATCH}" = "xjet" ]]; then export npe_node_max=24 -elif [[ "$PARTITION_BATCH" = "vjet" ]]; then +elif [[ "${PARTITION_BATCH}" = "vjet" ]]; then export npe_node_max=16 fi export launcher="srun -l --export=ALL" @@ -28,202 +28,202 @@ export NTHSTACK=1024000000 ulimit -s unlimited ulimit -a -if [ $step = "prep" -o $step = "prepbufr" ]; then +if [ ${step} = "prep" -o ${step} = "prepbufr" ]; then - nth_max=$(($npe_node_max / $npe_node_prep)) + nth_max=$((${npe_node_max} / ${npe_node_prep})) export POE="NO" export BACK=${BACK:-"NO"} export sys_tp="JET" -elif [ $step = "waveinit" -o $step = "waveprep" -o $step = "wavepostsbs" -o $step = "wavepostbndpnt" -o $step = "wavepostbndpntbll" -o $step = "wavepostpnt" ]; then +elif [ ${step} = "waveinit" -o ${step} = "waveprep" -o ${step} = "wavepostsbs" -o ${step} = "wavepostbndpnt" -o ${step} = "wavepostbndpntbll" -o ${step} = "wavepostpnt" ]; then - if [ $step = "waveprep" ]; then export MP_PULSE=0 ; fi + if [ ${step} = "waveprep" ]; then export MP_PULSE=0 ; fi export wavempexec=${launcher} export wave_mpmd=${mpmd} -elif [ $step = "atmanalrun" ]; then +elif [ ${step} = "atmanalrun" ]; then - nth_max=$(($npe_node_max / $npe_node_atmanalrun)) + nth_max=$((${npe_node_max} / ${npe_node_atmanalrun})) - export NTHREADS_ATMANAL=${nth_atmanalrun:-$nth_max} - [[ $NTHREADS_ATMANAL -gt $nth_max ]] && export NTHREADS_ATMANAL=$nth_max - export APRUN_ATMANAL="$launcher $npe_atmanalrun" + export NTHREADS_ATMANAL=${nth_atmanalrun:-${nth_max}} + [[ ${NTHREADS_ATMANAL} -gt ${nth_max} ]] && export NTHREADS_ATMANAL=${nth_max} + export APRUN_ATMANAL="${launcher} ${npe_atmanalrun}" -elif [ $step = "atmensanalrun" ]; then +elif [ ${step} = "atmensanalrun" ]; then - nth_max=$(($npe_node_max / $npe_node_atmensanalrun)) + nth_max=$((${npe_node_max} / ${npe_node_atmensanalrun})) - export NTHREADS_ATMENSANAL=${nth_atmensanalrun:-$nth_max} - [[ $NTHREADS_ATMENSANAL -gt $nth_max ]] && export NTHREADS_ATMENSANAL=$nth_max - export APRUN_ATMENSANAL="$launcher $npe_atmensanalrun" + export NTHREADS_ATMENSANAL=${nth_atmensanalrun:-${nth_max}} + [[ ${NTHREADS_ATMENSANAL} -gt ${nth_max} ]] && export NTHREADS_ATMENSANAL=${nth_max} + export APRUN_ATMENSANAL="${launcher} ${npe_atmensanalrun}" -elif [ $step = "anal" ]; then +elif [ ${step} = "anal" ]; then - nth_max=$(($npe_node_max / $npe_node_anal)) + nth_max=$((${npe_node_max} / ${npe_node_anal})) - export NTHREADS_GSI=${nth_gsi:-$nth_max} - [[ $NTHREADS_GSI -gt $nth_max ]] && export NTHREADS_GSI=$nth_max - export APRUN_GSI="$launcher ${npe_gsi:-${npe_anal:-$PBS_NP}}" + export NTHREADS_GSI=${nth_gsi:-${nth_max}} + [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} + export APRUN_GSI="${launcher} ${npe_gsi:-${npe_anal:-${PBS_NP}}}" export NTHREADS_CALCINC=${nth_calcinc:-1} - [[ $NTHREADS_CALCINC -gt $nth_max ]] && export NTHREADS_CALCINC=$nth_max - export APRUN_CALCINC="$launcher \$ncmd" + [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} + export APRUN_CALCINC="${launcher} \$ncmd" export NTHREADS_CYCLE=${nth_cycle:-12} - [[ $NTHREADS_CYCLE -gt $npe_node_max ]] && export NTHREADS_CYCLE=$npe_node_max + [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} npe_cycle=${ntiles:-6} - export APRUN_CYCLE="$launcher $npe_cycle" + export APRUN_CYCLE="${launcher} ${npe_cycle}" export NTHREADS_GAUSFCANL=1 npe_gausfcanl=${npe_gausfcanl:-1} - export APRUN_GAUSFCANL="$launcher $npe_gausfcanl" + export APRUN_GAUSFCANL="${launcher} ${npe_gausfcanl}" -elif [ $step = "sfcanl" ]; then - nth_max=$(($npe_node_max / $npe_node_sfcanl)) +elif [ ${step} = "sfcanl" ]; then + nth_max=$((${npe_node_max} / ${npe_node_sfcanl})) export NTHREADS_CYCLE=${nth_sfcanl:-14} - [[ $NTHREADS_CYCLE -gt $npe_node_max ]] && export NTHREADS_CYCLE=$npe_node_max + [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} npe_sfcanl=${ntiles:-6} - export APRUN_CYCLE="$launcher $npe_sfcanl" + export APRUN_CYCLE="${launcher} ${npe_sfcanl}" -elif [ $step = "gldas" ]; then +elif [ ${step} = "gldas" ]; then - nth_max=$(($npe_node_max / $npe_node_gldas)) + nth_max=$((${npe_node_max} / ${npe_node_gldas})) - export NTHREADS_GLDAS=${nth_gldas:-$nth_max} - [[ $NTHREADS_GLDAS -gt $nth_max ]] && export NTHREADS_GLDAS=$nth_max - export APRUN_GLDAS="$launcher $npe_gldas" + export NTHREADS_GLDAS=${nth_gldas:-${nth_max}} + [[ ${NTHREADS_GLDAS} -gt ${nth_max} ]] && export NTHREADS_GLDAS=${nth_max} + export APRUN_GLDAS="${launcher} ${npe_gldas}" export NTHREADS_GAUSSIAN=${nth_gaussian:-1} - [[ $NTHREADS_GAUSSIAN -gt $nth_max ]] && export NTHREADS_GAUSSIAN=$nth_max - export APRUN_GAUSSIAN="$launcher $npe_gaussian" + [[ ${NTHREADS_GAUSSIAN} -gt ${nth_max} ]] && export NTHREADS_GAUSSIAN=${nth_max} + export APRUN_GAUSSIAN="${launcher} ${npe_gaussian}" -elif [ $step = "eobs" ]; then +elif [ ${step} = "eobs" ]; then - nth_max=$(($npe_node_max / $npe_node_eobs)) + nth_max=$((${npe_node_max} / ${npe_node_eobs})) - export NTHREADS_GSI=${nth_gsi:-$nth_max} - [[ $NTHREADS_GSI -gt $nth_max ]] && export NTHREADS_GSI=$nth_max - export APRUN_GSI="$launcher ${npe_gsi:-${npe_eobs:-$PBS_NP}}" + export NTHREADS_GSI=${nth_gsi:-${nth_max}} + [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} + export APRUN_GSI="${launcher} ${npe_gsi:-${npe_eobs:-${PBS_NP}}}" -elif [ $step = "eupd" ]; then +elif [ ${step} = "eupd" ]; then - nth_max=$(($npe_node_max / $npe_node_eupd)) + nth_max=$((${npe_node_max} / ${npe_node_eupd})) - export NTHREADS_ENKF=${nth_enkf:-$nth_max} - [[ $NTHREADS_ENKF -gt $nth_max ]] && export NTHREADS_ENKF=$nth_max - export APRUN_ENKF="$launcher ${npe_enkf:-${npe_eupd:-$PBS_NP}}" + export NTHREADS_ENKF=${nth_enkf:-${nth_max}} + [[ ${NTHREADS_ENKF} -gt ${nth_max} ]] && export NTHREADS_ENKF=${nth_max} + export APRUN_ENKF="${launcher} ${npe_enkf:-${npe_eupd:-${PBS_NP}}}" -elif [ $step = "fcst" ]; then +elif [ ${step} = "fcst" ]; then #PEs and PEs/node can differ for GFS and GDAS forecasts if threading differs - if [[ $CDUMP == "gfs" ]]; then - npe_fcst=$npe_fcst_gfs - npe_node_fcst=$npe_node_fcst_gfs - nth_fv3=$nth_fv3_gfs + if [[ ${CDUMP} == "gfs" ]]; then + npe_fcst=${npe_fcst_gfs} + npe_node_fcst=${npe_node_fcst_gfs} + nth_fv3=${nth_fv3_gfs} fi - nth_max=$(($npe_node_max / $npe_node_fcst)) + nth_max=$((${npe_node_max} / ${npe_node_fcst})) - export NTHREADS_FV3=${nth_fv3:-$nth_max} - [[ $NTHREADS_FV3 -gt $nth_max ]] && export NTHREADS_FV3=$nth_max - export cores_per_node=$npe_node_max - export APRUN_FV3="$launcher" + export NTHREADS_FV3=${nth_fv3:-${nth_max}} + [[ ${NTHREADS_FV3} -gt ${nth_max} ]] && export NTHREADS_FV3=${nth_max} + export cores_per_node=${npe_node_max} + export APRUN_FV3="${launcher}" export NTHREADS_REGRID_NEMSIO=${nth_regrid_nemsio:-1} - [[ $NTHREADS_REGRID_NEMSIO -gt $nth_max ]] && export NTHREADS_REGRID_NEMSIO=$nth_max - export APRUN_REGRID_NEMSIO="$launcher $LEVS" + [[ ${NTHREADS_REGRID_NEMSIO} -gt ${nth_max} ]] && export NTHREADS_REGRID_NEMSIO=${nth_max} + export APRUN_REGRID_NEMSIO="${launcher} ${LEVS}" export NTHREADS_REMAP=${nth_remap:-2} - [[ $NTHREADS_REMAP -gt $nth_max ]] && export NTHREADS_REMAP=$nth_max - export APRUN_REMAP="$launcher ${npe_remap:-${npe_fcst:-$PBS_NP}}" + [[ ${NTHREADS_REMAP} -gt ${nth_max} ]] && export NTHREADS_REMAP=${nth_max} + export APRUN_REMAP="${launcher} ${npe_remap:-${npe_fcst:-${PBS_NP}}}" export I_MPI_DAPL_UD="enable" -elif [ $step = "efcs" ]; then +elif [ ${step} = "efcs" ]; then - nth_max=$(($npe_node_max / $npe_node_efcs)) + nth_max=$((${npe_node_max} / ${npe_node_efcs})) - export NTHREADS_FV3=${nth_fv3:-$nth_max} - [[ $NTHREADS_FV3 -gt $nth_max ]] && export NTHREADS_FV3=$nth_max - export cores_per_node=$npe_node_max - export APRUN_FV3="$launcher ${npe_fv3:-${npe_efcs:-$PBS_NP}}" + export NTHREADS_FV3=${nth_fv3:-${nth_max}} + [[ ${NTHREADS_FV3} -gt ${nth_max} ]] && export NTHREADS_FV3=${nth_max} + export cores_per_node=${npe_node_max} + export APRUN_FV3="${launcher} ${npe_fv3:-${npe_efcs:-${PBS_NP}}}" export NTHREADS_REGRID_NEMSIO=${nth_regrid_nemsio:-1} - [[ $NTHREADS_REGRID_NEMSIO -gt $nth_max ]] && export NTHREADS_REGRID_NEMSIO=$nth_max - export APRUN_REGRID_NEMSIO="$launcher $LEVS" + [[ ${NTHREADS_REGRID_NEMSIO} -gt ${nth_max} ]] && export NTHREADS_REGRID_NEMSIO=${nth_max} + export APRUN_REGRID_NEMSIO="${launcher} ${LEVS}" -elif [ $step = "post" ]; then +elif [ ${step} = "post" ]; then - nth_max=$(($npe_node_max / $npe_node_post)) + nth_max=$((${npe_node_max} / ${npe_node_post})) export NTHREADS_NP=${nth_np:-1} - [[ $NTHREADS_NP -gt $nth_max ]] && export NTHREADS_NP=$nth_max - export APRUN_NP="$launcher" + [[ ${NTHREADS_NP} -gt ${nth_max} ]] && export NTHREADS_NP=${nth_max} + export APRUN_NP="${launcher}" export NTHREADS_DWN=${nth_dwn:-1} - [[ $NTHREADS_DWN -gt $nth_max ]] && export NTHREADS_DWN=$nth_max - export APRUN_NP="$launcher" + [[ ${NTHREADS_DWN} -gt ${nth_max} ]] && export NTHREADS_DWN=${nth_max} + export APRUN_NP="${launcher}" -elif [ $step = "ecen" ]; then +elif [ ${step} = "ecen" ]; then - nth_max=$(($npe_node_max / $npe_node_ecen)) + nth_max=$((${npe_node_max} / ${npe_node_ecen})) - export NTHREADS_ECEN=${nth_ecen:-$nth_max} - [[ $NTHREADS_ECEN -gt $nth_max ]] && export NTHREADS_ECEN=$nth_max - export APRUN_ECEN="$launcher ${npe_ecen:-$PBS_NP}" + export NTHREADS_ECEN=${nth_ecen:-${nth_max}} + [[ ${NTHREADS_ECEN} -gt ${nth_max} ]] && export NTHREADS_ECEN=${nth_max} + export APRUN_ECEN="${launcher} ${npe_ecen:-${PBS_NP}}" export NTHREADS_CHGRES=${nth_chgres:-12} - [[ $NTHREADS_CHGRES -gt $npe_node_max ]] && export NTHREADS_CHGRES=$npe_node_max + [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} export APRUN_CHGRES="time" export NTHREADS_CALCINC=${nth_calcinc:-1} - [[ $NTHREADS_CALCINC -gt $nth_max ]] && export NTHREADS_CALCINC=$nth_max - export APRUN_CALCINC="$launcher ${npe_ecen:-$PBS_NP}" + [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} + export APRUN_CALCINC="${launcher} ${npe_ecen:-${PBS_NP}}" -elif [ $step = "esfc" ]; then +elif [ ${step} = "esfc" ]; then - nth_max=$(($npe_node_max / $npe_node_esfc)) + nth_max=$((${npe_node_max} / ${npe_node_esfc})) - export NTHREADS_ESFC=${nth_esfc:-$nth_max} - [[ $NTHREADS_ESFC -gt $nth_max ]] && export NTHREADS_ESFC=$nth_max - export APRUN_ESFC="$launcher ${npe_esfc:-$PBS_NP}" + export NTHREADS_ESFC=${nth_esfc:-${nth_max}} + [[ ${NTHREADS_ESFC} -gt ${nth_max} ]] && export NTHREADS_ESFC=${nth_max} + export APRUN_ESFC="${launcher} ${npe_esfc:-${PBS_NP}}" export NTHREADS_CYCLE=${nth_cycle:-12} - [[ $NTHREADS_CYCLE -gt $npe_node_max ]] && export NTHREADS_CYCLE=$npe_node_max - export APRUN_CYCLE="$launcher $npe_esfc" + [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} + export APRUN_CYCLE="${launcher} ${npe_esfc}" -elif [ $step = "epos" ]; then +elif [ ${step} = "epos" ]; then - nth_max=$(($npe_node_max / $npe_node_epos)) + nth_max=$((${npe_node_max} / ${npe_node_epos})) - export NTHREADS_EPOS=${nth_epos:-$nth_max} - [[ $NTHREADS_EPOS -gt $nth_max ]] && export NTHREADS_EPOS=$nth_max - export APRUN_EPOS="$launcher ${npe_epos:-$PBS_NP}" + export NTHREADS_EPOS=${nth_epos:-${nth_max}} + [[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max} + export APRUN_EPOS="${launcher} ${npe_epos:-${PBS_NP}}" -elif [ $step = "init" ]; then +elif [ ${step} = "init" ]; then - export APRUN="$launcher" + export APRUN="${launcher}" -elif [ $step = "postsnd" ]; then +elif [ ${step} = "postsnd" ]; then - nth_max=$(($npe_node_max / $npe_node_postsnd)) + nth_max=$((${npe_node_max} / ${npe_node_postsnd})) export NTHREADS_POSTSND=${nth_postsnd:-1} - [[ $NTHREADS_POSTSND -gt $nth_max ]] && export NTHREADS_POSTSND=$nth_max - export APRUN_POSTSND="$launcher $npe_postsnd" + [[ ${NTHREADS_POSTSND} -gt ${nth_max} ]] && export NTHREADS_POSTSND=${nth_max} + export APRUN_POSTSND="${launcher} ${npe_postsnd}" export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} - [[ $NTHREADS_POSTSNDCFP -gt $nth_max ]] && export NTHREADS_POSTSNDCFP=$nth_max - export APRUN_POSTSNDCFP="$launcher $npe_postsndcfp" + [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} + export APRUN_POSTSNDCFP="${launcher} ${npe_postsndcfp}" -elif [ $step = "awips" ]; then +elif [ ${step} = "awips" ]; then - echo "WARNING: $step is not enabled on $machine!" + echo "WARNING: ${step} is not enabled on ${machine}!" -elif [ $step = "gempak" ]; then +elif [ ${step} = "gempak" ]; then - echo "WARNING: $step is not enabled on $machine!" + echo "WARNING: ${step} is not enabled on ${machine}!" fi diff --git a/env/ORION.env b/env/ORION.env index 4b170cfdda..0a9cff020f 100755 --- a/env/ORION.env +++ b/env/ORION.env @@ -32,255 +32,255 @@ export NTHSTACK=1024000000 ulimit -s unlimited ulimit -a -if [ $step = "prep" -o $step = "prepbufr" ]; then +if [ ${step} = "prep" -o ${step} = "prepbufr" ]; then - nth_max=$(($npe_node_max / $npe_node_prep)) + nth_max=$((${npe_node_max} / ${npe_node_prep})) export POE="NO" export BACK=${BACK:-"YES"} export sys_tp="ORION" export launcher_PREP="srun" -elif [ $step = "waveinit" -o $step = "waveprep" -o $step = "wavepostsbs" -o $step = "wavepostbndpnt" -o $step = "wavepostpnt" ]; then +elif [ ${step} = "waveinit" -o ${step} = "waveprep" -o ${step} = "wavepostsbs" -o ${step} = "wavepostbndpnt" -o ${step} = "wavepostpnt" ]; then export mpmd="--multi-prog" export CFP_MP="YES" - if [ $step = "waveprep" ]; then export MP_PULSE=0 ; fi + if [ ${step} = "waveprep" ]; then export MP_PULSE=0 ; fi export wavempexec=${launcher} export wave_mpmd=${mpmd} -elif [ $step = "atmanalrun" ]; then +elif [ ${step} = "atmanalrun" ]; then export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} - export APRUNCFP="$launcher -n \$ncmd --multi-prog" + export APRUNCFP="${launcher} -n \$ncmd --multi-prog" - nth_max=$(($npe_node_max / $npe_node_atmanalrun)) + nth_max=$((${npe_node_max} / ${npe_node_atmanalrun})) - export NTHREADS_ATMANAL=${nth_atmanalrun:-$nth_max} - [[ $NTHREADS_ATMANAL -gt $nth_max ]] && export NTHREADS_ATMANAL=$nth_max - export APRUN_ATMANAL="$launcher -n $npe_atmanalrun" + export NTHREADS_ATMANAL=${nth_atmanalrun:-${nth_max}} + [[ ${NTHREADS_ATMANAL} -gt ${nth_max} ]] && export NTHREADS_ATMANAL=${nth_max} + export APRUN_ATMANAL="${launcher} -n ${npe_atmanalrun}" -elif [ $step = "atmensanalrun" ]; then +elif [ ${step} = "atmensanalrun" ]; then export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} - export APRUNCFP="$launcher -n \$ncmd --multi-prog" + export APRUNCFP="${launcher} -n \$ncmd --multi-prog" - nth_max=$(($npe_node_max / $npe_node_atmensanalrun)) + nth_max=$((${npe_node_max} / ${npe_node_atmensanalrun})) - export NTHREADS_ATMENSANAL=${nth_atmensanalrun:-$nth_max} - [[ $NTHREADS_ATMENSANAL -gt $nth_max ]] && export NTHREADS_ATMENSANAL=$nth_max - export APRUN_ATMENSANAL="$launcher -n $npe_atmensanalrun" + export NTHREADS_ATMENSANAL=${nth_atmensanalrun:-${nth_max}} + [[ ${NTHREADS_ATMENSANAL} -gt ${nth_max} ]] && export NTHREADS_ATMENSANAL=${nth_max} + export APRUN_ATMENSANAL="${launcher} -n ${npe_atmensanalrun}" -elif [ $step = "aeroanlrun" ]; then +elif [ ${step} = "aeroanlrun" ]; then - export APRUNCFP="$launcher -n \$ncmd --multi-prog" + export APRUNCFP="${launcher} -n \$ncmd --multi-prog" - nth_max=$(($npe_node_max / $npe_node_aeroanlrun)) + nth_max=$((${npe_node_max} / ${npe_node_aeroanlrun})) - export NTHREADS_AEROANL=${nth_aeroanlrun:-$nth_max} - [[ $NTHREADS_AEROANL -gt $nth_max ]] && export NTHREADS_AEROANL=$nth_max - export APRUN_AEROANL="$launcher -n $npe_aeroanlrun" + export NTHREADS_AEROANL=${nth_aeroanlrun:-${nth_max}} + [[ ${NTHREADS_AEROANL} -gt ${nth_max} ]] && export NTHREADS_AEROANL=${nth_max} + export APRUN_AEROANL="${launcher} -n ${npe_aeroanlrun}" -elif [ $step = "anal" -o $step = "analcalc" ]; then +elif [ ${step} = "anal" -o ${step} = "analcalc" ]; then export MKL_NUM_THREADS=4 export MKL_CBWR=AUTO export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} - export APRUNCFP="$launcher -n \$ncmd --multi-prog" + export APRUNCFP="${launcher} -n \$ncmd --multi-prog" - nth_max=$(($npe_node_max / $npe_node_anal)) + nth_max=$((${npe_node_max} / ${npe_node_anal})) - export NTHREADS_GSI=${nth_anal:-$nth_max} - [[ $NTHREADS_GSI -gt $nth_max ]] && export NTHREADS_GSI=$nth_max - export APRUN_GSI="$launcher" + export NTHREADS_GSI=${nth_anal:-${nth_max}} + [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} + export APRUN_GSI="${launcher}" export NTHREADS_CALCINC=${nth_calcinc:-1} - [[ $NTHREADS_CALCINC -gt $nth_max ]] && export NTHREADS_CALCINC=$nth_max - export APRUN_CALCINC="$launcher" + [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} + export APRUN_CALCINC="${launcher}" export NTHREADS_CYCLE=${nth_cycle:-12} - [[ $NTHREADS_CYCLE -gt $npe_node_max ]] && export NTHREADS_CYCLE=$npe_node_max + [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} npe_cycle=${ntiles:-6} - export APRUN_CYCLE="$launcher -n $npe_cycle" + export APRUN_CYCLE="${launcher} -n ${npe_cycle}" export NTHREADS_GAUSFCANL=1 npe_gausfcanl=${npe_gausfcanl:-1} - export APRUN_GAUSFCANL="$launcher -n $npe_gausfcanl" + export APRUN_GAUSFCANL="${launcher} -n ${npe_gausfcanl}" -elif [ $step = "sfcanl" ]; then - nth_max=$(($npe_node_max / $npe_node_sfcanl)) +elif [ ${step} = "sfcanl" ]; then + nth_max=$((${npe_node_max} / ${npe_node_sfcanl})) export NTHREADS_CYCLE=${nth_sfcanl:-14} - [[ $NTHREADS_CYCLE -gt $npe_node_max ]] && export NTHREADS_CYCLE=$npe_node_max + [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} npe_sfcanl=${ntiles:-6} - export APRUN_CYCLE="$launcher -n $npe_sfcanl" + export APRUN_CYCLE="${launcher} -n ${npe_sfcanl}" -elif [ $step = "gldas" ]; then +elif [ ${step} = "gldas" ]; then export USE_CFP="NO" - nth_max=$(($npe_node_max / $npe_node_gldas)) + nth_max=$((${npe_node_max} / ${npe_node_gldas})) - export NTHREADS_GLDAS=${nth_gldas:-$nth_max} - [[ $NTHREADS_GLDAS -gt $nth_max ]] && export NTHREADS_GLDAS=$nth_max - export APRUN_GLDAS="$launcher -n $npe_gldas" + export NTHREADS_GLDAS=${nth_gldas:-${nth_max}} + [[ ${NTHREADS_GLDAS} -gt ${nth_max} ]] && export NTHREADS_GLDAS=${nth_max} + export APRUN_GLDAS="${launcher} -n ${npe_gldas}" export NTHREADS_GAUSSIAN=${nth_gaussian:-1} - [[ $NTHREADS_GAUSSIAN -gt $nth_max ]] && export NTHREADS_GAUSSIAN=$nth_max - export APRUN_GAUSSIAN="$launcher -n $npe_gaussian" + [[ ${NTHREADS_GAUSSIAN} -gt ${nth_max} ]] && export NTHREADS_GAUSSIAN=${nth_max} + export APRUN_GAUSSIAN="${launcher} -n ${npe_gaussian}" # Must run data processing with exactly the number of tasks as time # periods being processed. - npe_gldas_data_proc=$(($gldas_spinup_hours + 12)) - export APRUN_GLDAS_DATA_PROC="$launcher -n $npe_gldas_data_proc --multi-prog" + npe_gldas_data_proc=$((${gldas_spinup_hours} + 12)) + export APRUN_GLDAS_DATA_PROC="${launcher} -n ${npe_gldas_data_proc} --multi-prog" -elif [ $step = "eobs" ]; then +elif [ ${step} = "eobs" ]; then export MKL_NUM_THREADS=4 export MKL_CBWR=AUTO export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} - export APRUNCFP="$launcher -n \$ncmd --multi-prog" + export APRUNCFP="${launcher} -n \$ncmd --multi-prog" - nth_max=$(($npe_node_max / $npe_node_eobs)) + nth_max=$((${npe_node_max} / ${npe_node_eobs})) - export NTHREADS_GSI=${nth_eobs:-$nth_max} - [[ $NTHREADS_GSI -gt $nth_max ]] && export NTHREADS_GSI=$nth_max - export APRUN_GSI="$launcher" + export NTHREADS_GSI=${nth_eobs:-${nth_max}} + [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} + export APRUN_GSI="${launcher}" -elif [ $step = "eupd" ]; then +elif [ ${step} = "eupd" ]; then export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} - export APRUNCFP="$launcher -n \$ncmd --multi-prog" + export APRUNCFP="${launcher} -n \$ncmd --multi-prog" - nth_max=$(($npe_node_max / $npe_node_eupd)) + nth_max=$((${npe_node_max} / ${npe_node_eupd})) - export NTHREADS_ENKF=${nth_eupd:-$nth_max} - [[ $NTHREADS_ENKF -gt $nth_max ]] && export NTHREADS_ENKF=$nth_max - export APRUN_ENKF="$launcher" + export NTHREADS_ENKF=${nth_eupd:-${nth_max}} + [[ ${NTHREADS_ENKF} -gt ${nth_max} ]] && export NTHREADS_ENKF=${nth_max} + export APRUN_ENKF="${launcher}" -elif [ $step = "fcst" ]; then +elif [ ${step} = "fcst" ]; then #PEs and PEs/node can differ for GFS and GDAS forecasts if threading differs - if [[ $CDUMP == "gfs" ]]; then - npe_fcst=$npe_fcst_gfs - npe_node_fcst=$npe_node_fcst_gfs - nth_fv3=$nth_fv3_gfs + if [[ ${CDUMP} == "gfs" ]]; then + npe_fcst=${npe_fcst_gfs} + npe_node_fcst=${npe_node_fcst_gfs} + nth_fv3=${nth_fv3_gfs} fi - nth_max=$(($npe_node_max / $npe_node_fcst)) + nth_max=$((${npe_node_max} / ${npe_node_fcst})) - export NTHREADS_FV3=${nth_fv3:-$nth_max} - [[ $NTHREADS_FV3 -gt $nth_max ]] && export NTHREADS_FV3=$nth_max - export cores_per_node=$npe_node_max - export APRUN_FV3="$launcher -n $npe_fcst" + export NTHREADS_FV3=${nth_fv3:-${nth_max}} + [[ ${NTHREADS_FV3} -gt ${nth_max} ]] && export NTHREADS_FV3=${nth_max} + export cores_per_node=${npe_node_max} + export APRUN_FV3="${launcher} -n ${npe_fcst}" export NTHREADS_REGRID_NEMSIO=${nth_regrid_nemsio:-1} - [[ $NTHREADS_REGRID_NEMSIO -gt $nth_max ]] && export NTHREADS_REGRID_NEMSIO=$nth_max - export APRUN_REGRID_NEMSIO="$launcher" + [[ ${NTHREADS_REGRID_NEMSIO} -gt ${nth_max} ]] && export NTHREADS_REGRID_NEMSIO=${nth_max} + export APRUN_REGRID_NEMSIO="${launcher}" export NTHREADS_REMAP=${nth_remap:-2} - [[ $NTHREADS_REMAP -gt $nth_max ]] && export NTHREADS_REMAP=$nth_max - export APRUN_REMAP="$launcher" + [[ ${NTHREADS_REMAP} -gt ${nth_max} ]] && export NTHREADS_REMAP=${nth_max} + export APRUN_REMAP="${launcher}" export I_MPI_DAPL_UD="enable" -elif [ $step = "efcs" ]; then +elif [ ${step} = "efcs" ]; then - nth_max=$(($npe_node_max / $npe_node_efcs)) + nth_max=$((${npe_node_max} / ${npe_node_efcs})) - export NTHREADS_FV3=${nth_efcs:-$nth_max} - [[ $NTHREADS_FV3 -gt $nth_max ]] && export NTHREADS_FV3=$nth_max - export cores_per_node=$npe_node_max - export APRUN_FV3="$launcher -n $npe_efcs" + export NTHREADS_FV3=${nth_efcs:-${nth_max}} + [[ ${NTHREADS_FV3} -gt ${nth_max} ]] && export NTHREADS_FV3=${nth_max} + export cores_per_node=${npe_node_max} + export APRUN_FV3="${launcher} -n ${npe_efcs}" export NTHREADS_REGRID_NEMSIO=${nth_regrid_nemsio:-1} - [[ $NTHREADS_REGRID_NEMSIO -gt $nth_max ]] && export NTHREADS_REGRID_NEMSIO=$nth_max - export APRUN_REGRID_NEMSIO="$launcher $LEVS" + [[ ${NTHREADS_REGRID_NEMSIO} -gt ${nth_max} ]] && export NTHREADS_REGRID_NEMSIO=${nth_max} + export APRUN_REGRID_NEMSIO="${launcher} ${LEVS}" -elif [ $step = "post" ]; then +elif [ ${step} = "post" ]; then - nth_max=$(($npe_node_max / $npe_node_post)) + nth_max=$((${npe_node_max} / ${npe_node_post})) export NTHREADS_NP=${nth_np:-1} - [[ $NTHREADS_NP -gt $nth_max ]] && export NTHREADS_NP=$nth_max - export APRUN_NP="$launcher" + [[ ${NTHREADS_NP} -gt ${nth_max} ]] && export NTHREADS_NP=${nth_max} + export APRUN_NP="${launcher}" export NTHREADS_DWN=${nth_dwn:-1} - [[ $NTHREADS_DWN -gt $nth_max ]] && export NTHREADS_DWN=$nth_max - export APRUN_DWN="$launcher" + [[ ${NTHREADS_DWN} -gt ${nth_max} ]] && export NTHREADS_DWN=${nth_max} + export APRUN_DWN="${launcher}" -elif [ $step = "ecen" ]; then +elif [ ${step} = "ecen" ]; then - nth_max=$(($npe_node_max / $npe_node_ecen)) + nth_max=$((${npe_node_max} / ${npe_node_ecen})) - export NTHREADS_ECEN=${nth_ecen:-$nth_max} - [[ $NTHREADS_ECEN -gt $nth_max ]] && export NTHREADS_ECEN=$nth_max - export APRUN_ECEN="$launcher" + export NTHREADS_ECEN=${nth_ecen:-${nth_max}} + [[ ${NTHREADS_ECEN} -gt ${nth_max} ]] && export NTHREADS_ECEN=${nth_max} + export APRUN_ECEN="${launcher}" export NTHREADS_CHGRES=${nth_chgres:-12} - [[ $NTHREADS_CHGRES -gt $npe_node_max ]] && export NTHREADS_CHGRES=$npe_node_max + [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} export APRUN_CHGRES="time" export NTHREADS_CALCINC=${nth_calcinc:-1} - [[ $NTHREADS_CALCINC -gt $nth_max ]] && export NTHREADS_CALCINC=$nth_max - export APRUN_CALCINC="$launcher" + [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} + export APRUN_CALCINC="${launcher}" -elif [ $step = "esfc" ]; then +elif [ ${step} = "esfc" ]; then - nth_max=$(($npe_node_max / $npe_node_esfc)) + nth_max=$((${npe_node_max} / ${npe_node_esfc})) - export NTHREADS_ESFC=${nth_esfc:-$nth_max} - [[ $NTHREADS_ESFC -gt $nth_max ]] && export NTHREADS_ESFC=$nth_max - export APRUN_ESFC="$launcher -n $npe_esfc" + export NTHREADS_ESFC=${nth_esfc:-${nth_max}} + [[ ${NTHREADS_ESFC} -gt ${nth_max} ]] && export NTHREADS_ESFC=${nth_max} + export APRUN_ESFC="${launcher} -n ${npe_esfc}" export NTHREADS_CYCLE=${nth_cycle:-14} - [[ $NTHREADS_CYCLE -gt $npe_node_max ]] && export NTHREADS_CYCLE=$npe_node_max - export APRUN_CYCLE="$launcher -n $npe_esfc" + [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} + export APRUN_CYCLE="${launcher} -n ${npe_esfc}" -elif [ $step = "epos" ]; then +elif [ ${step} = "epos" ]; then - nth_max=$(($npe_node_max / $npe_node_epos)) + nth_max=$((${npe_node_max} / ${npe_node_epos})) - export NTHREADS_EPOS=${nth_epos:-$nth_max} - [[ $NTHREADS_EPOS -gt $nth_max ]] && export NTHREADS_EPOS=$nth_max - export APRUN_EPOS="$launcher" + export NTHREADS_EPOS=${nth_epos:-${nth_max}} + [[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max} + export APRUN_EPOS="${launcher}" -elif [ $step = "init" ]; then +elif [ ${step} = "init" ]; then - export APRUN="$launcher" + export APRUN="${launcher}" -elif [ $step = "postsnd" ]; then +elif [ ${step} = "postsnd" ]; then - nth_max=$(($npe_node_max / $npe_node_postsnd)) + nth_max=$((${npe_node_max} / ${npe_node_postsnd})) export NTHREADS_POSTSND=${nth_postsnd:-1} - [[ $NTHREADS_POSTSND -gt $nth_max ]] && export NTHREADS_POSTSND=$nth_max - export APRUN_POSTSND="$launcher" + [[ ${NTHREADS_POSTSND} -gt ${nth_max} ]] && export NTHREADS_POSTSND=${nth_max} + export APRUN_POSTSND="${launcher}" export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} - [[ $NTHREADS_POSTSNDCFP -gt $nth_max ]] && export NTHREADS_POSTSNDCFP=$nth_max - export APRUN_POSTSNDCFP="$launcher" + [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} + export APRUN_POSTSNDCFP="${launcher}" -elif [ $step = "awips" ]; then +elif [ ${step} = "awips" ]; then - nth_max=$(($npe_node_max / $npe_node_awips)) + nth_max=$((${npe_node_max} / ${npe_node_awips})) export NTHREADS_AWIPS=${nth_awips:-2} - [[ $NTHREADS_AWIPS -gt $nth_max ]] && export NTHREADS_AWIPS=$nth_max - export APRUN_AWIPSCFP="$launcher -n $npe_awips --multi-prog" + [[ ${NTHREADS_AWIPS} -gt ${nth_max} ]] && export NTHREADS_AWIPS=${nth_max} + export APRUN_AWIPSCFP="${launcher} -n ${npe_awips} --multi-prog" -elif [ $step = "gempak" ]; then +elif [ ${step} = "gempak" ]; then - nth_max=$(($npe_node_max / $npe_node_gempak)) + nth_max=$((${npe_node_max} / ${npe_node_gempak})) export NTHREADS_GEMPAK=${nth_gempak:-1} - [[ $NTHREADS_GEMPAK -gt $nth_max ]] && export NTHREADS_GEMPAK=$nth_max - export APRUN="$launcher -n $npe_gempak --multi-prog" + [[ ${NTHREADS_GEMPAK} -gt ${nth_max} ]] && export NTHREADS_GEMPAK=${nth_max} + export APRUN="${launcher} -n ${npe_gempak} --multi-prog" fi diff --git a/env/WCOSS2.env b/env/WCOSS2.env index 0dd88356f6..941dd88453 100755 --- a/env/WCOSS2.env +++ b/env/WCOSS2.env @@ -21,156 +21,156 @@ export mpmd="--cpu-bind verbose,core cfp" export npe_node_max=128 -if [ $step = "prep" -o $step = "prepbufr" ]; then +if [ ${step} = "prep" -o ${step} = "prepbufr" ]; then - nth_max=$(($npe_node_max / $npe_node_prep)) + nth_max=$((${npe_node_max} / ${npe_node_prep})) export POE=${POE:-"YES"} export BACK=${BACK:-"off"} export sys_tp="wcoss2" export launcher_PREP="mpiexec" -elif [ $step = "waveinit" -o $step = "waveprep" -o $step = "wavepostsbs" -o $step = "wavepostbndpnt" -o $step = "wavepostbndpntbll" -o $step = "wavepostpnt" ]; then +elif [ ${step} = "waveinit" -o ${step} = "waveprep" -o ${step} = "wavepostsbs" -o ${step} = "wavepostbndpnt" -o ${step} = "wavepostbndpntbll" -o ${step} = "wavepostpnt" ]; then - if [ $step = "waveprep" -a $CDUMP = "gfs" ]; then NTASKS=$NTASKS_gfs ; fi - export wavempexec="$launcher -np" + if [ ${step} = "waveprep" -a ${CDUMP} = "gfs" ]; then NTASKS=${NTASKS_gfs} ; fi + export wavempexec="${launcher} -np" export wave_mpmd=${mpmd} -elif [ $step = "atmanalrun" ]; then +elif [ ${step} = "atmanalrun" ]; then export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} - export APRUNCFP="$launcher -np \$ncmd $mpmd" + export APRUNCFP="${launcher} -np \$ncmd ${mpmd}" - nth_max=$(($npe_node_max / $npe_node_atmanalrun)) + nth_max=$((${npe_node_max} / ${npe_node_atmanalrun})) - export NTHREADS_ATMANAL=${nth_atmanalrun:-$nth_max} - [[ $NTHREADS_ATMANAL -gt $nth_max ]] && export NTHREADS_ATMANAL=$nth_max - export APRUN_ATMANAL="$launcher -n $npe_atmanalrun" + export NTHREADS_ATMANAL=${nth_atmanalrun:-${nth_max}} + [[ ${NTHREADS_ATMANAL} -gt ${nth_max} ]] && export NTHREADS_ATMANAL=${nth_max} + export APRUN_ATMANAL="${launcher} -n ${npe_atmanalrun}" -elif [ $step = "atmensanalrun" ]; then +elif [ ${step} = "atmensanalrun" ]; then export CFP_MP=${CFP_MP:-"YES"} export USE_CFP=${USE_CFP:-"YES"} - export APRUNCFP="$launcher -np \$ncmd $mpmd" + export APRUNCFP="${launcher} -np \$ncmd ${mpmd}" - nth_max=$(($npe_node_max / $npe_node_atmensanalrun)) + nth_max=$((${npe_node_max} / ${npe_node_atmensanalrun})) - export NTHREADS_ATMENSANAL=${nth_atmensanalrun:-$nth_max} - [[ $NTHREADS_ATMENSANAL -gt $nth_max ]] && export NTHREADS_ATMENSANAL=$nth_max - export APRUN_ATMENSANAL="$launcher -n $npe_atmensanalrun" + export NTHREADS_ATMENSANAL=${nth_atmensanalrun:-${nth_max}} + [[ ${NTHREADS_ATMENSANAL} -gt ${nth_max} ]] && export NTHREADS_ATMENSANAL=${nth_max} + export APRUN_ATMENSANAL="${launcher} -n ${npe_atmensanalrun}" -elif [ $step = "aeroanlrun" ]; then +elif [ ${step} = "aeroanlrun" ]; then - export APRUNCFP="$launcher -np \$ncmd $mpmd" + export APRUNCFP="${launcher} -np \$ncmd ${mpmd}" - nth_max=$(($npe_node_max / $npe_node_aeroanlrun)) + nth_max=$((${npe_node_max} / ${npe_node_aeroanlrun})) - export NTHREADS_AEROANL=${nth_aeroanlrun:-$nth_max} - [[ $NTHREADS_AEROANL -gt $nth_max ]] && export NTHREADS_AEROANL=$nth_max - export APRUN_AEROANL="$launcher -n $npe_aeroanlrun" + export NTHREADS_AEROANL=${nth_aeroanlrun:-${nth_max}} + [[ ${NTHREADS_AEROANL} -gt ${nth_max} ]] && export NTHREADS_AEROANL=${nth_max} + export APRUN_AEROANL="${launcher} -n ${npe_aeroanlrun}" -elif [ $step = "anal" -o $step = "analcalc" ]; then +elif [ ${step} = "anal" -o ${step} = "analcalc" ]; then export OMP_PLACES=cores export OMP_STACKSIZE=1G export FI_OFI_RXM_SAR_LIMIT=3145728 - if [ $step = "analcalc" ]; then + if [ ${step} = "analcalc" ]; then export MPICH_MPIIO_HINTS="*:romio_cb_write=disable" fi - nth_max=$(($npe_node_max / $npe_node_anal)) + nth_max=$((${npe_node_max} / ${npe_node_anal})) - export NTHREADS_GSI=${nth_anal:-$nth_max} - [[ $NTHREADS_GSI -gt $nth_max ]] && export NTHREADS_GSI=$nth_max - export APRUN_GSI="$launcher -n ${npe_gsi:-$npe_anal} -ppn $npe_node_anal --cpu-bind depth --depth $NTHREADS_GSI" + export NTHREADS_GSI=${nth_anal:-${nth_max}} + [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} + export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe_anal}} -ppn ${npe_node_anal} --cpu-bind depth --depth ${NTHREADS_GSI}" export NTHREADS_CALCINC=${nth_calcinc:-1} - [[ $NTHREADS_CALCINC -gt $nth_max ]] && export NTHREADS_CALCINC=$nth_max - export APRUN_CALCINC="$launcher \$ncmd" + [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} + export APRUN_CALCINC="${launcher} \$ncmd" export NTHREADS_CYCLE=${nth_cycle:-14} - [[ $NTHREADS_CYCLE -gt $npe_node_max ]] && export NTHREADS_CYCLE=$npe_node_max + [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} npe_cycle=${ntiles:-6} - export APRUN_CYCLE="$launcher -n $npe_cycle -ppn $npe_node_cycle --cpu-bind depth --depth $NTHREADS_CYCLE" + export APRUN_CYCLE="${launcher} -n ${npe_cycle} -ppn ${npe_node_cycle} --cpu-bind depth --depth ${NTHREADS_CYCLE}" export NTHREADS_GAUSFCANL=1 npe_gausfcanl=${npe_gausfcanl:-1} - export APRUN_GAUSFCANL="$launcher -n $npe_gausfcanl" + export APRUN_GAUSFCANL="${launcher} -n ${npe_gausfcanl}" export NTHREADS_CHGRES=${nth_echgres:-14} - [[ $NTHREADS_CHGRES -gt $npe_node_max ]] && export NTHREADS_CHGRES=$npe_node_max + [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} export APRUN_CHGRES="" export CFP_MP=${CFP_MP:-"NO"} export USE_CFP=${USE_CFP:-"YES"} - export APRUNCFP="$launcher -np \$ncmd $mpmd" + export APRUNCFP="${launcher} -np \$ncmd ${mpmd}" -elif [ $step = "sfcanl" ]; then +elif [ ${step} = "sfcanl" ]; then - nth_max=$(($npe_node_max / $npe_node_sfcanl)) + nth_max=$((${npe_node_max} / ${npe_node_sfcanl})) export NTHREADS_CYCLE=${nth_sfcanl:-14} - [[ $NTHREADS_CYCLE -gt $npe_node_max ]] && export NTHREADS_CYCLE=$npe_node_max + [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} npe_sfcanl=${ntiles:-6} - export APRUN_CYCLE="$launcher -n $npe_sfcanl" + export APRUN_CYCLE="${launcher} -n ${npe_sfcanl}" -elif [ $step = "gldas" ]; then +elif [ ${step} = "gldas" ]; then export USE_CFP="YES" export CFP_MP="NO" - nth_max=$(($npe_node_max / $npe_node_gldas)) + nth_max=$((${npe_node_max} / ${npe_node_gldas})) - export NTHREADS_GLDAS=${nth_gldas:-$nth_max} - [[ $NTHREADS_GLDAS -gt $nth_max ]] && export NTHREADS_GLDAS=$nth_max - export APRUN_GLDAS="$launcher -n $npe_gldas -ppn $npe_node_gldas --cpu-bind depth --depth $NTHREADS_GLDAS" + export NTHREADS_GLDAS=${nth_gldas:-${nth_max}} + [[ ${NTHREADS_GLDAS} -gt ${nth_max} ]] && export NTHREADS_GLDAS=${nth_max} + export APRUN_GLDAS="${launcher} -n ${npe_gldas} -ppn ${npe_node_gldas} --cpu-bind depth --depth ${NTHREADS_GLDAS}" export NTHREADS_GAUSSIAN=${nth_gaussian:-1} - [[ $NTHREADS_GAUSSIAN -gt $nth_max ]] && export NTHREADS_GAUSSIAN=$nth_max - export APRUN_GAUSSIAN="$launcher -n $npe_gaussian -ppn $npe_node_gaussian --cpu-bind depth --depth $NTHREADS_GAUSSIAN" + [[ ${NTHREADS_GAUSSIAN} -gt ${nth_max} ]] && export NTHREADS_GAUSSIAN=${nth_max} + export APRUN_GAUSSIAN="${launcher} -n ${npe_gaussian} -ppn ${npe_node_gaussian} --cpu-bind depth --depth ${NTHREADS_GAUSSIAN}" # Must run data processing with exactly the number of tasks as time # periods being processed. export USE_CFP=${USE_CFP:-"YES"} - npe_gldas_data_proc=$(($gldas_spinup_hours + 12)) - export APRUN_GLDAS_DATA_PROC="$launcher -np $npe_gldas_data_proc $mpmd" + npe_gldas_data_proc=$((${gldas_spinup_hours} + 12)) + export APRUN_GLDAS_DATA_PROC="${launcher} -np ${npe_gldas_data_proc} ${mpmd}" -elif [ $step = "eobs" ]; then +elif [ ${step} = "eobs" ]; then export OMP_PLACES=cores export OMP_STACKSIZE=1G export FI_OFI_RXM_SAR_LIMIT=3145728 - nth_max=$(($npe_node_max / $npe_node_eobs)) + nth_max=$((${npe_node_max} / ${npe_node_eobs})) - export NTHREADS_GSI=${nth_eobs:-$nth_max} - [[ $NTHREADS_GSI -gt $nth_max ]] && export NTHREADS_GSI=$nth_max - export APRUN_GSI="$launcher -n ${npe_gsi:-$npe_eobs} -ppn $npe_node_eobs --cpu-bind depth --depth $NTHREADS_GSI" + export NTHREADS_GSI=${nth_eobs:-${nth_max}} + [[ ${NTHREADS_GSI} -gt ${nth_max} ]] && export NTHREADS_GSI=${nth_max} + export APRUN_GSI="${launcher} -n ${npe_gsi:-${npe_eobs}} -ppn ${npe_node_eobs} --cpu-bind depth --depth ${NTHREADS_GSI}" export CFP_MP=${CFP_MP:-"NO"} export USE_CFP=${USE_CFP:-"YES"} - export APRUNCFP="$launcher -np \$ncmd $mpmd" + export APRUNCFP="${launcher} -np \$ncmd ${mpmd}" -elif [ $step = "eupd" ]; then +elif [ ${step} = "eupd" ]; then export OMP_PLACES=cores export OMP_STACKSIZE=2G export MPICH_COLL_OPT_OFF=1 export FI_OFI_RXM_SAR_LIMIT=3145728 - nth_max=$(($npe_node_max / $npe_node_eupd)) + nth_max=$((${npe_node_max} / ${npe_node_eupd})) - export NTHREADS_ENKF=${nth_eupd:-$nth_max} - [[ $NTHREADS_ENKF -gt $nth_max ]] && export NTHREADS_ENKF=$nth_max - export APRUN_ENKF="$launcher -n ${npe_enkf:-$npe_eupd} -ppn $npe_node_eupd --cpu-bind depth --depth $NTHREADS_ENKF" + export NTHREADS_ENKF=${nth_eupd:-${nth_max}} + [[ ${NTHREADS_ENKF} -gt ${nth_max} ]] && export NTHREADS_ENKF=${nth_max} + export APRUN_ENKF="${launcher} -n ${npe_enkf:-${npe_eupd}} -ppn ${npe_node_eupd} --cpu-bind depth --depth ${NTHREADS_ENKF}" export CFP_MP=${CFP_MP:-"NO"} export USE_CFP=${USE_CFP:-"YES"} - export APRUNCFP="$launcher -np \$ncmd $mpmd" + export APRUNCFP="${launcher} -np \$ncmd ${mpmd}" -elif [ $step = "fcst" ]; then +elif [ ${step} = "fcst" ]; then export OMP_PLACES=cores export OMP_STACKSIZE=2048M @@ -178,138 +178,138 @@ elif [ $step = "fcst" ]; then export FI_OFI_RXM_TX_SIZE=40000 #PEs and PEs/node can differ for GFS and GDAS forecasts if threading differs - if [[ $CDUMP == "gfs" ]]; then - npe_fcst=$npe_fcst_gfs - npe_node_fcst=$npe_node_fcst_gfs - nth_fv3=$nth_fv3_gfs + if [[ ${CDUMP} == "gfs" ]]; then + npe_fcst=${npe_fcst_gfs} + npe_node_fcst=${npe_node_fcst_gfs} + nth_fv3=${nth_fv3_gfs} fi - nth_max=$(($npe_node_max / $npe_node_fcst)) + nth_max=$((${npe_node_max} / ${npe_node_fcst})) - export NTHREADS_FV3=${nth_fv3:-$nth_max} - [[ $NTHREADS_FV3 -gt $nth_max ]] && export NTHREADS_FV3=$nth_max - export cores_per_node=$npe_node_max - export APRUN_FV3="$launcher -n $npe_fcst -ppn $npe_node_fcst --cpu-bind depth --depth $NTHREADS_FV3" + export NTHREADS_FV3=${nth_fv3:-${nth_max}} + [[ ${NTHREADS_FV3} -gt ${nth_max} ]] && export NTHREADS_FV3=${nth_max} + export cores_per_node=${npe_node_max} + export APRUN_FV3="${launcher} -n ${npe_fcst} -ppn ${npe_node_fcst} --cpu-bind depth --depth ${NTHREADS_FV3}" export NTHREADS_REGRID_NEMSIO=${nth_regrid_nemsio:-1} - [[ $NTHREADS_REGRID_NEMSIO -gt $nth_max ]] && export NTHREADS_REGRID_NEMSIO=$nth_max - export APRUN_REGRID_NEMSIO="$launcher -n $LEVS" + [[ ${NTHREADS_REGRID_NEMSIO} -gt ${nth_max} ]] && export NTHREADS_REGRID_NEMSIO=${nth_max} + export APRUN_REGRID_NEMSIO="${launcher} -n ${LEVS}" export NTHREADS_REMAP=${nth_remap:-2} - [[ $NTHREADS_REMAP -gt $nth_max ]] && export NTHREADS_REMAP=$nth_max - export APRUN_REMAP="$launcher -n ${npe_remap:-$npe_fcst}" + [[ ${NTHREADS_REMAP} -gt ${nth_max} ]] && export NTHREADS_REMAP=${nth_max} + export APRUN_REMAP="${launcher} -n ${npe_remap:-${npe_fcst}}" export I_MPI_DAPL_UD="enable" -elif [ $step = "efcs" ]; then +elif [ ${step} = "efcs" ]; then export MPICH_MPIIO_HINTS="*:romio_cb_write=disable" export FI_OFI_RXM_SAR_LIMIT=3145728 export FI_OFI_RXM_RX_SIZE=40000 export FI_OFI_RXM_TX_SIZE=40000 - nth_max=$(($npe_node_max / $npe_node_efcs)) + nth_max=$((${npe_node_max} / ${npe_node_efcs})) - export NTHREADS_FV3=${nth_efcs:-$nth_max} - [[ $NTHREADS_FV3 -gt $nth_max ]] && export NTHREADS_FV3=$nth_max - export cores_per_node=$npe_node_max - export APRUN_FV3="$launcher -n ${npe_fv3:-$npe_efcs} -ppn $npe_node_efcs --cpu-bind depth --depth $NTHREADS_FV3" + export NTHREADS_FV3=${nth_efcs:-${nth_max}} + [[ ${NTHREADS_FV3} -gt ${nth_max} ]] && export NTHREADS_FV3=${nth_max} + export cores_per_node=${npe_node_max} + export APRUN_FV3="${launcher} -n ${npe_fv3:-${npe_efcs}} -ppn ${npe_node_efcs} --cpu-bind depth --depth ${NTHREADS_FV3}" export NTHREADS_REGRID_NEMSIO=${nth_regrid_nemsio:-1} - [[ $NTHREADS_REGRID_NEMSIO -gt $nth_max ]] && export NTHREADS_REGRID_NEMSIO=$nth_max - export APRUN_REGRID_NEMSIO="$launcher -n $LEVS" + [[ ${NTHREADS_REGRID_NEMSIO} -gt ${nth_max} ]] && export NTHREADS_REGRID_NEMSIO=${nth_max} + export APRUN_REGRID_NEMSIO="${launcher} -n ${LEVS}" -elif [ $step = "post" ]; then +elif [ ${step} = "post" ]; then - nth_max=$(($npe_node_max / $npe_node_post)) + nth_max=$((${npe_node_max} / ${npe_node_post})) export NTHREADS_NP=${nth_np:-1} - [[ $NTHREADS_NP -gt $nth_max ]] && export NTHREADS_NP=$nth_max - export APRUN_NP="$launcher -n ${npe_np:-$npe_post} -ppn $npe_node_post --cpu-bind depth --depth $NTHREADS_NP" + [[ ${NTHREADS_NP} -gt ${nth_max} ]] && export NTHREADS_NP=${nth_max} + export APRUN_NP="${launcher} -n ${npe_np:-${npe_post}} -ppn ${npe_node_post} --cpu-bind depth --depth ${NTHREADS_NP}" export NTHREADS_DWN=${nth_dwn:-1} - [[ $NTHREADS_DWN -gt $nth_max ]] && export NTHREADS_DWN=$nth_max - export APRUN_DWN="$launcher -np $npe_dwn $mpmd" + [[ ${NTHREADS_DWN} -gt ${nth_max} ]] && export NTHREADS_DWN=${nth_max} + export APRUN_DWN="${launcher} -np ${npe_dwn} ${mpmd}" -elif [ $step = "ecen" ]; then +elif [ ${step} = "ecen" ]; then - nth_max=$(($npe_node_max / $npe_node_ecen)) + nth_max=$((${npe_node_max} / ${npe_node_ecen})) - export NTHREADS_ECEN=${nth_ecen:-$nth_max} - [[ $NTHREADS_ECEN -gt $nth_max ]] && export NTHREADS_ECEN=$nth_max - export APRUN_ECEN="$launcher -n $npe_ecen -ppn $npe_node_ecen --cpu-bind depth --depth $NTHREADS_ECEN" + export NTHREADS_ECEN=${nth_ecen:-${nth_max}} + [[ ${NTHREADS_ECEN} -gt ${nth_max} ]] && export NTHREADS_ECEN=${nth_max} + export APRUN_ECEN="${launcher} -n ${npe_ecen} -ppn ${npe_node_ecen} --cpu-bind depth --depth ${NTHREADS_ECEN}" export NTHREADS_CHGRES=${nth_chgres:-14} - [[ $NTHREADS_CHGRES -gt $npe_node_max ]] && export NTHREADS_CHGRES=$npe_node_max + [[ ${NTHREADS_CHGRES} -gt ${npe_node_max} ]] && export NTHREADS_CHGRES=${npe_node_max} export APRUN_CHGRES="time" export NTHREADS_CALCINC=${nth_calcinc:-1} - [[ $NTHREADS_CALCINC -gt $nth_max ]] && export NTHREADS_CALCINC=$nth_max - export APRUN_CALCINC="$launcher -n $npe_ecen" + [[ ${NTHREADS_CALCINC} -gt ${nth_max} ]] && export NTHREADS_CALCINC=${nth_max} + export APRUN_CALCINC="${launcher} -n ${npe_ecen}" export NTHREADS_CYCLE=${nth_cycle:-14} - [[ $NTHREADS_CYCLE -gt $npe_node_max ]] && export NTHREADS_CYCLE=$npe_node_max - export APRUN_CYCLE="$launcher -n $npe_ecen -ppn $npe_node_cycle --cpu-bind depth --depth $NTHREADS_CYCLE" + [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} + export APRUN_CYCLE="${launcher} -n ${npe_ecen} -ppn ${npe_node_cycle} --cpu-bind depth --depth ${NTHREADS_CYCLE}" -elif [ $step = "esfc" ]; then +elif [ ${step} = "esfc" ]; then - nth_max=$(($npe_node_max / $npe_node_esfc)) + nth_max=$((${npe_node_max} / ${npe_node_esfc})) - export NTHREADS_ESFC=${nth_esfc:-$nth_max} - [[ $NTHREADS_ESFC -gt $nth_max ]] && export NTHREADS_ESFC=$nth_max - export APRUN_ESFC="$launcher -n $npe_esfc -ppn $npe_node_esfc --cpu-bind depth --depth $NTHREADS_ESFC" + export NTHREADS_ESFC=${nth_esfc:-${nth_max}} + [[ ${NTHREADS_ESFC} -gt ${nth_max} ]] && export NTHREADS_ESFC=${nth_max} + export APRUN_ESFC="${launcher} -n ${npe_esfc} -ppn ${npe_node_esfc} --cpu-bind depth --depth ${NTHREADS_ESFC}" export NTHREADS_CYCLE=${nth_cycle:-14} - [[ $NTHREADS_CYCLE -gt $npe_node_max ]] && export NTHREADS_CYCLE=$npe_node_max - export APRUN_CYCLE="$launcher -n $npe_esfc -ppn $npe_node_cycle --cpu-bind depth --depth $NTHREADS_CYCLE" + [[ ${NTHREADS_CYCLE} -gt ${npe_node_max} ]] && export NTHREADS_CYCLE=${npe_node_max} + export APRUN_CYCLE="${launcher} -n ${npe_esfc} -ppn ${npe_node_cycle} --cpu-bind depth --depth ${NTHREADS_CYCLE}" -elif [ $step = "epos" ]; then +elif [ ${step} = "epos" ]; then - nth_max=$(($npe_node_max / $npe_node_epos)) + nth_max=$((${npe_node_max} / ${npe_node_epos})) - export NTHREADS_EPOS=${nth_epos:-$nth_max} - [[ $NTHREADS_EPOS -gt $nth_max ]] && export NTHREADS_EPOS=$nth_max - export APRUN_EPOS="$launcher -n $npe_epos -ppn $npe_node_epos --cpu-bind depth --depth $NTHREADS_EPOS" + export NTHREADS_EPOS=${nth_epos:-${nth_max}} + [[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max} + export APRUN_EPOS="${launcher} -n ${npe_epos} -ppn ${npe_node_epos} --cpu-bind depth --depth ${NTHREADS_EPOS}" -elif [ $step = "init" ]; then +elif [ ${step} = "init" ]; then - export APRUN="$launcher" + export APRUN="${launcher}" -elif [ $step = "postsnd" ]; then +elif [ ${step} = "postsnd" ]; then export MPICH_MPIIO_HINTS_DISPLAY=1 export OMP_NUM_THREADS=1 - nth_max=$(($npe_node_max / $npe_node_postsnd)) + nth_max=$((${npe_node_max} / ${npe_node_postsnd})) export NTHREADS_POSTSND=${nth_postsnd:-1} - [[ $NTHREADS_POSTSND -gt $nth_max ]] && export NTHREADS_POSTSND=$nth_max - export APRUN_POSTSND="$launcher -n $npe_postsnd --depth=$NTHREADS_POSTSND --cpu-bind depth" + [[ ${NTHREADS_POSTSND} -gt ${nth_max} ]] && export NTHREADS_POSTSND=${nth_max} + export APRUN_POSTSND="${launcher} -n ${npe_postsnd} --depth=${NTHREADS_POSTSND} --cpu-bind depth" export NTHREADS_POSTSNDCFP=${nth_postsndcfp:-1} - [[ $NTHREADS_POSTSNDCFP -gt $nth_max ]] && export NTHREADS_POSTSNDCFP=$nth_max - export APRUN_POSTSNDCFP="$launcher -np $npe_postsndcfp $mpmd" + [[ ${NTHREADS_POSTSNDCFP} -gt ${nth_max} ]] && export NTHREADS_POSTSNDCFP=${nth_max} + export APRUN_POSTSNDCFP="${launcher} -np ${npe_postsndcfp} ${mpmd}" -elif [ $step = "awips" ]; then +elif [ ${step} = "awips" ]; then - nth_max=$(($npe_node_max / $npe_node_awips)) + nth_max=$((${npe_node_max} / ${npe_node_awips})) export NTHREADS_AWIPS=${nth_awips:-2} - [[ $NTHREADS_AWIPS -gt $nth_max ]] && export NTHREADS_AWIPS=$nth_max - export APRUN_AWIPSCFP="$launcher -np $npe_awips $mpmd" + [[ ${NTHREADS_AWIPS} -gt ${nth_max} ]] && export NTHREADS_AWIPS=${nth_max} + export APRUN_AWIPSCFP="${launcher} -np ${npe_awips} ${mpmd}" -elif [ $step = "gempak" ]; then +elif [ ${step} = "gempak" ]; then - nth_max=$(($npe_node_max / $npe_node_gempak)) + nth_max=$((${npe_node_max} / ${npe_node_gempak})) export NTHREADS_GEMPAK=${nth_gempak:-1} - [[ $NTHREADS_GEMPAK -gt $nth_max ]] && export NTHREADS_GEMPAK=$nth_max - export APRUN_GEMPAKCFP="$launcher -np $npe_gempak $mpmd" + [[ ${NTHREADS_GEMPAK} -gt ${nth_max} ]] && export NTHREADS_GEMPAK=${nth_max} + export APRUN_GEMPAKCFP="${launcher} -np ${npe_gempak} ${mpmd}" -elif [ $step = "waveawipsbulls" ]; then +elif [ ${step} = "waveawipsbulls" ]; then unset PERL5LIB -elif [ $step = "wafsgrib2" -o $step = "wafsgrib20p25" ]; then +elif [ ${step} = "wafsgrib2" -o ${step} = "wafsgrib20p25" ]; then export USE_CFP=${USE_CFP:-"YES"} diff --git a/jobs/JGDAS_ATMOS_ANALYSIS_DIAG b/jobs/JGDAS_ATMOS_ANALYSIS_DIAG index 9d4f57d678..ff8e33e86e 100755 --- a/jobs/JGDAS_ATMOS_ANALYSIS_DIAG +++ b/jobs/JGDAS_ATMOS_ANALYSIS_DIAG @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -29,22 +29,22 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base anal analdiag" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env anal +. ${HOMEgfs}/env/${machine}.env anal status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -60,45 +60,45 @@ export DO_CALC_ANALYSIS=${DO_CALC_ANALYSIS:-"YES"} # Begin JOB SPECIFIC work ############################################## -GDATE=$($NDATE -$assim_freq $CDATE) -gPDY=$(echo $GDATE | cut -c1-8) -gcyc=$(echo $GDATE | cut -c9-10) +GDATE=$(${NDATE} -${assim_freq} ${CDATE}) +gPDY=$(echo ${GDATE} | cut -c1-8) +gcyc=$(echo ${GDATE} | cut -c9-10) GDUMP=${GDUMP:-"gdas"} export OPREFIX="${CDUMP}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export APREFIX="${CDUMP}.t${cyc}z." -export GSUFFIX=${GSUFFIX:-$SUFFIX} -export ASUFFIX=${ASUFFIX:-$SUFFIX} +export GSUFFIX=${GSUFFIX:-${SUFFIX}} +export ASUFFIX=${ASUFFIX:-${SUFFIX}} -if [ $RUN_ENVIR = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then - export COMIN=${COMIN:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT} - export COMOUT=${COMOUT:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT} - export COMIN_OBS=${COMIN_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/$RUN.$PDY/$cyc/$COMPONENT} - export COMIN_GES_OBS=${COMIN_GES_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/$GDUMP.$gPDY/$gcyc/$COMPONENT} +if [ ${RUN_ENVIR} = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then + export COMIN=${COMIN:-${ROTDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT}} + export COMOUT=${COMOUT:-${ROTDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT}} + export COMIN_OBS=${COMIN_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}} + export COMIN_GES_OBS=${COMIN_GES_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}} else - export COMOUT="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT" - export COMIN_OBS="$DMPDIR/$CDUMP.$PDY/$cyc/$COMPONENT" - export COMIN_GES_OBS="$DMPDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT" + export COMOUT="${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" + export COMIN_OBS="${DMPDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" + export COMIN_GES_OBS="${DMPDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" fi -mkdir -m 775 -p $COMOUT +mkdir -m 775 -p ${COMOUT} # COMIN_GES and COMIN_GES_ENS are used in script -export COMIN_GES="$ROTDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT" -export COMIN_GES_ENS="$ROTDIR/enkfgdas.$gPDY/$gcyc/$COMPONENT" +export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" +export COMIN_GES_ENS="${ROTDIR}/enkfgdas.${gPDY}/${gcyc}/${COMPONENT}" -export ATMGES="$COMIN_GES/${GPREFIX}atmf006${GSUFFIX}" -if [ ! -f $ATMGES ]; then - echo "FATAL ERROR: FILE MISSING: ATMGES = $ATMGES" +export ATMGES="${COMIN_GES}/${GPREFIX}atmf006${GSUFFIX}" +if [ ! -f ${ATMGES} ]; then + echo "FATAL ERROR: FILE MISSING: ATMGES = ${ATMGES}" exit 1 fi -if [ $DOHYBVAR = "YES" ]; then - export ATMGES_ENSMEAN="$COMIN_GES_ENS/${GPREFIX}atmf006.ensmean$GSUFFIX" - if [ ! -f $ATMGES_ENSMEAN ]; then - echo "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = $ATMGES_ENSMEAN" +if [ ${DOHYBVAR} = "YES" ]; then + export ATMGES_ENSMEAN="${COMIN_GES_ENS}/${GPREFIX}atmf006.ensmean${GSUFFIX}" + if [ ! -f ${ATMGES_ENSMEAN} ]; then + echo "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = ${ATMGES_ENSMEAN}" exit 2 fi fi @@ -106,9 +106,9 @@ fi ############################################################### # Run relevant script -${ANALDIAGSH:-$SCRgfs/exglobal_diag.sh} +${ANALDIAGSH:-${SCRgfs}/exglobal_diag.sh} status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -118,15 +118,15 @@ status=$? ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGDAS_ATMOS_CHGRES_FORENKF b/jobs/JGDAS_ATMOS_CHGRES_FORENKF index 48c088e675..7265ba3ffd 100755 --- a/jobs/JGDAS_ATMOS_CHGRES_FORENKF +++ b/jobs/JGDAS_ATMOS_CHGRES_FORENKF @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -29,22 +29,22 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base anal echgres" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env anal +. ${HOMEgfs}/env/${machine}.env anal status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -60,40 +60,40 @@ export DO_CALC_ANALYSIS=${DO_CALC_ANALYSIS:-"YES"} # Begin JOB SPECIFIC work ############################################## -GDATE=$($NDATE -$assim_freq $CDATE) -gPDY=$(echo $GDATE | cut -c1-8) -gcyc=$(echo $GDATE | cut -c9-10) +GDATE=$(${NDATE} -${assim_freq} ${CDATE}) +gPDY=$(echo ${GDATE} | cut -c1-8) +gcyc=$(echo ${GDATE} | cut -c9-10) GDUMP=${GDUMP:-"gdas"} export OPREFIX="${CDUMP}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export APREFIX="${CDUMP}.t${cyc}z." -export GSUFFIX=${GSUFFIX:-$SUFFIX} -export ASUFFIX=${ASUFFIX:-$SUFFIX} +export GSUFFIX=${GSUFFIX:-${SUFFIX}} +export ASUFFIX=${ASUFFIX:-${SUFFIX}} -if [ $RUN_ENVIR = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then - export COMIN=${COMIN:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT} - export COMOUT=${COMOUT:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT} - export COMOUT_ENS=${COMOUT_ENS:-$ROTDIR/enkfgdas.$PDY/$cyc/$COMPONENT} - export COMIN_OBS=${COMIN_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/$RUN.$PDY/$cyc/$COMPONENT} - export COMIN_GES_OBS=${COMIN_GES_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/$GDUMP.$gPDY/$gcyc/$COMPONENT} +if [ ${RUN_ENVIR} = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then + export COMIN=${COMIN:-${ROTDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT}} + export COMOUT=${COMOUT:-${ROTDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT}} + export COMOUT_ENS=${COMOUT_ENS:-${ROTDIR}/enkfgdas.${PDY}/${cyc}/${COMPONENT}} + export COMIN_OBS=${COMIN_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}} + export COMIN_GES_OBS=${COMIN_GES_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}} else - export COMOUT="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT" - export COMOUT_ENS="$ROTDIR/enkfgdas.$PDY/$cyc/$COMPONENT" - export COMIN_OBS="$DMPDIR/$CDUMP.$PDY/$cyc/$COMPONENT" - export COMIN_GES_OBS="$DMPDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT" + export COMOUT="${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" + export COMOUT_ENS="${ROTDIR}/enkfgdas.${PDY}/${cyc}/${COMPONENT}" + export COMIN_OBS="${DMPDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" + export COMIN_GES_OBS="${DMPDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" fi -mkdir -m 775 -p $COMOUT +mkdir -m 775 -p ${COMOUT} # COMIN_GES and COMIN_GES_ENS are used in script -export COMIN_GES="$ROTDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT" -export COMIN_GES_ENS="$ROTDIR/enkfgdas.$gPDY/$gcyc/$COMPONENT" +export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" +export COMIN_GES_ENS="${ROTDIR}/enkfgdas.${gPDY}/${gcyc}/${COMPONENT}" ############################################################### # Run relevant script -${CHGRESFCSTSH:-$SCRgfs/exgdas_atmos_chgres_forenkf.sh} +${CHGRESFCSTSH:-${SCRgfs}/exgdas_atmos_chgres_forenkf.sh} status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -103,15 +103,15 @@ status=$? ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGDAS_ATMOS_GEMPAK b/jobs/JGDAS_ATMOS_GEMPAK index 69380a69a3..2fe7cd1b2d 100755 --- a/jobs/JGDAS_ATMOS_GEMPAK +++ b/jobs/JGDAS_ATMOS_GEMPAK @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ########################################################## # make temp directory ########################################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ########################################### # Run setpdy and initialize PDY variables @@ -23,32 +23,32 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base gempak" -for config in $configs; do - . $EXPDIR/config.${config} +for config in ${configs}; do + . ${EXPDIR}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ############################################################### -. $BASE_ENV/${machine}.env gempak +. ${BASE_ENV}/${machine}.env gempak status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ################################ # Set up the HOME directory ################################ export HOMEgfs=${HOMEgfs:-${PACKAGEROOT}/gfs.${gfs_ver}} # TODO: remove these as they are already defined in config.base -export EXECgfs=${EXECgfs:-$HOMEgfs/exec} -export PARMgfs=${PARMgfs:-$HOMEgfs/parm} -export PARMwmo=${PARMwmo:-$HOMEgfs/parm/wmo} -export PARMproduct=${PARMproduct:-$HOMEgfs/parm/product} -export FIXgempak=${FIXgempak:-$HOMEgfs/gempak/fix} -export USHgempak=${USHgempak:-$HOMEgfs/gempak/ush} -export SRCgfs=${SRCgfs:-$HOMEgfs/scripts} -export UTILgfs=${UTILgfs:-$HOMEgfs/util} +export EXECgfs=${EXECgfs:-${HOMEgfs}/exec} +export PARMgfs=${PARMgfs:-${HOMEgfs}/parm} +export PARMwmo=${PARMwmo:-${HOMEgfs}/parm/wmo} +export PARMproduct=${PARMproduct:-${HOMEgfs}/parm/product} +export FIXgempak=${FIXgempak:-${HOMEgfs}/gempak/fix} +export USHgempak=${USHgempak:-${HOMEgfs}/gempak/ush} +export SRCgfs=${SRCgfs:-${HOMEgfs}/scripts} +export UTILgfs=${UTILgfs:-${HOMEgfs}/util} ############################################ # Set up model and cycle specific variables @@ -76,58 +76,58 @@ export COMPONENT="atmos" ############################################## # Define COM directories ############################################## -export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/$COMPONENT} -export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/$COMPONENT/gempak} +export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/${COMPONENT}/gempak} -if [ $SENDCOM = YES ] ; then - mkdir -m 775 -p $COMOUT +if [ ${SENDCOM} = YES ] ; then + mkdir -m 775 -p ${COMOUT} fi # TODO: These actions belong in an ex-script not a j-job -if [ -f $DATA/poescrip ]; then - rm $DATA/poescript +if [ -f ${DATA}/poescrip ]; then + rm ${DATA}/poescript fi ######################################################## # Execute the script. -echo "$SRCgfs/exgdas_atmos_nawips.sh gdas 009 GDAS_GEMPAK " >> poescript +echo "${SRCgfs}/exgdas_atmos_nawips.sh gdas 009 GDAS_GEMPAK " >> poescript ######################################################## ######################################################## # Execute the script for quater-degree grib -echo "$SRCgfs/exgdas_atmos_nawips.sh gdas_0p25 009 GDAS_GEMPAK " >>poescript +echo "${SRCgfs}/exgdas_atmos_nawips.sh gdas_0p25 009 GDAS_GEMPAK " >>poescript ######################################################## cat poescript -chmod 775 $DATA/poescript +chmod 775 ${DATA}/poescript export MP_PGMMODEL=mpmd -export MP_CMDFILE=$DATA/poescript +export MP_CMDFILE=${DATA}/poescript -ntasks=${NTASKS_GEMPAK:-$(cat $DATA/poescript | wc -l)} +ntasks=${NTASKS_GEMPAK:-$(cat ${DATA}/poescript | wc -l)} ptile=${PTILE_GEMPAK:-4} threads=${NTHREADS_GEMPAK:-1} -export OMP_NUM_THREADS=$threads -APRUN="mpiexec -l -np $ntasks --cpu-bind verbose,core cfp" +export OMP_NUM_THREADS=${threads} +APRUN="mpiexec -l -np ${ntasks} --cpu-bind verbose,core cfp" -APRUN_GEMPAKCFP=${APRUN_GEMPAKCFP:-$APRUN} -APRUNCFP=$(eval echo $APRUN_GEMPAKCFP) +APRUN_GEMPAKCFP=${APRUN_GEMPAKCFP:-${APRUN}} +APRUNCFP=$(eval echo ${APRUN_GEMPAKCFP}) -$APRUNCFP $DATA/poescript +${APRUNCFP} ${DATA}/poescript export err=$?; err_chk ############################################ # print exec I/O output ############################################ -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ################################### # Remove temp directories ################################### -if [ "$KEEPDATA" != "YES" ] ; then - rm -rf $DATA +if [ "${KEEPDATA}" != "YES" ] ; then + rm -rf ${DATA} fi diff --git a/jobs/JGDAS_ATMOS_GEMPAK_META_NCDC b/jobs/JGDAS_ATMOS_GEMPAK_META_NCDC index f418ff714f..22e52ea9fb 100755 --- a/jobs/JGDAS_ATMOS_GEMPAK_META_NCDC +++ b/jobs/JGDAS_ATMOS_GEMPAK_META_NCDC @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################ # GDAS GEMPAK META NCDC PRODUCT GENERATION @@ -10,8 +10,8 @@ source "$HOMEgfs/ush/preamble.sh" # make temp directory ########################################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ########################################### # Run setpdy and initialize PDY variables @@ -28,20 +28,20 @@ export pgmerr=errfile # Set up the HOME directory ################################ export HOMEgfs=${HOMEgfs:-${PACKAGEROOT}/gfs.${gfs_ver}} -export EXECgfs=${EXECgfs:-$HOMEgfs/exec} -export PARMgfs=${PARMgfs:-$HOMEgfs/parm} -export PARMwmo=${PARMwmo:-$HOMEgfs/parm/wmo} -export PARMproduct=${PARMproduct:-$HOMEgfs/parm/product} -export FIXgempak=${FIXgempak:-$HOMEgfs/gempak/fix} -export USHgempak=${USHgempak:-$HOMEgfs/gempak/ush} -export SRCgfs=${SRCgfs:-$HOMEgfs/scripts} -export UTILgfs=${UTILgfs:-$HOMEgfs/util} +export EXECgfs=${EXECgfs:-${HOMEgfs}/exec} +export PARMgfs=${PARMgfs:-${HOMEgfs}/parm} +export PARMwmo=${PARMwmo:-${HOMEgfs}/parm/wmo} +export PARMproduct=${PARMproduct:-${HOMEgfs}/parm/product} +export FIXgempak=${FIXgempak:-${HOMEgfs}/gempak/fix} +export USHgempak=${USHgempak:-${HOMEgfs}/gempak/ush} +export SRCgfs=${SRCgfs:-${HOMEgfs}/scripts} +export UTILgfs=${UTILgfs:-${HOMEgfs}/util} # # Now set up GEMPAK/NTRANS environment # -cp $FIXgempak/datatype.tbl datatype.tbl +cp ${FIXgempak}/datatype.tbl datatype.tbl ################################### # Specify NET and RUN Name and model @@ -67,10 +67,10 @@ export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn} ############################################## # Define COM directories ############################################## -export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/$COMPONENT/gempak} +export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}/gempak} export COMINgdas=${COMINgdas:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}} -export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/$COMPONENT/gempak/meta} -export COMOUTncdc=${COMOUTncdc:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/$COMPONENT} +export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/${COMPONENT}/gempak/meta} +export COMOUTncdc=${COMOUTncdc:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/${COMPONENT}} export COMINukmet=${COMINukmet:-$(compath.py ${envir}/ukmet/${ukmet_ver})/ukmet} export COMINecmwf=${COMINecmwf:-$(compath.py ${envir}/ecmwf/${ecmwf_ver})/ecmwf} @@ -78,8 +78,8 @@ export COMINecmwf=${COMINecmwf:-$(compath.py ${envir}/ecmwf/${ecmwf_ver})/ecmwf} export COMOUTukmet=${COMOUT} export COMOUTecmwf=${COMOUT} -if [ $SENDCOM = YES ] ; then - mkdir -m 775 -p $COMOUT $COMOUTncdc $COMOUTukmet $COMOUTecmwf +if [ ${SENDCOM} = YES ] ; then + mkdir -m 775 -p ${COMOUT} ${COMOUTncdc} ${COMOUTukmet} ${COMOUTecmwf} fi export pgmout=OUTPUT.$$ @@ -87,10 +87,10 @@ export pgmout=OUTPUT.$$ ######################################################## # Execute the script. -$USHgempak/gdas_meta_na.sh -$USHgempak/gdas_ecmwf_meta_ver.sh -$USHgempak/gdas_meta_loop.sh -$USHgempak/gdas_ukmet_meta_ver.sh +${USHgempak}/gdas_meta_na.sh +${USHgempak}/gdas_ecmwf_meta_ver.sh +${USHgempak}/gdas_meta_loop.sh +${USHgempak}/gdas_ukmet_meta_ver.sh export err=$?; err_chk ######################################################## @@ -100,21 +100,21 @@ export err=$?; err_chk ######################################################## # Execute the script. -$SRCgfs/exgdas_atmos_gempak_gif_ncdc.sh +${SRCgfs}/exgdas_atmos_gempak_gif_ncdc.sh export err=$?; err_chk ######################################################## ############################################ # print exec I/O output ############################################ -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ################################### # Remove temp directories ################################### -if [ "$KEEPDATA" != "YES" ] ; then - rm -rf $DATA +if [ "${KEEPDATA}" != "YES" ] ; then + rm -rf ${DATA} fi diff --git a/jobs/JGDAS_ATMOS_VERFOZN b/jobs/JGDAS_ATMOS_VERFOZN index 27052d5507..6f68dcd74c 100755 --- a/jobs/JGDAS_ATMOS_VERFOZN +++ b/jobs/JGDAS_ATMOS_VERFOZN @@ -3,7 +3,7 @@ ############################################################# # Set up environment for GDAS Ozone Monitor job ############################################################# -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ########################################################### # make temp directories @@ -43,14 +43,14 @@ export OZNMON_SUFFIX=${OZNMON_SUFFIX:-${NET}} # export HOMEgfs_ozn=${HOMEgfs:-${NWROOT}/gfs.${gfs_ver}} export HOMEgdas_ozn=${HOMEgfs_ozn:-${NWROOT}/gfs.${gfs_ver}} -export PARMgdas_ozn=${PARMgfs_ozn:-$HOMEgfs_ozn/parm/mon} -export SCRgdas_ozn=${SCRgfs_ozn:-$HOMEgfs_ozn/scripts} -export FIXgdas_ozn=${FIXgfs_ozn:-$HOMEgfs_ozn/fix/gdas} +export PARMgdas_ozn=${PARMgfs_ozn:-${HOMEgfs_ozn}/parm/mon} +export SCRgdas_ozn=${SCRgfs_ozn:-${HOMEgfs_ozn}/scripts} +export FIXgdas_ozn=${FIXgfs_ozn:-${HOMEgfs_ozn}/fix/gdas} export HOMEoznmon=${HOMEoznmon:-${HOMEgfs_ozn}} -export EXECoznmon=${EXECoznmon:-$HOMEoznmon/exec} +export EXECoznmon=${EXECoznmon:-${HOMEoznmon}/exec} export FIXoznmon=${FIXoznmon:-${HOMEoznmon}/fix} -export USHoznmon=${USHoznmon:-$HOMEoznmon/ush} +export USHoznmon=${USHoznmon:-${HOMEoznmon}/ush} #----------------------------------- @@ -93,7 +93,7 @@ fi # Set necessary environment variables # export OZN_AREA=${OZN_AREA:-glb} -export oznstat=${oznstat:-$COMIN/gdas.t${cyc}z.oznstat} +export oznstat=${oznstat:-${COMIN}/gdas.t${cyc}z.oznstat} #------------------------------------------------------- @@ -101,16 +101,16 @@ export oznstat=${oznstat:-$COMIN/gdas.t${cyc}z.oznstat} # ${OZNMONSH:-${SCRgdas_ozn}/exgdas_atmos_verfozn.sh} ${PDY} ${cyc} err=$? -[[ $err -ne 0 ]] && exit $err +[[ ${err} -ne 0 ]] && exit ${err} ################################ # Remove the Working Directory ################################ KEEPDATA=${KEEPDATA:-NO} -cd $DATAROOT +cd ${DATAROOT} if [ ${KEEPDATA} = NO ] ; then - rm -rf $DATA + rm -rf ${DATA} fi exit 0 diff --git a/jobs/JGDAS_ATMOS_VERFRAD b/jobs/JGDAS_ATMOS_VERFRAD index f4cb30f13d..207c80415b 100755 --- a/jobs/JGDAS_ATMOS_VERFRAD +++ b/jobs/JGDAS_ATMOS_VERFRAD @@ -3,7 +3,7 @@ ############################################################# # Set up environment for GDAS Radiance Monitor job ############################################################# -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ########################################################### # make temp directories @@ -41,22 +41,22 @@ 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 +mkdir -p ${RAD_DATA_IN} +cd ${RAD_DATA_IN} ############################################## # Specify Execution Areas ############################################## export HOMEgfs=${HOMEgfs:-${NWROOT}/gfs.${gfs_ver}} -export SCRgfs=${SCRgfs:-$HOMEgfs/scripts} +export SCRgfs=${SCRgfs:-${HOMEgfs}/scripts} -export FIXgdas=${FIXgdas:-$HOMEgfs/fix/gdas} -export PARMmon=${PARMmon:-$HOMEgfs/parm/mon} +export FIXgdas=${FIXgdas:-${HOMEgfs}/fix/gdas} +export PARMmon=${PARMmon:-${HOMEgfs}/parm/mon} export HOMEradmon=${HOMEradmon:-${HOMEgfs}} -export EXECradmon=${EXECradmon:-$HOMEradmon/exec} +export EXECradmon=${EXECradmon:-${HOMEradmon}/exec} export FIXradmon=${FIXradmon:-${FIXgfs}} -export USHradmon=${USHradmon:-$HOMEradmon/ush} +export USHradmon=${USHradmon:-${HOMEradmon}/ush} ################################### @@ -81,10 +81,10 @@ export p_cyc=$(echo ${cdate} | cut -c9-10) # TANKverf - WHERE OUTPUT DATA WILL RESIDE ############################################# export TANKverf=${TANKverf:-$(compath.py ${envir}/${NET}/${gfs_ver})} -export TANKverf_rad=${TANKverf_rad:-${TANKverf}/${RUN}.${PDY}/${cyc}/$COMPONENT/radmon} -export TANKverf_radM1=${TANKverf_radM1:-${TANKverf}/${RUN}.${P_PDY}/${p_cyc}/$COMPONENT/radmon} +export TANKverf_rad=${TANKverf_rad:-${TANKverf}/${RUN}.${PDY}/${cyc}/${COMPONENT}/radmon} +export TANKverf_radM1=${TANKverf_radM1:-${TANKverf}/${RUN}.${P_PDY}/${p_cyc}/${COMPONENT}/radmon} export COM_IN=${COM_IN:-$(compath.py ${envir}/${NET}/${gfs_ver})} -export COMIN=${COMIN:-${COM_IN}/${RUN}.${PDY}/${cyc}/$COMPONENT} +export COMIN=${COMIN:-${COM_IN}/${RUN}.${PDY}/${cyc}/${COMPONENT}} ################################ # backwards compatibility for @@ -96,15 +96,15 @@ if [[ ! -d ${COMIN} ]]; then fi -mkdir -p -m 775 $TANKverf_rad +mkdir -p -m 775 ${TANKverf_rad} ######################################## # Set necessary environment variables ######################################## export RAD_AREA=${RAD_AREA:-glb} -export biascr=${biascr:-$COMIN/gdas.t${cyc}z.abias} -export radstat=${radstat:-$COMIN/gdas.t${cyc}z.radstat} +export biascr=${biascr:-${COMIN}/gdas.t${cyc}z.abias} +export radstat=${radstat:-${COMIN}/gdas.t${cyc}z.radstat} echo " " echo "JOB HAS STARTED" @@ -116,8 +116,8 @@ echo " " ${RADMONSH:-${SCRgfs}/exgdas_atmos_verfrad.sh} ${PDY} ${cyc} err=$? -if [[ $err -ne 0 ]] ; then - exit $err +if [[ ${err} -ne 0 ]] ; then + exit ${err} else echo " " echo "JOB HAS COMPLETED NORMALLY" @@ -128,8 +128,8 @@ fi # Remove the Working Directory ################################ KEEPDATA=${KEEPDATA:-YES} -cd $DATAROOT +cd ${DATAROOT} if [ ${KEEPDATA} = NO ] ; then - rm -rf $RAD_DATA_IN + rm -rf ${RAD_DATA_IN} fi diff --git a/jobs/JGDAS_ATMOS_VMINMON b/jobs/JGDAS_ATMOS_VMINMON index a32e668382..0077755aa2 100755 --- a/jobs/JGDAS_ATMOS_VMINMON +++ b/jobs/JGDAS_ATMOS_VMINMON @@ -3,7 +3,7 @@ ########################################################### # GDAS Minimization Monitor (MinMon) job ########################################################### -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ########################################################### # make temp directories @@ -47,13 +47,13 @@ export m_job=${m_job:-${MINMON_SUFFIX}_mmDE} # Specify Package Areas ############################################## export HOMEgfs=${HOMEgfs:-${NWROOT}/gfs.${gfs_ver}} -export SCRgfs=${SCRgfs:-$HOMEgfs/scripts} +export SCRgfs=${SCRgfs:-${HOMEgfs}/scripts} -export M_FIXgdas=${M_FIXgdas:-$HOMEgfs/fix/gdas} +export M_FIXgdas=${M_FIXgdas:-${HOMEgfs}/fix/gdas} export HOMEminmon=${HOMEminmon:-${HOMEgfs}} -export EXECminmon=${EXECminmon:-$HOMEminmon/exec} -export USHminmon=${USHminmon:-$HOMEminmon/ush} +export EXECminmon=${EXECminmon:-${HOMEminmon}/exec} +export USHminmon=${USHminmon:-${HOMEminmon}/ush} ############################################# @@ -75,9 +75,9 @@ export COM_IN=${COM_IN:-$(compath.py ${envir}/${NET}/${gfs_ver})} export M_TANKverf=${M_TANKverf:-${COM_IN}/${RUN}.${PDY}/${cyc}/${COMPONENT}/minmon} export M_TANKverfM1=${M_TANKverfM1:-${COM_IN}/${RUN}.${P_PDY}/${p_cyc}/${COMPONENT}/minmon} -export COMIN=${COMIN:-$COM_IN/${RUN}.${PDY}/${cyc}/$COMPONENT} +export COMIN=${COMIN:-${COM_IN}/${RUN}.${PDY}/${cyc}/${COMPONENT}} -mkdir -p -m 775 $M_TANKverf +mkdir -p -m 775 ${M_TANKverf} @@ -90,9 +90,9 @@ export gsistat=${gsistat:-${COMIN}/gdas.t${cyc}z.gsistat} ######################################################## # Execute the script. -${GMONSH:-$SCRgfs/exgdas_atmos_vminmon.sh} ${PDY} ${cyc} +${GMONSH:-${SCRgfs}/exgdas_atmos_vminmon.sh} ${PDY} ${cyc} err=$? -[[ $err -ne 0 ]] && exit $err +[[ ${err} -ne 0 ]] && exit ${err} ################################ diff --git a/jobs/JGDAS_ENKF_DIAG b/jobs/JGDAS_ENKF_DIAG index b62e7193d3..c72e3333fe 100755 --- a/jobs/JGDAS_ENKF_DIAG +++ b/jobs/JGDAS_ENKF_DIAG @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -29,22 +29,22 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base anal eobs analdiag ediag" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env eobs +. ${HOMEgfs}/env/${machine}.env eobs status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -61,13 +61,13 @@ export MAKE_ACFTBUFR=${MAKE_ACFTBUFR:-"NO"} # Begin JOB SPECIFIC work ############################################## -GDATE=$($NDATE -$assim_freq $CDATE) -gPDY=$(echo $GDATE | cut -c1-8) -gcyc=$(echo $GDATE | cut -c9-10) +GDATE=$(${NDATE} -${assim_freq} ${CDATE}) +gPDY=$(echo ${GDATE} | cut -c1-8) +gcyc=$(echo ${GDATE} | cut -c9-10) GDUMP=${GDUMP:-"gdas"} -export CASE=$CASE_ENKF -export CDUMP_OBS=${CDUMP_OBS:-$CDUMP} +export CASE=${CASE_ENKF} +export CDUMP_OBS=${CDUMP_OBS:-${CDUMP}} export OPREFIX="${CDUMP_OBS}.t${cyc}z." export APREFIX="${CDUMP}.t${cyc}z." @@ -75,44 +75,44 @@ export GPREFIX="${GDUMP}.t${gcyc}z." export GSUFFIX="${GSUFFIX:-".ensmean${SUFFIX}"}" export ASUFFIX="${ASUFFIX:-"${SUFFIX}"}" -if [ $RUN_ENVIR = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then - export COMIN_OBS=${COMIN_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/$RUN.$PDY/$cyc/$COMPONENT} - export COMIN_GES_OBS=${COMIN_GES_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/$GDUMP.$gPDY/$gcyc/$COMPONENT} +if [ ${RUN_ENVIR} = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then + export COMIN_OBS=${COMIN_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}} + export COMIN_GES_OBS=${COMIN_GES_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}} else - export COMIN_OBS="$DMPDIR/$CDUMP.$PDY/$cyc/$COMPONENT" - export COMIN_GES_OBS="$DMPDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT" + export COMIN_OBS="${DMPDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" + export COMIN_GES_OBS="${DMPDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" fi # COMIN_GES, COMIN_ANL COMIN_GES_ENS, and COMOUT are used in script -COMIN_GES_CTL="$ROTDIR/gdas.$gPDY/$gcyc/$COMPONENT" -export COMIN_ANL="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT" -export COMIN_GES_ENS="$ROTDIR/enkfgdas.$gPDY/$gcyc/$COMPONENT" -export COMIN_GES=$COMIN_GES_ENS -export COMOUT="$ROTDIR/enkf$CDUMP.$PDY/$cyc/$COMPONENT" +COMIN_GES_CTL="${ROTDIR}/gdas.${gPDY}/${gcyc}/${COMPONENT}" +export COMIN_ANL="${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" +export COMIN_GES_ENS="${ROTDIR}/enkfgdas.${gPDY}/${gcyc}/${COMPONENT}" +export COMIN_GES=${COMIN_GES_ENS} +export COMOUT="${ROTDIR}/enkf${CDUMP}.${PDY}/${cyc}/${COMPONENT}" -export ATMGES_ENSMEAN="$COMIN_GES_ENS/${GPREFIX}atmf006$GSUFFIX" -if [ ! -f $ATMGES_ENSMEAN ]; then - echo "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = $ATMGES_ENSMEAN" +export ATMGES_ENSMEAN="${COMIN_GES_ENS}/${GPREFIX}atmf006${GSUFFIX}" +if [ ! -f ${ATMGES_ENSMEAN} ]; then + echo "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = ${ATMGES_ENSMEAN}" exit 1 fi # Link observational data -export PREPQC="$COMIN_OBS/${OPREFIX}prepbufr" -if [ ! -f $PREPQC ]; then - echo "WARNING: Global PREPBUFR FILE $PREPQC MISSING" +export PREPQC="${COMIN_OBS}/${OPREFIX}prepbufr" +if [ ! -f ${PREPQC} ]; then + echo "WARNING: Global PREPBUFR FILE ${PREPQC} MISSING" fi -export TCVITL="$COMIN_ANL/${OPREFIX}syndata.tcvitals.tm00" -if [[ $DONST = "YES" ]]; then - if [[ $MAKE_NSSTBUFR == "YES" ]]; then +export TCVITL="${COMIN_ANL}/${OPREFIX}syndata.tcvitals.tm00" +if [[ ${DONST} = "YES" ]]; then + if [[ ${MAKE_NSSTBUFR} == "YES" ]]; then export NSSTBF="${COMOUT}/${OPREFIX}nsstbufr" else export NSSTBF="${COMIN_OBS}/${OPREFIX}nsstbufr" fi fi -if [[ $MAKE_ACFTBUFR == "YES" ]]; then +if [[ ${MAKE_ACFTBUFR} == "YES" ]]; then export PREPQCPF="${COMOUT}/${OPREFIX}prepbufr.acft_profiles" else export PREPQCPF="${COMIN_OBS}/${OPREFIX}prepbufr.acft_profiles" @@ -125,40 +125,40 @@ export GBIASAIR=${COMIN_GES_CTL}/${GPREFIX}abias_air export GRADSTAT=${COMIN_GES_CTL}/${GPREFIX}radstat # Bias correction coefficients related to ensemble mean -export ABIAS="$COMOUT/${APREFIX}abias.ensmean" -export ABIASPC="$COMOUT/${APREFIX}abias_pc.ensmean" -export ABIASAIR="$COMOUT/${APREFIX}abias_air.ensmean" -export ABIASe="$COMOUT/${APREFIX}abias_int.ensmean" +export ABIAS="${COMOUT}/${APREFIX}abias.ensmean" +export ABIASPC="${COMOUT}/${APREFIX}abias_pc.ensmean" +export ABIASAIR="${COMOUT}/${APREFIX}abias_air.ensmean" +export ABIASe="${COMOUT}/${APREFIX}abias_int.ensmean" # Diagnostics related to ensemble mean -export GSISTAT="$COMOUT/${APREFIX}gsistat.ensmean" -export CNVSTAT="$COMOUT/${APREFIX}cnvstat.ensmean" -export OZNSTAT="$COMOUT/${APREFIX}oznstat.ensmean" -export RADSTAT="$COMOUT/${APREFIX}radstat.ensmean" +export GSISTAT="${COMOUT}/${APREFIX}gsistat.ensmean" +export CNVSTAT="${COMOUT}/${APREFIX}cnvstat.ensmean" +export OZNSTAT="${COMOUT}/${APREFIX}oznstat.ensmean" +export RADSTAT="${COMOUT}/${APREFIX}radstat.ensmean" # Select observations based on ensemble mean export RUN_SELECT="YES" export USE_SELECT="NO" -export SELECT_OBS="$COMOUT/${APREFIX}obsinput.ensmean" +export SELECT_OBS="${COMOUT}/${APREFIX}obsinput.ensmean" export DIAG_SUFFIX="_ensmean" export DIAG_COMPRESS="NO" # GSI namelist options specific to eobs -export SETUP_INVOBS="passive_bc=.false.,$SETUP_INVOBS" +export SETUP_INVOBS="passive_bc=.false.,${SETUP_INVOBS}" # Ensure clean stat tarballs for ensemble mean -for fstat in $CNVSTAT $OZNSTAT $RADSTAT; do - [[ -f $fstat ]] && rm -f $fstat +for fstat in ${CNVSTAT} ${OZNSTAT} ${RADSTAT}; do + [[ -f ${fstat} ]] && rm -f ${fstat} done ############################################################### # Run relevant script -${ANALDIAGSH:-$SCRgfs/exglobal_diag.sh} +${ANALDIAGSH:-${SCRgfs}/exglobal_diag.sh} status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -168,15 +168,15 @@ status=$? ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGDAS_ENKF_ECEN b/jobs/JGDAS_ENKF_ECEN index 7b35db5706..0f9a68f22f 100755 --- a/jobs/JGDAS_ENKF_ECEN +++ b/jobs/JGDAS_ENKF_ECEN @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # Obtain unique process id (pid) and make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -29,22 +29,22 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base ecen" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env ecen +. ${HOMEgfs}/env/${machine}.env ecen status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -59,49 +59,49 @@ export COMPONENT="atmos" # Begin JOB SPECIFIC work ############################################## -GDATE=$($NDATE -$assim_freq $CDATE) -gPDY=$(echo $GDATE | cut -c1-8) -gcyc=$(echo $GDATE | cut -c9-10) +GDATE=$(${NDATE} -${assim_freq} ${CDATE}) +gPDY=$(echo ${GDATE} | cut -c1-8) +gcyc=$(echo ${GDATE} | cut -c9-10) GDUMP=${GDUMP:-"gdas"} -export CASE=$CASE_ENKF +export CASE=${CASE_ENKF} EUPD_CYC=$(echo ${EUPD_CYC:-"gdas"} | tr a-z A-Z) -if [ $EUPD_CYC = "GFS" ]; then +if [ ${EUPD_CYC} = "GFS" ]; then CDUMP_ENKF="gfs" else - CDUMP_ENKF=$CDUMP + CDUMP_ENKF=${CDUMP} fi export OPREFIX="${CDUMP}.t${cyc}z." export APREFIX="${CDUMP}.t${cyc}z." export APREFIX_ENKF="${CDUMP_ENKF}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." -export GSUFFIX=${GSUFFIX:-$SUFFIX} -export ASUFFIX=${ASUFFIX:-$SUFFIX} +export GSUFFIX=${GSUFFIX:-${SUFFIX}} +export ASUFFIX=${ASUFFIX:-${SUFFIX}} -if [ $RUN_ENVIR = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then - export COMIN_OBS=${COMIN_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/$RUN.$PDY/$cyc/$COMPONENT} - export COMIN_GES_OBS=${COMIN_GES_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/$GDUMP.$gPDY/$gcyc/$COMPONENT} +if [ ${RUN_ENVIR} = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then + export COMIN_OBS=${COMIN_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}} + export COMIN_GES_OBS=${COMIN_GES_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}} else - export COMIN_OBS="$DMPDIR/$CDUMP.$PDY/$cyc/$COMPONENT" - export COMIN_GES_OBS="$DMPDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT" + export COMIN_OBS="${DMPDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" + export COMIN_GES_OBS="${DMPDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" fi # COMIN, COMIN_ENS and COMIN_GES_ENS are used in script -export COMIN="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT" -export COMIN_ENS="$ROTDIR/enkf$CDUMP_ENKF.$PDY/$cyc/$COMPONENT" -export COMOUT_ENS="$ROTDIR/enkf$CDUMP.$PDY/$cyc/$COMPONENT" -export COMIN_GES_ENS="$ROTDIR/enkf$GDUMP.$gPDY/$gcyc/$COMPONENT" +export COMIN="${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" +export COMIN_ENS="${ROTDIR}/enkf${CDUMP_ENKF}.${PDY}/${cyc}/${COMPONENT}" +export COMOUT_ENS="${ROTDIR}/enkf${CDUMP}.${PDY}/${cyc}/${COMPONENT}" +export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" ############################################################### # Run relevant script -${ENKFRECENSH:-$SCRgfs/exgdas_enkf_ecen.sh} +${ENKFRECENSH:-${SCRgfs}/exgdas_enkf_ecen.sh} status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -111,15 +111,15 @@ status=$? ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGDAS_ENKF_FCST b/jobs/JGDAS_ENKF_FCST index 83fcb597f9..84e324a740 100755 --- a/jobs/JGDAS_ENKF_FCST +++ b/jobs/JGDAS_ENKF_FCST @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -29,22 +29,22 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base fcst efcs" -for config in $configs; do - . $config_path/config.$config +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env efcs +. ${HOMEgfs}/env/${machine}.env efcs status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -59,16 +59,16 @@ export rCDUMP="gdas" # Begin JOB SPECIFIC work ############################################## -export CASE=$CASE_ENKF +export CASE=${CASE_ENKF} # COMOUT is used in script -export COMOUT="$ROTDIR/enkf$CDUMP.$PDY/$cyc/$COMPONENT" +export COMOUT="${ROTDIR}/enkf${CDUMP}.${PDY}/${cyc}/${COMPONENT}" # Forecast length for EnKF forecast -export FHMIN=$FHMIN_ENKF -export FHOUT=$FHOUT_ENKF -export FHMAX=$FHMAX_ENKF +export FHMIN=${FHMIN_ENKF} +export FHOUT=${FHOUT_ENKF} +export FHMAX=${FHMAX_ENKF} # Get ENSBEG/ENSEND from ENSGRP and NMEM_EFCSGRP @@ -79,21 +79,21 @@ export ENSBEG=$((ENSEND - NMEM_EFCSGRP + 1)) ############################################################### # Run relevant script -${ENKFFCSTSH:-$SCRgfs/exgdas_enkf_fcst.sh} +${ENKFFCSTSH:-${SCRgfs}/exgdas_enkf_fcst.sh} status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} # Double check the status of members in ENSGRP -EFCSGRP=$COMOUT/efcs.grp${ENSGRP} +EFCSGRP=${COMOUT}/efcs.grp${ENSGRP} npass=0 -if [ -f $EFCSGRP ]; then - npass=$(grep "PASS" $EFCSGRP | wc -l) +if [ -f ${EFCSGRP} ]; then + npass=$(grep "PASS" ${EFCSGRP} | wc -l) fi -echo "$npass/$NMEM_EFCSGRP members successfull in efcs.grp$ENSGRP" -if [ $npass -ne $NMEM_EFCSGRP ]; then - echo "FATAL ERROR: Failed members in group $ENSGRP, ABORT!" - cat $EFCSGRP +echo "${npass}/${NMEM_EFCSGRP} members successfull in efcs.grp${ENSGRP}" +if [ ${npass} -ne ${NMEM_EFCSGRP} ]; then + echo "FATAL ERROR: Failed members in group ${ENSGRP}, ABORT!" + cat ${EFCSGRP} exit 99 fi @@ -101,8 +101,8 @@ fi ############################################## # Send Alerts ############################################## -if [ $SENDDBN = YES ] ; then - $DBNROOT/bin/dbn_alert MODEL ENKF1_MSC_fcsstat $job $EFCSGRP +if [ ${SENDDBN} = YES ] ; then + ${DBNROOT}/bin/dbn_alert MODEL ENKF1_MSC_fcsstat ${job} ${EFCSGRP} fi @@ -113,15 +113,15 @@ fi ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGDAS_ENKF_POST b/jobs/JGDAS_ENKF_POST index da36fe7d3d..95d41bbe72 100755 --- a/jobs/JGDAS_ENKF_POST +++ b/jobs/JGDAS_ENKF_POST @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -29,22 +29,22 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base epos" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env epos +. ${HOMEgfs}/env/${machine}.env epos status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -63,8 +63,8 @@ export GFS_NCIO=${GFS_NCIO:-"YES"} export PREFIX="${CDUMP}.t${cyc}z." # COMIN, COMOUT are used in script -export COMIN="$ROTDIR/enkf$CDUMP.$PDY/$cyc/$COMPONENT" -export COMOUT="$ROTDIR/enkf$CDUMP.$PDY/$cyc/$COMPONENT" +export COMIN="${ROTDIR}/enkf${CDUMP}.${PDY}/${cyc}/${COMPONENT}" +export COMOUT="${ROTDIR}/enkf${CDUMP}.${PDY}/${cyc}/${COMPONENT}" export LEVS=$((LEVS-1)) @@ -73,9 +73,9 @@ export LEVS=$((LEVS-1)) ############################################################### # Run relevant script -${ENKFPOSTSH:-$SCRgfs/exgdas_enkf_post.sh} +${ENKFPOSTSH:-${SCRgfs}/exgdas_enkf_post.sh} status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -85,15 +85,15 @@ status=$? ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGDAS_ENKF_SELECT_OBS b/jobs/JGDAS_ENKF_SELECT_OBS index 9a5da91789..02259700b1 100755 --- a/jobs/JGDAS_ENKF_SELECT_OBS +++ b/jobs/JGDAS_ENKF_SELECT_OBS @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -29,22 +29,22 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base anal eobs" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env eobs +. ${HOMEgfs}/env/${machine}.env eobs status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -61,13 +61,13 @@ export MAKE_ACFTBUFR=${MAKE_ACFTBUFR:-"NO"} # Begin JOB SPECIFIC work ############################################## -GDATE=$($NDATE -$assim_freq $CDATE) -gPDY=$(echo $GDATE | cut -c1-8) -gcyc=$(echo $GDATE | cut -c9-10) +GDATE=$(${NDATE} -${assim_freq} ${CDATE}) +gPDY=$(echo ${GDATE} | cut -c1-8) +gcyc=$(echo ${GDATE} | cut -c9-10) GDUMP=${GDUMP:-"gdas"} -export CASE=$CASE_ENKF -export CDUMP_OBS=${CDUMP_OBS:-$CDUMP} +export CASE=${CASE_ENKF} +export CDUMP_OBS=${CDUMP_OBS:-${CDUMP}} export OPREFIX="${CDUMP_OBS}.t${cyc}z." export APREFIX="${CDUMP}.t${cyc}z." @@ -75,47 +75,47 @@ export GPREFIX="${GDUMP}.t${gcyc}z." export GSUFFIX="${GSUFFIX:-".ensmean${SUFFIX}"}" export ASUFFIX="${ASUFFIX:-"${SUFFIX}"}" -if [ $RUN_ENVIR = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then - export COMIN_OBS=${COMIN_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/$RUN.$PDY/$cyc/$COMPONENT} - export COMIN_GES_OBS=${COMIN_GES_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/$GDUMP.$gPDY/$gcyc/$COMPONENT} +if [ ${RUN_ENVIR} = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then + export COMIN_OBS=${COMIN_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}} + export COMIN_GES_OBS=${COMIN_GES_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}} else - export COMIN_OBS="$DMPDIR/$CDUMP.$PDY/$cyc/$COMPONENT" - export COMIN_GES_OBS="$DMPDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT" + export COMIN_OBS="${DMPDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" + export COMIN_GES_OBS="${DMPDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" fi # COMIN_GES, COMIN_ANL COMIN_GES_ENS, and COMOUT are used in script -COMIN_GES_CTL="$ROTDIR/gdas.$gPDY/$gcyc/$COMPONENT" -export COMIN_ANL="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT" -export COMIN_GES_ENS="$ROTDIR/enkfgdas.$gPDY/$gcyc/$COMPONENT" -export COMIN_GES=$COMIN_GES_ENS -export COMOUT="$ROTDIR/enkf$CDUMP.$PDY/$cyc/$COMPONENT" +COMIN_GES_CTL="${ROTDIR}/gdas.${gPDY}/${gcyc}/${COMPONENT}" +export COMIN_ANL="${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" +export COMIN_GES_ENS="${ROTDIR}/enkfgdas.${gPDY}/${gcyc}/${COMPONENT}" +export COMIN_GES=${COMIN_GES_ENS} +export COMOUT="${ROTDIR}/enkf${CDUMP}.${PDY}/${cyc}/${COMPONENT}" -export ATMGES_ENSMEAN="$COMIN_GES_ENS/${GPREFIX}atmf006$GSUFFIX" -if [ ! -f $ATMGES_ENSMEAN ]; then - echo "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = $ATMGES_ENSMEAN" +export ATMGES_ENSMEAN="${COMIN_GES_ENS}/${GPREFIX}atmf006${GSUFFIX}" +if [ ! -f ${ATMGES_ENSMEAN} ]; then + echo "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = ${ATMGES_ENSMEAN}" exit 1 fi -export LEVS=$($NCDUMP -h $ATMGES_ENSMEAN | grep -i "pfull" | head -1 | awk -F" = " '{print $2}' | awk -F" " '{print $1}') # get LEVS +export LEVS=$(${NCDUMP} -h ${ATMGES_ENSMEAN} | grep -i "pfull" | head -1 | awk -F" = " '{print $2}' | awk -F" " '{print $1}') # get LEVS status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} # Link observational data -export PREPQC="$COMIN_OBS/${OPREFIX}prepbufr" -if [ ! -f $PREPQC ]; then - echo "WARNING: Global PREPBUFR FILE $PREPQC MISSING" +export PREPQC="${COMIN_OBS}/${OPREFIX}prepbufr" +if [ ! -f ${PREPQC} ]; then + echo "WARNING: Global PREPBUFR FILE ${PREPQC} MISSING" fi -export TCVITL="$COMIN_ANL/${OPREFIX}syndata.tcvitals.tm00" -if [[ $DONST = "YES" ]]; then - if [[ $MAKE_NSSTBUFR == "YES" ]]; then +export TCVITL="${COMIN_ANL}/${OPREFIX}syndata.tcvitals.tm00" +if [[ ${DONST} = "YES" ]]; then + if [[ ${MAKE_NSSTBUFR} == "YES" ]]; then export NSSTBF="${COMOUT}/${OPREFIX}nsstbufr" else export NSSTBF="${COMIN_OBS}/${OPREFIX}nsstbufr" fi fi -if [[ $MAKE_ACFTBUFR == "YES" ]]; then +if [[ ${MAKE_ACFTBUFR} == "YES" ]]; then export PREPQCPF="${COMOUT}/${OPREFIX}prepbufr.acft_profiles" else export PREPQCPF="${COMIN_OBS}/${OPREFIX}prepbufr.acft_profiles" @@ -128,46 +128,46 @@ export GBIASAIR=${COMIN_GES_CTL}/${GPREFIX}abias_air export GRADSTAT=${COMIN_GES_CTL}/${GPREFIX}radstat # Bias correction coefficients related to ensemble mean -export ABIAS="$COMOUT/${APREFIX}abias.ensmean" -export ABIASPC="$COMOUT/${APREFIX}abias_pc.ensmean" -export ABIASAIR="$COMOUT/${APREFIX}abias_air.ensmean" -export ABIASe="$COMOUT/${APREFIX}abias_int.ensmean" +export ABIAS="${COMOUT}/${APREFIX}abias.ensmean" +export ABIASPC="${COMOUT}/${APREFIX}abias_pc.ensmean" +export ABIASAIR="${COMOUT}/${APREFIX}abias_air.ensmean" +export ABIASe="${COMOUT}/${APREFIX}abias_int.ensmean" # Diagnostics related to ensemble mean -export GSISTAT="$COMOUT/${APREFIX}gsistat.ensmean" -export CNVSTAT="$COMOUT/${APREFIX}cnvstat.ensmean" -export OZNSTAT="$COMOUT/${APREFIX}oznstat.ensmean" -export RADSTAT="$COMOUT/${APREFIX}radstat.ensmean" +export GSISTAT="${COMOUT}/${APREFIX}gsistat.ensmean" +export CNVSTAT="${COMOUT}/${APREFIX}cnvstat.ensmean" +export OZNSTAT="${COMOUT}/${APREFIX}oznstat.ensmean" +export RADSTAT="${COMOUT}/${APREFIX}radstat.ensmean" # Select observations based on ensemble mean export RUN_SELECT="YES" export USE_SELECT="NO" -export SELECT_OBS="$COMOUT/${APREFIX}obsinput.ensmean" +export SELECT_OBS="${COMOUT}/${APREFIX}obsinput.ensmean" export DIAG_SUFFIX="_ensmean" # GSI namelist options specific to eobs -export SETUP_INVOBS="passive_bc=.false.,$SETUP_INVOBS" +export SETUP_INVOBS="passive_bc=.false.,${SETUP_INVOBS}" # Ensure clean stat tarballs for ensemble mean -for fstat in $CNVSTAT $OZNSTAT $RADSTAT; do - [[ -f $fstat ]] && rm -f $fstat +for fstat in ${CNVSTAT} ${OZNSTAT} ${RADSTAT}; do + [[ -f ${fstat} ]] && rm -f ${fstat} done ############################################################### # Run relevant script -${INVOBSSH:-$SCRgfs/exgdas_enkf_select_obs.sh} +${INVOBSSH:-${SCRgfs}/exgdas_enkf_select_obs.sh} status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## # Send Alerts ############################################## -if [ $SENDDBN = YES ] ; then - $DBNROOT/bin/dbn_alert MODEL ENKF1_MSC_gsistat $job $GSISTAT +if [ ${SENDDBN} = YES ] ; then + ${DBNROOT}/bin/dbn_alert MODEL ENKF1_MSC_gsistat ${job} ${GSISTAT} fi @@ -178,15 +178,15 @@ fi ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGDAS_ENKF_SFC b/jobs/JGDAS_ENKF_SFC index da36d879cb..4495ad732a 100755 --- a/jobs/JGDAS_ENKF_SFC +++ b/jobs/JGDAS_ENKF_SFC @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -29,22 +29,22 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base esfc" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env esfc +. ${HOMEgfs}/env/${machine}.env esfc status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -59,50 +59,50 @@ export COMPONENT="atmos" # Begin JOB SPECIFIC work ############################################## -GDATE=$($NDATE -$assim_freq $CDATE) -gPDY=$(echo $GDATE | cut -c1-8) -gcyc=$(echo $GDATE | cut -c9-10) +GDATE=$(${NDATE} -${assim_freq} ${CDATE}) +gPDY=$(echo ${GDATE} | cut -c1-8) +gcyc=$(echo ${GDATE} | cut -c9-10) GDUMP=${GDUMP:-"gdas"} -export CASE=$CASE_ENKF +export CASE=${CASE_ENKF} EUPD_CYC=$(echo ${EUPD_CYC:-"gdas"} | tr a-z A-Z) -if [ $EUPD_CYC = "GFS" ]; then +if [ ${EUPD_CYC} = "GFS" ]; then CDUMP_ENKF="gfs" else - CDUMP_ENKF=$CDUMP + CDUMP_ENKF=${CDUMP} fi export OPREFIX="${CDUMP}.t${cyc}z." export APREFIX="${CDUMP}.t${cyc}z." export APREFIX_ENKF="${CDUMP_ENKF}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." -export GSUFFIX=${GSUFFIX:-$SUFFIX} -export ASUFFIX=${ASUFFIX:-$SUFFIX} +export GSUFFIX=${GSUFFIX:-${SUFFIX}} +export ASUFFIX=${ASUFFIX:-${SUFFIX}} -if [ $RUN_ENVIR = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then - export COMIN_OBS=${COMIN_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/$RUN.$PDY/$cyc/$COMPONENT} - export COMIN_GES_OBS=${COMIN_GES_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/$GDUMP.$gPDY/$gcyc/$COMPONENT} +if [ ${RUN_ENVIR} = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then + export COMIN_OBS=${COMIN_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}} + export COMIN_GES_OBS=${COMIN_GES_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}} else - export COMIN_OBS="$DMPDIR/$CDUMP.$PDY/$cyc/$COMPONENT" - export COMIN_GES_OBS="$DMPDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT" + export COMIN_OBS="${DMPDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" + export COMIN_GES_OBS="${DMPDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" fi # COMIN, COMIN_ENS and COMIN_GES_ENS are used in script -export COMIN="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT" -export COMIN_GES="$ROTDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT" -export COMIN_ENS="$ROTDIR/enkf$CDUMP_ENKF.$PDY/$cyc/$COMPONENT" -export COMOUT_ENS="$ROTDIR/enkf$CDUMP.$PDY/$cyc/$COMPONENT" -export COMIN_GES_ENS="$ROTDIR/enkf$GDUMP.$gPDY/$gcyc/$COMPONENT" +export COMIN="${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" +export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" +export COMIN_ENS="${ROTDIR}/enkf${CDUMP_ENKF}.${PDY}/${cyc}/${COMPONENT}" +export COMOUT_ENS="${ROTDIR}/enkf${CDUMP}.${PDY}/${cyc}/${COMPONENT}" +export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" ############################################################### # Run relevant script -${ENKFRESFCSH:-$SCRgfs/exgdas_enkf_sfc.sh} +${ENKFRESFCSH:-${SCRgfs}/exgdas_enkf_sfc.sh} status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -112,15 +112,15 @@ status=$? ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGDAS_ENKF_UPDATE b/jobs/JGDAS_ENKF_UPDATE index ea1666167d..5062d8a976 100755 --- a/jobs/JGDAS_ENKF_UPDATE +++ b/jobs/JGDAS_ENKF_UPDATE @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -29,22 +29,22 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base anal eupd" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env eupd +. ${HOMEgfs}/env/${machine}.env eupd status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -59,34 +59,34 @@ export COMPONENT="atmos" # Begin JOB SPECIFIC work ############################################## -GDATE=$($NDATE -$assim_freq $CDATE) -gPDY=$(echo $GDATE | cut -c1-8) -gcyc=$(echo $GDATE | cut -c9-10) +GDATE=$(${NDATE} -${assim_freq} ${CDATE}) +gPDY=$(echo ${GDATE} | cut -c1-8) +gcyc=$(echo ${GDATE} | cut -c9-10) export APREFIX="${CDUMP}.t${cyc}z." export GPREFIX="gdas.t${gcyc}z." -export ASUFFIX=${ASUFFIX:-$SUFFIX} -export GSUFFIX=${GSUFFIX:-$SUFFIX} +export ASUFFIX=${ASUFFIX:-${SUFFIX}} +export GSUFFIX=${GSUFFIX:-${SUFFIX}} # COMIN_GES_ENS and COMOUT_ANL_ENS are used in script -export COMIN_GES_ENS="$ROTDIR/enkfgdas.$gPDY/$gcyc/$COMPONENT" -export COMOUT_ANL_ENS="$ROTDIR/enkf$CDUMP.$PDY/$cyc/$COMPONENT" +export COMIN_GES_ENS="${ROTDIR}/enkfgdas.${gPDY}/${gcyc}/${COMPONENT}" +export COMOUT_ANL_ENS="${ROTDIR}/enkf${CDUMP}.${PDY}/${cyc}/${COMPONENT}" ############################################################### # Run relevant script -${ENKFUPDSH:-$SCRgfs/exgdas_enkf_update.sh} +${ENKFUPDSH:-${SCRgfs}/exgdas_enkf_update.sh} status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## # Send Alerts ############################################## -if [ $SENDDBN = YES ] ; then - $DBNROOT/bin/dbn_alert MODEL ENKF1_MSC_enkfstat $job $COMOUT_ANL_ENS/${APREFIX}enkfstat +if [ ${SENDDBN} = YES ] ; then + ${DBNROOT}/bin/dbn_alert MODEL ENKF1_MSC_enkfstat ${job} ${COMOUT_ANL_ENS}/${APREFIX}enkfstat fi @@ -97,15 +97,15 @@ fi ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST index 053bf4e777..c770f3bc81 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST +++ b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST @@ -1,13 +1,13 @@ #!/bin/bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA || (echo "$DATA does not exist. ABORT!"; exit 1) +mkdir -p ${DATA} +cd ${DATA} || (echo "${DATA} does not exist. ABORT!"; exit 1) ############################################## @@ -29,22 +29,22 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base atmanal atmanalpost" -for config in $configs; do - . $config_path/config.$config +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env atmanalpost +. ${HOMEgfs}/env/${machine}.env atmanalpost status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -66,27 +66,27 @@ export GDUMP=${GDUMP:-"gdas"} export OPREFIX="${CDUMP}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export APREFIX="${CDUMP}.t${cyc}z." -export GSUFFIX=${GSUFFIX:-$SUFFIX} -export ASUFFIX=${ASUFFIX:-$SUFFIX} +export GSUFFIX=${GSUFFIX:-${SUFFIX}} +export ASUFFIX=${ASUFFIX:-${SUFFIX}} -export COMOUT=${COMOUT:-$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT} +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} -mkdir -p $COMOUT +mkdir -p ${COMOUT} # COMIN_GES and COMIN_GES_ENS are used in script -export COMIN_GES="$ROTDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT" -export COMIN_GES_ENS="$ROTDIR/enkf$GDUMP.$gPDY/$gcyc/$COMPONENT" +export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" +export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" # Add UFSDA to PYTHONPATH -export PYTHONPATH=$HOMEgfs/sorc/gdas.cd/ush/:$PYTHONPATH +export PYTHONPATH=${HOMEgfs}/sorc/gdas.cd/ush/:${PYTHONPATH} ############################################################### # Run relevant script -EXSCRIPT=${GDASPOSTPY:-$HOMEgfs/scripts/exgdas_global_atmos_analysis_post.py} -$EXSCRIPT +EXSCRIPT=${GDASPOSTPY:-${HOMEgfs}/scripts/exgdas_global_atmos_analysis_post.py} +${EXSCRIPT} status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## # End JOB SPECIFIC work @@ -95,14 +95,14 @@ status=$? ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP index 16e28f0aa5..b431f2d143 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP +++ b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP @@ -1,13 +1,13 @@ #!/bin/bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA || (echo "$DATA does not exist. ABORT!"; exit 1) +mkdir -p ${DATA} +cd ${DATA} || (echo "${DATA} does not exist. ABORT!"; exit 1) ############################################## @@ -29,22 +29,22 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base atmanal atmanalprep" -for config in $configs; do - . $config_path/config.$config +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env atmanalprep +. ${HOMEgfs}/env/${machine}.env atmanalprep status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -66,26 +66,26 @@ export GDUMP=${GDUMP:-"gdas"} export OPREFIX="${CDUMP}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export APREFIX="${CDUMP}.t${cyc}z." -export GSUFFIX=${GSUFFIX:-$SUFFIX} -export ASUFFIX=${ASUFFIX:-$SUFFIX} +export GSUFFIX=${GSUFFIX:-${SUFFIX}} +export ASUFFIX=${ASUFFIX:-${SUFFIX}} -export COMOUT=${COMOUT:-$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT} +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} -mkdir -p $COMOUT +mkdir -p ${COMOUT} # COMIN_GES and COMIN_GES_ENS are used in script -export COMIN_GES="$ROTDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT" -export COMIN_GES_ENS="$ROTDIR/enkf$GDUMP.$gPDY/$gcyc/$COMPONENT" +export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" +export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" # Add UFSDA to PYTHONPATH -export PYTHONPATH=$HOMEgfs/sorc/gdas.cd/ush/:$PYTHONPATH +export PYTHONPATH=${HOMEgfs}/sorc/gdas.cd/ush/:${PYTHONPATH} ############################################################### # Run relevant script -EXSCRIPT=${GDASPREPPY:-$HOMEgfs/scripts/exgdas_global_atmos_analysis_prep.py} -$EXSCRIPT +EXSCRIPT=${GDASPREPPY:-${HOMEgfs}/scripts/exgdas_global_atmos_analysis_prep.py} +${EXSCRIPT} status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## # End JOB SPECIFIC work @@ -94,14 +94,14 @@ status=$? ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN index b14ff52300..d4d75feb88 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN +++ b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN @@ -1,13 +1,13 @@ #!/bin/bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA || (echo "$DATA does not exist. ABORT!"; exit 1) +mkdir -p ${DATA} +cd ${DATA} || (echo "${DATA} does not exist. ABORT!"; exit 1) ############################################## @@ -29,22 +29,22 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base atmanal atmanalrun" -for config in $configs; do - . $config_path/config.$config +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env atmanalrun +. ${HOMEgfs}/env/${machine}.env atmanalrun status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -66,27 +66,27 @@ export GDUMP=${GDUMP:-"gdas"} export OPREFIX="${CDUMP}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export APREFIX="${CDUMP}.t${cyc}z." -export GSUFFIX=${GSUFFIX:-$SUFFIX} -export ASUFFIX=${ASUFFIX:-$SUFFIX} +export GSUFFIX=${GSUFFIX:-${SUFFIX}} +export ASUFFIX=${ASUFFIX:-${SUFFIX}} -export COMOUT=${COMOUT:-$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT} +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} -mkdir -p $COMOUT +mkdir -p ${COMOUT} # COMIN_GES and COMIN_GES_ENS are used in script -export COMIN_GES="$ROTDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT" -export COMIN_GES_ENS="$ROTDIR/enkf$GDUMP.$gPDY/$gcyc/$COMPONENT" +export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" +export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" # Add UFSDA to PYTHONPATH -export PYTHONPATH=$HOMEgfs/sorc/gdas.cd/ush/:$PYTHONPATH +export PYTHONPATH=${HOMEgfs}/sorc/gdas.cd/ush/:${PYTHONPATH} ############################################################### # Run relevant script -EXSCRIPT=${GDASRUNSH:-$HOMEgfs/scripts/exgdas_global_atmos_analysis_run.sh} -$EXSCRIPT +EXSCRIPT=${GDASRUNSH:-${HOMEgfs}/scripts/exgdas_global_atmos_analysis_run.sh} +${EXSCRIPT} status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## # End JOB SPECIFIC work @@ -95,14 +95,14 @@ status=$? ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST index 0029c8d9e1..ebf3da539c 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST +++ b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST @@ -1,13 +1,13 @@ #!/bin/bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA || (echo "$DATA does not exist. ABORT!"; exit 1) +mkdir -p ${DATA} +cd ${DATA} || (echo "${DATA} does not exist. ABORT!"; exit 1) ############################################## @@ -29,22 +29,22 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base atmensanal atmensanalpost" -for config in $configs; do - . $config_path/config.$config +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env atmensanalpost +. ${HOMEgfs}/env/${machine}.env atmensanalpost status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -66,30 +66,30 @@ export GDUMP=${GDUMP:-"gdas"} export OPREFIX="${CDUMP}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export APREFIX="${CDUMP}.t${cyc}z." -export GSUFFIX=${GSUFFIX:-$SUFFIX} -export ASUFFIX=${ASUFFIX:-$SUFFIX} +export GSUFFIX=${GSUFFIX:-${SUFFIX}} +export ASUFFIX=${ASUFFIX:-${SUFFIX}} -export COMOUT=${COMOUT:-$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT} -export COMOUT_ENS=${COMOUT_ENS:-$ROTDIR/enkf$CDUMP.$PDY/$cyc/$COMPONENT} +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT_ENS=${COMOUT_ENS:-${ROTDIR}/enkf${CDUMP}.${PDY}/${cyc}/${COMPONENT}} -mkdir -p $COMOUT -mkdir -p $COMOUT_ENS +mkdir -p ${COMOUT} +mkdir -p ${COMOUT_ENS} # COMIN_GES and COMIN_GES_ENS are used in script -export COMIN="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT" -export COMIN_GES="$ROTDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT" -export COMIN_GES_ENS="$ROTDIR/enkf$GDUMP.$gPDY/$gcyc/$COMPONENT" +export COMIN="${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" +export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" +export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" # Add UFSDA to PYTHONPATH -export PYTHONPATH=$HOMEgfs/sorc/gdas.cd/ush/:$PYTHONPATH +export PYTHONPATH=${HOMEgfs}/sorc/gdas.cd/ush/:${PYTHONPATH} ############################################################### # Run relevant script -EXSCRIPT=${GDASPOSTPY:-$HOMEgfs/scripts/exgdas_global_atmos_ensanal_post.py} -$EXSCRIPT +EXSCRIPT=${GDASPOSTPY:-${HOMEgfs}/scripts/exgdas_global_atmos_ensanal_post.py} +${EXSCRIPT} status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## # End JOB SPECIFIC work @@ -98,14 +98,14 @@ status=$? ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP index 39adb8cdbd..4e213ffe00 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP +++ b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP @@ -1,13 +1,13 @@ #!/bin/bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA || (echo "$DATA does not exist. ABORT!"; exit 1) +mkdir -p ${DATA} +cd ${DATA} || (echo "${DATA} does not exist. ABORT!"; exit 1) ############################################## @@ -29,22 +29,22 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base atmensanal atmensanalprep" -for config in $configs; do - . $config_path/config.$config +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env atmensanalprep +. ${HOMEgfs}/env/${machine}.env atmensanalprep status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -66,30 +66,30 @@ export GDUMP=${GDUMP:-"gdas"} export OPREFIX="${CDUMP}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export APREFIX="${CDUMP}.t${cyc}z." -export GSUFFIX=${GSUFFIX:-$SUFFIX} -export ASUFFIX=${ASUFFIX:-$SUFFIX} +export GSUFFIX=${GSUFFIX:-${SUFFIX}} +export ASUFFIX=${ASUFFIX:-${SUFFIX}} -export COMOUT=${COMOUT:-$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT} -export COMOUT_ENS=${COMOUT_ENS:-$ROTDIR/enkf$CDUMP.$PDY/$cyc/$COMPONENT} +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT_ENS=${COMOUT_ENS:-${ROTDIR}/enkf${CDUMP}.${PDY}/${cyc}/${COMPONENT}} -mkdir -p $COMOUT -mkdir -p $COMOUT_ENS +mkdir -p ${COMOUT} +mkdir -p ${COMOUT_ENS} # COMIN_GES and COMIN_GES_ENS are used in script -export COMIN="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT" -export COMIN_GES="$ROTDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT" -export COMIN_GES_ENS="$ROTDIR/enkf$GDUMP.$gPDY/$gcyc/$COMPONENT" +export COMIN="${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" +export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" +export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" # Add UFSDA to PYTHONPATH -export PYTHONPATH=$HOMEgfs/sorc/gdas.cd/ush/:$PYTHONPATH +export PYTHONPATH=${HOMEgfs}/sorc/gdas.cd/ush/:${PYTHONPATH} ############################################################### # Run relevant script -EXSCRIPT=${GDASPREPPY:-$HOMEgfs/scripts/exgdas_global_atmos_analysis_prep.py} -$EXSCRIPT +EXSCRIPT=${GDASPREPPY:-${HOMEgfs}/scripts/exgdas_global_atmos_analysis_prep.py} +${EXSCRIPT} status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## # End JOB SPECIFIC work @@ -98,14 +98,14 @@ status=$? ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN index ba501e5715..351a77fad4 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN +++ b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN @@ -1,13 +1,13 @@ #!/bin/bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA || (echo "$DATA does not exist. ABORT!"; exit 1) +mkdir -p ${DATA} +cd ${DATA} || (echo "${DATA} does not exist. ABORT!"; exit 1) ############################################## @@ -29,22 +29,22 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base atmensanal atmensanalrun" -for config in $configs; do - . $config_path/config.$config +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env atmensanalrun +. ${HOMEgfs}/env/${machine}.env atmensanalrun status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -66,30 +66,30 @@ export GDUMP=${GDUMP:-"gdas"} export OPREFIX="${CDUMP}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export APREFIX="${CDUMP}.t${cyc}z." -export GSUFFIX=${GSUFFIX:-$SUFFIX} -export ASUFFIX=${ASUFFIX:-$SUFFIX} +export GSUFFIX=${GSUFFIX:-${SUFFIX}} +export ASUFFIX=${ASUFFIX:-${SUFFIX}} -export COMOUT=${COMOUT:-$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT} -export COMOUT_ENS=${COMOUT_ENS:-$ROTDIR/enkf$CDUMP.$PDY/$cyc/$COMPONENT} +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT_ENS=${COMOUT_ENS:-${ROTDIR}/enkf${CDUMP}.${PDY}/${cyc}/${COMPONENT}} -mkdir -p $COMOUT -mkdir -p $COMOUT_ENS +mkdir -p ${COMOUT} +mkdir -p ${COMOUT_ENS} # COMIN_GES and COMIN_GES_ENS are used in script -export COMIN="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT" -export COMIN_GES="$ROTDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT" -export COMIN_GES_ENS="$ROTDIR/enkf$GDUMP.$gPDY/$gcyc/$COMPONENT" +export COMIN="${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" +export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" +export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" # Add UFSDA to PYTHONPATH -export PYTHONPATH=$HOMEgfs/sorc/gdas.cd/ush/:$PYTHONPATH +export PYTHONPATH=${HOMEgfs}/sorc/gdas.cd/ush/:${PYTHONPATH} ############################################################### # Run relevant script -EXSCRIPT=${GDASRUNSH:-$HOMEgfs/scripts/exgdas_global_atmos_ensanal_run.sh} -$EXSCRIPT +EXSCRIPT=${GDASRUNSH:-${HOMEgfs}/scripts/exgdas_global_atmos_ensanal_run.sh} +${EXSCRIPT} status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## # End JOB SPECIFIC work @@ -98,14 +98,14 @@ status=$? ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGFS_ATMOS_AWIPS_20KM_1P0DEG b/jobs/JGFS_ATMOS_AWIPS_20KM_1P0DEG index b22e245c66..3ccba8ca0e 100755 --- a/jobs/JGFS_ATMOS_AWIPS_20KM_1P0DEG +++ b/jobs/JGFS_ATMOS_AWIPS_20KM_1P0DEG @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" export OMP_NUM_THREADS=${OMP_NUM_THREADS:-1} @@ -12,8 +12,8 @@ export OMP_NUM_THREADS=${OMP_NUM_THREADS:-1} # obtain unique process id (pid) and make temp directory ######################################################### export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ###################################### # Set up the cycle variable @@ -30,12 +30,12 @@ setpdy.sh # Set up the HOME directory ################################ export HOMEgfs=${HOMEgfs:-${PACKAGEROOT}/gfs.${gfs_ver}} -export USHgfs=${USHgfs:-$HOMEgfs/ush} -export EXECgfs=${EXECgfs:-$HOMEgfs/exec} -export PARMgfs=${PARMgfs:-$HOMEgfs/parm} -export PARMwmo=${PARMwmo:-$HOMEgfs/parm/wmo} -export PARMproduct=${PARMproduct:-$HOMEgfs/parm/product} -export FIXgfs=${FIXgfs:-$HOMEgfs/fix} +export USHgfs=${USHgfs:-${HOMEgfs}/ush} +export EXECgfs=${EXECgfs:-${HOMEgfs}/exec} +export PARMgfs=${PARMgfs:-${HOMEgfs}/parm} +export PARMwmo=${PARMwmo:-${HOMEgfs}/parm/wmo} +export PARMproduct=${PARMproduct:-${HOMEgfs}/parm/product} +export FIXgfs=${FIXgfs:-${HOMEgfs}/fix} ################################### # Specify NET and RUN Name and model @@ -48,15 +48,15 @@ export COMPONENT="atmos" ############################################## # Define COM directories ############################################## -export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/$COMPONENT} -export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/$COMPONENT} +export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/${COMPONENT}} export COMOUTwmo=${COMOUTwmo:-${COMOUT}/wmo} export SENDDBN=${SENDDBN:-NO} export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn} -if [ $SENDCOM = YES ] ; then - mkdir -m 775 -p $COMOUT $COMOUTwmo +if [ ${SENDCOM} = YES ] ; then + mkdir -m 775 -p ${COMOUT} ${COMOUTwmo} fi export pgmout=OUTPUT.$$ @@ -70,21 +70,21 @@ export pgmout=OUTPUT.$$ ######################################################## # Execute the script. -$HOMEgfs/scripts/exgfs_atmos_awips_20km_1p0deg.sh $fcsthrs +${HOMEgfs}/scripts/exgfs_atmos_awips_20km_1p0deg.sh ${fcsthrs} export err=$?; err_chk ######################################################## ############################################ # print exec I/O output ############################################ -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ################################### # Remove temp directories ################################### -if [ "$KEEPDATA" != "YES" ] ; then - rm -rf $DATA +if [ "${KEEPDATA}" != "YES" ] ; then + rm -rf ${DATA} fi diff --git a/jobs/JGFS_ATMOS_AWIPS_G2 b/jobs/JGFS_ATMOS_AWIPS_G2 index a858213cc7..57d04f8a73 100755 --- a/jobs/JGFS_ATMOS_AWIPS_G2 +++ b/jobs/JGFS_ATMOS_AWIPS_G2 @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" export OMP_NUM_THREADS=${OMP_NUM_THREADS:-1} @@ -12,8 +12,8 @@ export OMP_NUM_THREADS=${OMP_NUM_THREADS:-1} # obtain unique process id (pid) and make temp directory ########################################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ###################################### # Set up the cycle variable @@ -30,13 +30,13 @@ setpdy.sh # Set up the HOME directory ################################ export HOMEgfs=${HOMEgfs:-${PACKAGEROOT}/gfs.${gfs_ver}} -export USHgfs=${USHgfs:-$HOMEgfs/ush} -export EXECgfs=${EXECgfs:-$HOMEgfs/exec} -export PARMgfs=${PARMgfs:-$HOMEgfs/parm} -export PARMwmo=${PARMwmo:-$HOMEgfs/parm/wmo} -export PARMproduct=${PARMproduct:-$HOMEgfs/parm/product} -export FIXgfs=${FIXgfs:-$HOMEgfs/fix} -export UTILgfs=${UTILgfs:-$HOMEgfs/util} +export USHgfs=${USHgfs:-${HOMEgfs}/ush} +export EXECgfs=${EXECgfs:-${HOMEgfs}/exec} +export PARMgfs=${PARMgfs:-${HOMEgfs}/parm} +export PARMwmo=${PARMwmo:-${HOMEgfs}/parm/wmo} +export PARMproduct=${PARMproduct:-${HOMEgfs}/parm/product} +export FIXgfs=${FIXgfs:-${HOMEgfs}/fix} +export UTILgfs=${UTILgfs:-${HOMEgfs}/util} ################################### # Specify NET and RUN Name and model @@ -49,15 +49,15 @@ export COMPONENT="atmos" ############################################## # Define COM directories ############################################## -export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/$COMPONENT} -export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/$COMPONENT} +export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/${COMPONENT}} export COMOUTwmo=${COMOUTwmo:-${COMOUT}/wmo} export SENDDBN=${SENDDBN:-NO} export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn} -if [ $SENDCOM = YES ] ; then - mkdir -m 775 -p $COMOUT $COMOUTwmo +if [ ${SENDCOM} = YES ] ; then + mkdir -m 775 -p ${COMOUT} ${COMOUTwmo} fi export pgmout=OUTPUT.$$ @@ -67,21 +67,21 @@ export pgmout=OUTPUT.$$ # Execute the script. ######################################################### mkdir -m 775 awips_g1 -cd $DATA/awips_g1 -$HOMEgfs/scripts/exgfs_atmos_grib_awips.sh $fcsthrs +cd ${DATA}/awips_g1 +${HOMEgfs}/scripts/exgfs_atmos_grib_awips.sh ${fcsthrs} export err=$?; err_chk ############################################ # print exec I/O output ############################################ -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ################################### # Remove temp directories ################################### -if [ "$KEEPDATA" != "YES" ] ; then - rm -rf $DATA +if [ "${KEEPDATA}" != "YES" ] ; then + rm -rf ${DATA} fi diff --git a/jobs/JGFS_ATMOS_CYCLONE_GENESIS b/jobs/JGFS_ATMOS_CYCLONE_GENESIS index ae609d36a2..f789a8631d 100755 --- a/jobs/JGFS_ATMOS_CYCLONE_GENESIS +++ b/jobs/JGFS_ATMOS_CYCLONE_GENESIS @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" export RUN_ENVIR=${RUN_ENVIR:-"nco"} @@ -8,34 +8,34 @@ export RUN_ENVIR=${RUN_ENVIR:-"nco"} # Source relevant config files ############################# configs="base vrfy" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env vrfy +. ${HOMEgfs}/env/${machine}.env vrfy status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## # Obtain unique process id (pid) and make temp directory ############################################## -if [ $RUN_ENVIR = "nco" ]; then +if [ ${RUN_ENVIR} = "nco" ]; then export DATA=${DATA:-${DATAROOT}/${jobid}} else export job="gfs_cyclone_genesis" - export DATA="$DATAROOT/${job}$$" - [[ -d $DATA ]] && rm -rf $DATA + export DATA="${DATAROOT}/${job}$$" + [[ -d ${DATA} ]] && rm -rf ${DATA} fi -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -64,7 +64,7 @@ export pgmerr=errfile ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gfs"}} -export cmodel=$CDUMP +export cmodel=${CDUMP} #################################### # SENDCOM - Copy Files From TMPDIR to $COMOUT @@ -78,18 +78,18 @@ export SENDECF=${SENDECF:-NO} # Specify Execution Areas #################################### export HOMEens_tracker=${HOMEens_tracker:-${PACKAGEROOT}/ens_tracker.${ens_tracker_ver}} -export EXECens_tracker=${EXECens_tracker:-$HOMEens_tracker/exec} -export FIXens_tracker=${FIXens_tracker:-$HOMEens_tracker/fix} -export USHens_tracker=${USHens_tracker:-$HOMEens_tracker/ush} -export SCRIPTens_tracker=${SCRIPTens_tracker:-$HOMEens_tracker/scripts} +export EXECens_tracker=${EXECens_tracker:-${HOMEens_tracker}/exec} +export FIXens_tracker=${FIXens_tracker:-${HOMEens_tracker}/fix} +export USHens_tracker=${USHens_tracker:-${HOMEens_tracker}/ush} +export SCRIPTens_tracker=${SCRIPTens_tracker:-${HOMEens_tracker}/scripts} ############################################## # Define COM directories ############################################## -export COMIN=${ROTDIR}/${RUN}.${PDY}/${cyc}/$COMPONENT +export COMIN=${ROTDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT} export gfsdir=${COMIN} export COMINgfs=${COMIN} -export COMOUT=${ROTDIR}/${RUN}.${PDY}/${cyc}/$COMPONENT +export COMOUT=${ROTDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT} export JYYYY=$(echo ${PDY} | cut -c1-4) export COMINgenvit=${COMINgenvit:-${COMOUT}/genesis_vital_${JYYYY}} @@ -97,7 +97,7 @@ export COMOUTgenvit=${COMOUTgenvit:-${COMOUT}/genesis_vital_${JYYYY}} export COMINsyn=${COMINsyn:-$(compath.py ${envir}/com/gfs/${gfs_ver})/syndat} -mkdir -m 775 -p $COMOUTgenvit +mkdir -m 775 -p ${COMOUTgenvit} ############################################## # Run relevant script @@ -109,15 +109,15 @@ export err=$?; err_chk ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGFS_ATMOS_CYCLONE_TRACKER b/jobs/JGFS_ATMOS_CYCLONE_TRACKER index a10ef07e4f..aa3cbb6e8f 100755 --- a/jobs/JGFS_ATMOS_CYCLONE_TRACKER +++ b/jobs/JGFS_ATMOS_CYCLONE_TRACKER @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" export RUN_ENVIR=${RUN_ENVIR:-"nco"} @@ -8,34 +8,34 @@ export RUN_ENVIR=${RUN_ENVIR:-"nco"} # Source relevant config files ############################# configs="base vrfy" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env vrfy +. ${HOMEgfs}/env/${machine}.env vrfy status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## # Obtain unique process id (pid) and make temp directory ############################################## -if [ $RUN_ENVIR = "nco" ]; then +if [ ${RUN_ENVIR} = "nco" ]; then export DATA=${DATA:-${DATAROOT}/${jobid}} else export job="gfs_cyclone_tracker" - export DATA="$DATAROOT/${job}$$" - [[ -d $DATA ]] && rm -rf $DATA + export DATA="${DATAROOT}/${job}$$" + [[ -d ${DATA} ]] && rm -rf ${DATA} fi -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -80,31 +80,31 @@ export SENDECF=${SENDECF:-NO} # Specify Execution Areas #################################### export HOMEens_tracker=${HOMEens_tracker:-${PACKAGEROOT}/ens_tracker.${ens_tracker_ver}} -export EXECens_tracker=${EXECens_tracker:-$HOMEens_tracker/exec} -export FIXens_tracker=${FIXens_tracker:-$HOMEens_tracker/fix} -export USHens_tracker=${USHens_tracker:-$HOMEens_tracker/ush} +export EXECens_tracker=${EXECens_tracker:-${HOMEens_tracker}/exec} +export FIXens_tracker=${FIXens_tracker:-${HOMEens_tracker}/fix} +export USHens_tracker=${USHens_tracker:-${HOMEens_tracker}/ush} ############################################## # Define COM and Data directories ############################################## -export COMIN=${ROTDIR}/${RUN}.${PDY}/${cyc}/$COMPONENT +export COMIN=${ROTDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT} export COMINgfs=${COMIN} export gfsdir=${COMINgfs} export COMINgdas=${COMIN} export gdasdir=${COMINgdas} -export COMOUT=${ROTDIR}/${RUN}.${PDY}/${cyc}/$COMPONENT +export COMOUT=${ROTDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT} export COMINsyn=${COMINsyn:-$(compath.py ${envir}/com/gfs/${gfs_ver})/syndat} -if [ $RUN_ENVIR = "nco" ]; then +if [ ${RUN_ENVIR} = "nco" ]; then export COMOUThur=${COMROOTp1}/hur/${envir}/global export COMOUTatcf=${COMROOTp1}/nhc/${envir}/atcf - mkdir -m 775 -p $COMOUThur $COMOUTatcf + mkdir -m 775 -p ${COMOUThur} ${COMOUTatcf} else # export COMOUThur=$COMOUT # export COMOUTatcf=$COMOUT - export COMOUThur=$DATA - export COMOUTatcf=$DATA + export COMOUThur=${DATA} + export COMOUTatcf=${DATA} fi ############################################## @@ -114,7 +114,7 @@ fi ############################################################# # Execute the script export pert="p01" -export cmodel=$CDUMP +export cmodel=${CDUMP} export loopnum=1 #-----------input data checking ----------------- @@ -140,15 +140,15 @@ export err=$?; err_chk ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGFS_ATMOS_FBWIND b/jobs/JGFS_ATMOS_FBWIND index 1c3fe1df71..69532e5863 100755 --- a/jobs/JGFS_ATMOS_FBWIND +++ b/jobs/JGFS_ATMOS_FBWIND @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################ # GFS FBWIND PRODUCT GENERATION @@ -10,8 +10,8 @@ source "$HOMEgfs/ush/preamble.sh" # obtain unique process id (pid) and make temp directory ########################################################### export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ###################################### # Set up the cycle variable @@ -28,13 +28,13 @@ setpdy.sh # Set up the HOME directory ################################ export HOMEgfs=${HOMEgfs:-${PACKAGEROOT}/gfs.${gfs_ver}} -export USHgfs=${USHgfs:-$HOMEgfs/ush} -export EXECgfs=${EXECgfs:-$HOMEgfs/exec} -export PARMgfs=${PARMgfs:-$HOMEgfs/parm} -export PARMwmo=${PARMwmo:-$HOMEgfs/parm/wmo} -export PARMproduct=${PARMproduct:-$HOMEgfs/parm/product} -export FIXgfs=${FIXgfs:-$HOMEgfs/fix} -export UTILgfs=${UTILgfs:-$HOMEgfs/util} +export USHgfs=${USHgfs:-${HOMEgfs}/ush} +export EXECgfs=${EXECgfs:-${HOMEgfs}/exec} +export PARMgfs=${PARMgfs:-${HOMEgfs}/parm} +export PARMwmo=${PARMwmo:-${HOMEgfs}/parm/wmo} +export PARMproduct=${PARMproduct:-${HOMEgfs}/parm/product} +export FIXgfs=${FIXgfs:-${HOMEgfs}/fix} +export UTILgfs=${UTILgfs:-${HOMEgfs}/util} ################################### # Specify NET and RUN Name and model @@ -47,15 +47,15 @@ export COMPONENT="atmos" ############################################## # Define COM directories ############################################## -export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/$COMPONENT} -export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/$COMPONENT} +export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/${COMPONENT}} export COMOUTwmo=${COMOUTwmo:-${COMOUT}/wmo} export SENDDBN=${SENDDBN:-NO} export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn} -if [ $SENDCOM = YES ] ; then - mkdir -m 775 -p $COMOUT $COMOUTwmo +if [ ${SENDCOM} = YES ] ; then + mkdir -m 775 -p ${COMOUT} ${COMOUTwmo} fi export pgmout=OUTPUT.$$ @@ -63,21 +63,21 @@ export pgmout=OUTPUT.$$ ######################################################## # Execute the script. -$HOMEgfs/scripts/exgfs_atmos_fbwind.sh +${HOMEgfs}/scripts/exgfs_atmos_fbwind.sh export err=$?;err_chk ######################################################## ############################################ # print exec I/O output ############################################ -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ################################### # Remove temp directories ################################### -if [ "$KEEPDATA" != "YES" ] ; then - rm -rf $DATA +if [ "${KEEPDATA}" != "YES" ] ; then + rm -rf ${DATA} fi diff --git a/jobs/JGFS_ATMOS_FSU_GENESIS b/jobs/JGFS_ATMOS_FSU_GENESIS index baa54b65c9..df5290fad7 100755 --- a/jobs/JGFS_ATMOS_FSU_GENESIS +++ b/jobs/JGFS_ATMOS_FSU_GENESIS @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" export RUN_ENVIR=${RUN_ENVIR:-"nco"} @@ -8,11 +8,11 @@ export RUN_ENVIR=${RUN_ENVIR:-"nco"} # Source relevant config files ############################# configs="base vrfy" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ##exit @@ -20,23 +20,23 @@ done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env vrfy +. ${HOMEgfs}/env/${machine}.env vrfy status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## # Obtain unique process id (pid) and make temp directory ############################################## -if [ $RUN_ENVIR = "nco" ]; then +if [ ${RUN_ENVIR} = "nco" ]; then export DATA=${DATA:-${DATAROOT}/${jobid}} else export job="gfs_fsu_genesis" - export DATA="$DATAROOT/${job}$$" - [[ -d $DATA ]] && rm -rf $DATA + export DATA="${DATAROOT}/${job}$$" + [[ -d ${DATA} ]] && rm -rf ${DATA} fi -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -81,11 +81,11 @@ export SENDECF=${SENDECF:-NO} # Specify Execution Areas #################################### export HOMEens_tracker=${HOMEens_tracker:-${PACKAGEROOT}/ens_tracker.${ens_tracker_ver}} -export EXECens_tracker=${EXECens_tracker:-$HOMEens_tracker/exec} -export FIXens_tracker=${FIXens_tracker:-$HOMEens_tracker/fix} -export USHens_tracker=${USHens_tracker:-$HOMEens_tracker/ush} -export SCRIPTens_tracker=${SCRIPTens_tracker:-$HOMEens_tracker/scripts} -export BINens_tracker=${BINens_tracker:-$HOMEens_tracker/ush/FSUgenesisPY/bin} +export EXECens_tracker=${EXECens_tracker:-${HOMEens_tracker}/exec} +export FIXens_tracker=${FIXens_tracker:-${HOMEens_tracker}/fix} +export USHens_tracker=${USHens_tracker:-${HOMEens_tracker}/ush} +export SCRIPTens_tracker=${SCRIPTens_tracker:-${HOMEens_tracker}/scripts} +export BINens_tracker=${BINens_tracker:-${HOMEens_tracker}/ush/FSUgenesisPY/bin} export PYTHONPATH=${USHens_tracker}/FSUgenesisPY:${PYTHONPATH} ############################################## @@ -100,15 +100,15 @@ export gdasdir=${COMINgdas} export COMOUT=${ROTDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT} export COMINsyn=${COMINsyn:-$(compath.py ${envir}/com/gfs/${gfs_ver})/syndat} -if [ $RUN_ENVIR = "nco" ]; then +if [ ${RUN_ENVIR} = "nco" ]; then export COMOUThur=${COMROOTp1}/hur/${envir}/global export COMOUTatcf=${COMROOTp1}/nhc/${envir}/atcf - mkdir -m 775 -p $COMOUThur $COMOUTatcf + mkdir -m 775 -p ${COMOUThur} ${COMOUTatcf} else # export COMOUThur=$COMOUT # export COMOUTatcf=$COMOUT - export COMOUThur=$DATA - export COMOUTatcf=$DATA + export COMOUThur=${DATA} + export COMOUTatcf=${DATA} fi ############################################## @@ -123,15 +123,15 @@ export err=$?; err_chk ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGFS_ATMOS_GEMPAK b/jobs/JGFS_ATMOS_GEMPAK index 37a2edad86..92703f9451 100755 --- a/jobs/JGFS_ATMOS_GEMPAK +++ b/jobs/JGFS_ATMOS_GEMPAK @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ########################################################## # make temp directory ########################################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ########################################### # Run setpdy and initialize PDY variables @@ -21,32 +21,32 @@ export pgmout=OUTPUT.$$ ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base gempak" -for config in $configs; do - . $config_path/config.$config +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env gempak +. ${HOMEgfs}/env/${machine}.env gempak status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ################################ # Set up the HOME directory ################################ export HOMEgfs=${HOMEgfs:-${PACKAGEROOT}/gfs.${gfs_ver}} # TODO: These should be removed as they are defined in config.base -export EXECgfs=${EXECgfs:-$HOMEgfs/exec} -export PARMgfs=${PARMgfs:-$HOMEgfs/parm} -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -export FIXgempak=${FIXgempak:-$HOMEgfs/gempak/fix} -export USHgempak=${USHgempak:-$HOMEgfs/gempak/ush} -export SRCgfs=${SRCgfs:-$HOMEgfs/scripts} +export EXECgfs=${EXECgfs:-${HOMEgfs}/exec} +export PARMgfs=${PARMgfs:-${HOMEgfs}/parm} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +export FIXgempak=${FIXgempak:-${HOMEgfs}/gempak/fix} +export USHgempak=${USHgempak:-${HOMEgfs}/gempak/ush} +export SRCgfs=${SRCgfs:-${HOMEgfs}/scripts} # For half-degree P Grib files export DO_HD_PGRB=${DO_HD_PGRB:-YES} @@ -72,14 +72,14 @@ export COMPONENT="atmos" ############################################## # Define COM directories ############################################## -export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/$COMPONENT} -export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/$COMPONENT/gempak} +export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/${COMPONENT}/gempak} export SENDDBN=${SENDDBN:-NO} export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn} -if [ $SENDCOM = YES ] ; then - mkdir -m 775 -p $COMOUT +if [ ${SENDCOM} = YES ] ; then + mkdir -m 775 -p ${COMOUT} fi @@ -91,54 +91,54 @@ fi ################################################################# # Execute the script for the 384 hour 1 degree grib ################################################################## -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs 384 GFS_GEMPAK &> $DATA/gfs_1p0.$$.1 " >>poescript -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs 384 GFS_GEMPAK &> $DATA/gfs_1p0.$$.2 " >>poescript -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs 384 GFS_GEMPAK &> $DATA/gfs_1p0.$$.3 " >>poescript -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs 384 GFS_GEMPAK &> $DATA/gfs_1p0.$$.4 " >>poescript -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs 384 GFS_GEMPAK &> $DATA/gfs_1p0.$$.5 " >>poescript -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs 384 GFS_GEMPAK &> $DATA/gfs_1p0.$$.6 " >>poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs 384 GFS_GEMPAK &> ${DATA}/gfs_1p0.$$.1 " >>poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs 384 GFS_GEMPAK &> ${DATA}/gfs_1p0.$$.2 " >>poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs 384 GFS_GEMPAK &> ${DATA}/gfs_1p0.$$.3 " >>poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs 384 GFS_GEMPAK &> ${DATA}/gfs_1p0.$$.4 " >>poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs 384 GFS_GEMPAK &> ${DATA}/gfs_1p0.$$.5 " >>poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs 384 GFS_GEMPAK &> ${DATA}/gfs_1p0.$$.6 " >>poescript ################################################################# # Execute the script for the half-degree grib ################################################################## -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs_0p50 384 GFS_GEMPAK &> $DATA/gfs_0p5.$$.1 " >>poescript -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs_0p50 384 GFS_GEMPAK &> $DATA/gfs_0p5.$$.2 " >>poescript -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs_0p50 384 GFS_GEMPAK &> $DATA/gfs_0p5.$$.3 " >>poescript -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs_0p50 384 GFS_GEMPAK &> $DATA/gfs_0p5.$$.4 " >>poescript -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs_0p50 384 GFS_GEMPAK &> $DATA/gfs_0p5.$$.5 " >>poescript -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs_0p50 384 GFS_GEMPAK &> $DATA/gfs_0p5.$$.6 " >>poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs_0p50 384 GFS_GEMPAK &> ${DATA}/gfs_0p5.$$.1 " >>poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs_0p50 384 GFS_GEMPAK &> ${DATA}/gfs_0p5.$$.2 " >>poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs_0p50 384 GFS_GEMPAK &> ${DATA}/gfs_0p5.$$.3 " >>poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs_0p50 384 GFS_GEMPAK &> ${DATA}/gfs_0p5.$$.4 " >>poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs_0p50 384 GFS_GEMPAK &> ${DATA}/gfs_0p5.$$.5 " >>poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs_0p50 384 GFS_GEMPAK &> ${DATA}/gfs_0p5.$$.6 " >>poescript ################################################################# # Execute the script for the quater-degree grib #################################################################### -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs_0p25 384 GFS_GEMPAK &> $DATA/gfs_0p25.$$.1 " >> poescript -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs_0p25 384 GFS_GEMPAK &> $DATA/gfs_0p25.$$.2 " >> poescript -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs_0p25 384 GFS_GEMPAK &> $DATA/gfs_0p25.$$.3 " >> poescript -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs_0p25 384 GFS_GEMPAK &> $DATA/gfs_0p25.$$.4 " >> poescript -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs_0p25 384 GFS_GEMPAK &> $DATA/gfs_0p25.$$.5 " >> poescript -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs_0p25 384 GFS_GEMPAK &> $DATA/gfs_0p25.$$.6 " >> poescript -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs_0p25 384 GFS_GEMPAK &> $DATA/gfs_0p25.$$.7 " >> poescript -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs_0p25 384 GFS_GEMPAK &> $DATA/gfs_0p25.$$.8 " >> poescript -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs_0p25 384 GFS_GEMPAK &> $DATA/gfs_0p25.$$.9 " >> poescript -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs_0p25 384 GFS_GEMPAK &> $DATA/gfs_0p25.$$.10 " >> poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs_0p25 384 GFS_GEMPAK &> ${DATA}/gfs_0p25.$$.1 " >> poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs_0p25 384 GFS_GEMPAK &> ${DATA}/gfs_0p25.$$.2 " >> poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs_0p25 384 GFS_GEMPAK &> ${DATA}/gfs_0p25.$$.3 " >> poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs_0p25 384 GFS_GEMPAK &> ${DATA}/gfs_0p25.$$.4 " >> poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs_0p25 384 GFS_GEMPAK &> ${DATA}/gfs_0p25.$$.5 " >> poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs_0p25 384 GFS_GEMPAK &> ${DATA}/gfs_0p25.$$.6 " >> poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs_0p25 384 GFS_GEMPAK &> ${DATA}/gfs_0p25.$$.7 " >> poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs_0p25 384 GFS_GEMPAK &> ${DATA}/gfs_0p25.$$.8 " >> poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs_0p25 384 GFS_GEMPAK &> ${DATA}/gfs_0p25.$$.9 " >> poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs_0p25 384 GFS_GEMPAK &> ${DATA}/gfs_0p25.$$.10 " >> poescript #################################################################### # Execute the script to create the 35km Pacific grids for OPC ##################################################################### -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs35_pac 180 GFS_GEMPAK_WWB &> $DATA/gfs35_pac.$$.1 " >>poescript -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs35_pac 180 GFS_GEMPAK_WWB &> $DATA/gfs35_pac.$$.2 " >>poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs35_pac 180 GFS_GEMPAK_WWB &> ${DATA}/gfs35_pac.$$.1 " >>poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs35_pac 180 GFS_GEMPAK_WWB &> ${DATA}/gfs35_pac.$$.2 " >>poescript #################################################################### # Execute the script to create the 35km Atlantic grids for OPC ##################################################################### -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs35_atl 180 GFS_GEMPAK_WWB &> $DATA/gfs35_atl.$$.1 " >>poescript -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs35_atl 180 GFS_GEMPAK_WWB &> $DATA/gfs35_atl.$$.2 " >>poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs35_atl 180 GFS_GEMPAK_WWB &> ${DATA}/gfs35_atl.$$.1 " >>poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs35_atl 180 GFS_GEMPAK_WWB &> ${DATA}/gfs35_atl.$$.2 " >>poescript ##################################################################### # Execute the script to create the 40km grids for HPC ###################################################################### -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs40 180 GFS_GEMPAK_WWB &> $DATA/gfs40.$$.1 " >>poescript -echo "time $SRCgfs/exgfs_atmos_nawips.sh gfs40 180 GFS_GEMPAK_WWB &> $DATA/gfs40.$$.2 " >>poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs40 180 GFS_GEMPAK_WWB &> ${DATA}/gfs40.$$.1 " >>poescript +echo "time ${SRCgfs}/exgfs_atmos_nawips.sh gfs40 180 GFS_GEMPAK_WWB &> ${DATA}/gfs40.$$.2 " >>poescript # Add task number to the MPMD script nl -n ln -v 0 poescript > poescript.new @@ -146,33 +146,33 @@ mv poescript.new poescript cat poescript -chmod 775 $DATA/poescript +chmod 775 ${DATA}/poescript export MP_PGMMODEL=mpmd -export MP_CMDFILE=$DATA/poescript +export MP_CMDFILE=${DATA}/poescript -ntasks=${NTASKS_GEMPAK:-$(cat $DATA/poescript | wc -l)} +ntasks=${NTASKS_GEMPAK:-$(cat ${DATA}/poescript | wc -l)} ptile=${PTILE_GEMPAK:-4} threads=${NTHREADS_GEMPAK:-1} -export OMP_NUM_THREADS=$threads -APRUN=${APRUN:-"mpiexec -l -np $ntasks --cpu-bind verbose,core cfp"} +export OMP_NUM_THREADS=${threads} +APRUN=${APRUN:-"mpiexec -l -np ${ntasks} --cpu-bind verbose,core cfp"} -APRUN_GEMPAKCFP=${APRUN_GEMPAKCFP:-$APRUN} -APRUNCFP=$(eval echo $APRUN_GEMPAKCFP) +APRUN_GEMPAKCFP=${APRUN_GEMPAKCFP:-${APRUN}} +APRUNCFP=$(eval echo ${APRUN_GEMPAKCFP}) -$APRUNCFP $DATA/poescript +${APRUNCFP} ${DATA}/poescript export err=$?; err_chk ############################################ # print exec I/O output ############################################ -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ################################### # Remove temp directories ################################### -if [ "$KEEPDATA" != "YES" ] ; then - rm -rf $DATA +if [ "${KEEPDATA}" != "YES" ] ; then + rm -rf ${DATA} fi diff --git a/jobs/JGFS_ATMOS_GEMPAK_META b/jobs/JGFS_ATMOS_GEMPAK_META index 948b11b180..0a903aa140 100755 --- a/jobs/JGFS_ATMOS_GEMPAK_META +++ b/jobs/JGFS_ATMOS_GEMPAK_META @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################ # GFS GEMPAK META PRODUCT GENERATION @@ -20,8 +20,8 @@ export MP_DEBUG_NOTIMEOUT=yes # obtain unique process id (pid) and make temp directory ########################################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ###################################### # Set up the cycle variable @@ -38,14 +38,14 @@ setpdy.sh # Set up the HOME directory ################################ export HOMEgfs=${HOMEgfs:-${PACKAGEROOT}/gfs.${gfs_ver}} -export EXECgfs=${EXECgfs:-$HOMEgfs/exec} -export PARMgfs=${PARMgfs:-$HOMEgfs/parm} -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -export FIXgempak=${FIXgempak:-$HOMEgfs/gempak/fix} -export USHgempak=${USHgempak:-$HOMEgfs/gempak/ush} -export SRCgfs=${SRCgfs:-$HOMEgfs/scripts} +export EXECgfs=${EXECgfs:-${HOMEgfs}/exec} +export PARMgfs=${PARMgfs:-${HOMEgfs}/parm} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +export FIXgempak=${FIXgempak:-${HOMEgfs}/gempak/fix} +export USHgempak=${USHgempak:-${HOMEgfs}/gempak/ush} +export SRCgfs=${SRCgfs:-${HOMEgfs}/scripts} -cp $FIXgempak/datatype.tbl datatype.tbl +cp ${FIXgempak}/datatype.tbl datatype.tbl ############################################# #set the fcst hrs for all the cycles @@ -70,8 +70,8 @@ export DBN_ALERT_TYPE=GFS_METAFILE ############################################## # Define COM directories ############################################## -export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/$COMPONENT/gempak} -export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/$COMPONENT/gempak/meta} +export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}/gempak} +export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/${COMPONENT}/gempak/meta} export COMINgempak=${COMINgempak:-$(compath.py ${envir}/${NET}/${gfs_ver})} export COMINukmet=${COMINukmet:-$(compath.py ${envir}/ukmet/${ukmet_ver})/ukmet} @@ -81,8 +81,8 @@ export COMINnam=${COMINnam:-$(compath.py ${envir}/nam/${nam_ver})/nam} export SENDDBN=${SENDDBN:-NO} export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn} -if [ $SENDCOM = YES ] ; then - mkdir -m 775 -p $COMOUT +if [ ${SENDCOM} = YES ] ; then + mkdir -m 775 -p ${COMOUT} fi export pgmout=OUTPUT.$$ @@ -90,21 +90,21 @@ export pgmout=OUTPUT.$$ ######################################################## # Execute the script. -$SRCgfs/exgfs_atmos_gempak_meta.sh +${SRCgfs}/exgfs_atmos_gempak_meta.sh export err=$?; err_chk ######################################################## ############################################ # print exec I/O output ############################################ -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ################################### # Remove temp directories ################################### -if [ "$KEEPDATA" != "YES" ] ; then - rm -rf $DATA +if [ "${KEEPDATA}" != "YES" ] ; then + rm -rf ${DATA} fi diff --git a/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF b/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF index e80ed658b4..2cb0069a1e 100755 --- a/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF +++ b/jobs/JGFS_ATMOS_GEMPAK_NCDC_UPAPGIF @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################ # GFS GEMPAK NCDC PRODUCT GENERATION @@ -10,8 +10,8 @@ source "$HOMEgfs/ush/preamble.sh" # obtain unique process id (pid) and make temp directory ########################################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ########################################### # Run setpdy and initialize PDY variables @@ -24,20 +24,20 @@ setpdy.sh # Set up the HOME directory ################################ export HOMEgfs=${HOMEgfs:-${PACKAGEROOT}/gfs.${gfs_ver}} -export EXECgfs=${EXECgfs:-$HOMEgfs/exec} -export PARMgfs=${PARMgfs:-$HOMEgfs/parm} -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -export FIXgfs=${FIXgfs:-$HOMEgfs/gempak/fix} -export USHgempak=${USHgempak:-$HOMEgfs/gempak/ush} -export SRCgfs=${SRCgfs:-$HOMEgfs/scripts} -export UTILgfs=${UTILgfs:-$HOMEgfs/util} +export EXECgfs=${EXECgfs:-${HOMEgfs}/exec} +export PARMgfs=${PARMgfs:-${HOMEgfs}/parm} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +export FIXgfs=${FIXgfs:-${HOMEgfs}/gempak/fix} +export USHgempak=${USHgempak:-${HOMEgfs}/gempak/ush} +export SRCgfs=${SRCgfs:-${HOMEgfs}/scripts} +export UTILgfs=${UTILgfs:-${HOMEgfs}/util} ###################################### # Set up the GEMPAK directory ####################################### -export HOMEgempak=${HOMEgempak:-$HOMEgfs/gempak} -export FIXgempak=${FIXgempak:-$HOMEgempak/fix} -export USHgempak=${USHgempak:-$HOMEgempak/ush} +export HOMEgempak=${HOMEgempak:-${HOMEgfs}/gempak} +export FIXgempak=${FIXgempak:-${HOMEgempak}/fix} +export USHgempak=${USHgempak:-${HOMEgempak}/ush} export MP_PULSE=0 export MP_TIMEOUT=2000 @@ -64,17 +64,17 @@ export COMPONENT="atmos" ############################################## # Define COM directories ############################################## -export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/$COMPONENT/gempak} -export COMINgfs=${COMINgfs:-$(compath.py ${envir}/${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/$COMPONENT} -export COMINobsproc=${COMINobsproc:-$(compath.py ${envir}/obsproc/${obsproc_ver})/$RUN.$PDY/$cyc/$COMPONENT} -export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/$COMPONENT} +export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}/gempak} +export COMINgfs=${COMINgfs:-$(compath.py ${envir}/${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/${COMPONENT}} +export COMINobsproc=${COMINobsproc:-$(compath.py ${envir}/obsproc/${obsproc_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/${COMPONENT}} export COMOUTwmo=${COMOUTwmo:-${COMOUT}/wmo} export SENDDBN=${SENDDBN:-NO} export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn} -if [ $SENDCOM = YES ] ; then - mkdir -m 775 -p $COMOUT $COMOUTwmo +if [ ${SENDCOM} = YES ] ; then + mkdir -m 775 -p ${COMOUT} ${COMOUTwmo} fi export pgmout=OUTPUT.$$ @@ -82,21 +82,21 @@ export pgmout=OUTPUT.$$ ######################################################## # Execute the script. -$SRCgfs/exgfs_atmos_gempak_gif_ncdc_skew_t.sh +${SRCgfs}/exgfs_atmos_gempak_gif_ncdc_skew_t.sh export err=$?; err_chk ######################################################## ############################################ # print exec I/O output ############################################ -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ################################### # Remove temp directories ################################### -if [ "$KEEPDATA" != "YES" ] ; then - rm -rf $DATA +if [ "${KEEPDATA}" != "YES" ] ; then + rm -rf ${DATA} fi diff --git a/jobs/JGFS_ATMOS_GEMPAK_PGRB2_SPEC b/jobs/JGFS_ATMOS_GEMPAK_PGRB2_SPEC index 7167e313c5..f4284ff35a 100755 --- a/jobs/JGFS_ATMOS_GEMPAK_PGRB2_SPEC +++ b/jobs/JGFS_ATMOS_GEMPAK_PGRB2_SPEC @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################ # GFS_PGRB2_SPEC_GEMPAK PRODUCT GENERATION @@ -10,8 +10,8 @@ source "$HOMEgfs/ush/preamble.sh" # obtain unique process id (pid) and make temp directory ######################################################### export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ###################################### # Set up the cycle variable @@ -28,12 +28,12 @@ setpdy.sh # Set up the HOME directory ################################ export HOMEgfs=${HOMEgfs:-${PACKAGEROOT}/gfs.${gfs_ver}} -export EXECgfs=${EXECgfs:-$HOMEgfs/exec} -export PARMgfs=${PARMgfs:-$HOMEgfs/parm} -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -export FIXgempak=${FIXgempak:-$HOMEgfs/gempak/fix} -export USHgempak=${USHgempak:-$HOMEgfs/gempak/ush} -export SRCgfs=${SRCgfs:-$HOMEgfs/scripts} +export EXECgfs=${EXECgfs:-${HOMEgfs}/exec} +export PARMgfs=${PARMgfs:-${HOMEgfs}/parm} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +export FIXgempak=${FIXgempak:-${HOMEgfs}/gempak/fix} +export USHgempak=${USHgempak:-${HOMEgfs}/gempak/ush} +export SRCgfs=${SRCgfs:-${HOMEgfs}/scripts} # For half-degree P Grib files #export DO_HD_PGRB=YES @@ -51,25 +51,25 @@ export EXT="" ############################################## # Define COM directories ############################################## -export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/$COMPONENT} -export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${NET}.${PDY})/${cyc}/$COMPONENT/gempak} +export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${NET}.${PDY})/${cyc}/${COMPONENT}/gempak} export SENDDBN=${SENDDBN:-NO} export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn} -if [ $SENDCOM = YES ] ; then - mkdir -m 775 -p $COMOUT +if [ ${SENDCOM} = YES ] ; then + mkdir -m 775 -p ${COMOUT} fi -export DATA_HOLD=$DATA +export DATA_HOLD=${DATA} ################################################################# # Execute the script for the regular grib ################################################################# -export DATA=$DATA_HOLD/SPECIAL -mkdir -p $DATA -cd $DATA +export DATA=${DATA_HOLD}/SPECIAL +mkdir -p ${DATA} +cd ${DATA} export DBN_ALERT_TYPE=GFS_GOESSIM_GEMPAK export RUN2=gfs_goessim @@ -83,14 +83,14 @@ echo "RUNS the Program" ######################################################## # Execute the script. -$SRCgfs/exgfs_atmos_goes_nawips.sh +${SRCgfs}/exgfs_atmos_goes_nawips.sh ################################################################# # Execute the script for the 221 grib -export DATA=$DATA_HOLD/SPECIAL221 -mkdir -p $DATA -cd $DATA +export DATA=${DATA_HOLD}/SPECIAL221 +mkdir -p ${DATA} +cd ${DATA} export DBN_ALERT_TYPE=GFS_GOESSIM221_GEMPAK export RUN2=gfs_goessim221 @@ -104,12 +104,12 @@ echo "RUNS the Program" ######################################################## # Execute the script. -$SRCgfs/exgfs_atmos_goes_nawips.sh +${SRCgfs}/exgfs_atmos_goes_nawips.sh export err=$?; err_chk ######################################################## echo "end of program" -cd $DATA_HOLD +cd ${DATA_HOLD} echo "######################################" echo " SPECIAL.OUT " echo "######################################" @@ -117,14 +117,14 @@ echo "######################################" ############################################ # print exec I/O output ############################################ -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ################################### # Remove temp directories ################################### -if [ "$KEEPDATA" != "YES" ] ; then - rm -rf $DATA +if [ "${KEEPDATA}" != "YES" ] ; then + rm -rf ${DATA} fi diff --git a/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS b/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS index 2bf174177c..76937f40f6 100755 --- a/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS +++ b/jobs/JGFS_ATMOS_PGRB2_SPEC_NPOESS @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" export OMP_NUM_THREADS=${OMP_NUM_THREADS:-1} @@ -12,8 +12,8 @@ export OMP_NUM_THREADS=${OMP_NUM_THREADS:-1} # obtain unique process id (pid) and make temp directory ########################################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ###################################### # Set up the cycle variable @@ -30,13 +30,13 @@ setpdy.sh # Set up the HOME directory ################################ export HOMEgfs=${HOMEgfs:-${PACKAGEROOT}/gfs.${gfs_ver}} -export USHgfs=${USHgfs:-$HOMEgfs/ush} -export EXECgfs=${EXECgfs:-$HOMEgfs/exec} -export PARMgfs=${PARMgfs:-$HOMEgfs/parm} -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -export PARMwmo=${PARMwmo:-$HOMEgfs/parm/wmo} -export PARMproduct=${PARMproduct:-$HOMEgfs/parm/product} -export FIXgfs=${FIXgfs:-$HOMEgfs/fix} +export USHgfs=${USHgfs:-${HOMEgfs}/ush} +export EXECgfs=${EXECgfs:-${HOMEgfs}/exec} +export PARMgfs=${PARMgfs:-${HOMEgfs}/parm} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +export PARMwmo=${PARMwmo:-${HOMEgfs}/parm/wmo} +export PARMproduct=${PARMproduct:-${HOMEgfs}/parm/product} +export FIXgfs=${FIXgfs:-${HOMEgfs}/fix} ################################### # Specify NET and RUN Name and model @@ -49,15 +49,15 @@ export COMPONENT="atmos" ############################################## # Define COM directories ############################################## -export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/$COMPONENT} -export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/$COMPONENT} +export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/${COMPONENT}} export COMOUTwmo=${COMOUTwmo:-${COMOUT}/wmo} export SENDDBN=${SENDDBN:-NO} export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn} -if [ $SENDCOM = YES ] ; then - mkdir -m 775 -p $COMOUT $COMOUTwmo +if [ ${SENDCOM} = YES ] ; then + mkdir -m 775 -p ${COMOUT} ${COMOUTwmo} fi export pgmout=OUTPUT.$$ @@ -73,7 +73,7 @@ export FHINC=003 ####################################### # Specify Restart File Name to Key Off ####################################### -restart_file=$COMIN/${RUN}.t${cyc}z.special.grb2if +restart_file=${COMIN}/${RUN}.t${cyc}z.special.grb2if #################################### # Specify Timeout Behavior of Post @@ -89,46 +89,46 @@ export SLEEP_INT=5 #################################### # Check if this is a restart #################################### -if test -f $COMIN/$RUN.t${cyc}z.control.goessimpgrb2 +if test -f ${COMIN}/${RUN}.t${cyc}z.control.goessimpgrb2 then - modelrecvy=$(cat < $COMIN/$RUN.t${cyc}z.control.goessimpgrb) - recvy_pdy=$(echo $modelrecvy | cut -c1-8) - recvy_cyc=$(echo $modelrecvy | cut -c9-10) - recvy_shour=$(echo $modelrecvy | cut -c11-13) + modelrecvy=$(cat < ${COMIN}/${RUN}.t${cyc}z.control.goessimpgrb) + recvy_pdy=$(echo ${modelrecvy} | cut -c1-8) + recvy_cyc=$(echo ${modelrecvy} | cut -c9-10) + recvy_shour=$(echo ${modelrecvy} | cut -c11-13) - if test $RERUN = "NO" + if test ${RERUN} = "NO" then - NEW_SHOUR=$(expr $recvy_shour + $FHINC) - if test $NEW_SHOUR -ge $SHOUR + NEW_SHOUR=$(expr ${recvy_shour} + ${FHINC}) + if test ${NEW_SHOUR} -ge ${SHOUR} then - export SHOUR=$NEW_SHOUR + export SHOUR=${NEW_SHOUR} fi - if test $recvy_shour -ge $FHOUR + if test ${recvy_shour} -ge ${FHOUR} then - echo="Forecast Pgrb Generation Already Completed to $FHOUR" + echo="Forecast Pgrb Generation Already Completed to ${FHOUR}" else - echo="Starting: PDY=$PDY cycle=t${recvy_cyc}z SHOUR=$SHOUR ." + echo="Starting: PDY=${PDY} cycle=t${recvy_cyc}z SHOUR=${SHOUR} ." fi fi fi ############################################################# # Execute the script -$HOMEgfs/scripts/exgfs_atmos_grib2_special_npoess.sh +${HOMEgfs}/scripts/exgfs_atmos_grib2_special_npoess.sh export err=$?;err_chk ############################################################# ############################################ # print exec I/O output ############################################ -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ################################### # Remove temp directories ################################### -if [ "$KEEPDATA" != "YES" ] ; then - rm -rf $DATA +if [ "${KEEPDATA}" != "YES" ] ; then + rm -rf ${DATA} fi diff --git a/jobs/JGFS_ATMOS_POSTSND b/jobs/JGFS_ATMOS_POSTSND index 6603095a39..d44564d0b4 100755 --- a/jobs/JGFS_ATMOS_POSTSND +++ b/jobs/JGFS_ATMOS_POSTSND @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -29,21 +29,21 @@ export pgmerr=errfile # Source relevant config files ############################# configs="base postsnd" -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env postsnd +. ${HOMEgfs}/env/${machine}.env postsnd status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -66,31 +66,31 @@ export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn} # Set up the source directories ################################### -export HOMEbufrsnd=${HOMEbufrsnd:-$HOMEgfs} -export EXECbufrsnd=${EXECbufrsnd:-$HOMEbufrsnd/exec} -export FIXbufrsnd=${FIXbufrsnd:-$HOMEbufrsnd/fix/product} -export PARMbufrsnd=${PARMbufrsnd:-$HOMEbufrsnd/parm/product} -export USHbufrsnd=${USHbufrsnd:-$HOMEbufrsnd/ush} -export SCRbufrsnd=${SCRbufrsnd:-$HOMEbufrsnd/scripts} +export HOMEbufrsnd=${HOMEbufrsnd:-${HOMEgfs}} +export EXECbufrsnd=${EXECbufrsnd:-${HOMEbufrsnd}/exec} +export FIXbufrsnd=${FIXbufrsnd:-${HOMEbufrsnd}/fix/product} +export PARMbufrsnd=${PARMbufrsnd:-${HOMEbufrsnd}/parm/product} +export USHbufrsnd=${USHbufrsnd:-${HOMEbufrsnd}/ush} +export SCRbufrsnd=${SCRbufrsnd:-${HOMEbufrsnd}/scripts} ############################## # Define COM Directories ############################## -export COMIN=${COMIN:-$ROTDIR/${CDUMP}.${PDY}/${cyc}/atmos} -export COMOUT=${COMOUT:-$ROTDIR/${CDUMP}.${PDY}/${cyc}/atmos} +export COMIN=${COMIN:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos} +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos} export pcom=${pcom:-${COMOUT}/wmo} export COMAWP=${COMAWP:-${COMOUT}/gempak} export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn} -[[ ! -d $COMOUT ]] && mkdir -p $COMOUT -[[ ! -d $pcom ]] && mkdir -p $pcom -[[ ! -d $COMAWP ]] && mkdir -p $COMAWP +[[ ! -d ${COMOUT} ]] && mkdir -p ${COMOUT} +[[ ! -d ${pcom} ]] && mkdir -p ${pcom} +[[ ! -d ${COMAWP} ]] && mkdir -p ${COMAWP} ######################################################## # Execute the script. -$SCRbufrsnd/exgfs_atmos_postsnd.sh +${SCRbufrsnd}/exgfs_atmos_postsnd.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -100,15 +100,15 @@ status=$? ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGFS_ATMOS_VMINMON b/jobs/JGFS_ATMOS_VMINMON index 674e0d00f4..bd996ce01d 100755 --- a/jobs/JGFS_ATMOS_VMINMON +++ b/jobs/JGFS_ATMOS_VMINMON @@ -3,7 +3,7 @@ ########################################################### # GFS Minimization Monitor (MinMon) job ########################################################### -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################### # Specify NET and RUN name @@ -18,8 +18,8 @@ export COMPONENT="atmos" ########################################################### export pid=$$ export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ########################################################### @@ -33,12 +33,12 @@ export m_job=${m_job:-${MINMON_SUFFIX}_mmDE} # Specify Package Areas ############################################## export HOMEgfs=${HOMEgfs:-${NWROOT}/gfs.${gfs_ver}} -export SCRgfs=${SCRgfs:-$HOMEgfs/scripts} -export M_FIXgfs=${M_FIXgfs:-$HOMEgfs/fix/product} +export SCRgfs=${SCRgfs:-${HOMEgfs}/scripts} +export M_FIXgfs=${M_FIXgfs:-${HOMEgfs}/fix/product} export HOMEminmon=${HOMEminmon:-${HOMEgfs}} -export EXECminmon=${EXECminmon:-$HOMEminmon/exec} -export USHminmon=${USHminmon:-$HOMEminmon/ush} +export EXECminmon=${EXECminmon:-${HOMEminmon}/exec} +export USHminmon=${USHminmon:-${HOMEminmon}/ush} ############################################# @@ -60,9 +60,9 @@ export COM_IN=${COM_IN:-$(compath.py ${envir}/${NET}/${gfs_ver})} M_TANKverf=${M_TANKverf:-${COM_IN}/${RUN}.${PDY}/${cyc}/${COMPONENT}/minmon} export M_TANKverfM1=${M_TANKverfM1:-${COM_IN}/${RUN}.${P_PDY}/${p_cyc}/${COMPONENT}/minmon} -export COMIN=${COMIN:-$COM_IN/${RUN}.${PDY}/${cyc}/$COMPONENT} +export COMIN=${COMIN:-${COM_IN}/${RUN}.${PDY}/${cyc}/${COMPONENT}} -mkdir -p -m 775 $M_TANKverf +mkdir -p -m 775 ${M_TANKverf} ######################################## @@ -74,9 +74,9 @@ export gsistat=${gsistat:-${COMIN}/gfs.t${cyc}z.gsistat} ######################################################## # Execute the script. -${GMONSH:-$SCRgfs/exgfs_atmos_vminmon.sh} ${PDY} ${cyc} +${GMONSH:-${SCRgfs}/exgfs_atmos_vminmon.sh} ${PDY} ${cyc} err=$? -[[ $err -ne 0 ]] && exit $err +[[ ${err} -ne 0 ]] && exit ${err} ################################ diff --git a/jobs/JGLOBAL_ATMOS_ANALYSIS b/jobs/JGLOBAL_ATMOS_ANALYSIS index df1b24f8b1..85e51661ca 100755 --- a/jobs/JGLOBAL_ATMOS_ANALYSIS +++ b/jobs/JGLOBAL_ATMOS_ANALYSIS @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # Obtain unique process id (pid) and make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -29,22 +29,22 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base anal" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env anal +. ${HOMEgfs}/env/${machine}.env anal status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -62,56 +62,56 @@ export MAKE_ACFTBUFR=${MAKE_ACFTBUFR:-"NO"} # Begin JOB SPECIFIC work ############################################## -GDATE=$($NDATE -$assim_freq $CDATE) -gPDY=$(echo $GDATE | cut -c1-8) -gcyc=$(echo $GDATE | cut -c9-10) +GDATE=$(${NDATE} -${assim_freq} ${CDATE}) +gPDY=$(echo ${GDATE} | cut -c1-8) +gcyc=$(echo ${GDATE} | cut -c9-10) GDUMP=${GDUMP:-"gdas"} export OPREFIX="${CDUMP}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export APREFIX="${CDUMP}.t${cyc}z." -export GSUFFIX=${GSUFFIX:-$SUFFIX} -export ASUFFIX=${ASUFFIX:-$SUFFIX} +export GSUFFIX=${GSUFFIX:-${SUFFIX}} +export ASUFFIX=${ASUFFIX:-${SUFFIX}} -if [ $RUN_ENVIR = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then - export COMIN=${COMIN:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT} - export COMOUT=${COMOUT:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT} - export COMIN_OBS=${COMIN_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/$RUN.$PDY/$cyc/$COMPONENT} - export COMIN_GES_OBS=${COMIN_GES_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/$GDUMP.$gPDY/$gcyc/$COMPONENT} +if [ ${RUN_ENVIR} = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then + export COMIN=${COMIN:-${ROTDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT}} + export COMOUT=${COMOUT:-${ROTDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT}} + export COMIN_OBS=${COMIN_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}} + export COMIN_GES_OBS=${COMIN_GES_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}} else - export COMOUT="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT" - export COMIN_OBS="$DMPDIR/$CDUMP.$PDY/$cyc/$COMPONENT" - export COMIN_GES_OBS="$DMPDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT" + export COMOUT="${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" + export COMIN_OBS="${DMPDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" + export COMIN_GES_OBS="${DMPDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" fi -mkdir -m 775 -p $COMOUT +mkdir -m 775 -p ${COMOUT} # COMIN_GES and COMIN_GES_ENS are used in script -export COMIN_GES="$ROTDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT" -export COMIN_GES_ENS="$ROTDIR/enkfgdas.$gPDY/$gcyc/$COMPONENT" +export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" +export COMIN_GES_ENS="${ROTDIR}/enkfgdas.${gPDY}/${gcyc}/${COMPONENT}" -export ATMGES="$COMIN_GES/${GPREFIX}atmf006${GSUFFIX}" -if [ ! -f $ATMGES ]; then - echo "FATAL ERROR: FILE MISSING: ATMGES = $ATMGES" +export ATMGES="${COMIN_GES}/${GPREFIX}atmf006${GSUFFIX}" +if [ ! -f ${ATMGES} ]; then + echo "FATAL ERROR: FILE MISSING: ATMGES = ${ATMGES}" exit 1 fi # Get LEVS if [ ${GSUFFIX} = ".nc" ]; then - export LEVS=$($NCLEN $ATMGES pfull) + export LEVS=$(${NCLEN} ${ATMGES} pfull) status=$? else - export LEVS=$($NEMSIOGET $ATMGES dimz | awk '{print $2}') + export LEVS=$(${NEMSIOGET} ${ATMGES} dimz | awk '{print $2}') status=$? fi -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} -if [ $DOHYBVAR = "YES" ]; then - export ATMGES_ENSMEAN="$COMIN_GES_ENS/${GPREFIX}atmf006.ensmean$GSUFFIX" - if [ ! -f $ATMGES_ENSMEAN ]; then - echo "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = $ATMGES_ENSMEAN" +if [ ${DOHYBVAR} = "YES" ]; then + export ATMGES_ENSMEAN="${COMIN_GES_ENS}/${GPREFIX}atmf006.ensmean${GSUFFIX}" + if [ ! -f ${ATMGES_ENSMEAN} ]; then + echo "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = ${ATMGES_ENSMEAN}" exit 2 fi fi @@ -119,46 +119,46 @@ fi # Link observational data export PREPQC="${COMIN_OBS}/${OPREFIX}prepbufr" -if [ ! -f $PREPQC ]; then - echo "WARNING: Global PREPBUFR FILE $PREPQC MISSING" +if [ ! -f ${PREPQC} ]; then + echo "WARNING: Global PREPBUFR FILE ${PREPQC} MISSING" fi export TCVITL="${COMOUT}/${OPREFIX}syndata.tcvitals.tm00" -if [[ $DONST = "YES" ]]; then - if [[ $MAKE_NSSTBUFR == "YES" ]]; then +if [[ ${DONST} = "YES" ]]; then + if [[ ${MAKE_NSSTBUFR} == "YES" ]]; then export NSSTBF="${COMOUT}/${OPREFIX}nsstbufr" else export NSSTBF="${COMIN_OBS}/${OPREFIX}nsstbufr" fi fi -if [[ $MAKE_ACFTBUFR == "YES" ]]; then +if [[ ${MAKE_ACFTBUFR} == "YES" ]]; then export PREPQCPF="${COMOUT}/${OPREFIX}prepbufr.acft_profiles" else export PREPQCPF="${COMIN_OBS}/${OPREFIX}prepbufr.acft_profiles" fi # Copy fix file for obsproc # TODO: Why is this necessary? -if [ $RUN = "gfs" ]; then - mkdir -p $ROTDIR/fix - cp $FIXgsi/prepobs_errtable.global $ROTDIR/fix/ +if [ ${RUN} = "gfs" ]; then + mkdir -p ${ROTDIR}/fix + cp ${FIXgsi}/prepobs_errtable.global ${ROTDIR}/fix/ fi ############################################################### # Run relevant script -${ANALYSISSH:-$SCRgfs/exglobal_atmos_analysis.sh} +${ANALYSISSH:-${SCRgfs}/exglobal_atmos_analysis.sh} status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## # Send Alerts ############################################## -if [ $SENDDBN = YES -a $RUN = gdas ] ; then - $DBNROOT/bin/dbn_alert MODEL GDAS_MSC_abias $job $COMOUT/${APREFIX}abias - $DBNROOT/bin/dbn_alert MODEL GDAS_MSC_abias_pc $job $COMOUT/${APREFIX}abias_pc - $DBNROOT/bin/dbn_alert MODEL GDAS_MSC_abias_air $job $COMOUT/${APREFIX}abias_air +if [ ${SENDDBN} = YES -a ${RUN} = gdas ] ; then + ${DBNROOT}/bin/dbn_alert MODEL GDAS_MSC_abias ${job} ${COMOUT}/${APREFIX}abias + ${DBNROOT}/bin/dbn_alert MODEL GDAS_MSC_abias_pc ${job} ${COMOUT}/${APREFIX}abias_pc + ${DBNROOT}/bin/dbn_alert MODEL GDAS_MSC_abias_air ${job} ${COMOUT}/${APREFIX}abias_air fi @@ -169,14 +169,14 @@ fi ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT +cd ${DATAROOT} [[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} diff --git a/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC b/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC index c8f7aa4809..bf90f1e5d7 100755 --- a/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC +++ b/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # Obtain unique process id (pid) and make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -29,22 +29,22 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base anal analcalc" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env analcalc +. ${HOMEgfs}/env/${machine}.env analcalc status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -60,56 +60,56 @@ export DO_CALC_ANALYSIS=${DO_CALC_ANALYSIS:-"YES"} # Begin JOB SPECIFIC work ############################################## -GDATE=$($NDATE -$assim_freq $CDATE) -gPDY=$(echo $GDATE | cut -c1-8) -gcyc=$(echo $GDATE | cut -c9-10) +GDATE=$(${NDATE} -${assim_freq} ${CDATE}) +gPDY=$(echo ${GDATE} | cut -c1-8) +gcyc=$(echo ${GDATE} | cut -c9-10) GDUMP=${GDUMP:-"gdas"} export OPREFIX="${CDUMP}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export APREFIX="${CDUMP}.t${cyc}z." -export GSUFFIX=${GSUFFIX:-$SUFFIX} -export ASUFFIX=${ASUFFIX:-$SUFFIX} +export GSUFFIX=${GSUFFIX:-${SUFFIX}} +export ASUFFIX=${ASUFFIX:-${SUFFIX}} -if [ $RUN_ENVIR = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then - export COMIN=${COMIN:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT} - export COMOUT=${COMOUT:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT} - export COMIN_OBS=${COMIN_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/$RUN.$PDY/$cyc/$COMPONENT} - export COMIN_GES_OBS=${COMIN_GES_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/$GDUMP.$gPDY/$gcyc/$COMPONENT} +if [ ${RUN_ENVIR} = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then + export COMIN=${COMIN:-${ROTDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT}} + export COMOUT=${COMOUT:-${ROTDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT}} + export COMIN_OBS=${COMIN_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}} + export COMIN_GES_OBS=${COMIN_GES_OBS:-$(compath.py ${envir}/obsproc/${obsproc_ver})/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}} else - export COMOUT="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT" - export COMIN_OBS="$DMPDIR/$CDUMP.$PDY/$cyc/$COMPONENT" - export COMIN_GES_OBS="$DMPDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT" + export COMOUT="${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" + export COMIN_OBS="${DMPDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" + export COMIN_GES_OBS="${DMPDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" fi -mkdir -m 775 -p $COMOUT +mkdir -m 775 -p ${COMOUT} # COMIN_GES and COMIN_GES_ENS are used in script -export COMIN_GES="$ROTDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT" -export COMIN_GES_ENS="$ROTDIR/enkfgdas.$gPDY/$gcyc/$COMPONENT" +export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" +export COMIN_GES_ENS="${ROTDIR}/enkfgdas.${gPDY}/${gcyc}/${COMPONENT}" -export ATMGES="$COMIN_GES/${GPREFIX}atmf006${GSUFFIX}" -if [ ! -f $ATMGES ]; then - echo "FATAL ERROR: FILE MISSING: ATMGES = $ATMGES" +export ATMGES="${COMIN_GES}/${GPREFIX}atmf006${GSUFFIX}" +if [ ! -f ${ATMGES} ]; then + echo "FATAL ERROR: FILE MISSING: ATMGES = ${ATMGES}" exit 1 fi # Get LEVS if [ ${GSUFFIX} = ".nc" ]; then - export LEVS=$($NCLEN $ATMGES pfull) + export LEVS=$(${NCLEN} ${ATMGES} pfull) status=$? else - export LEVS=$($NEMSIOGET $ATMGES dimz | awk '{print $2}') + export LEVS=$(${NEMSIOGET} ${ATMGES} dimz | awk '{print $2}') status=$? fi -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} -if [ $DOHYBVAR = "YES" ]; then - export ATMGES_ENSMEAN="$COMIN_GES_ENS/${GPREFIX}atmf006.ensmean$GSUFFIX" - if [ ! -f $ATMGES_ENSMEAN ]; then - echo "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = $ATMGES_ENSMEAN" +if [ ${DOHYBVAR} = "YES" ]; then + export ATMGES_ENSMEAN="${COMIN_GES_ENS}/${GPREFIX}atmf006.ensmean${GSUFFIX}" + if [ ! -f ${ATMGES_ENSMEAN} ]; then + echo "FATAL ERROR: FILE MISSING: ATMGES_ENSMEAN = ${ATMGES_ENSMEAN}" exit 2 fi fi @@ -122,9 +122,9 @@ export DOGAUSFCANL=${DOGAUSFCANL:-"YES"} ############################################################### # Run relevant script -${ANALCALCSH:-$SCRgfs/exglobal_atmos_analysis_calc.sh} +${ANALCALCSH:-${SCRgfs}/exglobal_atmos_analysis_calc.sh} status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -134,15 +134,15 @@ status=$? ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP b/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP index 18cc0ca893..6bdc52e317 100755 --- a/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP +++ b/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" export RUN_ENVIR=${RUN_ENVIR:-"nco"} @@ -8,12 +8,12 @@ export RUN_ENVIR=${RUN_ENVIR:-"nco"} # Source relevant config files ############################# configs="base" -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done @@ -22,8 +22,8 @@ done ############################################## export pid=${pid:-$$} export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -48,16 +48,16 @@ export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn} ############################################## CDATE=${CDATE:-${PDY}${cyc}} -GDATE=$($NDATE -06 $CDATE) -PDY_m6hrs=$(echo $GDATE | cut -c1-8) -cyc_m6hrs=$(echo $GDATE | cut -c9-10) +GDATE=$(${NDATE} -06 ${CDATE}) +PDY_m6hrs=$(echo ${GDATE} | cut -c1-8) +cyc_m6hrs=$(echo ${GDATE} | cut -c9-10) export cycle_m6hrs=t${cyc_m6hrs}z export COMPONENT="atmos" -export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/$COMPONENT} +export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/${COMPONENT}} -export COMINobsproc=${COMINobsproc:-$(compath.py ${envir}/obsproc/${obsproc_ver})/${RUN}.${PDY}/${cyc}/$COMPONENT} -export COMIN_m6hrs=${COMIN_m6hrs:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY_m6hrs}/${cyc_m6hrs}/$COMPONENT} +export COMINobsproc=${COMINobsproc:-$(compath.py ${envir}/obsproc/${obsproc_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}} +export COMIN_m6hrs=${COMIN_m6hrs:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY_m6hrs}/${cyc_m6hrs}/${COMPONENT}} export IMS_FILE=${COMINobsproc}/${RUN}.${cycle}.imssnow96.grib2 export FIVE_MIN_ICE_FILE=${COMINobsproc}/${RUN}.${cycle}.seaice.5min.grib2 @@ -71,9 +71,9 @@ export BLENDED_ICE_FILE_m6hrs=${BLENDED_ICE_FILE_m6hrs:-${COMIN_m6hrs}/${RUN}.${ # Run relevant script ############################################################### -${EMCSFCPREPSH:-$SCRgfs/exemcsfc_global_sfc_prep.sh} +${EMCSFCPREPSH:-${SCRgfs}/exemcsfc_global_sfc_prep.sh} status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## # End JOB SPECIFIC work @@ -83,14 +83,14 @@ status=$? # Final processing ############################################## if [ -e ${pgmout} ]; then - cat $pgmout + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGLOBAL_ATMOS_POST_MANAGER b/jobs/JGLOBAL_ATMOS_POST_MANAGER index 746190bd4b..b40120a2c4 100755 --- a/jobs/JGLOBAL_ATMOS_POST_MANAGER +++ b/jobs/JGLOBAL_ATMOS_POST_MANAGER @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" #################################### # make temp directories #################################### export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ########################################### @@ -33,22 +33,22 @@ export pgmout="OUTPUT.${pid}" ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base post" -for config in $configs; do - . $config_path/config.$config +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env post +. ${HOMEgfs}/env/${machine}.env post status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} #################################### @@ -68,23 +68,23 @@ export gfs_ver=${gfs_ver:-v15.0.0} # Specify Execution Areas #################################### export HOMEgfs=${HOMEgfs:-${PACKAGEROOT}/gfs.${gfs_ver}} -export EXECgfs=${HOMEgfs:-$HOMEgfs/exec} -export FIXgfs=${HOMEgfs:-$HOMEgfs/fix} -export PARMgfs=${HOMEgfs:-$HOMEgfs/parm} -export USHgfs=${HOMEgfs:-$HOMEgfs/ush} +export EXECgfs=${HOMEgfs:-${HOMEgfs}/exec} +export FIXgfs=${HOMEgfs:-${HOMEgfs}/fix} +export PARMgfs=${HOMEgfs:-${HOMEgfs}/parm} +export USHgfs=${HOMEgfs:-${HOMEgfs}/ush} ########################### # Set up EXT variable ########################### export EXT_FCST=NO -export ROTDIR=${ROTDIR:-${COMROOT:?}/$NET/$envir} -export COMIN=${COMIN:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT} -export COMOUT=${COMOUT:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT} +export ROTDIR=${ROTDIR:-${COMROOT:?}/${NET}/${envir}} +export COMIN=${COMIN:-${ROTDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT=${COMOUT:-${ROTDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT}} ######################################################## # Execute the script. -$HOMEgfs/scripts/exglobal_atmos_pmgr.sh +${HOMEgfs}/scripts/exglobal_atmos_pmgr.sh ######################################################## diff --git a/jobs/JGLOBAL_ATMOS_SFCANL b/jobs/JGLOBAL_ATMOS_SFCANL index 359dd05ecc..5466bb685e 100755 --- a/jobs/JGLOBAL_ATMOS_SFCANL +++ b/jobs/JGLOBAL_ATMOS_SFCANL @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # Obtain unique process id (pid) and make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -29,21 +29,21 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base sfcanl" -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env sfcanl +. ${HOMEgfs}/env/${machine}.env sfcanl status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -52,8 +52,8 @@ status=$? export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gfs"}} export COMPONENT="atmos" -if [ $RUN_ENVIR = "nco" ]; then - export ROTDIR=${COMROOT:?}/$NET/$envir +if [ ${RUN_ENVIR} = "nco" ]; then + export ROTDIR=${COMROOT:?}/${NET}/${envir} fi @@ -61,37 +61,37 @@ fi # Begin JOB SPECIFIC work ############################################## -GDATE=$($NDATE -$assim_freq $CDATE) -gPDY=$(echo $GDATE | cut -c1-8) -gcyc=$(echo $GDATE | cut -c9-10) +GDATE=$(${NDATE} -${assim_freq} ${CDATE}) +gPDY=$(echo ${GDATE} | cut -c1-8) +gcyc=$(echo ${GDATE} | cut -c9-10) GDUMP=${GDUMP:-"gdas"} export OPREFIX="${CDUMP}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export APREFIX="${CDUMP}.t${cyc}z." -export GSUFFIX=${GSUFFIX:-$SUFFIX} -export ASUFFIX=${ASUFFIX:-$SUFFIX} +export GSUFFIX=${GSUFFIX:-${SUFFIX}} +export ASUFFIX=${ASUFFIX:-${SUFFIX}} -if [ $RUN_ENVIR = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then - export COMIN=${COMIN:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT} - export COMOUT=${COMOUT:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT} - export COMIN_OBS=${COMIN_OBS:-$ROTDIR/$RUN.$PDY/$cyc/$COMPONENT} - export COMIN_GES_OBS=${COMIN_GES_OBS:-$ROTDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT} +if [ ${RUN_ENVIR} = "nco" -o ${ROTDIR_DUMP:-NO} = "YES" ]; then + export COMIN=${COMIN:-${ROTDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT}} + export COMOUT=${COMOUT:-${ROTDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT}} + export COMIN_OBS=${COMIN_OBS:-${ROTDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT}} + export COMIN_GES_OBS=${COMIN_GES_OBS:-${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}} else - export COMOUT="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT" - export COMIN_OBS="$DMPDIR/$CDATE/$CDUMP" - export COMIN_GES_OBS="$DMPDIR/$GDATE/$GDUMP" + export COMOUT="${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" + export COMIN_OBS="${DMPDIR}/${CDATE}/${CDUMP}" + export COMIN_GES_OBS="${DMPDIR}/${GDATE}/${GDUMP}" fi -mkdir -m 775 -p $COMOUT +mkdir -m 775 -p ${COMOUT} # COMIN_GES and COMIN_GES_ENS are used in script -export COMIN_GES="$ROTDIR/$GDUMP.$gPDY/$gcyc/$COMPONENT" -export COMIN_GES_ENS="$ROTDIR/enkfgdas.$gPDY/$gcyc/$COMPONENT" +export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" +export COMIN_GES_ENS="${ROTDIR}/enkfgdas.${gPDY}/${gcyc}/${COMPONENT}" -export ATMGES="$COMIN_GES/${GPREFIX}atmf006${GSUFFIX}" -if [ ! -f $ATMGES ]; then - echo "FATAL ERROR: FILE MISSING: ATMGES = $ATMGES" +export ATMGES="${COMIN_GES}/${GPREFIX}atmf006${GSUFFIX}" +if [ ! -f ${ATMGES} ]; then + echo "FATAL ERROR: FILE MISSING: ATMGES = ${ATMGES}" exit 1 fi @@ -99,9 +99,9 @@ fi ############################################################### # Run relevant script -${SFCANALSH:-$SCRgfs/exglobal_atmos_sfcanl.sh} +${SFCANALSH:-${SCRgfs}/exglobal_atmos_sfcanl.sh} status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -111,15 +111,15 @@ status=$? ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC b/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC index b04aa589b3..4029155bc9 100755 --- a/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC +++ b/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" export RUN_ENVIR=${RUN_ENVIR:-"nco"} @@ -8,21 +8,21 @@ export RUN_ENVIR=${RUN_ENVIR:-"nco"} # Source relevant config files ############################# configs="base prep" -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} -for config in $configs; do - . $config_path/config.$config +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env prep +. ${HOMEgfs}/env/${machine}.env prep status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -30,8 +30,8 @@ status=$? ############################################## export pid=${pid:-$$} export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -66,7 +66,7 @@ export DO_RELOCATE=${DO_RELOCATE:-NO} # Turn on tropical cyclone reloc export tmmark=tm00 export ARCHSYND=${ROTDIR}/syndat # this location is unique, do not change -if [ ! -d ${ARCHSYND} ]; then mkdir -p $ARCHSYND; fi +if [ ! -d ${ARCHSYND} ]; then mkdir -p ${ARCHSYND}; fi export HOMENHC=${HOMENHC:-/lfs/h1/ops/prod/dcom/nhc/atcf/ncep} @@ -75,13 +75,13 @@ export TANK_TROPCY=${TANK_TROPCY:-${DCOMROOT}} # path to tropical cyclone reco ############################################## # Define COM directories ############################################## -export COMIN=${ROTDIR}/${RUN}.${PDY}/${cyc}/$COMPONENT -export COMOUT=${ROTDIR}/${RUN}.${PDY}/${cyc}/$COMPONENT -if [ ! -d ${COMOUT} ]; then mkdir -p $COMOUT; fi +export COMIN=${ROTDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT} +export COMOUT=${ROTDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT} +if [ ! -d ${COMOUT} ]; then mkdir -p ${COMOUT}; fi #export COMINgdas=${ROTDIR}/gdas.${PDY}/${cyc} #export COMINgfs=${ROTDIR}/gfs.${PDY}/${cyc} -export CRES=$(echo $CASE | cut -c2-) +export CRES=$(echo ${CASE} | cut -c2-) export LATB=$((CRES*2)) export LONB=$((CRES*4)) export BKGFREQ=1 # for hourly relocation @@ -91,23 +91,23 @@ export BKGFREQ=1 # for hourly relocation # Run relevant script ############################################## -${TROPCYQCRELOSH:-$SCRgfs/exglobal_atmos_tropcy_qc_reloc.sh} +${TROPCYQCRELOSH:-${SCRgfs}/exglobal_atmos_tropcy_qc_reloc.sh} status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGLOBAL_FORECAST b/jobs/JGLOBAL_FORECAST index e8c0957c75..3b50052200 100755 --- a/jobs/JGLOBAL_FORECAST +++ b/jobs/JGLOBAL_FORECAST @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -29,23 +29,23 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base fcst" [[ ${DO_WAVE:-"NO"} = "YES" ]] && configs+=" wave" -for config in $configs; do - . $config_path/config.$config +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env fcst +. ${HOMEgfs}/env/${machine}.env fcst status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -64,15 +64,15 @@ fi ############################################## # Restart conditions for GFS cycle come from GDAS -rCDUMP=$CDUMP -[[ $CDUMP = "gfs" ]] && export rCDUMP="gdas" +rCDUMP=${CDUMP} +[[ ${CDUMP} = "gfs" ]] && export rCDUMP="gdas" # Forecast length for GFS forecast -if [ $CDUMP = "gfs" ]; then - export FHMAX=$FHMAX_GFS - export FHOUT=$FHOUT_GFS - export FHMAX_HF=$FHMAX_HF_GFS - export FHOUT_HF=$FHOUT_HF_GFS +if [ ${CDUMP} = "gfs" ]; then + export FHMAX=${FHMAX_GFS} + export FHOUT=${FHOUT_GFS} + export FHMAX_HF=${FHMAX_HF_GFS} + export FHOUT_HF=${FHOUT_HF_GFS} else export FHMAX_HF=0 export FHOUT_HF=0 @@ -82,9 +82,9 @@ fi ############################################################### # Run relevant exglobal script -${FORECASTSH:-$SCRgfs/exglobal_forecast.sh} +${FORECASTSH:-${SCRgfs}/exglobal_forecast.sh} status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -94,15 +94,15 @@ status=$? ############################################## # Final processing ############################################## -if [ -e "$pgmout" ] ; then - cat $pgmout +if [ -e "${pgmout}" ] ; then + cat ${pgmout} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGLOBAL_WAVE_GEMPAK b/jobs/JGLOBAL_WAVE_GEMPAK index 305da14bc3..76cc44ec1a 100755 --- a/jobs/JGLOBAL_WAVE_GEMPAK +++ b/jobs/JGLOBAL_WAVE_GEMPAK @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -36,8 +36,8 @@ export errchk=${errchk:-err_chk} ################################### # Set COM Paths -export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/$COMPONENT} -export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/$COMPONENT/gempak} +export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/${COMPONENT}/gempak} #export pid=$$ export pgmout="OUTPUT.$$" @@ -47,8 +47,8 @@ export SENDDBN=${SENDDBN:-YES} export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn} -if [ $SENDCOM = YES ] ; then - mkdir -m 775 -p $COMOUT +if [ ${SENDCOM} = YES ] ; then + mkdir -m 775 -p ${COMOUT} fi @@ -56,13 +56,13 @@ fi # Execute the script. ${HOMEgfs}/scripts/exgfs_wave_nawips.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ################################### # Remove temp directories -cd $DATAROOT -if [ "$KEEPDATA" != "YES" ]; then - rm -rf $DATA +cd ${DATAROOT} +if [ "${KEEPDATA}" != "YES" ]; then + rm -rf ${DATA} fi diff --git a/jobs/JGLOBAL_WAVE_INIT b/jobs/JGLOBAL_WAVE_INIT index 0e041c74af..856778385a 100755 --- a/jobs/JGLOBAL_WAVE_INIT +++ b/jobs/JGLOBAL_WAVE_INIT @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -29,21 +29,21 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base wave waveinit" -for config in $configs; do - . $config_path/config.$config +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env waveinit +. ${HOMEgfs}/env/${machine}.env waveinit status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} # PATH for working directory export NET=${NET:-gfs} @@ -56,18 +56,18 @@ export errchk=${errchk:-err_chk} export MP_PULSE=0 # Path to HOME Directory -export FIXwave=${FIXwave:-$HOMEgfs/fix/fix_wave_${NET}} -export PARMwave=${PARMwave:-$HOMEgfs/parm/wave} -export USHwave=${USHwave:-$HOMEgfs/ush} -export EXECwave=${EXECwave:-$HOMEgfs/exec} +export FIXwave=${FIXwave:-${HOMEgfs}/fix/fix_wave_${NET}} +export PARMwave=${PARMwave:-${HOMEgfs}/parm/wave} +export USHwave=${USHwave:-${HOMEgfs}/ush} +export EXECwave=${EXECwave:-${HOMEgfs}/exec} # Set COM Paths and GETGES environment -export COMIN=${COMIN:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/$COMPONENT} -export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/$COMPONENT} -[[ ! -d $COMOUT ]] && mkdir -m 775 -p $COMOUT +export COMIN=${COMIN:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} +[[ ! -d ${COMOUT} ]] && mkdir -m 775 -p ${COMOUT} -if [ $SENDCOM = YES ]; then - mkdir -p $COMOUT/rundata +if [ ${SENDCOM} = YES ]; then + mkdir -p ${COMOUT}/rundata fi # Set mpi serial command @@ -75,13 +75,13 @@ export wavempexec=${wavempexec:-"mpirun -n"} export wave_mpmd=${mpmd:-"cfp"} # Execute the Script -$HOMEgfs/scripts/exgfs_wave_init.sh +${HOMEgfs}/scripts/exgfs_wave_init.sh ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGLOBAL_WAVE_POST_BNDPNT b/jobs/JGLOBAL_WAVE_POST_BNDPNT index d4aa6f093e..95c755972e 100755 --- a/jobs/JGLOBAL_WAVE_POST_BNDPNT +++ b/jobs/JGLOBAL_WAVE_POST_BNDPNT @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -29,48 +29,48 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base wave wavepostsbs wavepostbndpnt" -for config in $configs; do - . $config_path/config.$config +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env wavepostbndpnt +. ${HOMEgfs}/env/${machine}.env wavepostbndpnt status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} # PATH for working directory export NET=${NET:-gfs} export RUN=${RUN:-gfs} export COMPONENT="wave" -export HOMEgefs=${HOMEgefs:-$PACKAGEROOT/$NET.${gefs_ver}} -export HOMEgfs=${HOMEgfs:-$PACKAGEROOT/$NET.${gfs_ver}} +export HOMEgefs=${HOMEgefs:-${PACKAGEROOT}/${NET}.${gefs_ver}} +export HOMEgfs=${HOMEgfs:-${PACKAGEROOT}/${NET}.${gfs_ver}} # Add default errchk = err_chk export errchk=${errchk:-err_chk} -export CDATE=$PDY$cyc +export CDATE=${PDY}${cyc} export MP_PULSE=0 # Path to HOME Directory -export FIXwave=${FIXwave:-$HOMEgfs/fix/fix_wave_${NET}} -export PARMwave=${PARMwave:-$HOMEgfs/parm/wave} -export USHwave=${USHwave:-$HOMEgfs/ush} -export EXECwave=${EXECwave:-$HOMEgfs/exec} +export FIXwave=${FIXwave:-${HOMEgfs}/fix/fix_wave_${NET}} +export PARMwave=${PARMwave:-${HOMEgfs}/parm/wave} +export USHwave=${USHwave:-${HOMEgfs}/ush} +export EXECwave=${EXECwave:-${HOMEgfs}/exec} # Set COM Paths and GETGES environment -export COMIN=${COMIN:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/$COMPONENT} -export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/$COMPONENT} +export COMIN=${COMIN:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} -mkdir -p $COMOUT/station +mkdir -p ${COMOUT}/station # Set wave model ID tag to include member number @@ -83,15 +83,15 @@ export WAV_MOD_TAG=${CDUMP}wave${waveMEMB} export CFP_VERBOSE=1 export FHMAX_WAV_PNT=180 -if [ $FHMAX_WAV -lt $FHMAX_WAV_PNT ] ; then export FHMAX_WAV_IBP=$FHMAX_WAV ; fi +if [ ${FHMAX_WAV} -lt ${FHMAX_WAV_PNT} ] ; then export FHMAX_WAV_IBP=${FHMAX_WAV} ; fi export DOSPC_WAV='YES' # Spectral post export DOBLL_WAV='NO' # Bulletin post export DOBNDPNT_WAV='YES' #not boundary points # Execute the Script -$HOMEgfs/scripts/exgfs_wave_post_pnt.sh +${HOMEgfs}/scripts/exgfs_wave_post_pnt.sh err=$? -if [ $err -ne 0 ]; then +if [ ${err} -ne 0 ]; then echo "FATAL ERROR: ex-script of GWES_POST failed!" exit ${err} fi @@ -99,8 +99,8 @@ fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL b/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL index a0de082255..c0a9c67c4c 100755 --- a/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL +++ b/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -29,48 +29,48 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base wave wavepostsbs wavepostbndpntbll" -for config in $configs; do - . $config_path/config.$config +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env wavepostbndpntbll +. ${HOMEgfs}/env/${machine}.env wavepostbndpntbll status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} # PATH for working directory export NET=${NET:-gfs} export RUN=${RUN:-gfs} export COMPONENT="wave" -export HOMEgefs=${HOMEgefs:-$PACKAGEROOT/$NET.${gefs_ver}} +export HOMEgefs=${HOMEgefs:-${PACKAGEROOT}/${NET}.${gefs_ver}} # Add default errchk = err_chk export errchk=${errchk:-err_chk} -export CDATE=$PDY$cyc +export CDATE=${PDY}${cyc} export MP_PULSE=0 # Path to HOME Directory -export FIXwave=${FIXwave:-$HOMEgfs/fix/fix_wave_${NET}} -export PARMwave=${PARMwave:-$HOMEgfs/parm/wave} -export USHwave=${USHwave:-$HOMEgfs/ush} -export EXECwave=${EXECwave:-$HOMEgfs/exec} +export FIXwave=${FIXwave:-${HOMEgfs}/fix/fix_wave_${NET}} +export PARMwave=${PARMwave:-${HOMEgfs}/parm/wave} +export USHwave=${USHwave:-${HOMEgfs}/ush} +export EXECwave=${EXECwave:-${HOMEgfs}/exec} # Set COM Paths and GETGES environment -export COMIN=${COMIN:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/$COMPONENT} -export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/$COMPONENT} +export COMIN=${COMIN:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} -mkdir -p $COMOUT/station +mkdir -p ${COMOUT}/station # Set wave model ID tag to include member number @@ -85,15 +85,15 @@ export WAV_MOD_TAG=${CDUMP}wave${waveMEMB} export CFP_VERBOSE=1 export FHMAX_WAV_PNT=180 -if [ $FHMAX_WAV -lt $FHMAX_WAV_PNT ] ; then export FHMAX_WAV_IBP=$FHMAX_WAV ; fi +if [ ${FHMAX_WAV} -lt ${FHMAX_WAV_PNT} ] ; then export FHMAX_WAV_IBP=${FHMAX_WAV} ; fi export DOSPC_WAV='NO' # Spectral post export DOBLL_WAV='YES' # Bulletin post export DOBNDPNT_WAV='YES' #boundary points # Execute the Script -$HOMEgfs/scripts/exgfs_wave_post_pnt.sh +${HOMEgfs}/scripts/exgfs_wave_post_pnt.sh err=$? -if [ $err -ne 0 ]; then +if [ ${err} -ne 0 ]; then echo "FATAL ERROR: ex-script of GFS_WAVE_POST_PNT failed!" exit ${err} fi @@ -101,8 +101,8 @@ fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGLOBAL_WAVE_POST_PNT b/jobs/JGLOBAL_WAVE_POST_PNT index 0a1fae9813..5632092c02 100755 --- a/jobs/JGLOBAL_WAVE_POST_PNT +++ b/jobs/JGLOBAL_WAVE_POST_PNT @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -29,47 +29,47 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} config_path=${EXPDIR:-${PACKAGEROOT:-}/gfs.${gfs_ver}/parm/config} configs="base wave wavepostsbs wavepostpnt" -for config in $configs; do - . $config_path/config.$config +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env wavepostpnt +. ${HOMEgfs}/env/${machine}.env wavepostpnt status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} # PATH for working directory export NET=${NET:-gfs} export RUN=${RUN:-gfs} export COMPONENT="wave" -export HOMEgefs=${HOMEgefs:-${PACKAGEROOT:-}/$NET.${gefs_ver:-}} +export HOMEgefs=${HOMEgefs:-${PACKAGEROOT:-}/${NET}.${gefs_ver:-}} # Add default errchk = err_chk export errchk=${errchk:-err_chk} -export CDATE=$PDY$cyc +export CDATE=${PDY}${cyc} export MP_PULSE=0 # Path to HOME Directory -export FIXwave=${FIXwave:-$HOMEgfs/fix/fix_wave_${NET}} -export PARMwave=${PARMwave:-$HOMEgfs/parm/wave} -export USHwave=${USHwave:-$HOMEgfs/ush} -export EXECwave=${EXECwave:-$HOMEgfs/exec} +export FIXwave=${FIXwave:-${HOMEgfs}/fix/fix_wave_${NET}} +export PARMwave=${PARMwave:-${HOMEgfs}/parm/wave} +export USHwave=${USHwave:-${HOMEgfs}/ush} +export EXECwave=${EXECwave:-${HOMEgfs}/exec} # Set COM Paths and GETGES environment -export COMIN=${COMIN:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/$COMPONENT} -export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/$COMPONENT} +export COMIN=${COMIN:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} -mkdir -p $COMOUT/station +mkdir -p ${COMOUT}/station # Set wave model ID tag to include member number @@ -90,9 +90,9 @@ export DOBNDPNT_WAV='NO' #not boundary points # Execute the Script -$HOMEgfs/scripts/exgfs_wave_post_pnt.sh +${HOMEgfs}/scripts/exgfs_wave_post_pnt.sh err=$? -if [ $err -ne 0 ]; then +if [ ${err} -ne 0 ]; then echo "FATAL ERROR: ex-script of GWES_POST failed!" exir ${err} fi @@ -100,8 +100,8 @@ fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGLOBAL_WAVE_POST_SBS b/jobs/JGLOBAL_WAVE_POST_SBS index 37131930c6..d1d3392ca5 100755 --- a/jobs/JGLOBAL_WAVE_POST_SBS +++ b/jobs/JGLOBAL_WAVE_POST_SBS @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -29,51 +29,51 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} config_path=${EXPDIR:-${PACKAGEROOT:-}/gfs.${gfs_ver}/parm/config} configs="base wave wavepostsbs" -for config in $configs; do - . $config_path/config.$config +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env wavepostsbs +. ${HOMEgfs}/env/${machine}.env wavepostsbs status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} # PATH for working directory export NET=${NET:-gfs} export RUN=${RUN:-gfs} export COMPONENT="wave" -export HOMEgefs=${HOMEgefs:-${PACKAGEROOT:-}/$NET.${gefs_ver:-}} +export HOMEgefs=${HOMEgefs:-${PACKAGEROOT:-}/${NET}.${gefs_ver:-}} # Add default errchk = err_chk export errchk=${errchk:-err_chk} -export CDATE=$PDY$cyc +export CDATE=${PDY}${cyc} export MP_PULSE=0 # Path to HOME Directory -export FIXwave=${FIXwave:-$HOMEgfs/fix/fix_wave_${NET}} -export PARMwave=${PARMwave:-$HOMEgfs/parm/wave} -export USHwave=${USHwave:-$HOMEgfs/ush} -export EXECwave=${EXECwave:-$HOMEgfs/exec} +export FIXwave=${FIXwave:-${HOMEgfs}/fix/fix_wave_${NET}} +export PARMwave=${PARMwave:-${HOMEgfs}/parm/wave} +export USHwave=${USHwave:-${HOMEgfs}/ush} +export EXECwave=${EXECwave:-${HOMEgfs}/exec} # Set COM Paths and GETGES environment -export COMIN=${COMIN:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/$COMPONENT} -export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/$COMPONENT} +export COMIN=${COMIN:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} export COMINice=${COMINice:-${COMROOTp2:-${COMROOT}}/omb/prod} export COMINwnd=${COMINwnd:-${COMROOT}/gfs/prod} export COMIN_WAV_CUR=${COMIN_WAV_CUR:-$(compath.py ${envir}/rtofs/${rtofs_ver})} -mkdir -p $COMOUT/gridded +mkdir -p ${COMOUT}/gridded # Set wave model ID tag to include member number @@ -88,18 +88,18 @@ export WAV_MOD_TAG=${CDUMP}wave${waveMEMB} export CFP_VERBOSE=1 # Execute the Script -$HOMEgfs/scripts/exgfs_wave_post_gridded_sbs.sh +${HOMEgfs}/scripts/exgfs_wave_post_gridded_sbs.sh err=$? -if [ $err -ne 0 ]; then +if [ ${err} -ne 0 ]; then echo "FATAL ERROR: ex-script of GWES_POST failed!" - exit $err + exit ${err} fi ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/JGLOBAL_WAVE_PRDGEN_BULLS b/jobs/JGLOBAL_WAVE_PRDGEN_BULLS index b24055d2f7..d52a85ce46 100755 --- a/jobs/JGLOBAL_WAVE_PRDGEN_BULLS +++ b/jobs/JGLOBAL_WAVE_PRDGEN_BULLS @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -35,8 +35,8 @@ export errchk=${errchk:-err_chk} ################################### # Set COM Paths -export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/$COMPONENT} -export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/$COMPONENT} +export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/${COMPONENT}} export PCOM=${PCOM:-${COMOUT}/wmo} export SENDCOM=${SENDCOM:-YES} @@ -45,23 +45,23 @@ export SENDDBN=${SENDDBN:-NO} export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn} -if [ $SENDCOM = YES ]; then - mkdir -p $COMOUT $PCOM +if [ ${SENDCOM} = YES ]; then + mkdir -p ${COMOUT} ${PCOM} fi ################################### # Execute the Script -$HOMEgfs/scripts/exgfs_wave_prdgen_bulls.sh +${HOMEgfs}/scripts/exgfs_wave_prdgen_bulls.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ################################### # Remove temp directories -cd $DATAROOT -if [ "$KEEPDATA" != "YES" ]; then - rm -rf $DATA +cd ${DATAROOT} +if [ "${KEEPDATA}" != "YES" ]; then + rm -rf ${DATA} fi diff --git a/jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED b/jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED index 2fb1c58174..5374d31648 100755 --- a/jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED +++ b/jobs/JGLOBAL_WAVE_PRDGEN_GRIDDED @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -37,8 +37,8 @@ export errchk=${errchk:-err_chk} ################################### # Set COM Paths ################################### -export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/$COMPONENT} -export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/$COMPONENT} +export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${gfs_ver})/${RUN}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${gfs_ver}/${RUN}.${PDY})/${cyc}/${COMPONENT}} export PCOM=${PCOM:-${COMOUT}/wmo} export SENDCOM=${SENDCOM:-YES} @@ -46,23 +46,23 @@ export SENDDBN_NTC=${SENDDBN_NTC:-YES} export SENDDBN=${SENDDBN:-NO} export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn} -if [ $SENDCOM = YES ]; then - mkdir -p $COMOUT $PCOM +if [ ${SENDCOM} = YES ]; then + mkdir -p ${COMOUT} ${PCOM} fi ################################### # Execute the Script ################################### -$HOMEgfs/scripts/exgfs_wave_prdgen_gridded.sh +${HOMEgfs}/scripts/exgfs_wave_prdgen_gridded.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ################################### # Remove temp directories ################################### -cd $DATAROOT -if [ "$KEEPDATA" != "YES" ]; then - rm -rf $DATA +cd ${DATAROOT} +if [ "${KEEPDATA}" != "YES" ]; then + rm -rf ${DATA} fi diff --git a/jobs/JGLOBAL_WAVE_PREP b/jobs/JGLOBAL_WAVE_PREP index bac83135a2..9b7720fbbf 100755 --- a/jobs/JGLOBAL_WAVE_PREP +++ b/jobs/JGLOBAL_WAVE_PREP @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################## # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -29,21 +29,21 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base wave waveprep" -for config in $configs; do - . $config_path/config.$config +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env waveprep +. ${HOMEgfs}/env/${machine}.env waveprep status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} # PATH for working directory export NET=${NET:-gfs} @@ -54,7 +54,7 @@ export COMPONENT="wave" export errchk=${errchk:-err_chk} # Set rtofs PDY -export RPDY=$PDY +export RPDY=${PDY} export MP_PULSE=0 @@ -62,47 +62,47 @@ export MP_PULSE=0 export CDO=${CDO_ROOT}/bin/cdo # Path to HOME Directory -export FIXwave=${FIXwave:-$HOMEgfs/fix/fix_wave_${NET}} -export PARMwave=${PARMwave:-$HOMEgfs/parm/wave} -export USHwave=${USHwave:-$HOMEgfs/ush} -export EXECwave=${EXECwave:-$HOMEgfs/exec} +export FIXwave=${FIXwave:-${HOMEgfs}/fix/fix_wave_${NET}} +export PARMwave=${PARMwave:-${HOMEgfs}/parm/wave} +export USHwave=${USHwave:-${HOMEgfs}/ush} +export EXECwave=${EXECwave:-${HOMEgfs}/exec} # Set COM Paths and GETGES environment -export COMIN=${COMIN:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/$COMPONENT} -export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/$COMPONENT} -[[ ! -d $COMOUT ]] && mkdir -m 775 -p $COMOUT +export COMIN=${COMIN:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} +[[ ! -d ${COMOUT} ]] && mkdir -m 775 -p ${COMOUT} -if [ $RUN_ENVIR = "nco" ]; then +if [ ${RUN_ENVIR} = "nco" ]; then export COMIN_WAV_ICE=${COMIN_WAV_ICE:-$(compath.py ${envir}/obsproc/${obsproc_ver})}/${CDUMP}.${PDY}/${cyc}/atmos export COMIN_WAV_RTOFS=${COMIN_WAV_RTOFS:-$(compath.py ${envir}/${WAVECUR_DID}/${rtofs_ver})} else - if [ $WW3CURINP = "YES" ]; then - if [ ! -d $DMPDIR/${WAVECUR_DID}.${RPDY} ]; then export RPDY=$($NDATE -24 ${PDY}00 | cut -c1-8); fi - if [ ! -L $ROTDIR/${WAVECUR_DID}.${RPDY} ]; then # Check if symlink already exists in ROTDIR - $NLN $DMPDIR/${WAVECUR_DID}.${RPDY} $ROTDIR/${WAVECUR_DID}.${RPDY} + if [ ${WW3CURINP} = "YES" ]; then + if [ ! -d ${DMPDIR}/${WAVECUR_DID}.${RPDY} ]; then export RPDY=$(${NDATE} -24 ${PDY}00 | cut -c1-8); fi + if [ ! -L ${ROTDIR}/${WAVECUR_DID}.${RPDY} ]; then # Check if symlink already exists in ROTDIR + ${NLN} ${DMPDIR}/${WAVECUR_DID}.${RPDY} ${ROTDIR}/${WAVECUR_DID}.${RPDY} fi - BRPDY=$($NDATE -24 ${RPDY}00 | cut -c1-8) - if [ ! -L $ROTDIR/${WAVECUR_DID}.${BRPDY} ]; then # Check if symlink already exists in ROTDIR - $NLN $DMPDIR/${WAVECUR_DID}.${BRPDY} $ROTDIR/${WAVECUR_DID}.${BRPDY} + BRPDY=$(${NDATE} -24 ${RPDY}00 | cut -c1-8) + if [ ! -L ${ROTDIR}/${WAVECUR_DID}.${BRPDY} ]; then # Check if symlink already exists in ROTDIR + ${NLN} ${DMPDIR}/${WAVECUR_DID}.${BRPDY} ${ROTDIR}/${WAVECUR_DID}.${BRPDY} fi - export COMIN_WAV_RTOFS=${COMIN_WAV_RTOFS:-$ROTDIR} + export COMIN_WAV_RTOFS=${COMIN_WAV_RTOFS:-${ROTDIR}} fi - if [ $WW3ICEINP = "YES" ]; then - if [ ! -L $ROTDIR/${CDUMP}.${PDY}/${cyc}/atmos/${WAVICEFILE} ]; then # Check if symlink already exists in ROTDIR - $NLN $DMPDIR/$CDUMP.${PDY}/$cyc/atmos/${WAVICEFILE} $ROTDIR/$CDUMP.${PDY}/$cyc/atmos/${WAVICEFILE} + if [ ${WW3ICEINP} = "YES" ]; then + if [ ! -L ${ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos/${WAVICEFILE} ]; then # Check if symlink already exists in ROTDIR + ${NLN} ${DMPDIR}/${CDUMP}.${PDY}/${cyc}/atmos/${WAVICEFILE} ${ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos/${WAVICEFILE} fi - export COMIN_WAV_ICE=${COMIN_WAV_ICE:-$ROTDIR/$RUN.$PDY/$cyc/atmos} + export COMIN_WAV_ICE=${COMIN_WAV_ICE:-${ROTDIR}/${RUN}.${PDY}/${cyc}/atmos} fi fi # Execute the Script -$HOMEgfs/scripts/exgfs_wave_prep.sh +${HOMEgfs}/scripts/exgfs_wave_prep.sh ########################################## # Remove the Temporary working directory ########################################## -cd $DATAROOT -[[ $KEEPDATA = "NO" ]] && rm -rf $DATA +cd ${DATAROOT} +[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA} exit 0 diff --git a/jobs/rocoto/anal.sh b/jobs/rocoto/anal.sh index be50a547e3..d99152ef19 100755 --- a/jobs/rocoto/anal.sh +++ b/jobs/rocoto/anal.sh @@ -1,19 +1,19 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### # Source FV3GFS workflow modules -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="anal" export jobid="${job}.$$" ############################################################### # Execute the JJOB -$HOMEgfs/jobs/JGLOBAL_ATMOS_ANALYSIS +${HOMEgfs}/jobs/JGLOBAL_ATMOS_ANALYSIS status=$? diff --git a/jobs/rocoto/analcalc.sh b/jobs/rocoto/analcalc.sh index 5e5bf2fc73..2e669b0163 100755 --- a/jobs/rocoto/analcalc.sh +++ b/jobs/rocoto/analcalc.sh @@ -1,20 +1,20 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### # Source FV3GFS workflow modules -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="analcalc" export jobid="${job}.$$" ############################################################### # Execute the JJOB -$HOMEgfs/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC +${HOMEgfs}/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC status=$? -exit $status +exit ${status} diff --git a/jobs/rocoto/analdiag.sh b/jobs/rocoto/analdiag.sh index 442251db2d..cd6e1113f0 100755 --- a/jobs/rocoto/analdiag.sh +++ b/jobs/rocoto/analdiag.sh @@ -1,20 +1,20 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### # Source FV3GFS workflow modules -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="analdiag" export jobid="${job}.$$" ############################################################### # Execute the JJOB -$HOMEgfs/jobs/JGDAS_ATMOS_ANALYSIS_DIAG +${HOMEgfs}/jobs/JGDAS_ATMOS_ANALYSIS_DIAG status=$? -exit $status +exit ${status} diff --git a/jobs/rocoto/atmanalpost.sh b/jobs/rocoto/atmanalpost.sh index dca1010f3b..71ace70c8b 100755 --- a/jobs/rocoto/atmanalpost.sh +++ b/jobs/rocoto/atmanalpost.sh @@ -1,20 +1,20 @@ #! /usr/bin/env bash export STRICT="NO" -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" export STRICT="YES" ############################################################### # Source UFSDA workflow modules -. $HOMEgfs/ush/load_ufsda_modules.sh +. ${HOMEgfs}/ush/load_ufsda_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="atmanalpost" export jobid="${job}.$$" ############################################################### # Execute the JJOB -$HOMEgfs/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST +${HOMEgfs}/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST status=$? -exit $status +exit ${status} diff --git a/jobs/rocoto/atmanalprep.sh b/jobs/rocoto/atmanalprep.sh index c50035b6eb..d5b729194a 100755 --- a/jobs/rocoto/atmanalprep.sh +++ b/jobs/rocoto/atmanalprep.sh @@ -1,20 +1,20 @@ #! /usr/bin/env bash export STRICT="NO" -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" export STRICT="YES" ############################################################### # Source UFSDA workflow modules -. $HOMEgfs/ush/load_ufsda_modules.sh +. ${HOMEgfs}/ush/load_ufsda_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="atmanalprep" export jobid="${job}.$$" ############################################################### # Execute the JJOB -$HOMEgfs/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP +${HOMEgfs}/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP status=$? -exit $status +exit ${status} diff --git a/jobs/rocoto/atmanalrun.sh b/jobs/rocoto/atmanalrun.sh index 8f6a580a98..63aa08c184 100755 --- a/jobs/rocoto/atmanalrun.sh +++ b/jobs/rocoto/atmanalrun.sh @@ -1,20 +1,20 @@ #! /usr/bin/env bash export STRICT="NO" -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" export STRICT="YES" ############################################################### # Source UFSDA workflow modules -. $HOMEgfs/ush/load_ufsda_modules.sh +. ${HOMEgfs}/ush/load_ufsda_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="atmanalrun" export jobid="${job}.$$" ############################################################### # Execute the JJOB -$HOMEgfs/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN +${HOMEgfs}/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN status=$? -exit $status +exit ${status} diff --git a/jobs/rocoto/atmensanalpost.sh b/jobs/rocoto/atmensanalpost.sh index 4ee39c5ac6..91ac2d6212 100755 --- a/jobs/rocoto/atmensanalpost.sh +++ b/jobs/rocoto/atmensanalpost.sh @@ -1,20 +1,20 @@ #! /usr/bin/env bash export STRICT="NO" -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" export STRICT="YES" ############################################################### # Source UFSDA workflow modules -. $HOMEgfs/ush/load_ufsda_modules.sh +. ${HOMEgfs}/ush/load_ufsda_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="atmensanalpost" export jobid="${job}.$$" ############################################################### # Execute the JJOB -$HOMEgfs/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST +${HOMEgfs}/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST status=$? -exit $status +exit ${status} diff --git a/jobs/rocoto/atmensanalprep.sh b/jobs/rocoto/atmensanalprep.sh index 43ef9bbddb..b54a1b464e 100755 --- a/jobs/rocoto/atmensanalprep.sh +++ b/jobs/rocoto/atmensanalprep.sh @@ -1,20 +1,20 @@ #! /usr/bin/env bash export STRICT="NO" -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" export STRICT="YES" ############################################################### # Source UFSDA workflow modules -. $HOMEgfs/ush/load_ufsda_modules.sh +. ${HOMEgfs}/ush/load_ufsda_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="atmensanalprep" export jobid="${job}.$$" ############################################################### # Execute the JJOB -$HOMEgfs/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP +${HOMEgfs}/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP status=$? -exit $status +exit ${status} diff --git a/jobs/rocoto/atmensanalrun.sh b/jobs/rocoto/atmensanalrun.sh index e2a36fa149..a2509a310e 100755 --- a/jobs/rocoto/atmensanalrun.sh +++ b/jobs/rocoto/atmensanalrun.sh @@ -1,20 +1,20 @@ #! /usr/bin/env bash export STRICT="NO" -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" export STRICT="YES" ############################################################### # Source UFSDA workflow modules -. $HOMEgfs/ush/load_ufsda_modules.sh +. ${HOMEgfs}/ush/load_ufsda_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="atmensanalrun" export jobid="${job}.$$" ############################################################### # Execute the JJOB -$HOMEgfs/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN +${HOMEgfs}/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN status=$? -exit $status +exit ${status} diff --git a/jobs/rocoto/ecen.sh b/jobs/rocoto/ecen.sh index 08abb97fd8..8a98974615 100755 --- a/jobs/rocoto/ecen.sh +++ b/jobs/rocoto/ecen.sh @@ -1,27 +1,27 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### # Source FV3GFS workflow modules -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################################### # Loop over groups to Execute the JJOB -fhrlst=$(echo $FHRLST | sed -e 's/_/ /g; s/f/ /g; s/,/ /g') -for fhr in $fhrlst; do +fhrlst=$(echo ${FHRLST} | sed -e 's/_/ /g; s/f/ /g; s/,/ /g') +for fhr in ${fhrlst}; do - export FHMIN_ECEN=$fhr - export FHMAX_ECEN=$fhr - export FHOUT_ECEN=$fhr + export FHMIN_ECEN=${fhr} + export FHMAX_ECEN=${fhr} + export FHOUT_ECEN=${fhr} export job=ecen${fhr} export jobid="${job}.$$" - $HOMEgfs/jobs/JGDAS_ENKF_ECEN + ${HOMEgfs}/jobs/JGDAS_ENKF_ECEN status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/rocoto/echgres.sh b/jobs/rocoto/echgres.sh index 0f86975b58..5779a91f06 100755 --- a/jobs/rocoto/echgres.sh +++ b/jobs/rocoto/echgres.sh @@ -1,19 +1,19 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### # Source FV3GFS workflow modules -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="echgres" export jobid="${job}.$$" ############################################################### # Execute the JJOB -$HOMEgfs/jobs/JGDAS_ATMOS_CHGRES_FORENKF +${HOMEgfs}/jobs/JGDAS_ATMOS_CHGRES_FORENKF status=$? diff --git a/jobs/rocoto/ediag.sh b/jobs/rocoto/ediag.sh index f0d03ca2bd..8462edf296 100755 --- a/jobs/rocoto/ediag.sh +++ b/jobs/rocoto/ediag.sh @@ -1,20 +1,20 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### # Source FV3GFS workflow modules -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="ediag" export jobid="${job}.$$" ############################################################### # Execute the JJOB -$HOMEgfs/jobs/JGDAS_ENKF_DIAG +${HOMEgfs}/jobs/JGDAS_ENKF_DIAG status=$? -exit $status +exit ${status} diff --git a/jobs/rocoto/efcs.sh b/jobs/rocoto/efcs.sh index f83263deef..b202015149 100755 --- a/jobs/rocoto/efcs.sh +++ b/jobs/rocoto/efcs.sh @@ -1,19 +1,19 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### # Source FV3GFS workflow modules -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="efcs" export jobid="${job}.$$" ############################################################### # Execute the JJOB -$HOMEgfs/jobs/JGDAS_ENKF_FCST +${HOMEgfs}/jobs/JGDAS_ENKF_FCST status=$? -exit $status +exit ${status} diff --git a/jobs/rocoto/eobs.sh b/jobs/rocoto/eobs.sh index 51c8239a1d..95fa42cb08 100755 --- a/jobs/rocoto/eobs.sh +++ b/jobs/rocoto/eobs.sh @@ -1,20 +1,20 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### # Source FV3GFS workflow modules -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="eobs" export jobid="${job}.$$" ############################################################### # Execute the JJOB -$HOMEgfs/jobs/JGDAS_ENKF_SELECT_OBS +${HOMEgfs}/jobs/JGDAS_ENKF_SELECT_OBS status=$? -exit $status +exit ${status} diff --git a/jobs/rocoto/epos.sh b/jobs/rocoto/epos.sh index c67c4a09ba..21c8e0019e 100755 --- a/jobs/rocoto/epos.sh +++ b/jobs/rocoto/epos.sh @@ -1,28 +1,28 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### # Source FV3GFS workflow modules -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################################### # Loop over groups to Execute the JJOB -fhrlst=$(echo $FHRLST | sed -e 's/_/ /g; s/f/ /g; s/,/ /g') +fhrlst=$(echo ${FHRLST} | sed -e 's/_/ /g; s/f/ /g; s/,/ /g') -for fhr in $fhrlst; do +for fhr in ${fhrlst}; do - export FHMIN_EPOS=$fhr - export FHMAX_EPOS=$fhr - export FHOUT_EPOS=$fhr + export FHMIN_EPOS=${fhr} + export FHMAX_EPOS=${fhr} + export FHOUT_EPOS=${fhr} export job=epos${fhr} export jobid="${job}.$$" - $HOMEgfs/jobs/JGDAS_ENKF_POST + ${HOMEgfs}/jobs/JGDAS_ENKF_POST status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/rocoto/esfc.sh b/jobs/rocoto/esfc.sh index 76ca22b4bc..85f44151c9 100755 --- a/jobs/rocoto/esfc.sh +++ b/jobs/rocoto/esfc.sh @@ -1,20 +1,20 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### # Source FV3GFS workflow modules -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="esfc" export jobid="${job}.$$" ############################################################### # Execute the JJOB -$HOMEgfs/jobs/JGDAS_ENKF_SFC +${HOMEgfs}/jobs/JGDAS_ENKF_SFC status=$? -exit $status +exit ${status} diff --git a/jobs/rocoto/eupd.sh b/jobs/rocoto/eupd.sh index 33bea5f972..3ed028f87a 100755 --- a/jobs/rocoto/eupd.sh +++ b/jobs/rocoto/eupd.sh @@ -1,20 +1,20 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### # Source FV3GFS workflow modules -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="eupd" export jobid="${job}.$$" ############################################################### # Execute the JJOB -$HOMEgfs/jobs/JGDAS_ENKF_UPDATE +${HOMEgfs}/jobs/JGDAS_ENKF_UPDATE status=$? -exit $status +exit ${status} diff --git a/jobs/rocoto/fcst.sh b/jobs/rocoto/fcst.sh index 0a26196738..ba40472d99 100755 --- a/jobs/rocoto/fcst.sh +++ b/jobs/rocoto/fcst.sh @@ -1,20 +1,20 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### # Source FV3GFS workflow modules -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="fcst" export jobid="${job}.$$" ############################################################### # Execute the JJOB -$HOMEgfs/jobs/JGLOBAL_FORECAST +${HOMEgfs}/jobs/JGLOBAL_FORECAST status=$? -exit $status +exit ${status} diff --git a/jobs/rocoto/metp.sh b/jobs/rocoto/metp.sh index 3359eeee45..82254a0435 100755 --- a/jobs/rocoto/metp.sh +++ b/jobs/rocoto/metp.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### ## Abstract: @@ -19,9 +19,9 @@ source "$HOMEgfs/ush/preamble.sh" ############################################################### echo echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="metp${METPCASE}" export jobid="${job}.$$" @@ -30,8 +30,8 @@ export jobid="${job}.$$" # make temp directory ############################################## export DATA=${DATA:-${DATAROOT}/${jobid}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -45,52 +45,52 @@ setpdy.sh echo echo "=============== START TO SOURCE RELEVANT CONFIGS ===============" configs="base metp" -for config in $configs; do - . $EXPDIR/config.${config} +for config in ${configs}; do + . ${EXPDIR}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ############################################################### echo echo "=============== START TO SOURCE MACHINE RUNTIME ENVIRONMENT ===============" -. $BASE_ENV/${machine}.env metp +. ${BASE_ENV}/${machine}.env metp status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################################### export COMPONENT="atmos" -export VDATE="$(echo $($NDATE -${VRFYBACK_HRS} $CDATE) | cut -c1-8)" -export COMIN="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT" +export VDATE="$(echo $(${NDATE} -${VRFYBACK_HRS} ${CDATE}) | cut -c1-8)" +export COMIN="${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" # TODO: This should not be permitted as DATAROOT is set at the job-card level. # TODO: DATAROOT is being used as DATA in metp jobs. This should be rectified in metp. # TODO: The temporary directory is DATA and is created at the top of the J-Job. # TODO: remove this line -export DATAROOT=$DATA +export DATAROOT=${DATA} ############################################################### echo echo "=============== START TO RUN METPLUS VERIFICATION ===============" -if [ $CDUMP = "gfs" ]; then +if [ ${CDUMP} = "gfs" ]; then - if [ $RUN_GRID2GRID_STEP1 = "YES" -o $RUN_GRID2OBS_STEP1 = "YES" -o $RUN_PRECIP_STEP1 = "YES" ]; then + if [ ${RUN_GRID2GRID_STEP1} = "YES" -o ${RUN_GRID2OBS_STEP1} = "YES" -o ${RUN_PRECIP_STEP1} = "YES" ]; then - $VERIF_GLOBALSH + ${VERIF_GLOBALSH} status=$? - [[ $status -ne 0 ]] && exit $status - [[ $status -eq 0 ]] && echo "Succesfully ran $VERIF_GLOBALSH" + [[ ${status} -ne 0 ]] && exit ${status} + [[ ${status} -eq 0 ]] && echo "Succesfully ran ${VERIF_GLOBALSH}" fi fi -if [ $CDUMP = "gdas" ]; then +if [ ${CDUMP} = "gdas" ]; then echo "METplus verification currently not supported for CDUMP=${CDUMP}" fi ############################################################### # Force Exit out cleanly -if [ ${KEEPDATA:-"NO"} = "NO" ] ; then rm -rf $DATAROOT ; fi # TODO: This should be $DATA +if [ ${KEEPDATA:-"NO"} = "NO" ] ; then rm -rf ${DATAROOT} ; fi # TODO: This should be $DATA exit 0 diff --git a/jobs/rocoto/ocnpost.sh b/jobs/rocoto/ocnpost.sh index 4c1f1f18b0..54e3652b44 100755 --- a/jobs/rocoto/ocnpost.sh +++ b/jobs/rocoto/ocnpost.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### ## CICE5/MOM6 post driver script @@ -9,9 +9,9 @@ source "$HOMEgfs/ush/preamble.sh" ############################################################### # Source FV3GFS workflow modules -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="ocnpost" export jobid=${job}.$$ @@ -19,9 +19,9 @@ export jobid=${job}.$$ ############################################## # make temp directory ############################################## -export DATA="$DATAROOT/${jobid}" -[[ -d $DATA ]] && rm -rf $DATA -mkdir -p $DATA && cd $DATA +export DATA="${DATAROOT}/${jobid}" +[[ -d ${DATA} ]] && rm -rf ${DATA} +mkdir -p ${DATA} && cd ${DATA} ############################################## # Run setpdy and initialize PDY variables @@ -41,21 +41,21 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -config_path=${EXPDIR:-$PACKAGEROOT/gfs.${gfs_ver}/parm/config} +config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base ocnpost" -for config in $configs; do - . $config_path/config.$config +for config in ${configs}; do + . ${config_path}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env ocnpost +. ${HOMEgfs}/env/${machine}.env ocnpost status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################## @@ -63,85 +63,85 @@ status=$? ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gfs"}} -if [ $RUN_ENVIR = "nco" ]; then - export ROTDIR=${COMROOT:?}/$NET/$envir +if [ ${RUN_ENVIR} = "nco" ]; then + export ROTDIR=${COMROOT:?}/${NET}/${envir} fi ############################################## # Begin JOB SPECIFIC work ############################################## -[[ ! -d $COMOUTocean ]] && mkdir -p $COMOUTocean -[[ ! -d $COMOUTice ]] && mkdir -p $COMOUTice +[[ ! -d ${COMOUTocean} ]] && mkdir -p ${COMOUTocean} +[[ ! -d ${COMOUTice} ]] && mkdir -p ${COMOUTice} -fhrlst=$(echo $FHRLST | sed -e 's/_/ /g; s/f/ /g; s/,/ /g') +fhrlst=$(echo ${FHRLST} | sed -e 's/_/ /g; s/f/ /g; s/,/ /g') export OMP_NUM_THREADS=1 export ENSMEM=${ENSMEM:-01} -export IDATE=$CDATE +export IDATE=${CDATE} -for fhr in $fhrlst; do - export fhr=$fhr - VDATE=$($NDATE $fhr $IDATE) +for fhr in ${fhrlst}; do + export fhr=${fhr} + VDATE=$(${NDATE} ${fhr} ${IDATE}) # Regrid the MOM6 and CICE5 output from tripolar to regular grid via NCL # This can take .25 degree input and convert to .5 degree - other opts avail # The regrid scripts use CDATE for the current day, restore it to IDATE afterwards - export CDATE=$VDATE - cd $DATA - if [ $fhr -gt 0 ]; then - export MOM6REGRID=${MOM6REGRID:-$HOMEgfs} - $MOM6REGRID/scripts/run_regrid.sh + export CDATE=${VDATE} + cd ${DATA} + if [ ${fhr} -gt 0 ]; then + export MOM6REGRID=${MOM6REGRID:-${HOMEgfs}} + ${MOM6REGRID}/scripts/run_regrid.sh status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} # Convert the netcdf files to grib2 - export executable=$MOM6REGRID/exec/reg2grb2.x - $MOM6REGRID/scripts/run_reg2grb2.sh + export executable=${MOM6REGRID}/exec/reg2grb2.x + ${MOM6REGRID}/scripts/run_reg2grb2.sh status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} #break up ocn netcdf into multiple files: - if [ -f $COMOUTocean/ocn_2D_$VDATE.$ENSMEM.$IDATE.nc ]; then - echo "File $COMOUTocean/ocn_2D_$VDATE.$ENSMEM.$IDATE.nc already exists" + if [ -f ${COMOUTocean}/ocn_2D_${VDATE}.${ENSMEM}.${IDATE}.nc ]; then + echo "File ${COMOUTocean}/ocn_2D_${VDATE}.${ENSMEM}.${IDATE}.nc already exists" else - ncks -x -v vo,uo,so,temp $COMOUTocean/ocn$VDATE.$ENSMEM.$IDATE.nc $COMOUTocean/ocn_2D_$VDATE.$ENSMEM.$IDATE.nc + ncks -x -v vo,uo,so,temp ${COMOUTocean}/ocn${VDATE}.${ENSMEM}.${IDATE}.nc ${COMOUTocean}/ocn_2D_${VDATE}.${ENSMEM}.${IDATE}.nc status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} fi - if [ -f $COMOUTocean/ocn_3D_$VDATE.$ENSMEM.$IDATE.nc ]; then - echo "File $COMOUTocean/ocn_3D_$VDATE.$ENSMEM.$IDATE.nc already exists" + if [ -f ${COMOUTocean}/ocn_3D_${VDATE}.${ENSMEM}.${IDATE}.nc ]; then + echo "File ${COMOUTocean}/ocn_3D_${VDATE}.${ENSMEM}.${IDATE}.nc already exists" else - ncks -x -v Heat_PmE,LW,LwLatSens,MLD_003,MLD_0125,SSH,SSS,SST,SSU,SSV,SW,cos_rot,ePBL,evap,fprec,frazil,latent,lprec,lrunoff,sensible,sin_rot,speed,taux,tauy,wet_c,wet_u,wet_v $COMOUTocean/ocn$VDATE.$ENSMEM.$IDATE.nc $COMOUTocean/ocn_3D_$VDATE.$ENSMEM.$IDATE.nc + ncks -x -v Heat_PmE,LW,LwLatSens,MLD_003,MLD_0125,SSH,SSS,SST,SSU,SSV,SW,cos_rot,ePBL,evap,fprec,frazil,latent,lprec,lrunoff,sensible,sin_rot,speed,taux,tauy,wet_c,wet_u,wet_v ${COMOUTocean}/ocn${VDATE}.${ENSMEM}.${IDATE}.nc ${COMOUTocean}/ocn_3D_${VDATE}.${ENSMEM}.${IDATE}.nc status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} fi - if [ -f $COMOUTocean/ocn-temp-EQ_$VDATE.$ENSMEM.$IDATE.nc ]; then - echo "File $COMOUTocean/ocn-temp-EQ_$VDATE.$ENSMEM.$IDATE.nc already exists" + if [ -f ${COMOUTocean}/ocn-temp-EQ_${VDATE}.${ENSMEM}.${IDATE}.nc ]; then + echo "File ${COMOUTocean}/ocn-temp-EQ_${VDATE}.${ENSMEM}.${IDATE}.nc already exists" else - ncks -v temp -d yh,503 -d xh,-299.92,60.03 $COMOUTocean/ocn_3D_$VDATE.$ENSMEM.$IDATE.nc $COMOUTocean/ocn-temp-EQ_$VDATE.$ENSMEM.$IDATE.nc + ncks -v temp -d yh,503 -d xh,-299.92,60.03 ${COMOUTocean}/ocn_3D_${VDATE}.${ENSMEM}.${IDATE}.nc ${COMOUTocean}/ocn-temp-EQ_${VDATE}.${ENSMEM}.${IDATE}.nc status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} fi - if [ -f $COMOUTocean/ocn-uo-EQ_$VDATE.$ENSMEM.$IDATE.nc ]; then - echo "File $COMOUTocean/ocn-uo-EQ_$VDATE.$ENSMEM.$IDATE.nc already exists" + if [ -f ${COMOUTocean}/ocn-uo-EQ_${VDATE}.${ENSMEM}.${IDATE}.nc ]; then + echo "File ${COMOUTocean}/ocn-uo-EQ_${VDATE}.${ENSMEM}.${IDATE}.nc already exists" else - ncks -v uo -d yh,503 -d xh,-299.92,60.03 $COMOUTocean/ocn_3D_$VDATE.$ENSMEM.$IDATE.nc $COMOUTocean/ocn-uo-EQ_$VDATE.$ENSMEM.$IDATE.nc + ncks -v uo -d yh,503 -d xh,-299.92,60.03 ${COMOUTocean}/ocn_3D_${VDATE}.${ENSMEM}.${IDATE}.nc ${COMOUTocean}/ocn-uo-EQ_${VDATE}.${ENSMEM}.${IDATE}.nc status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} fi fi done # Restore CDATE to what is expected -export CDATE=$IDATE -$NMV ocn_ice*.grb2 $COMOUTocean/ +export CDATE=${IDATE} +${NMV} ocn_ice*.grb2 ${COMOUTocean}/ status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} # clean up working folder -if [ ${KEEPDATA:-"NO"} = "NO" ] ; then rm -rf $DATA ; fi +if [ ${KEEPDATA:-"NO"} = "NO" ] ; then rm -rf ${DATA} ; fi ############################################################### # Exit out cleanly diff --git a/jobs/rocoto/post.sh b/jobs/rocoto/post.sh index 49cfa0303d..bc7da5709a 100755 --- a/jobs/rocoto/post.sh +++ b/jobs/rocoto/post.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### ## NCEP post driver script @@ -9,29 +9,29 @@ source "$HOMEgfs/ush/preamble.sh" ############################################################### # Source FV3GFS workflow modules -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export COMPONENT="atmos" -if [ $FHRGRP = 'anl' ]; then +if [ ${FHRGRP} = 'anl' ]; then fhrlst="anl" - restart_file=$ROTDIR/${CDUMP}.${PDY}/${cyc}/$COMPONENT/${CDUMP}.t${cyc}z.atm + restart_file=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}/${CDUMP}.t${cyc}z.atm else - fhrlst=$(echo $FHRLST | sed -e 's/_/ /g; s/f/ /g; s/,/ /g') - restart_file=$ROTDIR/${CDUMP}.${PDY}/${cyc}/$COMPONENT/${CDUMP}.t${cyc}z.logf + fhrlst=$(echo ${FHRLST} | sed -e 's/_/ /g; s/f/ /g; s/,/ /g') + restart_file=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}/${CDUMP}.t${cyc}z.logf fi #--------------------------------------------------------------- -for fhr in $fhrlst; do - export post_times=$fhr +for fhr in ${fhrlst}; do + export post_times=${fhr} export job="post${post_times}" export jobid="${job}.$$" - $HOMEgfs/jobs/JGLOBAL_ATMOS_POST + ${HOMEgfs}/jobs/JGLOBAL_ATMOS_POST status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done exit 0 diff --git a/jobs/rocoto/postsnd.sh b/jobs/rocoto/postsnd.sh index 24aa65ed86..bc274361db 100755 --- a/jobs/rocoto/postsnd.sh +++ b/jobs/rocoto/postsnd.sh @@ -1,22 +1,22 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### # Source FV3GFS workflow modules -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="postsnd" export jobid="${job}.$$" ############################################################### # Execute the JJOB -$HOMEgfs/jobs/JGFS_ATMOS_POSTSND +${HOMEgfs}/jobs/JGFS_ATMOS_POSTSND status=$? -exit $status +exit ${status} diff --git a/jobs/rocoto/sfcanl.sh b/jobs/rocoto/sfcanl.sh index e2e83d10a0..44f93ee0c3 100755 --- a/jobs/rocoto/sfcanl.sh +++ b/jobs/rocoto/sfcanl.sh @@ -1,20 +1,20 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### # Source FV3GFS workflow modules -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="sfcanl" export jobid="${job}.$$" ############################################################### # Execute the JJOB -$HOMEgfs/jobs/JGLOBAL_ATMOS_SFCANL +${HOMEgfs}/jobs/JGLOBAL_ATMOS_SFCANL status=$? -exit $status +exit ${status} diff --git a/jobs/rocoto/vrfy.sh b/jobs/rocoto/vrfy.sh index c092f198af..aef08ec90e 100755 --- a/jobs/rocoto/vrfy.sh +++ b/jobs/rocoto/vrfy.sh @@ -1,12 +1,12 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" echo echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="vrfy" export jobid="${job}.$$" @@ -16,8 +16,8 @@ export jobid="${job}.$$" # make temp directory ############################################## export DATA="${DATA:-${DATAROOT}/${jobid}}" -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} ############################################## @@ -39,79 +39,79 @@ export pgmerr=errfile echo echo "=============== START TO SOURCE RELEVANT CONFIGS ===============" configs="base vrfy" -for config in $configs; do - . $EXPDIR/config.${config} +for config in ${configs}; do + . ${EXPDIR}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ############################################################### echo echo "=============== START TO SOURCE MACHINE RUNTIME ENVIRONMENT ===============" -. $BASE_ENV/${machine}.env vrfy +. ${BASE_ENV}/${machine}.env vrfy status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################################### export COMPONENT="atmos" -export CDATEm1=$($NDATE -24 $CDATE) -export PDYm1=$(echo $CDATEm1 | cut -c1-8) +export CDATEm1=$(${NDATE} -24 ${CDATE}) +export PDYm1=$(echo ${CDATEm1} | cut -c1-8) -CDATEm1c=$($NDATE -06 $CDATE) -PDYm1c=$(echo $CDATEm1c | cut -c1-8) +CDATEm1c=$(${NDATE} -06 ${CDATE}) +PDYm1c=$(echo ${CDATEm1c} | cut -c1-8) pcyc=$(echo ${CDATEm1c} | cut -c9-10) -export COMIN="$ROTDIR/$CDUMP.$PDY/$cyc/$COMPONENT" +export COMIN="${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" ############################################################### echo echo "=============== START TO GENERATE QUARTER DEGREE GRIB1 FILES ===============" -if [ $MKPGB4PRCP = "YES" -a $CDUMP = "gfs" ]; then - if [ ! -d $ARCDIR ]; then mkdir $ARCDIR ; fi +if [ ${MKPGB4PRCP} = "YES" -a ${CDUMP} = "gfs" ]; then + if [ ! -d ${ARCDIR} ]; then mkdir ${ARCDIR} ; fi nthreads_env=${OMP_NUM_THREADS:-1} # get threads set in env export OMP_NUM_THREADS=1 - cd $COMIN - fhmax=${vhr_rain:-$FHMAX_GFS} + cd ${COMIN} + fhmax=${vhr_rain:-${FHMAX_GFS}} fhr=0 - while [ $fhr -le $fhmax ]; do - fhr2=$(printf %02i $fhr) - fhr3=$(printf %03i $fhr) - fname=${CDUMP}.t${cyc}z.sfluxgrbf$fhr3.grib2 - fileout=$ARCDIR/pgbq${fhr2}.${CDUMP}.${CDATE}.grib2 - $WGRIB2 $fname -match "(:PRATE:surface:)|(:TMP:2 m above ground:)" -grib $fileout - (( fhr = $fhr + 6 )) + while [ ${fhr} -le ${fhmax} ]; do + fhr2=$(printf %02i ${fhr}) + fhr3=$(printf %03i ${fhr}) + fname=${CDUMP}.t${cyc}z.sfluxgrbf${fhr3}.grib2 + fileout=${ARCDIR}/pgbq${fhr2}.${CDUMP}.${CDATE}.grib2 + ${WGRIB2} ${fname} -match "(:PRATE:surface:)|(:TMP:2 m above ground:)" -grib ${fileout} + (( fhr = ${fhr} + 6 )) done - export OMP_NUM_THREADS=$nthreads_env # revert to threads set in env + export OMP_NUM_THREADS=${nthreads_env} # revert to threads set in env fi ############################################################### echo echo "=============== START TO RUN MOS ===============" -if [ $RUNMOS = "YES" -a $CDUMP = "gfs" ]; then - $RUNGFSMOSSH $PDY$cyc +if [ ${RUNMOS} = "YES" -a ${CDUMP} = "gfs" ]; then + ${RUNGFSMOSSH} ${PDY}${cyc} fi ############################################################### echo echo "=============== START TO RUN FIT2OBS VERIFICATION ===============" -if [ $VRFYFITS = "YES" -a $CDUMP = $CDFNL -a $CDATE != $SDATE ]; then +if [ ${VRFYFITS} = "YES" -a ${CDUMP} = ${CDFNL} -a ${CDATE} != ${SDATE} ]; then - export CDUMPFCST=$VDUMP - export TMPDIR="$RUNDIR/$CDATE/$CDUMP" - [[ ! -d $TMPDIR ]] && mkdir -p $TMPDIR + export CDUMPFCST=${VDUMP} + export TMPDIR="${RUNDIR}/${CDATE}/${CDUMP}" + [[ ! -d ${TMPDIR} ]] && mkdir -p ${TMPDIR} - xdate=$($NDATE -${VBACKUP_FITS} $CDATE) + xdate=$(${NDATE} -${VBACKUP_FITS} ${CDATE}) - export RUN_ENVIR_SAVE=$RUN_ENVIR - export RUN_ENVIR=$OUTPUT_FILE + export RUN_ENVIR_SAVE=${RUN_ENVIR} + export RUN_ENVIR=${OUTPUT_FILE} - $PREPQFITSH $PSLOT $xdate $ROTDIR $ARCDIR $TMPDIR + ${PREPQFITSH} ${PSLOT} ${xdate} ${ROTDIR} ${ARCDIR} ${TMPDIR} - export RUN_ENVIR=$RUN_ENVIR_SAVE + export RUN_ENVIR=${RUN_ENVIR_SAVE} fi @@ -119,7 +119,7 @@ fi ############################################################### echo echo "=============== START TO RUN RADMON DATA EXTRACTION ===============" -if [ $VRFYRAD = "YES" -a "${CDUMP}" = "${CDFNL}" -a "${CDATE}" != "${SDATE}" ]; then +if [ ${VRFYRAD} = "YES" -a "${CDUMP}" = "${CDFNL}" -a "${CDATE}" != "${SDATE}" ]; then export EXP=${PSLOT} export COMOUT="${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" @@ -192,8 +192,8 @@ fi ############################################################### # Force Exit out cleanly -cd $DATAROOT -if [ ${KEEPDATA:-"NO"} = "NO" ] ; then rm -rf $DATA ; fi +cd ${DATAROOT} +if [ ${KEEPDATA:-"NO"} = "NO" ] ; then rm -rf ${DATA} ; fi exit 0 diff --git a/jobs/rocoto/wafs.sh b/jobs/rocoto/wafs.sh index 592baa02c4..59d1ede139 100755 --- a/jobs/rocoto/wafs.sh +++ b/jobs/rocoto/wafs.sh @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### echo echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="wafs" export jobid="${job}.$$" @@ -17,10 +17,10 @@ export jobid="${job}.$$" # TODO: sourcing configs should be in the j-job echo "=============== BEGIN TO SOURCE RELEVANT CONFIGS ===============" configs="base wafs" -for config in $configs; do - . $EXPDIR/config.${config} +for config in ${configs}; do + . ${EXPDIR}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ############################################################### @@ -30,16 +30,16 @@ echo "=============== START TO RUN WAFS ===============" # Loop through fcsthrs hr=0 -while [ $hr -le 120 ]; do +while [ ${hr} -le 120 ]; do - export fcsthrs=$(printf "%03d" $hr) + export fcsthrs=$(printf "%03d" ${hr}) # Execute the JJOB - $HOMEgfs/jobs/JGFS_ATMOS_WAFS + ${HOMEgfs}/jobs/JGFS_ATMOS_WAFS status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} - hr=$(expr $hr + 6) + hr=$(expr ${hr} + 6) done diff --git a/jobs/rocoto/wafsblending.sh b/jobs/rocoto/wafsblending.sh index 5f2b2688c4..e16e8fa2b3 100755 --- a/jobs/rocoto/wafsblending.sh +++ b/jobs/rocoto/wafsblending.sh @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### echo echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="wafsblending" export jobid="${job}.$$" @@ -16,10 +16,10 @@ export jobid="${job}.$$" # TODO: sourcing configs should be in the j-job echo "=============== BEGIN TO SOURCE RELEVANT CONFIGS ===============" configs="base wafsblending" -for config in $configs; do - . $EXPDIR/config.${config} +for config in ${configs}; do + . ${EXPDIR}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done # TODO: Mising source machine runtime environment @@ -29,9 +29,9 @@ done echo echo "=============== START TO RUN WAFSBLENDING ===============" # Execute the JJOB -$HOMEgfs/jobs/JGFS_ATMOS_WAFS_BLENDING +${HOMEgfs}/jobs/JGFS_ATMOS_WAFS_BLENDING status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################################### diff --git a/jobs/rocoto/wafsblending0p25.sh b/jobs/rocoto/wafsblending0p25.sh index 3be6d8553b..11788baf4d 100755 --- a/jobs/rocoto/wafsblending0p25.sh +++ b/jobs/rocoto/wafsblending0p25.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" export job="wafsblending0p25" export jobid="${job}.$$" @@ -8,18 +8,18 @@ export jobid="${job}.$$" ############################################################### echo echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################################### # TODO: sourcing configs should be in the j-job echo "=============== BEGIN TO SOURCE RELEVANT CONFIGS ===============" configs="base wafsblending0p25" -for config in $configs; do - . $EXPDIR/config.${config} +for config in ${configs}; do + . ${EXPDIR}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done # TODO: Mising source machine runtime environment @@ -29,9 +29,9 @@ done echo echo "=============== START TO RUN WAFSBLENDING0P25 ===============" # Execute the JJOB -$HOMEgfs/jobs/JGFS_ATMOS_WAFS_BLENDING_0P25 +${HOMEgfs}/jobs/JGFS_ATMOS_WAFS_BLENDING_0P25 status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################################### diff --git a/jobs/rocoto/wafsgcip.sh b/jobs/rocoto/wafsgcip.sh index b1e0ef94bd..36b2b491d7 100755 --- a/jobs/rocoto/wafsgcip.sh +++ b/jobs/rocoto/wafsgcip.sh @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### echo echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="wafsgcip" export jobid="${job}.$$" @@ -17,18 +17,18 @@ export jobid="${job}.$$" # TODO: sourcing configs should be in the j-job echo "=============== BEGIN TO SOURCE RELEVANT CONFIGS ===============" configs="base wafsgcip" -for config in $configs; do - . $EXPDIR/config.${config} +for config in ${configs}; do + . ${EXPDIR}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done ########################################## # Source machine runtime environment ########################################## -. $HOMEgfs/env/${machine}.env wafsgcip +. ${HOMEgfs}/env/${machine}.env wafsgcip status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################################### @@ -36,9 +36,9 @@ status=$? echo echo "=============== START TO RUN WAFSGCIP ===============" # Execute the JJOB -$HOMEgfs/jobs/JGFS_ATMOS_WAFS_GCIP +${HOMEgfs}/jobs/JGFS_ATMOS_WAFS_GCIP status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################################### diff --git a/jobs/rocoto/wafsgrib2.sh b/jobs/rocoto/wafsgrib2.sh index 4e9e0ca4b0..a2903e5aa2 100755 --- a/jobs/rocoto/wafsgrib2.sh +++ b/jobs/rocoto/wafsgrib2.sh @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### echo echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="wafsgrib2" export jobid=${job}.$$ @@ -16,10 +16,10 @@ export jobid=${job}.$$ # TODO: Sourcing configs should be done in the j-job echo "=============== BEGIN TO SOURCE RELEVANT CONFIGS ===============" configs="base wafsgrib2" -for config in $configs; do - . $EXPDIR/config.${config} +for config in ${configs}; do + . ${EXPDIR}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done # TODO: Missing sourcing of $MACHINE.env @@ -29,9 +29,9 @@ done echo echo "=============== START TO RUN WAFSGRIB2 ===============" # Execute the JJOB -$HOMEgfs/jobs/JGFS_ATMOS_WAFS_GRIB2 +${HOMEgfs}/jobs/JGFS_ATMOS_WAFS_GRIB2 status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################################### diff --git a/jobs/rocoto/wafsgrib20p25.sh b/jobs/rocoto/wafsgrib20p25.sh index 161c0fa3cc..585ca23524 100755 --- a/jobs/rocoto/wafsgrib20p25.sh +++ b/jobs/rocoto/wafsgrib20p25.sh @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### echo echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="wafsgrib20p25" export jobid="${job}.$$" @@ -16,10 +16,10 @@ export jobid="${job}.$$" # TODO: sourcing configs should be in the j-job echo "=============== BEGIN TO SOURCE RELEVANT CONFIGS ===============" configs="base wafsgrib20p25" -for config in $configs; do - . $EXPDIR/config.${config} +for config in ${configs}; do + . ${EXPDIR}/config.${config} status=$? - [[ $status -ne 0 ]] && exit $status + [[ ${status} -ne 0 ]] && exit ${status} done # TODO: missing sourcing $MACHINE.env @@ -28,9 +28,9 @@ done echo echo "=============== START TO RUN WAFSGRIB20p25 ===============" # Execute the JJOB -$HOMEgfs/jobs/JGFS_ATMOS_WAFS_GRIB2_0P25 +${HOMEgfs}/jobs/JGFS_ATMOS_WAFS_GRIB2_0P25 status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} ############################################################### diff --git a/jobs/rocoto/waveinit.sh b/jobs/rocoto/waveinit.sh index af3192c4df..d0c3f49929 100755 --- a/jobs/rocoto/waveinit.sh +++ b/jobs/rocoto/waveinit.sh @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### echo echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="waveinit" export jobid="${job}.$$" @@ -16,8 +16,8 @@ export jobid="${job}.$$" echo echo "=============== START TO RUN WAVE INIT ===============" # Execute the JJOB -$HOMEgfs/jobs/JGLOBAL_WAVE_INIT +${HOMEgfs}/jobs/JGLOBAL_WAVE_INIT status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} exit 0 diff --git a/jobs/rocoto/wavepostbndpnt.sh b/jobs/rocoto/wavepostbndpnt.sh index 2a07e9be7e..5d26498356 100755 --- a/jobs/rocoto/wavepostbndpnt.sh +++ b/jobs/rocoto/wavepostbndpnt.sh @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### echo echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="wavepostbndpnt" export jobid="${job}.$$" @@ -16,8 +16,8 @@ export jobid="${job}.$$" echo echo "=============== START TO RUN WAVE_POST_BNDPNT ===============" # Execute the JJOB -$HOMEgfs/jobs/JGLOBAL_WAVE_POST_BNDPNT +${HOMEgfs}/jobs/JGLOBAL_WAVE_POST_BNDPNT status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} exit 0 diff --git a/jobs/rocoto/wavepostbndpntbll.sh b/jobs/rocoto/wavepostbndpntbll.sh index d14a71bbcf..ce4f9e6b2d 100755 --- a/jobs/rocoto/wavepostbndpntbll.sh +++ b/jobs/rocoto/wavepostbndpntbll.sh @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### echo echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="wavepostbndpntbll" export jobid="${job}.$$" @@ -16,8 +16,8 @@ export jobid="${job}.$$" echo echo "=============== START TO RUN WAVE_POST_BNDPNT ===============" # Execute the JJOB -$HOMEgfs/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL +${HOMEgfs}/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} exit 0 diff --git a/jobs/rocoto/wavepostpnt.sh b/jobs/rocoto/wavepostpnt.sh index 3885f7755f..9efb755dec 100755 --- a/jobs/rocoto/wavepostpnt.sh +++ b/jobs/rocoto/wavepostpnt.sh @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### echo echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="wavepostpnt" export jobid="${job}.$$" @@ -16,8 +16,8 @@ export jobid="${job}.$$" echo echo "=============== START TO RUN WAVE_POST_PNT ===============" # Execute the JJOB -$HOMEgfs/jobs/JGLOBAL_WAVE_POST_PNT +${HOMEgfs}/jobs/JGLOBAL_WAVE_POST_PNT status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} exit 0 diff --git a/jobs/rocoto/wavepostsbs.sh b/jobs/rocoto/wavepostsbs.sh index 814e114b4b..fa61d31eec 100755 --- a/jobs/rocoto/wavepostsbs.sh +++ b/jobs/rocoto/wavepostsbs.sh @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### echo echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="wavepostsbs" export jobid="${job}.$$" @@ -16,8 +16,8 @@ export jobid="${job}.$$" echo echo "=============== START TO RUN WAVE POST_SBS ===============" # Execute the JJOB -$HOMEgfs/jobs/JGLOBAL_WAVE_POST_SBS +${HOMEgfs}/jobs/JGLOBAL_WAVE_POST_SBS status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} exit 0 diff --git a/jobs/rocoto/waveprep.sh b/jobs/rocoto/waveprep.sh index 2c40ec621a..0cbafde87e 100755 --- a/jobs/rocoto/waveprep.sh +++ b/jobs/rocoto/waveprep.sh @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ############################################################### echo echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" -. $HOMEgfs/ush/load_fv3gfs_modules.sh +. ${HOMEgfs}/ush/load_fv3gfs_modules.sh status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} export job="waveprep" export jobid="${job}.$$" @@ -16,8 +16,8 @@ export jobid="${job}.$$" echo echo "=============== START TO RUN WAVE PREP ===============" # Execute the JJOB -$HOMEgfs/jobs/JGLOBAL_WAVE_PREP +${HOMEgfs}/jobs/JGLOBAL_WAVE_PREP status=$? -[[ $status -ne 0 ]] && exit $status +[[ ${status} -ne 0 ]] && exit ${status} exit 0 diff --git a/scripts/exglobal_atmos_analysis.sh b/scripts/exglobal_atmos_analysis.sh index e263487975..809e0c9b7a 100755 --- a/scripts/exglobal_atmos_analysis.sh +++ b/scripts/exglobal_atmos_analysis.sh @@ -19,7 +19,7 @@ # Set environment. -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" # Directories. pwd=$(pwd) @@ -30,12 +30,12 @@ CDUMP=${CDUMP:-"gdas"} GDUMP=${GDUMP:-"gdas"} # Derived base variables -GDATE=$($NDATE -$assim_freq $CDATE) -BDATE=$($NDATE -3 $CDATE) -PDY=$(echo $CDATE | cut -c1-8) -cyc=$(echo $CDATE | cut -c9-10) -bPDY=$(echo $BDATE | cut -c1-8) -bcyc=$(echo $BDATE | cut -c9-10) +GDATE=$(${NDATE} -${assim_freq} ${CDATE}) +BDATE=$(${NDATE} -3 ${CDATE}) +PDY=$(echo ${CDATE} | cut -c1-8) +cyc=$(echo ${CDATE} | cut -c9-10) +bPDY=$(echo ${BDATE} | cut -c1-8) +bcyc=$(echo ${BDATE} | cut -c9-10) # Utilities export NCP=${NCP:-"/bin/cp"} @@ -43,7 +43,7 @@ export NMV=${NMV:-"/bin/mv"} export NLN=${NLN:-"/bin/ln -sf"} export CHGRP_CMD=${CHGRP_CMD:-"chgrp ${group_name:-rstprod}"} export NEMSIOGET=${NEMSIOGET:-${NWPROD}/exec/nemsio_get} -export NCLEN=${NCLEN:-$HOMEgfs/ush/getncdimlen} +export NCLEN=${NCLEN:-${HOMEgfs}/ush/getncdimlen} COMPRESS=${COMPRESS:-gzip} UNCOMPRESS=${UNCOMPRESS:-gunzip} APRUNCFP=${APRUNCFP:-""} @@ -69,20 +69,20 @@ DOIAU=${DOIAU:-"NO"} export IAUFHRS=${IAUFHRS:-"6"} # Dependent Scripts and Executables -GSIEXEC=${GSIEXEC:-$HOMEgfs/exec/gsi.x} +GSIEXEC=${GSIEXEC:-${HOMEgfs}/exec/gsi.x} export NTHREADS_CALCINC=${NTHREADS_CALCINC:-1} export APRUN_CALCINC=${APRUN_CALCINC:-${APRUN:-""}} export APRUN_CALCANL=${APRUN_CALCANL:-${APRUN:-""}} export APRUN_CHGRES=${APRUN_CALCANL:-${APRUN:-""}} -export CALCINCEXEC=${CALCINCEXEC:-$HOMEgfs/exec/calc_increment_ens.x} -export CALCINCNCEXEC=${CALCINCNCEXEC:-$HOMEgfs/exec/calc_increment_ens_ncio.x} -export CALCANLEXEC=${CALCANLEXEC:-$HOMEgfs/exec/calc_analysis.x} -export CHGRESNCEXEC=${CHGRESNCEXEC:-$HOMEgfs/exec/enkf_chgres_recenter_nc.x} -export CHGRESINCEXEC=${CHGRESINCEXEC:-$HOMEgfs/exec/interp_inc.x} -CHGRESEXEC=${CHGRESEXEC:-$HOMEgfs/exec/enkf_chgres_recenter.x} +export CALCINCEXEC=${CALCINCEXEC:-${HOMEgfs}/exec/calc_increment_ens.x} +export CALCINCNCEXEC=${CALCINCNCEXEC:-${HOMEgfs}/exec/calc_increment_ens_ncio.x} +export CALCANLEXEC=${CALCANLEXEC:-${HOMEgfs}/exec/calc_analysis.x} +export CHGRESNCEXEC=${CHGRESNCEXEC:-${HOMEgfs}/exec/enkf_chgres_recenter_nc.x} +export CHGRESINCEXEC=${CHGRESINCEXEC:-${HOMEgfs}/exec/interp_inc.x} +CHGRESEXEC=${CHGRESEXEC:-${HOMEgfs}/exec/enkf_chgres_recenter.x} export NTHREADS_CHGRES=${NTHREADS_CHGRES:-24} -CALCINCPY=${CALCINCPY:-$HOMEgfs/ush/calcinc_gfs.py} -CALCANLPY=${CALCANLPY:-$HOMEgfs/ush/calcanl_gfs.py} +CALCINCPY=${CALCINCPY:-${HOMEgfs}/ush/calcinc_gfs.py} +CALCANLPY=${CALCANLPY:-${HOMEgfs}/ush/calcanl_gfs.py} # OPS flags RUN=${RUN:-""} @@ -90,7 +90,7 @@ SENDECF=${SENDECF:-"NO"} SENDDBN=${SENDDBN:-"NO"} RUN_GETGES=${RUN_GETGES:-"NO"} GETGESSH=${GETGESSH:-"getges.sh"} -export gesenvir=${gesenvir:-$envir} +export gesenvir=${gesenvir:-${envir}} # Observations OPREFIX=${OPREFIX:-""} @@ -158,7 +158,7 @@ HDOB=${HDOB:-${COMIN_OBS}/${OPREFIX}hdob.tm00.bufr_d${OSUFFIX}} # Guess files GPREFIX=${GPREFIX:-""} -GSUFFIX=${GSUFFIX:-$SUFFIX} +GSUFFIX=${GSUFFIX:-${SUFFIX}} SFCG03=${SFCG03:-${COMIN_GES}/${GPREFIX}sfcf003${GSUFFIX}} SFCG04=${SFCG04:-${COMIN_GES}/${GPREFIX}sfcf004${GSUFFIX}} SFCG05=${SFCG05:-${COMIN_GES}/${GPREFIX}sfcf005${GSUFFIX}} @@ -180,7 +180,7 @@ GRADSTAT=${GRADSTAT:-${COMIN_GES}/${GPREFIX}radstat} # Analysis files export APREFIX=${APREFIX:-""} -export ASUFFIX=${ASUFFIX:-$SUFFIX} +export ASUFFIX=${ASUFFIX:-${SUFFIX}} SFCANL=${SFCANL:-${COMOUT}/${APREFIX}sfcanl${ASUFFIX}} DTFANL=${DTFANL:-${COMOUT}/${APREFIX}dtfanl.nc} ATMANL=${ATMANL:-${COMOUT}/${APREFIX}atmanl${ASUFFIX}} @@ -204,7 +204,7 @@ USE_RADSTAT=${USE_RADSTAT:-"YES"} SELECT_OBS=${SELECT_OBS:-${COMOUT}/${APREFIX}obsinput} GENDIAG=${GENDIAG:-"YES"} DIAG_SUFFIX=${DIAG_SUFFIX:-""} -if [ $netcdf_diag = ".true." ] ; then +if [ ${netcdf_diag} = ".true." ] ; then DIAG_SUFFIX="${DIAG_SUFFIX}.nc4" fi DIAG_COMPRESS=${DIAG_COMPRESS:-"YES"} @@ -212,7 +212,7 @@ DIAG_TARBALL=${DIAG_TARBALL:-"YES"} USE_CFP=${USE_CFP:-"NO"} CFP_MP=${CFP_MP:-"NO"} nm="" -if [ $CFP_MP = "YES" ]; then +if [ ${CFP_MP} = "YES" ]; then nm=0 fi DIAG_DIR=${DIAG_DIR:-${COMOUT}/gsidiags} @@ -238,62 +238,62 @@ USE_CORRELATED_OBERRS=${USE_CORRELATED_OBERRS:-"YES"} # Get header information from Guess files if [ ${SUFFIX} = ".nc" ]; then - LONB=${LONB:-$($NCLEN $ATMGES grid_xt)} # get LONB - LATB=${LATB:-$($NCLEN $ATMGES grid_yt)} # get LATB - LEVS=${LEVS:-$($NCLEN $ATMGES pfull)} # get LEVS + LONB=${LONB:-$(${NCLEN} ${ATMGES} grid_xt)} # get LONB + LATB=${LATB:-$(${NCLEN} ${ATMGES} grid_yt)} # get LATB + LEVS=${LEVS:-$(${NCLEN} ${ATMGES} pfull)} # get LEVS JCAP=${JCAP:--9999} # there is no jcap in these files else - LONB=${LONB:-$($NEMSIOGET $ATMGES dimx | grep -i "dimx" | awk -F"= " '{print $2}' | awk -F" " '{print $1}')} # 'get LONB - LATB=${LATB:-$($NEMSIOGET $ATMGES dimy | grep -i "dimy" | awk -F"= " '{print $2}' | awk -F" " '{print $1}')} # 'get LATB - LEVS=${LEVS:-$($NEMSIOGET $ATMGES dimz | grep -i "dimz" | awk -F"= " '{print $2}' | awk -F" " '{print $1}')} # 'get LEVS - JCAP=${JCAP:-$($NEMSIOGET $ATMGES jcap | grep -i "jcap" | awk -F"= " '{print $2}' | awk -F" " '{print $1}')} # 'get JCAP + LONB=${LONB:-$(${NEMSIOGET} ${ATMGES} dimx | grep -i "dimx" | awk -F"= " '{print $2}' | awk -F" " '{print $1}')} # 'get LONB + LATB=${LATB:-$(${NEMSIOGET} ${ATMGES} dimy | grep -i "dimy" | awk -F"= " '{print $2}' | awk -F" " '{print $1}')} # 'get LATB + LEVS=${LEVS:-$(${NEMSIOGET} ${ATMGES} dimz | grep -i "dimz" | awk -F"= " '{print $2}' | awk -F" " '{print $1}')} # 'get LEVS + JCAP=${JCAP:-$(${NEMSIOGET} ${ATMGES} jcap | grep -i "jcap" | awk -F"= " '{print $2}' | awk -F" " '{print $1}')} # 'get JCAP fi -[ $JCAP -eq -9999 -a $LATB -ne -9999 ] && JCAP=$((LATB-2)) -[ $LONB -eq -9999 -o $LATB -eq -9999 -o $LEVS -eq -9999 -o $JCAP -eq -9999 ] && exit -9999 +[ ${JCAP} -eq -9999 -a ${LATB} -ne -9999 ] && JCAP=$((LATB-2)) +[ ${LONB} -eq -9999 -o ${LATB} -eq -9999 -o ${LEVS} -eq -9999 -o ${JCAP} -eq -9999 ] && exit -9999 # Get header information from Ensemble Guess files -if [ $DOHYBVAR = "YES" ]; then +if [ ${DOHYBVAR} = "YES" ]; then SFCGES_ENSMEAN=${SFCGES_ENSMEAN:-${COMIN_GES_ENS}/${GPREFIX}sfcf006.ensmean${GSUFFIX}} export ATMGES_ENSMEAN=${ATMGES_ENSMEAN:-${COMIN_GES_ENS}/${GPREFIX}atmf006.ensmean${GSUFFIX}} if [ ${SUFFIX} = ".nc" ]; then - LONB_ENKF=${LONB_ENKF:-$($NCLEN $ATMGES_ENSMEAN grid_xt)} # get LONB_ENKF - LATB_ENKF=${LATB_ENKF:-$($NCLEN $ATMGES_ENSMEAN grid_yt)} # get LATB_ENFK - LEVS_ENKF=${LEVS_ENKF:-$($NCLEN $ATMGES_ENSMEAN pfull)} # get LATB_ENFK + LONB_ENKF=${LONB_ENKF:-$(${NCLEN} ${ATMGES_ENSMEAN} grid_xt)} # get LONB_ENKF + LATB_ENKF=${LATB_ENKF:-$(${NCLEN} ${ATMGES_ENSMEAN} grid_yt)} # get LATB_ENFK + LEVS_ENKF=${LEVS_ENKF:-$(${NCLEN} ${ATMGES_ENSMEAN} pfull)} # get LATB_ENFK JCAP_ENKF=${JCAP_ENKF:--9999} # again, no jcap in the netcdf files else - LONB_ENKF=${LONB_ENKF:-$($NEMSIOGET $ATMGES_ENSMEAN dimx | grep -i "dimx" | awk -F"= " '{print $2}' | awk -F" " '{print $1}')} # 'get LONB_ENKF - LATB_ENKF=${LATB_ENKF:-$($NEMSIOGET $ATMGES_ENSMEAN dimy | grep -i "dimy" | awk -F"= " '{print $2}' | awk -F" " '{print $1}')} # 'get LATB_ENKF - LEVS_ENKF=${LEVS_ENKF:-$($NEMSIOGET $ATMGES_ENSMEAN dimz | grep -i "dimz" | awk -F"= " '{print $2}' | awk -F" " '{print $1}')} # 'get LEVS_ENKF - JCAP_ENKF=${JCAP_ENKF:-$($NEMSIOGET $ATMGES_ENSMEAN jcap | grep -i "jcap" | awk -F"= " '{print $2}' | awk -F" " '{print $1}')} # 'get JCAP_ENKF + LONB_ENKF=${LONB_ENKF:-$(${NEMSIOGET} ${ATMGES_ENSMEAN} dimx | grep -i "dimx" | awk -F"= " '{print $2}' | awk -F" " '{print $1}')} # 'get LONB_ENKF + LATB_ENKF=${LATB_ENKF:-$(${NEMSIOGET} ${ATMGES_ENSMEAN} dimy | grep -i "dimy" | awk -F"= " '{print $2}' | awk -F" " '{print $1}')} # 'get LATB_ENKF + LEVS_ENKF=${LEVS_ENKF:-$(${NEMSIOGET} ${ATMGES_ENSMEAN} dimz | grep -i "dimz" | awk -F"= " '{print $2}' | awk -F" " '{print $1}')} # 'get LEVS_ENKF + JCAP_ENKF=${JCAP_ENKF:-$(${NEMSIOGET} ${ATMGES_ENSMEAN} jcap | grep -i "jcap" | awk -F"= " '{print $2}' | awk -F" " '{print $1}')} # 'get JCAP_ENKF fi - NLON_ENKF=${NLON_ENKF:-$LONB_ENKF} - NLAT_ENKF=${NLAT_ENKF:-$(($LATB_ENKF+2))} - [ $JCAP_ENKF -eq -9999 -a $LATB_ENKF -ne -9999 ] && JCAP_ENKF=$((LATB_ENKF-2)) - [ $LONB_ENKF -eq -9999 -o $LATB_ENKF -eq -9999 -o $LEVS_ENKF -eq -9999 -o $JCAP_ENKF -eq -9999 ] && exit -9999 + NLON_ENKF=${NLON_ENKF:-${LONB_ENKF}} + NLAT_ENKF=${NLAT_ENKF:-$((${LATB_ENKF}+2))} + [ ${JCAP_ENKF} -eq -9999 -a ${LATB_ENKF} -ne -9999 ] && JCAP_ENKF=$((LATB_ENKF-2)) + [ ${LONB_ENKF} -eq -9999 -o ${LATB_ENKF} -eq -9999 -o ${LEVS_ENKF} -eq -9999 -o ${JCAP_ENKF} -eq -9999 ] && exit -9999 else LONB_ENKF=0 # just for if statement later fi # Get dimension information based on CASE -res=$(echo $CASE | cut -c2-) +res=$(echo ${CASE} | cut -c2-) JCAP_CASE=$((res*2-2)) LATB_CASE=$((res*2)) LONB_CASE=$((res*4)) # Set analysis resolution information -if [ $DOHYBVAR = "YES" ]; then - JCAP_A=${JCAP_A:-${JCAP_ENKF:-$JCAP}} - LONA=${LONA:-${LONB_ENKF:-$LONB}} - LATA=${LATA:-${LATB_ENKF:-$LATB}} +if [ ${DOHYBVAR} = "YES" ]; then + JCAP_A=${JCAP_A:-${JCAP_ENKF:-${JCAP}}} + LONA=${LONA:-${LONB_ENKF:-${LONB}}} + LATA=${LATA:-${LATB_ENKF:-${LATB}}} else - JCAP_A=${JCAP_A:-$JCAP} - LONA=${LONA:-$LONB} - LATA=${LATA:-$LATB} + JCAP_A=${JCAP_A:-${JCAP}} + LONA=${LONA:-${LONB}} + LATA=${LATA:-${LATB}} fi -NLON_A=${NLON_A:-$LONA} -NLAT_A=${NLAT_A:-$(($LATA+2))} +NLON_A=${NLON_A:-${LONA}} +NLAT_A=${NLAT_A:-$((${LATA}+2))} -DELTIM=${DELTIM:-$((3600/($JCAP_A/20)))} +DELTIM=${DELTIM:-$((3600/(${JCAP_A}/20)))} # logic for netCDF I/O if [ ${SUFFIX} = ".nc" ]; then @@ -307,13 +307,13 @@ else fi # determine if writing or calculating increment -if [ $DO_CALC_INCREMENT = "YES" ]; then +if [ ${DO_CALC_INCREMENT} = "YES" ]; then write_fv3_increment=".false." else write_fv3_increment=".true." - WRITE_INCR_ZERO="incvars_to_zero= $INCREMENTS_TO_ZERO," - WRITE_ZERO_STRAT="incvars_zero_strat= $INCVARS_ZERO_STRAT," - WRITE_STRAT_EFOLD="incvars_efold= $INCVARS_EFOLD," + WRITE_INCR_ZERO="incvars_to_zero= ${INCREMENTS_TO_ZERO}," + WRITE_ZERO_STRAT="incvars_zero_strat= ${INCVARS_ZERO_STRAT}," + WRITE_STRAT_EFOLD="incvars_efold= ${INCVARS_EFOLD}," fi # GSI Fix files @@ -353,7 +353,7 @@ NST=${NST:-""} #uGSI Namelist parameters lrun_subdirs=${lrun_subdirs:-".true."} -if [ $DOHYBVAR = "YES" ]; then +if [ ${DOHYBVAR} = "YES" ]; then l_hyb_ens=.true. export l4densvar=${l4densvar:-".false."} export lwrite4danl=${lwrite4danl:-".false."} @@ -364,7 +364,7 @@ else fi # Set 4D-EnVar specific variables -if [ $DOHYBVAR = "YES" -a $l4densvar = ".true." -a $lwrite4danl = ".true." ]; then +if [ ${DOHYBVAR} = "YES" -a ${l4densvar} = ".true." -a ${lwrite4danl} = ".true." ]; then ATMA03=${ATMA03:-${COMOUT}/${APREFIX}atma003${ASUFFIX}} ATMI03=${ATMI03:-${COMOUT}/${APREFIX}atmi003.nc} ATMA04=${ATMA04:-${COMOUT}/${APREFIX}atma004${ASUFFIX}} @@ -382,44 +382,44 @@ fi ################################################################################ # Preprocessing mkdata=NO -if [ ! -d $DATA ]; then +if [ ! -d ${DATA} ]; then mkdata=YES - mkdir -p $DATA + mkdir -p ${DATA} fi -cd $DATA || exit 99 +cd ${DATA} || exit 99 ############################################################## # Fixed files -$NLN $BERROR berror_stats -$NLN $SATANGL satbias_angle -$NLN $SATINFO satinfo -$NLN $RADCLOUDINFO cloudy_radiance_info.txt -$NLN $ATMSFILTER atms_beamwidth.txt -$NLN $ANAVINFO anavinfo -$NLN $CONVINFO convinfo -$NLN $vqcdat vqctp001.dat -$NLN $INSITUINFO insituinfo -$NLN $OZINFO ozinfo -$NLN $PCPINFO pcpinfo -$NLN $AEROINFO aeroinfo -$NLN $SCANINFO scaninfo -$NLN $HYBENSINFO hybens_info -$NLN $OBERROR errtable +${NLN} ${BERROR} berror_stats +${NLN} ${SATANGL} satbias_angle +${NLN} ${SATINFO} satinfo +${NLN} ${RADCLOUDINFO} cloudy_radiance_info.txt +${NLN} ${ATMSFILTER} atms_beamwidth.txt +${NLN} ${ANAVINFO} anavinfo +${NLN} ${CONVINFO} convinfo +${NLN} ${vqcdat} vqctp001.dat +${NLN} ${INSITUINFO} insituinfo +${NLN} ${OZINFO} ozinfo +${NLN} ${PCPINFO} pcpinfo +${NLN} ${AEROINFO} aeroinfo +${NLN} ${SCANINFO} scaninfo +${NLN} ${HYBENSINFO} hybens_info +${NLN} ${OBERROR} errtable #If using correlated error, link to the covariance files -if [ $USE_CORRELATED_OBERRS == "YES" ]; then - if grep -q "Rcov" $ANAVINFO ; then +if [ ${USE_CORRELATED_OBERRS} == "YES" ]; then + if grep -q "Rcov" ${ANAVINFO} ; then if ls ${FIXgsi}/Rcov* 1> /dev/null 2>&1; then - $NLN ${FIXgsi}/Rcov* $DATA + ${NLN} ${FIXgsi}/Rcov* ${DATA} echo "using correlated obs error" else echo "FATAL ERROR: Satellite error covariance files (Rcov) are missing." - echo "Check for the required Rcov files in " $ANAVINFO + echo "Check for the required Rcov files in " ${ANAVINFO} exit 1 fi else - echo "FATAL ERROR: Satellite error covariance info missing in " $ANAVINFO + echo "FATAL ERROR: Satellite error covariance info missing in " ${ANAVINFO} exit 1 fi @@ -436,140 +436,140 @@ fi # CRTM Spectral and Transmittance coefficients mkdir -p crtm_coeffs for file in $(awk '{if($1!~"!"){print $1}}' satinfo | sort | uniq); do - $NLN $RTMFIX/${file}.SpcCoeff.bin ./crtm_coeffs/${file}.SpcCoeff.bin - $NLN $RTMFIX/${file}.TauCoeff.bin ./crtm_coeffs/${file}.TauCoeff.bin + ${NLN} ${RTMFIX}/${file}.SpcCoeff.bin ./crtm_coeffs/${file}.SpcCoeff.bin + ${NLN} ${RTMFIX}/${file}.TauCoeff.bin ./crtm_coeffs/${file}.TauCoeff.bin done -$NLN $RTMFIX/amsua_metop-a_v2.SpcCoeff.bin ./crtm_coeffs/amsua_metop-a_v2.SpcCoeff.bin - -$NLN $RTMFIX/Nalli.IRwater.EmisCoeff.bin ./crtm_coeffs/Nalli.IRwater.EmisCoeff.bin -$NLN $RTMFIX/NPOESS.IRice.EmisCoeff.bin ./crtm_coeffs/NPOESS.IRice.EmisCoeff.bin -$NLN $RTMFIX/NPOESS.IRland.EmisCoeff.bin ./crtm_coeffs/NPOESS.IRland.EmisCoeff.bin -$NLN $RTMFIX/NPOESS.IRsnow.EmisCoeff.bin ./crtm_coeffs/NPOESS.IRsnow.EmisCoeff.bin -$NLN $RTMFIX/NPOESS.VISice.EmisCoeff.bin ./crtm_coeffs/NPOESS.VISice.EmisCoeff.bin -$NLN $RTMFIX/NPOESS.VISland.EmisCoeff.bin ./crtm_coeffs/NPOESS.VISland.EmisCoeff.bin -$NLN $RTMFIX/NPOESS.VISsnow.EmisCoeff.bin ./crtm_coeffs/NPOESS.VISsnow.EmisCoeff.bin -$NLN $RTMFIX/NPOESS.VISwater.EmisCoeff.bin ./crtm_coeffs/NPOESS.VISwater.EmisCoeff.bin -$NLN $RTMFIX/FASTEM6.MWwater.EmisCoeff.bin ./crtm_coeffs/FASTEM6.MWwater.EmisCoeff.bin -$NLN $RTMFIX/AerosolCoeff.bin ./crtm_coeffs/AerosolCoeff.bin -$NLN $RTMFIX/CloudCoeff.bin ./crtm_coeffs/CloudCoeff.bin +${NLN} ${RTMFIX}/amsua_metop-a_v2.SpcCoeff.bin ./crtm_coeffs/amsua_metop-a_v2.SpcCoeff.bin + +${NLN} ${RTMFIX}/Nalli.IRwater.EmisCoeff.bin ./crtm_coeffs/Nalli.IRwater.EmisCoeff.bin +${NLN} ${RTMFIX}/NPOESS.IRice.EmisCoeff.bin ./crtm_coeffs/NPOESS.IRice.EmisCoeff.bin +${NLN} ${RTMFIX}/NPOESS.IRland.EmisCoeff.bin ./crtm_coeffs/NPOESS.IRland.EmisCoeff.bin +${NLN} ${RTMFIX}/NPOESS.IRsnow.EmisCoeff.bin ./crtm_coeffs/NPOESS.IRsnow.EmisCoeff.bin +${NLN} ${RTMFIX}/NPOESS.VISice.EmisCoeff.bin ./crtm_coeffs/NPOESS.VISice.EmisCoeff.bin +${NLN} ${RTMFIX}/NPOESS.VISland.EmisCoeff.bin ./crtm_coeffs/NPOESS.VISland.EmisCoeff.bin +${NLN} ${RTMFIX}/NPOESS.VISsnow.EmisCoeff.bin ./crtm_coeffs/NPOESS.VISsnow.EmisCoeff.bin +${NLN} ${RTMFIX}/NPOESS.VISwater.EmisCoeff.bin ./crtm_coeffs/NPOESS.VISwater.EmisCoeff.bin +${NLN} ${RTMFIX}/FASTEM6.MWwater.EmisCoeff.bin ./crtm_coeffs/FASTEM6.MWwater.EmisCoeff.bin +${NLN} ${RTMFIX}/AerosolCoeff.bin ./crtm_coeffs/AerosolCoeff.bin +${NLN} ${RTMFIX}/CloudCoeff.bin ./crtm_coeffs/CloudCoeff.bin #$NLN $RTMFIX/CloudCoeff.GFDLFV3.-109z-1.bin ./crtm_coeffs/CloudCoeff.bin ############################################################## # Observational data -$NLN $PREPQC prepbufr -$NLN $PREPQCPF prepbufr_profl -$NLN $SATWND satwndbufr -$NLN $OSCATBF oscatbufr -$NLN $RAPIDSCATBF rapidscatbufr -$NLN $GSNDBF gsndrbufr -$NLN $GSNDBF1 gsnd1bufr -$NLN $B1HRS2 hirs2bufr -$NLN $B1MSU msubufr -$NLN $B1HRS3 hirs3bufr -$NLN $B1HRS4 hirs4bufr -$NLN $B1AMUA amsuabufr -$NLN $B1AMUB amsubbufr -$NLN $B1MHS mhsbufr -$NLN $ESHRS3 hirs3bufrears -$NLN $ESAMUA amsuabufrears -$NLN $ESAMUB amsubbufrears +${NLN} ${PREPQC} prepbufr +${NLN} ${PREPQCPF} prepbufr_profl +${NLN} ${SATWND} satwndbufr +${NLN} ${OSCATBF} oscatbufr +${NLN} ${RAPIDSCATBF} rapidscatbufr +${NLN} ${GSNDBF} gsndrbufr +${NLN} ${GSNDBF1} gsnd1bufr +${NLN} ${B1HRS2} hirs2bufr +${NLN} ${B1MSU} msubufr +${NLN} ${B1HRS3} hirs3bufr +${NLN} ${B1HRS4} hirs4bufr +${NLN} ${B1AMUA} amsuabufr +${NLN} ${B1AMUB} amsubbufr +${NLN} ${B1MHS} mhsbufr +${NLN} ${ESHRS3} hirs3bufrears +${NLN} ${ESAMUA} amsuabufrears +${NLN} ${ESAMUB} amsubbufrears #$NLN $ESMHS mhsbufrears -$NLN $HRS3DB hirs3bufr_db -$NLN $AMUADB amsuabufr_db -$NLN $AMUBDB amsubbufr_db +${NLN} ${HRS3DB} hirs3bufr_db +${NLN} ${AMUADB} amsuabufr_db +${NLN} ${AMUBDB} amsubbufr_db #$NLN $MHSDB mhsbufr_db -$NLN $SBUVBF sbuvbufr -$NLN $OMPSNPBF ompsnpbufr -$NLN $OMPSLPBF ompslpbufr -$NLN $OMPSTCBF ompstcbufr -$NLN $GOMEBF gomebufr -$NLN $OMIBF omibufr -$NLN $MLSBF mlsbufr -$NLN $SMIPCP ssmirrbufr -$NLN $TMIPCP tmirrbufr -$NLN $AIRSBF airsbufr -$NLN $IASIBF iasibufr -$NLN $ESIASI iasibufrears -$NLN $IASIDB iasibufr_db -$NLN $AMSREBF amsrebufr -$NLN $AMSR2BF amsr2bufr -$NLN $GMI1CRBF gmibufr -$NLN $SAPHIRBF saphirbufr -$NLN $SEVIRIBF seviribufr -$NLN $CRISBF crisbufr -$NLN $ESCRIS crisbufrears -$NLN $CRISDB crisbufr_db -$NLN $CRISFSBF crisfsbufr -$NLN $ESCRISFS crisfsbufrears -$NLN $CRISFSDB crisfsbufr_db -$NLN $ATMSBF atmsbufr -$NLN $ESATMS atmsbufrears -$NLN $ATMSDB atmsbufr_db -$NLN $SSMITBF ssmitbufr -$NLN $SSMISBF ssmisbufr -$NLN $GPSROBF gpsrobufr -$NLN $TCVITL tcvitl -$NLN $B1AVHAM avhambufr -$NLN $B1AVHPM avhpmbufr -$NLN $AHIBF ahibufr -$NLN $ABIBF abibufr -$NLN $HDOB hdobbufr -$NLN $SSTVIIRS sstviirs - -[[ $DONST = "YES" ]] && $NLN $NSSTBF nsstbufr +${NLN} ${SBUVBF} sbuvbufr +${NLN} ${OMPSNPBF} ompsnpbufr +${NLN} ${OMPSLPBF} ompslpbufr +${NLN} ${OMPSTCBF} ompstcbufr +${NLN} ${GOMEBF} gomebufr +${NLN} ${OMIBF} omibufr +${NLN} ${MLSBF} mlsbufr +${NLN} ${SMIPCP} ssmirrbufr +${NLN} ${TMIPCP} tmirrbufr +${NLN} ${AIRSBF} airsbufr +${NLN} ${IASIBF} iasibufr +${NLN} ${ESIASI} iasibufrears +${NLN} ${IASIDB} iasibufr_db +${NLN} ${AMSREBF} amsrebufr +${NLN} ${AMSR2BF} amsr2bufr +${NLN} ${GMI1CRBF} gmibufr +${NLN} ${SAPHIRBF} saphirbufr +${NLN} ${SEVIRIBF} seviribufr +${NLN} ${CRISBF} crisbufr +${NLN} ${ESCRIS} crisbufrears +${NLN} ${CRISDB} crisbufr_db +${NLN} ${CRISFSBF} crisfsbufr +${NLN} ${ESCRISFS} crisfsbufrears +${NLN} ${CRISFSDB} crisfsbufr_db +${NLN} ${ATMSBF} atmsbufr +${NLN} ${ESATMS} atmsbufrears +${NLN} ${ATMSDB} atmsbufr_db +${NLN} ${SSMITBF} ssmitbufr +${NLN} ${SSMISBF} ssmisbufr +${NLN} ${GPSROBF} gpsrobufr +${NLN} ${TCVITL} tcvitl +${NLN} ${B1AVHAM} avhambufr +${NLN} ${B1AVHPM} avhpmbufr +${NLN} ${AHIBF} ahibufr +${NLN} ${ABIBF} abibufr +${NLN} ${HDOB} hdobbufr +${NLN} ${SSTVIIRS} sstviirs + +[[ ${DONST} = "YES" ]] && ${NLN} ${NSSTBF} nsstbufr ############################################################## # Required bias guess files -$NLN $GBIAS satbias_in -$NLN $GBIASPC satbias_pc -$NLN $GBIASAIR aircftbias_in -$NLN $GRADSTAT radstat.gdas +${NLN} ${GBIAS} satbias_in +${NLN} ${GBIASPC} satbias_pc +${NLN} ${GBIASAIR} aircftbias_in +${NLN} ${GRADSTAT} radstat.gdas ############################################################## # Required model guess files -$NLN $ATMG03 sigf03 -$NLN $ATMGES sigf06 -$NLN $ATMG09 sigf09 +${NLN} ${ATMG03} sigf03 +${NLN} ${ATMGES} sigf06 +${NLN} ${ATMG09} sigf09 -$NLN $SFCG03 sfcf03 -$NLN $SFCGES sfcf06 -$NLN $SFCG09 sfcf09 +${NLN} ${SFCG03} sfcf03 +${NLN} ${SFCGES} sfcf06 +${NLN} ${SFCG09} sfcf09 # Link hourly backgrounds (if present) -if [ -f $ATMG04 -a -f $ATMG05 -a -f $ATMG07 -a -f $ATMG08 ]; then +if [ -f ${ATMG04} -a -f ${ATMG05} -a -f ${ATMG07} -a -f ${ATMG08} ]; then nhr_obsbin=1 fi -[[ -f $ATMG04 ]] && $NLN $ATMG04 sigf04 -[[ -f $ATMG05 ]] && $NLN $ATMG05 sigf05 -[[ -f $ATMG07 ]] && $NLN $ATMG07 sigf07 -[[ -f $ATMG08 ]] && $NLN $ATMG08 sigf08 +[[ -f ${ATMG04} ]] && ${NLN} ${ATMG04} sigf04 +[[ -f ${ATMG05} ]] && ${NLN} ${ATMG05} sigf05 +[[ -f ${ATMG07} ]] && ${NLN} ${ATMG07} sigf07 +[[ -f ${ATMG08} ]] && ${NLN} ${ATMG08} sigf08 -[[ -f $SFCG04 ]] && $NLN $SFCG04 sfcf04 -[[ -f $SFCG05 ]] && $NLN $SFCG05 sfcf05 -[[ -f $SFCG07 ]] && $NLN $SFCG07 sfcf07 -[[ -f $SFCG08 ]] && $NLN $SFCG08 sfcf08 +[[ -f ${SFCG04} ]] && ${NLN} ${SFCG04} sfcf04 +[[ -f ${SFCG05} ]] && ${NLN} ${SFCG05} sfcf05 +[[ -f ${SFCG07} ]] && ${NLN} ${SFCG07} sfcf07 +[[ -f ${SFCG08} ]] && ${NLN} ${SFCG08} sfcf08 -if [ $DOHYBVAR = "YES" ]; then +if [ ${DOHYBVAR} = "YES" ]; then # Link ensemble members mkdir -p ensemble_data ENKF_SUFFIX="s" - [[ $SMOOTH_ENKF = "NO" ]] && ENKF_SUFFIX="" + [[ ${SMOOTH_ENKF} = "NO" ]] && ENKF_SUFFIX="" fhrs="06" - if [ $l4densvar = ".true." ]; then + if [ ${l4densvar} = ".true." ]; then fhrs="03 04 05 06 07 08 09" fi - for imem in $(seq 1 $NMEM_ENKF); do - memchar="mem"$(printf %03i $imem) - for fhr in $fhrs; do - $NLN ${COMIN_GES_ENS}/$memchar/${GPREFIX}atmf0${fhr}${ENKF_SUFFIX}${GSUFFIX} ./ensemble_data/sigf${fhr}_ens_$memchar - if [ $cnvw_option = ".true." ]; then - $NLN ${COMIN_GES_ENS}/$memchar/${GPREFIX}sfcf0${fhr}${GSUFFIX} ./ensemble_data/sfcf${fhr}_ens_$memchar + for imem in $(seq 1 ${NMEM_ENKF}); do + memchar="mem"$(printf %03i ${imem}) + for fhr in ${fhrs}; do + ${NLN} ${COMIN_GES_ENS}/${memchar}/${GPREFIX}atmf0${fhr}${ENKF_SUFFIX}${GSUFFIX} ./ensemble_data/sigf${fhr}_ens_${memchar} + if [ ${cnvw_option} = ".true." ]; then + ${NLN} ${COMIN_GES_ENS}/${memchar}/${GPREFIX}sfcf0${fhr}${GSUFFIX} ./ensemble_data/sfcf${fhr}_ens_${memchar} fi done done @@ -579,11 +579,11 @@ fi ############################################################## # Handle inconsistent surface mask between background, ensemble and analysis grids # This needs re-visiting in the context of NSST; especially references to JCAP* -if [ $JCAP -ne $JCAP_A ]; then - if [ $DOHYBVAR = "YES" -a $JCAP_A = $JCAP_ENKF ]; then - if [ -e $SFCGES_ENSMEAN ]; then +if [ ${JCAP} -ne ${JCAP_A} ]; then + if [ ${DOHYBVAR} = "YES" -a ${JCAP_A} = ${JCAP_ENKF} ]; then + if [ -e ${SFCGES_ENSMEAN} ]; then USE_READIN_ANL_SFCMASK=.true. - $NLN $SFCGES_ENSMEAN sfcf06_anlgrid + ${NLN} ${SFCGES_ENSMEAN} sfcf06_anlgrid else echo "Warning: Inconsistent sfc mask between analysis and ensemble grids, GSI will interpolate" fi @@ -595,108 +595,108 @@ fi ############################################################## # Diagnostic files # if requested, link GSI diagnostic file directories for use later -if [ $GENDIAG = "YES" ] ; then - if [ $lrun_subdirs = ".true." ] ; then - if [ -d $DIAG_DIR ]; then - rm -rf $DIAG_DIR +if [ ${GENDIAG} = "YES" ] ; then + if [ ${lrun_subdirs} = ".true." ] ; then + if [ -d ${DIAG_DIR} ]; then + rm -rf ${DIAG_DIR} fi - npe_m1="$(($npe_gsi-1))" - for pe in $(seq 0 $npe_m1); do - pedir="dir."$(printf %04i $pe) - mkdir -p $DIAG_DIR/$pedir - $NLN $DIAG_DIR/$pedir $pedir + npe_m1="$((${npe_gsi}-1))" + for pe in $(seq 0 ${npe_m1}); do + pedir="dir."$(printf %04i ${pe}) + mkdir -p ${DIAG_DIR}/${pedir} + ${NLN} ${DIAG_DIR}/${pedir} ${pedir} done else - err_exit "FATAL ERROR: lrun_subdirs must be true. lrun_subdirs=$lrun_subdirs" + err_exit "FATAL ERROR: lrun_subdirs must be true. lrun_subdirs=${lrun_subdirs}" fi fi ############################################################## # Output files -$NLN $ATMANL siganl -$NLN $ATMINC siginc.nc -if [ $DOHYBVAR = "YES" -a $l4densvar = ".true." -a $lwrite4danl = ".true." ]; then - $NLN $ATMA03 siga03 - $NLN $ATMI03 sigi03.nc - $NLN $ATMA04 siga04 - $NLN $ATMI04 sigi04.nc - $NLN $ATMA05 siga05 - $NLN $ATMI05 sigi05.nc - $NLN $ATMA07 siga07 - $NLN $ATMI07 sigi07.nc - $NLN $ATMA08 siga08 - $NLN $ATMI08 sigi08.nc - $NLN $ATMA09 siga09 - $NLN $ATMI09 sigi09.nc +${NLN} ${ATMANL} siganl +${NLN} ${ATMINC} siginc.nc +if [ ${DOHYBVAR} = "YES" -a ${l4densvar} = ".true." -a ${lwrite4danl} = ".true." ]; then + ${NLN} ${ATMA03} siga03 + ${NLN} ${ATMI03} sigi03.nc + ${NLN} ${ATMA04} siga04 + ${NLN} ${ATMI04} sigi04.nc + ${NLN} ${ATMA05} siga05 + ${NLN} ${ATMI05} sigi05.nc + ${NLN} ${ATMA07} siga07 + ${NLN} ${ATMI07} sigi07.nc + ${NLN} ${ATMA08} siga08 + ${NLN} ${ATMI08} sigi08.nc + ${NLN} ${ATMA09} siga09 + ${NLN} ${ATMI09} sigi09.nc fi -$NLN $ABIAS satbias_out -$NLN $ABIASPC satbias_pc.out -$NLN $ABIASAIR aircftbias_out +${NLN} ${ABIAS} satbias_out +${NLN} ${ABIASPC} satbias_pc.out +${NLN} ${ABIASAIR} aircftbias_out -if [ $DONST = "YES" ]; then - $NLN $DTFANL dtfanl +if [ ${DONST} = "YES" ]; then + ${NLN} ${DTFANL} dtfanl fi # If requested, link (and if tarred, de-tar obsinput.tar) into obs_input.* files -if [ $USE_SELECT = "YES" ]; then +if [ ${USE_SELECT} = "YES" ]; then rm obs_input.* - nl=$(file $SELECT_OBS | cut -d: -f2 | grep tar | wc -l) - if [ $nl -eq 1 ]; then + nl=$(file ${SELECT_OBS} | cut -d: -f2 | grep tar | wc -l) + if [ ${nl} -eq 1 ]; then rm obsinput.tar - $NLN $SELECT_OBS obsinput.tar + ${NLN} ${SELECT_OBS} obsinput.tar tar -xvf obsinput.tar rm obsinput.tar else - for filetop in $(ls $SELECT_OBS/obs_input.*); do - fileloc=$(basename $filetop) - $NLN $filetop $fileloc + for filetop in $(ls ${SELECT_OBS}/obs_input.*); do + fileloc=$(basename ${filetop}) + ${NLN} ${filetop} ${fileloc} done fi fi ############################################################## # If requested, copy and de-tar guess radstat file -if [ $USE_RADSTAT = "YES" ]; then - if [ $USE_CFP = "YES" ]; then - [[ -f $DATA/unzip.sh ]] && rm $DATA/unzip.sh - [[ -f $DATA/mp_unzip.sh ]] && rm $DATA/mp_unzip.sh - cat > $DATA/unzip.sh << EOFunzip +if [ ${USE_RADSTAT} = "YES" ]; then + if [ ${USE_CFP} = "YES" ]; then + [[ -f ${DATA}/unzip.sh ]] && rm ${DATA}/unzip.sh + [[ -f ${DATA}/mp_unzip.sh ]] && rm ${DATA}/mp_unzip.sh + cat > ${DATA}/unzip.sh << EOFunzip #!/bin/sh diag_file=\$1 diag_suffix=\$2 fname=\$(echo \$diag_file | cut -d'.' -f1) fdate=\$(echo \$diag_file | cut -d'.' -f2) - $UNCOMPRESS \$diag_file + ${UNCOMPRESS} \$diag_file fnameges=\$(echo \$fname | sed 's/_ges//g') - $NMV \$fname.\$fdate\$diag_suffix \$fnameges + ${NMV} \$fname.\$fdate\$diag_suffix \$fnameges EOFunzip - chmod 755 $DATA/unzip.sh + chmod 755 ${DATA}/unzip.sh fi listdiag=$(tar xvf radstat.gdas | cut -d' ' -f2 | grep _ges) - for type in $listdiag; do - diag_file=$(echo $type | cut -d',' -f1) - if [ $USE_CFP = "YES" ] ; then - echo "$nm $DATA/unzip.sh $diag_file $DIAG_SUFFIX" | tee -a $DATA/mp_unzip.sh + for type in ${listdiag}; do + diag_file=$(echo ${type} | cut -d',' -f1) + if [ ${USE_CFP} = "YES" ] ; then + echo "${nm} ${DATA}/unzip.sh ${diag_file} ${DIAG_SUFFIX}" | tee -a ${DATA}/mp_unzip.sh if [ ${CFP_MP:-"NO"} = "YES" ]; then nm=$((nm+1)) fi else - fname=$(echo $diag_file | cut -d'.' -f1) - date=$(echo $diag_file | cut -d'.' -f2) - $UNCOMPRESS $diag_file - fnameges=$(echo $fname|sed 's/_ges//g') - $NMV $fname.$date$DIAG_SUFFIX $fnameges + fname=$(echo ${diag_file} | cut -d'.' -f1) + date=$(echo ${diag_file} | cut -d'.' -f2) + ${UNCOMPRESS} ${diag_file} + fnameges=$(echo ${fname}|sed 's/_ges//g') + ${NMV} ${fname}.${date}${DIAG_SUFFIX} ${fnameges} fi done - if [ $USE_CFP = "YES" ] ; then - chmod 755 $DATA/mp_unzip.sh - ncmd=$(cat $DATA/mp_unzip.sh | wc -l) - if [ $ncmd -gt 0 ]; then + if [ ${USE_CFP} = "YES" ] ; then + chmod 755 ${DATA}/mp_unzip.sh + ncmd=$(cat ${DATA}/mp_unzip.sh | wc -l) + if [ ${ncmd} -gt 0 ]; then ncmd_max=$((ncmd < npe_node_max ? ncmd : npe_node_max)) - APRUNCFP_UNZIP=$(eval echo $APRUNCFP) - $APRUNCFP_UNZIP $DATA/mp_unzip.sh + APRUNCFP_UNZIP=$(eval echo ${APRUNCFP}) + ${APRUNCFP_UNZIP} ${DATA}/mp_unzip.sh export err=$?; err_chk fi fi @@ -704,18 +704,18 @@ fi # if [ $USE_RADSTAT = "YES" ] ############################################################## # GSI Namelist options -if [ $DOHYBVAR = "YES" ]; then - HYBRID_ENSEMBLE="n_ens=$NMEM_ENKF,jcap_ens=$JCAP_ENKF,nlat_ens=$NLAT_ENKF,nlon_ens=$NLON_ENKF,jcap_ens_test=$JCAP_ENKF,$HYBRID_ENSEMBLE" - if [ $l4densvar = ".true." ]; then - SETUP="niter(1)=50,niter(2)=150,niter_no_qc(1)=25,niter_no_qc(2)=0,thin4d=.true.,ens_nstarthr=3,l4densvar=$l4densvar,lwrite4danl=$lwrite4danl,$SETUP" - JCOPTS="ljc4tlevs=.true.,$JCOPTS" - STRONGOPTS="tlnmc_option=3,$STRONGOPTS" - OBSQC="c_varqc=0.04,$OBSQC" +if [ ${DOHYBVAR} = "YES" ]; then + HYBRID_ENSEMBLE="n_ens=${NMEM_ENKF},jcap_ens=${JCAP_ENKF},nlat_ens=${NLAT_ENKF},nlon_ens=${NLON_ENKF},jcap_ens_test=${JCAP_ENKF},${HYBRID_ENSEMBLE}" + if [ ${l4densvar} = ".true." ]; then + SETUP="niter(1)=50,niter(2)=150,niter_no_qc(1)=25,niter_no_qc(2)=0,thin4d=.true.,ens_nstarthr=3,l4densvar=${l4densvar},lwrite4danl=${lwrite4danl},${SETUP}" + JCOPTS="ljc4tlevs=.true.,${JCOPTS}" + STRONGOPTS="tlnmc_option=3,${STRONGOPTS}" + OBSQC="c_varqc=0.04,${OBSQC}" fi fi -if [ $DONST = "YES" ]; then - NST="nstinfo=$NSTINFO,fac_dtl=$FAC_DTL,fac_tsl=$FAC_TSL,zsea1=$ZSEA1,zsea2=$ZSEA2,$NST" +if [ ${DONST} = "YES" ]; then + NST="nstinfo=${NSTINFO},fac_dtl=${FAC_DTL},fac_tsl=${FAC_TSL},zsea1=${ZSEA1},zsea2=${ZSEA2},${NST}" fi ############################################################## @@ -727,33 +727,33 @@ cat > gsiparm.anl << EOF niter_no_qc(1)=50,niter_no_qc(2)=0, write_diag(1)=.true.,write_diag(2)=.false.,write_diag(3)=.true., qoption=2, - gencode=${IGEN:-0},deltim=$DELTIM, + gencode=${IGEN:-0},deltim=${DELTIM}, factqmin=0.5,factqmax=0.0002, iguess=-1, - tzr_qc=$TZR_QC, + tzr_qc=${TZR_QC}, oneobtest=.false.,retrieval=.false.,l_foto=.false., use_pbl=.false.,use_compress=.true.,nsig_ext=12,gpstop=50.,commgpstop=45.,commgpserrinf=1.0, use_gfs_nemsio=${use_gfs_nemsio},use_gfs_ncio=${use_gfs_ncio},sfcnst_comb=.true., use_readin_anl_sfcmask=${USE_READIN_ANL_SFCMASK}, - lrun_subdirs=$lrun_subdirs, + lrun_subdirs=${lrun_subdirs}, crtm_coeffs_path='./crtm_coeffs/', newpc4pred=.true.,adp_anglebc=.true.,angord=4,passive_bc=.true.,use_edges=.false., diag_precon=.true.,step_start=1.e-3,emiss_bc=.true.,nhr_obsbin=${nhr_obsbin:-3}, - cwoption=3,imp_physics=$imp_physics,lupp=$lupp,cnvw_option=$cnvw_option,cao_check=${cao_check}, - netcdf_diag=$netcdf_diag,binary_diag=$binary_diag, - lobsdiag_forenkf=$lobsdiag_forenkf, - write_fv3_incr=$write_fv3_increment, + cwoption=3,imp_physics=${imp_physics},lupp=${lupp},cnvw_option=${cnvw_option},cao_check=${cao_check}, + netcdf_diag=${netcdf_diag},binary_diag=${binary_diag}, + lobsdiag_forenkf=${lobsdiag_forenkf}, + write_fv3_incr=${write_fv3_increment}, nhr_anal=${IAUFHRS}, ta2tb=${ta2tb}, - $WRITE_INCR_ZERO - $WRITE_ZERO_STRAT - $WRITE_STRAT_EFOLD - $SETUP + ${WRITE_INCR_ZERO} + ${WRITE_ZERO_STRAT} + ${WRITE_STRAT_EFOLD} + ${SETUP} / &GRIDOPTS - JCAP_B=$JCAP,JCAP=$JCAP_A,NLAT=$NLAT_A,NLON=$NLON_A,nsig=$LEVS, + JCAP_B=${JCAP},JCAP=${JCAP_A},NLAT=${NLAT_A},NLON=${NLON_A},nsig=${LEVS}, regional=.false.,nlayers(63)=3,nlayers(64)=6, - $GRIDOPTS + ${GRIDOPTS} / &BKGERR vs=0.7, @@ -763,30 +763,30 @@ cat > gsiparm.anl << EOF bkgv_flowdep=.true.,bkgv_rewgtfct=1.5, bkgv_write=.false., cwcoveqqcov=.false., - $BKGVERR + ${BKGVERR} / &ANBKGERR anisotropic=.false., - $ANBKGERR + ${ANBKGERR} / &JCOPTS ljcdfi=.false.,alphajc=0.0,ljcpdry=.true.,bamp_jcpdry=5.0e7, - $JCOPTS + ${JCOPTS} / &STRONGOPTS tlnmc_option=2,nstrong=1,nvmodes_keep=8,period_max=6.,period_width=1.5, - $STRONGOPTS + ${STRONGOPTS} / &OBSQC dfact=0.75,dfact1=3.0,noiqc=.true.,oberrflg=.false.,c_varqc=0.02, use_poq7=.true.,qc_noirjaco3_pole=.true.,vqc=.false.,nvqc=.true., aircraft_t_bc=.true.,biaspredt=1.0e5,upd_aircraft=.true.,cleanup_tail=.true., tcp_width=70.0,tcp_ermax=7.35, - $OBSQC + ${OBSQC} / &OBS_INPUT dmesh(1)=145.0,dmesh(2)=150.0,dmesh(3)=100.0,dmesh(4)=25.0,time_window_max=3.0, - $OBSINPUT + ${OBSINPUT} / OBS_INPUT:: ! dfile dtype dplat dsis dval dthin dsfcalc @@ -908,37 +908,37 @@ OBS_INPUT:: gomebufr gome metop-c gome_metop-c 0.0 2 0 :: &SUPEROB_RADAR - $SUPERRAD + ${SUPERRAD} / &LAG_DATA - $LAGDATA + ${LAGDATA} / &HYBRID_ENSEMBLE - l_hyb_ens=$l_hyb_ens, + l_hyb_ens=${l_hyb_ens}, generate_ens=.false., beta_s0=0.125,readin_beta=.false., s_ens_h=800.,s_ens_v=-0.8,readin_localization=.true., aniso_a_en=.false.,oz_univ_static=.false.,uv_hyb_ens=.true., ensemble_path='./ensemble_data/', ens_fast_read=.true., - $HYBRID_ENSEMBLE + ${HYBRID_ENSEMBLE} / &RAPIDREFRESH_CLDSURF dfi_radar_latent_heat_time_period=30.0, - $RAPIDREFRESH_CLDSURF + ${RAPIDREFRESH_CLDSURF} / &CHEM - $CHEM + ${CHEM} / &SINGLEOB_TEST maginnov=0.1,magoberr=0.1,oneob_type='t', - oblat=45.,oblon=180.,obpres=1000.,obdattim=$CDATE, + oblat=45.,oblon=180.,obpres=1000.,obdattim=${CDATE}, obhourset=0., - $SINGLEOB + ${SINGLEOB} / &NST - nst_gsi=$NST_GSI, - $NST + nst_gsi=${NST_GSI}, + ${NST} / EOF cat gsiparm.anl @@ -946,20 +946,20 @@ cat gsiparm.anl ############################################################## # Run gsi analysis -export OMP_NUM_THREADS=$NTHREADS_GSI -export pgm=$GSIEXEC +export OMP_NUM_THREADS=${NTHREADS_GSI} +export pgm=${GSIEXEC} . prep_step -$NCP $GSIEXEC $DATA -$APRUN_GSI ${DATA}/$(basename $GSIEXEC) 1>&1 2>&2 +${NCP} ${GSIEXEC} ${DATA} +${APRUN_GSI} ${DATA}/$(basename ${GSIEXEC}) 1>&1 2>&2 export err=$?; err_chk ############################################################## # If full analysis field written, calculate analysis increment # here before releasing FV3 forecast -if [ $DO_CALC_INCREMENT = "YES" ]; then - $CALCINCPY +if [ ${DO_CALC_INCREMENT} = "YES" ]; then + ${CALCINCPY} export err=$?; err_chk fi @@ -967,52 +967,52 @@ fi ############################################################## # For eupd if [ -s satbias_out.int ]; then - $NCP satbias_out.int $ABIASe + ${NCP} satbias_out.int ${ABIASe} else - $NCP satbias_in $ABIASe + ${NCP} satbias_in ${ABIASe} fi # Cat runtime output files. -cat fort.2* > $GSISTAT +cat fort.2* > ${GSISTAT} # If requested, create obsinput tarball from obs_input.* files -if [ $RUN_SELECT = "YES" ]; then +if [ ${RUN_SELECT} = "YES" ]; then echo $(date) START tar obs_input >&2 [[ -s obsinput.tar ]] && rm obsinput.tar - $NLN $SELECT_OBS obsinput.tar + ${NLN} ${SELECT_OBS} obsinput.tar ${CHGRP_CMD} obs_input.* tar -cvf obsinput.tar obs_input.* - chmod 750 $SELECT_OBS - ${CHGRP_CMD} $SELECT_OBS + chmod 750 ${SELECT_OBS} + ${CHGRP_CMD} ${SELECT_OBS} rm obsinput.tar echo $(date) END tar obs_input >&2 fi ################################################################################ # Send alerts -if [ $SENDDBN = "YES" ]; then - if [ $RUN = "gfs" ]; then - $DBNROOT/bin/dbn_alert MODEL GFS_abias $job $ABIAS +if [ ${SENDDBN} = "YES" ]; then + if [ ${RUN} = "gfs" ]; then + ${DBNROOT}/bin/dbn_alert MODEL GFS_abias ${job} ${ABIAS} fi fi ################################################################################ # Postprocessing -cd $pwd -[[ $mkdata = "YES" ]] && rm -rf $DATA +cd ${pwd} +[[ ${mkdata} = "YES" ]] && rm -rf ${DATA} ############################################################## # Add this statement to release the forecast job once the # atmopsheric analysis and updated surface RESTARTS are # available. Do not release forecast when RUN=enkf ############################################################## -if [ $SENDECF = "YES" -a "$RUN" != "enkf" ]; then +if [ ${SENDECF} = "YES" -a "${RUN}" != "enkf" ]; then ecflow_client --event release_fcst fi -echo "$CDUMP $CDATE atminc done at $(date)" > $COMOUT/${APREFIX}loginc.txt +echo "${CDUMP} ${CDATE} atminc done at $(date)" > ${COMOUT}/${APREFIX}loginc.txt ################################################################################ -exit $err +exit ${err} ################################################################################ From 3e26d0ee96392e65f208c499937ecb806e2d802c Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Thu, 1 Dec 2022 14:16:49 -0500 Subject: [PATCH 29/30] remove references to config_path --- jobs/JENKFGDAS_ARCHIVE | 9 ++++----- jobs/JGDAS_ATMOS_ANALYSIS_DIAG | 3 +-- jobs/JGDAS_ATMOS_CHGRES_FORENKF | 3 +-- jobs/JGDAS_ATMOS_GEMPAK | 1 - jobs/JGDAS_ATMOS_GLDAS | 7 +------ jobs/JGDAS_ENKF_DIAG | 3 +-- jobs/JGDAS_ENKF_ECEN | 3 +-- jobs/JGDAS_ENKF_FCST | 3 +-- jobs/JGDAS_ENKF_POST | 3 +-- jobs/JGDAS_ENKF_SELECT_OBS | 3 +-- jobs/JGDAS_ENKF_SFC | 3 +-- jobs/JGDAS_ENKF_UPDATE | 3 +-- jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST | 3 +-- jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP | 3 +-- jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN | 3 +-- jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST | 3 +-- jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP | 3 +-- jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN | 3 +-- jobs/JGFS_ATMOS_CYCLONE_GENESIS | 4 ++-- jobs/JGFS_ATMOS_CYCLONE_TRACKER | 4 ++-- jobs/JGFS_ATMOS_FSU_GENESIS | 4 ++-- jobs/JGFS_ATMOS_GEMPAK | 3 +-- jobs/JGFS_ATMOS_POSTSND | 5 ++--- jobs/JGLOBAL_ARCHIVE | 3 +-- jobs/JGLOBAL_ATMOS_ANALYSIS | 3 +-- jobs/JGLOBAL_ATMOS_ANALYSIS_CALC | 3 +-- jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP | 5 ++--- jobs/JGLOBAL_ATMOS_POST | 5 ++--- jobs/JGLOBAL_ATMOS_POST_MANAGER | 3 +-- jobs/JGLOBAL_ATMOS_SFCANL | 3 +-- jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC | 5 ++--- jobs/JGLOBAL_FORECAST | 3 +-- jobs/JGLOBAL_WAVE_INIT | 3 +-- jobs/JGLOBAL_WAVE_POST_BNDPNT | 3 +-- jobs/JGLOBAL_WAVE_POST_BNDPNTBLL | 3 +-- jobs/JGLOBAL_WAVE_POST_PNT | 3 +-- jobs/JGLOBAL_WAVE_POST_SBS | 3 +-- jobs/JGLOBAL_WAVE_PREP | 3 +-- 38 files changed, 47 insertions(+), 86 deletions(-) diff --git a/jobs/JENKFGDAS_ARCHIVE b/jobs/JENKFGDAS_ARCHIVE index cf38ede54f..305dbe005b 100755 --- a/jobs/JENKFGDAS_ARCHIVE +++ b/jobs/JENKFGDAS_ARCHIVE @@ -7,9 +7,8 @@ source "${HOMEgfs}/ush/preamble.sh" ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base earc" -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} for config in ${configs}; do - . "${config_path}"/config."${config}" + . "${EXPDIR}"/config."${config}" status=$? [[ ${status} -ne 0 ]] && exit "${status}" done @@ -17,7 +16,7 @@ done ########################################## # Source machine runtime environment ########################################## -. "${HOMEgfs}"/env/"${machine}".env earc +. ${HOMEgfs}/env/${machine}.env earc status=$? [[ ${status} -ne 0 ]] && exit "${status}" @@ -50,13 +49,13 @@ export pgmerr=errfile ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gdas"}} -export COMPONENT=${COMPONENT:-atmos} +export COMPONENT="atmos" ############################################################### # Run archive script ############################################################### -"${SCRgfs}"/exgdas_enkf_earc.sh +${SCRgfs}/exgdas_enkf_earc.sh status=$? [[ ${status} -ne 0 ]] && exit "${status}" diff --git a/jobs/JGDAS_ATMOS_ANALYSIS_DIAG b/jobs/JGDAS_ATMOS_ANALYSIS_DIAG index ff8e33e86e..11fc1553c2 100755 --- a/jobs/JGDAS_ATMOS_ANALYSIS_DIAG +++ b/jobs/JGDAS_ATMOS_ANALYSIS_DIAG @@ -31,9 +31,8 @@ export pgmerr=errfile ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base anal analdiag" -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGDAS_ATMOS_CHGRES_FORENKF b/jobs/JGDAS_ATMOS_CHGRES_FORENKF index 7265ba3ffd..f3848e544d 100755 --- a/jobs/JGDAS_ATMOS_CHGRES_FORENKF +++ b/jobs/JGDAS_ATMOS_CHGRES_FORENKF @@ -31,9 +31,8 @@ export pgmerr=errfile ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base anal echgres" -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGDAS_ATMOS_GEMPAK b/jobs/JGDAS_ATMOS_GEMPAK index 2fe7cd1b2d..28c3c0df48 100755 --- a/jobs/JGDAS_ATMOS_GEMPAK +++ b/jobs/JGDAS_ATMOS_GEMPAK @@ -24,7 +24,6 @@ export pgmerr=errfile # Source relevant config files ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base gempak" for config in ${configs}; do . ${EXPDIR}/config.${config} diff --git a/jobs/JGDAS_ATMOS_GLDAS b/jobs/JGDAS_ATMOS_GLDAS index d03d48c75e..996daf12de 100755 --- a/jobs/JGDAS_ATMOS_GLDAS +++ b/jobs/JGDAS_ATMOS_GLDAS @@ -15,9 +15,7 @@ cd "${DATA}" || exit 1 ############################################## export cycle="t${cyc}z" setpdy.sh -# shellcheck disable=SC1091 . ./PDY -# shellcheck disable= ############################################## @@ -32,12 +30,9 @@ export pgmerr=errfile # Source relevant config files ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -config_path=${EXPDIR:-${NWROOT}/gfs.${gfs_ver}/parm/config} configs="base gldas" for config in ${configs}; do - # shellcheck disable=SC1090-SC1091 - . "${config_path}/config.${config}" - # shellcheck disable= + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit "${status}" done diff --git a/jobs/JGDAS_ENKF_DIAG b/jobs/JGDAS_ENKF_DIAG index c72e3333fe..b144a72bb3 100755 --- a/jobs/JGDAS_ENKF_DIAG +++ b/jobs/JGDAS_ENKF_DIAG @@ -31,9 +31,8 @@ export pgmerr=errfile ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base anal eobs analdiag ediag" -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGDAS_ENKF_ECEN b/jobs/JGDAS_ENKF_ECEN index 0f9a68f22f..d3d4f8fe7e 100755 --- a/jobs/JGDAS_ENKF_ECEN +++ b/jobs/JGDAS_ENKF_ECEN @@ -31,9 +31,8 @@ export pgmerr=errfile ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base ecen" -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGDAS_ENKF_FCST b/jobs/JGDAS_ENKF_FCST index ef305045ed..e5d949577b 100755 --- a/jobs/JGDAS_ENKF_FCST +++ b/jobs/JGDAS_ENKF_FCST @@ -30,10 +30,9 @@ export pgmerr=errfile # Source relevant config files ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base fcst efcs" for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGDAS_ENKF_POST b/jobs/JGDAS_ENKF_POST index 95d41bbe72..02d2741d16 100755 --- a/jobs/JGDAS_ENKF_POST +++ b/jobs/JGDAS_ENKF_POST @@ -31,9 +31,8 @@ export pgmerr=errfile ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base epos" -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGDAS_ENKF_SELECT_OBS b/jobs/JGDAS_ENKF_SELECT_OBS index 02259700b1..b0b149080f 100755 --- a/jobs/JGDAS_ENKF_SELECT_OBS +++ b/jobs/JGDAS_ENKF_SELECT_OBS @@ -31,9 +31,8 @@ export pgmerr=errfile ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base anal eobs" -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGDAS_ENKF_SFC b/jobs/JGDAS_ENKF_SFC index 4495ad732a..85313002a6 100755 --- a/jobs/JGDAS_ENKF_SFC +++ b/jobs/JGDAS_ENKF_SFC @@ -31,9 +31,8 @@ export pgmerr=errfile ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base esfc" -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGDAS_ENKF_UPDATE b/jobs/JGDAS_ENKF_UPDATE index 5062d8a976..e97016b630 100755 --- a/jobs/JGDAS_ENKF_UPDATE +++ b/jobs/JGDAS_ENKF_UPDATE @@ -31,9 +31,8 @@ export pgmerr=errfile ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base anal eupd" -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST index c770f3bc81..56e0c4ade9 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST +++ b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_POST @@ -30,10 +30,9 @@ export pgmerr=errfile # Source relevant config files ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base atmanal atmanalpost" for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP index b431f2d143..259d2eab0c 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP +++ b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_PREP @@ -30,10 +30,9 @@ export pgmerr=errfile # Source relevant config files ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base atmanal atmanalprep" for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN index d4d75feb88..62e02a6dd0 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN +++ b/jobs/JGDAS_GLOBAL_ATMOS_ANALYSIS_RUN @@ -30,10 +30,9 @@ export pgmerr=errfile # Source relevant config files ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base atmanal atmanalrun" for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST index ebf3da539c..4d546f3b06 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST +++ b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_POST @@ -30,10 +30,9 @@ export pgmerr=errfile # Source relevant config files ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base atmensanal atmensanalpost" for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP index 4e213ffe00..6b5204564e 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP +++ b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_PREP @@ -30,10 +30,9 @@ export pgmerr=errfile # Source relevant config files ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base atmensanal atmensanalprep" for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN index 351a77fad4..bb7d42f670 100755 --- a/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN +++ b/jobs/JGDAS_GLOBAL_ATMOS_ENSANAL_RUN @@ -30,10 +30,9 @@ export pgmerr=errfile # Source relevant config files ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base atmensanal atmensanalrun" for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGFS_ATMOS_CYCLONE_GENESIS b/jobs/JGFS_ATMOS_CYCLONE_GENESIS index f789a8631d..3233dec92d 100755 --- a/jobs/JGFS_ATMOS_CYCLONE_GENESIS +++ b/jobs/JGFS_ATMOS_CYCLONE_GENESIS @@ -7,10 +7,10 @@ export RUN_ENVIR=${RUN_ENVIR:-"nco"} ############################# # Source relevant config files ############################# +export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base vrfy" -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGFS_ATMOS_CYCLONE_TRACKER b/jobs/JGFS_ATMOS_CYCLONE_TRACKER index aa3cbb6e8f..922ae086fd 100755 --- a/jobs/JGFS_ATMOS_CYCLONE_TRACKER +++ b/jobs/JGFS_ATMOS_CYCLONE_TRACKER @@ -7,10 +7,10 @@ export RUN_ENVIR=${RUN_ENVIR:-"nco"} ############################# # Source relevant config files ############################# +EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base vrfy" -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGFS_ATMOS_FSU_GENESIS b/jobs/JGFS_ATMOS_FSU_GENESIS index df5290fad7..1f18cfff99 100755 --- a/jobs/JGFS_ATMOS_FSU_GENESIS +++ b/jobs/JGFS_ATMOS_FSU_GENESIS @@ -7,10 +7,10 @@ export RUN_ENVIR=${RUN_ENVIR:-"nco"} ############################# # Source relevant config files ############################# +EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base vrfy" -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGFS_ATMOS_GEMPAK b/jobs/JGFS_ATMOS_GEMPAK index 92703f9451..8e8b27dbb8 100755 --- a/jobs/JGFS_ATMOS_GEMPAK +++ b/jobs/JGFS_ATMOS_GEMPAK @@ -22,10 +22,9 @@ export pgmout=OUTPUT.$$ # Source relevant config files ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base gempak" for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGFS_ATMOS_POSTSND b/jobs/JGFS_ATMOS_POSTSND index d44564d0b4..2c3363e1b0 100755 --- a/jobs/JGFS_ATMOS_POSTSND +++ b/jobs/JGFS_ATMOS_POSTSND @@ -28,11 +28,10 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -configs="base postsnd" export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} +configs="base postsnd" for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGLOBAL_ARCHIVE b/jobs/JGLOBAL_ARCHIVE index 9d7dbb7436..97d8e4be35 100755 --- a/jobs/JGLOBAL_ARCHIVE +++ b/jobs/JGLOBAL_ARCHIVE @@ -9,9 +9,8 @@ export RUN_ENVIR=${RUN_ENVIR:-"nco"} ############################################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base arch" -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} for config in ${configs}; do - . "${config_path}"/config."${config}" + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit "${status}" done diff --git a/jobs/JGLOBAL_ATMOS_ANALYSIS b/jobs/JGLOBAL_ATMOS_ANALYSIS index 85e51661ca..a557fd81a5 100755 --- a/jobs/JGLOBAL_ATMOS_ANALYSIS +++ b/jobs/JGLOBAL_ATMOS_ANALYSIS @@ -31,9 +31,8 @@ export pgmerr=errfile ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base anal" -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC b/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC index bf90f1e5d7..97dfd8079b 100755 --- a/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC +++ b/jobs/JGLOBAL_ATMOS_ANALYSIS_CALC @@ -31,9 +31,8 @@ export pgmerr=errfile ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base anal analcalc" -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP b/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP index 6bdc52e317..c2730b8464 100755 --- a/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP +++ b/jobs/JGLOBAL_ATMOS_EMCSFC_SFC_PREP @@ -7,11 +7,10 @@ export RUN_ENVIR=${RUN_ENVIR:-"nco"} ############################# # Source relevant config files ############################# -configs="base" export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} +configs="base" for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGLOBAL_ATMOS_POST b/jobs/JGLOBAL_ATMOS_POST index 3fb56b4f45..c0327a8311 100755 --- a/jobs/JGLOBAL_ATMOS_POST +++ b/jobs/JGLOBAL_ATMOS_POST @@ -29,11 +29,10 @@ export pgmerr=errfile ############################# # Source relevant config files ############################# -configs="base post" export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} +configs="base post" for config in ${configs}; do - . "${config_path}/config.${config}" + . ${EXPDIR}/config.${config} status=$? (( status != 0 )) && exit "${status}" done diff --git a/jobs/JGLOBAL_ATMOS_POST_MANAGER b/jobs/JGLOBAL_ATMOS_POST_MANAGER index b40120a2c4..88aca2896f 100755 --- a/jobs/JGLOBAL_ATMOS_POST_MANAGER +++ b/jobs/JGLOBAL_ATMOS_POST_MANAGER @@ -34,10 +34,9 @@ export pgmout="OUTPUT.${pid}" # Source relevant config files ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base post" for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGLOBAL_ATMOS_SFCANL b/jobs/JGLOBAL_ATMOS_SFCANL index 5466bb685e..c574f9d0e3 100755 --- a/jobs/JGLOBAL_ATMOS_SFCANL +++ b/jobs/JGLOBAL_ATMOS_SFCANL @@ -31,9 +31,8 @@ export pgmerr=errfile ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} configs="base sfcanl" -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC b/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC index 4029155bc9..7aa3e5111e 100755 --- a/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC +++ b/jobs/JGLOBAL_ATMOS_TROPCY_QC_RELOC @@ -7,11 +7,10 @@ export RUN_ENVIR=${RUN_ENVIR:-"nco"} ############################# # Source relevant config files ############################# -configs="base prep" export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} +configs="base prep" for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGLOBAL_FORECAST b/jobs/JGLOBAL_FORECAST index 3b50052200..e272e449fa 100755 --- a/jobs/JGLOBAL_FORECAST +++ b/jobs/JGLOBAL_FORECAST @@ -30,11 +30,10 @@ export pgmerr=errfile # Source relevant config files ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base fcst" [[ ${DO_WAVE:-"NO"} = "YES" ]] && configs+=" wave" for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGLOBAL_WAVE_INIT b/jobs/JGLOBAL_WAVE_INIT index 9d359ca74d..80726f2918 100755 --- a/jobs/JGLOBAL_WAVE_INIT +++ b/jobs/JGLOBAL_WAVE_INIT @@ -30,10 +30,9 @@ export pgmerr=errfile # Source relevant config files ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base wave waveinit" for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGLOBAL_WAVE_POST_BNDPNT b/jobs/JGLOBAL_WAVE_POST_BNDPNT index 95c755972e..00c87870bb 100755 --- a/jobs/JGLOBAL_WAVE_POST_BNDPNT +++ b/jobs/JGLOBAL_WAVE_POST_BNDPNT @@ -30,10 +30,9 @@ export pgmerr=errfile # Source relevant config files ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base wave wavepostsbs wavepostbndpnt" for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL b/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL index c0a9c67c4c..863a741438 100755 --- a/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL +++ b/jobs/JGLOBAL_WAVE_POST_BNDPNTBLL @@ -30,10 +30,9 @@ export pgmerr=errfile # Source relevant config files ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base wave wavepostsbs wavepostbndpntbll" for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGLOBAL_WAVE_POST_PNT b/jobs/JGLOBAL_WAVE_POST_PNT index 5632092c02..dd35efd15f 100755 --- a/jobs/JGLOBAL_WAVE_POST_PNT +++ b/jobs/JGLOBAL_WAVE_POST_PNT @@ -30,10 +30,9 @@ export pgmerr=errfile # Source relevant config files ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -config_path=${EXPDIR:-${PACKAGEROOT:-}/gfs.${gfs_ver}/parm/config} configs="base wave wavepostsbs wavepostpnt" for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGLOBAL_WAVE_POST_SBS b/jobs/JGLOBAL_WAVE_POST_SBS index d1d3392ca5..dc847f7e46 100755 --- a/jobs/JGLOBAL_WAVE_POST_SBS +++ b/jobs/JGLOBAL_WAVE_POST_SBS @@ -30,10 +30,9 @@ export pgmerr=errfile # Source relevant config files ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -config_path=${EXPDIR:-${PACKAGEROOT:-}/gfs.${gfs_ver}/parm/config} configs="base wave wavepostsbs" for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done diff --git a/jobs/JGLOBAL_WAVE_PREP b/jobs/JGLOBAL_WAVE_PREP index 9b7720fbbf..ddc68cde3b 100755 --- a/jobs/JGLOBAL_WAVE_PREP +++ b/jobs/JGLOBAL_WAVE_PREP @@ -30,10 +30,9 @@ export pgmerr=errfile # Source relevant config files ############################# export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config} -config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config} configs="base wave waveprep" for config in ${configs}; do - . ${config_path}/config.${config} + . ${EXPDIR}/config.${config} status=$? [[ ${status} -ne 0 ]] && exit ${status} done From 63db45b64ed0d0a78e3c27df53523f29afe95d62 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Thu, 1 Dec 2022 14:32:30 -0500 Subject: [PATCH 30/30] correct typo --- jobs/JGDAS_ATMOS_GEMPAK | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/JGDAS_ATMOS_GEMPAK b/jobs/JGDAS_ATMOS_GEMPAK index 28c3c0df48..b674bd7ec7 100755 --- a/jobs/JGDAS_ATMOS_GEMPAK +++ b/jobs/JGDAS_ATMOS_GEMPAK @@ -84,7 +84,7 @@ fi # TODO: These actions belong in an ex-script not a j-job -if [ -f ${DATA}/poescrip ]; then +if [ -f ${DATA}/poescript ]; then rm ${DATA}/poescript fi