From e819bdfff611de39c88c4efb33f027f80f8477f4 Mon Sep 17 00:00:00 2001 From: "kate.friedman" Date: Wed, 6 Mar 2024 13:51:33 +0000 Subject: [PATCH] Additional top level variable replacements Including preamble command Refs #2332 --- scripts/exgdas_atmos_chgres_forenkf.sh | 6 +++--- scripts/exgdas_atmos_nawips.sh | 2 +- scripts/exgdas_atmos_verfozn.sh | 2 +- scripts/exgdas_atmos_verfrad.sh | 2 +- scripts/exgdas_enkf_earc.sh | 8 ++++---- scripts/exgdas_enkf_ecen.sh | 22 ++++++++++----------- scripts/exgdas_enkf_post.sh | 6 +++--- scripts/exgdas_enkf_select_obs.sh | 4 ++-- scripts/exgdas_enkf_sfc.sh | 8 ++++---- scripts/exgdas_enkf_update.sh | 6 +++--- scripts/exgfs_atmos_awips_20km_1p0deg.sh | 4 ++-- scripts/exgfs_atmos_fbwind.sh | 2 +- scripts/exgfs_atmos_goes_nawips.sh | 2 +- scripts/exgfs_atmos_grib2_special_npoess.sh | 2 +- scripts/exgfs_atmos_grib_awips.sh | 8 ++++---- scripts/exgfs_atmos_nawips.sh | 4 ++-- scripts/exgfs_atmos_postsnd.sh | 4 ++-- scripts/exgfs_pmgr.sh | 2 +- scripts/exgfs_prdgen_manager.sh | 2 +- scripts/exgfs_wave_init.sh | 2 +- scripts/exgfs_wave_nawips.sh | 2 +- scripts/exgfs_wave_post_gridded_sbs.sh | 2 +- scripts/exgfs_wave_post_pnt.sh | 2 +- scripts/exgfs_wave_prdgen_bulls.sh | 2 +- scripts/exgfs_wave_prdgen_gridded.sh | 2 +- scripts/exgfs_wave_prep.sh | 2 +- scripts/exglobal_archive.sh | 8 ++++---- scripts/exglobal_atmos_analysis.sh | 20 +++++++++---------- scripts/exglobal_atmos_analysis_calc.sh | 18 ++++++++--------- scripts/exglobal_atmos_pmgr.sh | 2 +- scripts/exglobal_atmos_products.sh | 8 ++++---- scripts/exglobal_atmos_sfcanl.sh | 20 +++++++++---------- scripts/exglobal_atmos_tropcy_qc_reloc.sh | 2 +- scripts/exglobal_atmos_vminmon.sh | 2 +- scripts/exglobal_cleanup.sh | 2 +- scripts/exglobal_diag.sh | 4 ++-- scripts/exglobal_forecast.sh | 12 +++++------ scripts/exglobal_stage_ic.sh | 2 +- 38 files changed, 105 insertions(+), 105 deletions(-) diff --git a/scripts/exgdas_atmos_chgres_forenkf.sh b/scripts/exgdas_atmos_chgres_forenkf.sh index 40f702beb2..45c6be973d 100755 --- a/scripts/exgdas_atmos_chgres_forenkf.sh +++ b/scripts/exgdas_atmos_chgres_forenkf.sh @@ -17,7 +17,7 @@ # ################################################################################ -source "$HOMEgfs/ush/preamble.sh" +source "${USHgfs}/preamble.sh" # Directories. pwd=$(pwd) @@ -40,7 +40,7 @@ export NCP=${NCP:-"/bin/cp"} export NMV=${NMV:-"/bin/mv"} export NLN=${NLN:-"/bin/ln -sf"} export CHGRP_CMD=${CHGRP_CMD:-"chgrp ${group_name:-rstprod}"} -export NCLEN=${NCLEN:-$HOMEgfs/ush/getncdimlen} +export NCLEN=${NCLEN:-${USHgfs}/getncdimlen} # IAU DOIAU=${DOIAU:-"NO"} @@ -48,7 +48,7 @@ export IAUFHRS=${IAUFHRS:-"6"} # Dependent Scripts and Executables export APRUN_CHGRES=${APRUN_CHGRES:-${APRUN:-""}} -export CHGRESNCEXEC=${CHGRESNCEXEC:-$HOMEgfs/exec/enkf_chgres_recenter_nc.x} +export CHGRESNCEXEC=${CHGRESNCEXEC:-${EXECgfs}/enkf_chgres_recenter_nc.x} export NTHREADS_CHGRES=${NTHREADS_CHGRES:-1} APRUNCFP=${APRUNCFP:-""} diff --git a/scripts/exgdas_atmos_nawips.sh b/scripts/exgdas_atmos_nawips.sh index 83781bac5b..64a2b21e39 100755 --- a/scripts/exgdas_atmos_nawips.sh +++ b/scripts/exgdas_atmos_nawips.sh @@ -10,7 +10,7 @@ # echo " data on the CCS is properly protected." ##################################################################### -source "$HOMEgfs/ush/preamble.sh" "${2}" +source "${USHgfs}/preamble.sh" "${2}" cd $DATA RUN2=$1 diff --git a/scripts/exgdas_atmos_verfozn.sh b/scripts/exgdas_atmos_verfozn.sh index 1810fdef5d..e681fc55c5 100755 --- a/scripts/exgdas_atmos_verfozn.sh +++ b/scripts/exgdas_atmos_verfozn.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +source "${USHgfs}/preamble.sh" ################################################################################ # exgdas_atmos_verfozn.sh diff --git a/scripts/exgdas_atmos_verfrad.sh b/scripts/exgdas_atmos_verfrad.sh index 0e06e0ede1..bad8715acd 100755 --- a/scripts/exgdas_atmos_verfrad.sh +++ b/scripts/exgdas_atmos_verfrad.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +source "${USHgfs}/preamble.sh" ################################################################################ #### UNIX Script Documentation Block diff --git a/scripts/exgdas_enkf_earc.sh b/scripts/exgdas_enkf_earc.sh index 199b5609a2..3e54c658e9 100755 --- a/scripts/exgdas_enkf_earc.sh +++ b/scripts/exgdas_enkf_earc.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +source "${USHgfs}/preamble.sh" ############################################## # Begin JOB SPECIFIC work @@ -15,16 +15,16 @@ if [ "${EARCICS_CYC}" -lt 0 ]; then EARCICS_CYC=$((EARCICS_CYC+24)) fi -"${HOMEgfs}/ush/hpssarch_gen.sh" "${RUN}" +"${USHgfs}/hpssarch_gen.sh" "${RUN}" status=$? if [ "${status}" -ne 0 ]; then - echo "${HOMEgfs}/ush/hpssarch_gen.sh ${RUN} failed, ABORT!" + echo "${USHgfs}/hpssarch_gen.sh ${RUN} failed, ABORT!" exit "${status}" fi cd "${ROTDIR}" || exit 2 -source "${HOMEgfs}/ush/file_utils.sh" +source "${USHgfs}/file_utils.sh" ################################################################### # ENSGRP > 0 archives a group of ensemble members diff --git a/scripts/exgdas_enkf_ecen.sh b/scripts/exgdas_enkf_ecen.sh index 59021debaa..ff25c78b7c 100755 --- a/scripts/exgdas_enkf_ecen.sh +++ b/scripts/exgdas_enkf_ecen.sh @@ -17,7 +17,7 @@ # ################################################################################ -source "$HOMEgfs/ush/preamble.sh" +source "${USHgfs}/preamble.sh" # Directories. pwd=$(pwd) @@ -31,16 +31,16 @@ ntiles=${ntiles:-6} # Utilities NCP=${NCP:-"/bin/cp -p"} NLN=${NLN:-"/bin/ln -sf"} -NCLEN=${NCLEN:-$HOMEgfs/ush/getncdimlen} +NCLEN=${NCLEN:-${USHgfs}/getncdimlen} # Scripts # Executables. -GETATMENSMEANEXEC=${GETATMENSMEANEXEC:-$HOMEgfs/exec/getsigensmeanp_smooth.x} -GETSFCENSMEANEXEC=${GETSFCENSMEANEXEC:-$HOMEgfs/exec/getsfcensmeanp.x} -RECENATMEXEC=${RECENATMEXEC:-$HOMEgfs/exec/recentersigp.x} -CALCINCNEMSEXEC=${CALCINCNEMSEXEC:-$HOMEgfs/exec/calc_increment_ens.x} -CALCINCNCEXEC=${CALCINCEXEC:-$HOMEgfs/exec/calc_increment_ens_ncio.x} +GETATMENSMEANEXEC=${GETATMENSMEANEXEC:-${EXECgfs}/getsigensmeanp_smooth.x} +GETSFCENSMEANEXEC=${GETSFCENSMEANEXEC:-${EXECgfs}/getsfcensmeanp.x} +RECENATMEXEC=${RECENATMEXEC:-${EXECgfs}/recentersigp.x} +CALCINCNEMSEXEC=${CALCINCNEMSEXEC:-${EXECgfs}/calc_increment_ens.x} +CALCINCNCEXEC=${CALCINCEXEC:-${EXECgfs}/calc_increment_ens_ncio.x} # Files. OPREFIX=${OPREFIX:-""} @@ -66,14 +66,14 @@ else fi # global_chgres stuff -CHGRESNEMS=${CHGRESNEMS:-$HOMEgfs/exec/enkf_chgres_recenter.x} -CHGRESNC=${CHGRESNC:-$HOMEgfs/exec/enkf_chgres_recenter_nc.x} +CHGRESNEMS=${CHGRESNEMS:-${EXECgfs}/enkf_chgres_recenter.x} +CHGRESNC=${CHGRESNC:-${EXECgfs}/enkf_chgres_recenter_nc.x} NTHREADS_CHGRES=${NTHREADS_CHGRES:-24} APRUN_CHGRES=${APRUN_CHGRES:-""} # global_cycle stuff -CYCLESH=${CYCLESH:-$HOMEgfs/ush/global_cycle.sh} -export CYCLEXEC=${CYCLEXEC:-$HOMEgfs/exec/global_cycle} +CYCLESH=${CYCLESH:-${USHgfs}/global_cycle.sh} +export CYCLEXEC=${CYCLEXEC:-${EXECgfs}/global_cycle} APRUN_CYCLE=${APRUN_CYCLE:-${APRUN:-""}} NTHREADS_CYCLE=${NTHREADS_CYCLE:-${NTHREADS:-1}} export CYCLVARS=${CYCLVARS:-"FSNOL=-2.,FSNOS=99999.,"} diff --git a/scripts/exgdas_enkf_post.sh b/scripts/exgdas_enkf_post.sh index f240ae561d..1819502c45 100755 --- a/scripts/exgdas_enkf_post.sh +++ b/scripts/exgdas_enkf_post.sh @@ -17,7 +17,7 @@ # ################################################################################ -source "$HOMEgfs/ush/preamble.sh" +source "${USHgfs}/preamble.sh" # Directories. pwd=$(pwd) @@ -37,8 +37,8 @@ LEVS=${LEVS:-64} HYBENSMOOTH=${HYBENSMOOTH:-${FIXgfs}/gsi/global_hybens_smoothinfo.l${LEVS}.txt} # Executables. -GETATMENSMEANEXEC=${GETATMENSMEANEXEC:-$HOMEgfs/exec/getsigensmeanp_smooth.x} -GETSFCENSMEANEXEC=${GETSFCENSMEANEXEC:-$HOMEgfs/exec/getsfcensmeanp.x} +GETATMENSMEANEXEC=${GETATMENSMEANEXEC:-${EXECgfs}/getsigensmeanp_smooth.x} +GETSFCENSMEANEXEC=${GETSFCENSMEANEXEC:-${EXECgfs}/getsfcensmeanp.x} # Other variables. PREFIX=${PREFIX:-""} diff --git a/scripts/exgdas_enkf_select_obs.sh b/scripts/exgdas_enkf_select_obs.sh index 2ad624bcdb..782838df6d 100755 --- a/scripts/exgdas_enkf_select_obs.sh +++ b/scripts/exgdas_enkf_select_obs.sh @@ -17,7 +17,7 @@ # ################################################################################ -source "$HOMEgfs/ush/preamble.sh" +source "${USHgfs}/preamble.sh" # Directories. pwd=$(pwd) @@ -26,7 +26,7 @@ pwd=$(pwd) export NLN=${NLN:-"/bin/ln -sf"} # Scripts. -ANALYSISSH=${ANALYSISSH:-$HOMEgfs/scripts/exglobal_atmos_analysis.sh} +ANALYSISSH=${ANALYSISSH:-${SCRgfs}/exglobal_atmos_analysis.sh} # Select obs export RUN_SELECT=${RUN_SELECT:-"YES"} diff --git a/scripts/exgdas_enkf_sfc.sh b/scripts/exgdas_enkf_sfc.sh index 085ab35351..85d0b2187d 100755 --- a/scripts/exgdas_enkf_sfc.sh +++ b/scripts/exgdas_enkf_sfc.sh @@ -17,7 +17,7 @@ # ################################################################################ -source "$HOMEgfs/ush/preamble.sh" +source "${USHgfs}/preamble.sh" # Directories. pwd=$(pwd) @@ -31,7 +31,7 @@ ntiles=${ntiles:-6} # Utilities NCP=${NCP:-"/bin/cp -p"} NLN=${NLN:-"/bin/ln -sf"} -NCLEN=${NCLEN:-$HOMEgfs/ush/getncdimlen} +NCLEN=${NCLEN:-${USHgfs}/getncdimlen} # Scripts @@ -50,8 +50,8 @@ NMEM_ENS=${NMEM_ENS:-80} DOIAU=${DOIAU_ENKF:-"NO"} # Global_cycle stuff -CYCLESH=${CYCLESH:-$HOMEgfs/ush/global_cycle.sh} -export CYCLEXEC=${CYCLEXEC:-$HOMEgfs/exec/global_cycle} +CYCLESH=${CYCLESH:-${USHgfs}/global_cycle.sh} +export CYCLEXEC=${CYCLEXEC:-${EXECgfs}/global_cycle} APRUN_CYCLE=${APRUN_CYCLE:-${APRUN:-""}} NTHREADS_CYCLE=${NTHREADS_CYCLE:-${NTHREADS:-1}} export CYCLVARS=${CYCLVARS:-"FSNOL=-2.,FSNOS=99999.,"} diff --git a/scripts/exgdas_enkf_update.sh b/scripts/exgdas_enkf_update.sh index 60d2592e4d..a23a892914 100755 --- a/scripts/exgdas_enkf_update.sh +++ b/scripts/exgdas_enkf_update.sh @@ -17,7 +17,7 @@ # ################################################################################ -source "$HOMEgfs/ush/preamble.sh" +source "${USHgfs}/preamble.sh" # Directories. pwd=$(pwd) @@ -25,7 +25,7 @@ pwd=$(pwd) # Utilities NCP=${NCP:-"/bin/cp -p"} NLN=${NLN:-"/bin/ln -sf"} -NCLEN=${NCLEN:-$HOMEgfs/ush/getncdimlen} +NCLEN=${NCLEN:-${USHgfs}/getncdimlen} USE_CFP=${USE_CFP:-"NO"} CFP_MP=${CFP_MP:-"NO"} nm="" @@ -37,7 +37,7 @@ APRUN_ENKF=${APRUN_ENKF:-${APRUN:-""}} NTHREADS_ENKF=${NTHREADS_ENKF:-${NTHREADS:-1}} # Executables -ENKFEXEC=${ENKFEXEC:-$HOMEgfs/exec/enkf.x} +ENKFEXEC=${ENKFEXEC:-${EXECgfs}/enkf.x} # Cycling and forecast hour specific parameters CDATE=${CDATE:-"2001010100"} diff --git a/scripts/exgfs_atmos_awips_20km_1p0deg.sh b/scripts/exgfs_atmos_awips_20km_1p0deg.sh index 59e38a1fe9..490875b2c4 100755 --- a/scripts/exgfs_atmos_awips_20km_1p0deg.sh +++ b/scripts/exgfs_atmos_awips_20km_1p0deg.sh @@ -19,7 +19,7 @@ # echo " " ############################################################################### -source "${HOMEgfs}/ush/preamble.sh" +source "${USHgfs}/preamble.sh" fcsthrs="$1" num=$# @@ -38,7 +38,7 @@ fi cd "${DATA}" || exit 2 # "Import" functions used in this script -source "${HOMEgfs}/ush/product_functions.sh" +source "${USHgfs}/product_functions.sh" ############################################### # Wait for the availability of the pgrb file diff --git a/scripts/exgfs_atmos_fbwind.sh b/scripts/exgfs_atmos_fbwind.sh index 2158c8b25d..de8e448a01 100755 --- a/scripts/exgfs_atmos_fbwind.sh +++ b/scripts/exgfs_atmos_fbwind.sh @@ -14,7 +14,7 @@ # echo " Nov 2019 - B Vuong Removed WINTEMV bulletin (retired)" ##################################################################### -source "$HOMEgfs/ush/preamble.sh" +source "${USHgfs}/preamble.sh" cd $DATA diff --git a/scripts/exgfs_atmos_goes_nawips.sh b/scripts/exgfs_atmos_goes_nawips.sh index 137feec7c2..ed82082e8a 100755 --- a/scripts/exgfs_atmos_goes_nawips.sh +++ b/scripts/exgfs_atmos_goes_nawips.sh @@ -11,7 +11,7 @@ # echo "C. Magee: 10/2013 - swap X and Y for rtgssthr Atl and Pac." ##################################################################### -source "$HOMEgfs/ush/preamble.sh" +source "${USHgfs}/preamble.sh" cd $DATA diff --git a/scripts/exgfs_atmos_grib2_special_npoess.sh b/scripts/exgfs_atmos_grib2_special_npoess.sh index ffccfd176e..1b01aed24d 100755 --- a/scripts/exgfs_atmos_grib2_special_npoess.sh +++ b/scripts/exgfs_atmos_grib2_special_npoess.sh @@ -7,7 +7,7 @@ # echo "-----------------------------------------------------" ##################################################################### -source "$HOMEgfs/ush/preamble.sh" +source "${USHgfs}/preamble.sh" cd $DATA diff --git a/scripts/exgfs_atmos_grib_awips.sh b/scripts/exgfs_atmos_grib_awips.sh index de4a9d1390..bdfc625dce 100755 --- a/scripts/exgfs_atmos_grib_awips.sh +++ b/scripts/exgfs_atmos_grib_awips.sh @@ -21,7 +21,7 @@ # echo " FEB 2019 - Removed grid 225" ##################################################################### -source "${HOMEgfs}/ush/preamble.sh" +source "${USHgfs}/preamble.sh" fcsthrs="$1" num=$# @@ -40,7 +40,7 @@ fi cd "${DATA}/awips_g1" || exit 2 # "Import" functions used in this script -source "${HOMEgfs}/ush/product_functions.sh" +source "${USHgfs}/product_functions.sh" ############################################### # Wait for the availability of the pgrb file @@ -82,7 +82,7 @@ ${CNVGRIB} -g21 masterfile masterfile.grib1 ln -s masterfile.grib1 fort.11 -"${HOMEgfs}/exec/overgridid.x" << EOF +"${EXECgfs}/overgridid.x" << EOF 255 EOF @@ -106,7 +106,7 @@ export FORT11="master.grbf${fcsthrs}" export FORT31="master.grbif${fcsthrs}" export FORT51="xtrn.awpgfs${fcsthrs}.${GRID}" # $MKGFSAWPS < ${PARMgfs}/wmo/grib_awpgfs${fcsthrs}.${GRID} parm=KWBC >> $pgmout 2>errfile -"${HOMEgfs}/exec/mkgfsawps.x" < "${PARMgfs}/wmo/grib_awpgfs${fcsthrs}.${GRID}" parm=KWBC >> "${pgmout}" 2>errfile +"${EXECgfs}/mkgfsawps.x" < "${PARMgfs}/wmo/grib_awpgfs${fcsthrs}.${GRID}" parm=KWBC >> "${pgmout}" 2>errfile export err=$?; err_chk ############################## # Post Files to ${COM_ATMOS_WMO} diff --git a/scripts/exgfs_atmos_nawips.sh b/scripts/exgfs_atmos_nawips.sh index d03ec9cef6..36c3c8e74a 100755 --- a/scripts/exgfs_atmos_nawips.sh +++ b/scripts/exgfs_atmos_nawips.sh @@ -10,7 +10,7 @@ # echo " data on the CCS is properly protected." ##################################################################### -source "${HOMEgfs}/ush/preamble.sh" "${2}" +source "${USHgfs}/preamble.sh" "${2}" #### If EMC GFS PARA runs hourly file are not available, The ILPOST #### will set to 3 hour in EMC GFS PARA. @@ -28,7 +28,7 @@ mkdir -p "${DATA_RUN}" cd "${DATA_RUN}" || exit 1 # "Import" functions used in this script -source "${HOMEgfs}/ush/product_functions.sh" +source "${USHgfs}/product_functions.sh" # NAGRIB="${GEMEXE}/nagrib2" diff --git a/scripts/exgfs_atmos_postsnd.sh b/scripts/exgfs_atmos_postsnd.sh index 47a61e4a72..7aa97f3644 100755 --- a/scripts/exgfs_atmos_postsnd.sh +++ b/scripts/exgfs_atmos_postsnd.sh @@ -20,7 +20,7 @@ # 9) 2019-12-18 Guang Ping Lou generalizing to reading in NetCDF or nemsio ################################################################ -source "${HOMEgfs}/ush/preamble.sh" +source "${USHgfs}/preamble.sh" cd $DATA @@ -44,7 +44,7 @@ export NINT3=${FHOUT_GFS:-3} rm -f -r "${COM_ATMOS_BUFR}" mkdir -p "${COM_ATMOS_BUFR}" -GETDIM="${HOMEgfs}/ush/getncdimlen" +GETDIM="${USHgfs}/getncdimlen" LEVS=$(${GETDIM} "${COM_ATMOS_HISTORY}/${RUN}.${cycle}.atmf000.${atmfm}" pfull) declare -x LEVS diff --git a/scripts/exgfs_pmgr.sh b/scripts/exgfs_pmgr.sh index a417bbed55..c3b9a5befa 100755 --- a/scripts/exgfs_pmgr.sh +++ b/scripts/exgfs_pmgr.sh @@ -6,7 +6,7 @@ # This script monitors the progress of the gfs_fcst job # -source "$HOMEgfs/ush/preamble.sh" +source "${USHgfs}/preamble.sh" hour=00 TEND=384 diff --git a/scripts/exgfs_prdgen_manager.sh b/scripts/exgfs_prdgen_manager.sh index 7d0a95696b..01e8c58c87 100755 --- a/scripts/exgfs_prdgen_manager.sh +++ b/scripts/exgfs_prdgen_manager.sh @@ -6,7 +6,7 @@ # This script monitors the progress of the gfs_fcst job # -source "$HOMEgfs/ush/preamble.sh" +source "${USHgfs}/preamble.sh" hour=00 TEND=384 diff --git a/scripts/exgfs_wave_init.sh b/scripts/exgfs_wave_init.sh index 49222d8ca7..79c2931889 100755 --- a/scripts/exgfs_wave_init.sh +++ b/scripts/exgfs_wave_init.sh @@ -26,7 +26,7 @@ # --------------------------------------------------------------------------- # # 0. Preparations -source "${HOMEgfs}/ush/preamble.sh" +source "${USHgfs}/preamble.sh" # 0.a Basic modes of operation diff --git a/scripts/exgfs_wave_nawips.sh b/scripts/exgfs_wave_nawips.sh index 9145a30a2f..69c4e54ebb 100755 --- a/scripts/exgfs_wave_nawips.sh +++ b/scripts/exgfs_wave_nawips.sh @@ -11,7 +11,7 @@ # March-2020 Roberto.Padilla@noaa.gov ##################################################################### -source "${HOMEgfs}/ush/preamble.sh" +source "${USHgfs}/preamble.sh" #export grids=${grids:-'glo_30m at_10m ep_10m wc_10m ao_9km'} #Interpolated grids export grids=${grids:-'glo_30m'} #Native grids diff --git a/scripts/exgfs_wave_post_gridded_sbs.sh b/scripts/exgfs_wave_post_gridded_sbs.sh index dfa314cbed..be17967865 100755 --- a/scripts/exgfs_wave_post_gridded_sbs.sh +++ b/scripts/exgfs_wave_post_gridded_sbs.sh @@ -30,7 +30,7 @@ # --------------------------------------------------------------------------- # # 0. Preparations -source "${HOMEgfs}/ush/preamble.sh" +source "${USHgfs}/preamble.sh" # 0.a Basic modes of operation diff --git a/scripts/exgfs_wave_post_pnt.sh b/scripts/exgfs_wave_post_pnt.sh index 2b0290547c..bc4c85ec74 100755 --- a/scripts/exgfs_wave_post_pnt.sh +++ b/scripts/exgfs_wave_post_pnt.sh @@ -32,7 +32,7 @@ # --------------------------------------------------------------------------- # # 0. Preparations -source "${HOMEgfs}/ush/preamble.sh" +source "${USHgfs}/preamble.sh" # 0.a Basic modes of operation diff --git a/scripts/exgfs_wave_prdgen_bulls.sh b/scripts/exgfs_wave_prdgen_bulls.sh index 0f0b70dbd2..2bf90cdf2b 100755 --- a/scripts/exgfs_wave_prdgen_bulls.sh +++ b/scripts/exgfs_wave_prdgen_bulls.sh @@ -18,7 +18,7 @@ # --------------------------------------------------------------------------- # # 0. Preparations -source "$HOMEgfs/ush/preamble.sh" +source "${USHgfs}/preamble.sh" # 0.a Basic modes of operation diff --git a/scripts/exgfs_wave_prdgen_gridded.sh b/scripts/exgfs_wave_prdgen_gridded.sh index 46a406fe4b..55c5b36827 100755 --- a/scripts/exgfs_wave_prdgen_gridded.sh +++ b/scripts/exgfs_wave_prdgen_gridded.sh @@ -19,7 +19,7 @@ # --------------------------------------------------------------------------- # # 0. Preparations -source "$HOMEgfs/ush/preamble.sh" +source "${USHgfs}/preamble.sh" # 0.a Basic modes of operation diff --git a/scripts/exgfs_wave_prep.sh b/scripts/exgfs_wave_prep.sh index 2fe286f4d1..1fbe7dd767 100755 --- a/scripts/exgfs_wave_prep.sh +++ b/scripts/exgfs_wave_prep.sh @@ -40,7 +40,7 @@ # --------------------------------------------------------------------------- # # 0. Preparations -source "$HOMEgfs/ush/preamble.sh" +source "${USHgfs}/preamble.sh" # 0.a Basic modes of operation diff --git a/scripts/exglobal_archive.sh b/scripts/exglobal_archive.sh index 833b06bd98..4cc123111c 100755 --- a/scripts/exglobal_archive.sh +++ b/scripts/exglobal_archive.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +source "${USHgfs}/preamble.sh" ############################################## # Begin JOB SPECIFIC work @@ -29,7 +29,7 @@ PDY_MOS="${CDATE_MOS:0:8}" ############################################################### # Archive online for verification and diagnostics ############################################################### -source "${HOMEgfs}/ush/file_utils.sh" +source "${USHgfs}/file_utils.sh" [[ ! -d ${ARCDIR} ]] && mkdir -p "${ARCDIR}" nb_copy "${COM_ATMOS_ANALYSIS}/${APREFIX}gsistat" "${ARCDIR}/gsistat.${RUN}.${PDY}${cyc}" @@ -158,10 +158,10 @@ if [[ ${HPSSARCH} = "YES" || ${LOCALARCH} = "YES" ]]; then cd "${DATA}" || exit 2 - "${HOMEgfs}/ush/hpssarch_gen.sh" "${RUN}" + "${USHgfs}/hpssarch_gen.sh" "${RUN}" status=$? if [ "${status}" -ne 0 ]; then - echo "${HOMEgfs}/ush/hpssarch_gen.sh ${RUN} failed, ABORT!" + echo "${USHgfs}/hpssarch_gen.sh ${RUN} failed, ABORT!" exit "${status}" fi diff --git a/scripts/exglobal_atmos_analysis.sh b/scripts/exglobal_atmos_analysis.sh index b12046f9e2..6da862eb54 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 "${USHgfs}/preamble.sh" # Directories. pwd=$(pwd) @@ -42,7 +42,7 @@ export NCP=${NCP:-"/bin/cp"} export NMV=${NMV:-"/bin/mv"} export NLN=${NLN:-"/bin/ln -sf"} export CHGRP_CMD=${CHGRP_CMD:-"chgrp ${group_name:-rstprod}"} -export NCLEN=${NCLEN:-${HOMEgfs}/ush/getncdimlen} +export NCLEN=${NCLEN:-${USHgfs}/getncdimlen} COMPRESS=${COMPRESS:-gzip} UNCOMPRESS=${UNCOMPRESS:-gunzip} APRUNCFP=${APRUNCFP:-""} @@ -68,19 +68,19 @@ DOIAU=${DOIAU:-"NO"} export IAUFHRS=${IAUFHRS:-"6"} # Dependent Scripts and Executables -GSIEXEC=${GSIEXEC:-${HOMEgfs}/exec/gsi.x} +GSIEXEC=${GSIEXEC:-${EXECgfs}/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:-${EXECgfs}/calc_increment_ens.x} +export CALCINCNCEXEC=${CALCINCNCEXEC:-${EXECgfs}/calc_increment_ens_ncio.x} +export CALCANLEXEC=${CALCANLEXEC:-${EXECgfs}/calc_analysis.x} +export CHGRESNCEXEC=${CHGRESNCEXEC:-${EXECgfs}/enkf_chgres_recenter_nc.x} +export CHGRESINCEXEC=${CHGRESINCEXEC:-${EXECgfs}/interp_inc.x} +CHGRESEXEC=${CHGRESEXEC:-${EXECgfs}/enkf_chgres_recenter.x} export NTHREADS_CHGRES=${NTHREADS_CHGRES:-24} -CALCINCPY=${CALCINCPY:-${HOMEgfs}/ush/calcinc_gfs.py} +CALCINCPY=${CALCINCPY:-${USHgfs}/calcinc_gfs.py} # OPS flags RUN=${RUN:-""} diff --git a/scripts/exglobal_atmos_analysis_calc.sh b/scripts/exglobal_atmos_analysis_calc.sh index a2228f0425..771221ce1d 100755 --- a/scripts/exglobal_atmos_analysis_calc.sh +++ b/scripts/exglobal_atmos_analysis_calc.sh @@ -19,7 +19,7 @@ # Set environment. -source "$HOMEgfs/ush/preamble.sh" +source "${USHgfs}/preamble.sh" # Directories. pwd=$(pwd) @@ -33,7 +33,7 @@ export NCP=${NCP:-"/bin/cp"} export NMV=${NMV:-"/bin/mv"} export NLN=${NLN:-"/bin/ln -sf"} export CHGRP_CMD=${CHGRP_CMD:-"chgrp ${group_name:-rstprod}"} -export NCLEN=${NCLEN:-$HOMEgfs/ush/getncdimlen} +export NCLEN=${NCLEN:-${USHgfs}/getncdimlen} COMPRESS=${COMPRESS:-gzip} UNCOMPRESS=${UNCOMPRESS:-gunzip} APRUNCFP=${APRUNCFP:-""} @@ -52,16 +52,16 @@ export APRUN_CALCINC=${APRUN_CALCINC:-${APRUN:-""}} export APRUN_CALCANL=${APRUN_CALCANL:-${APRUN:-""}} export APRUN_CHGRES=${APRUN_CALCANL:-${APRUN:-""}} -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} +export CALCANLEXEC=${CALCANLEXEC:-${EXECgfs}/calc_analysis.x} +export CHGRESNCEXEC=${CHGRESNCEXEC:-${EXECgfs}/enkf_chgres_recenter_nc.x} +export CHGRESINCEXEC=${CHGRESINCEXEC:-${EXECgfs}/interp_inc.x} export NTHREADS_CHGRES=${NTHREADS_CHGRES:-1} -CALCINCPY=${CALCINCPY:-$HOMEgfs/ush/calcinc_gfs.py} -CALCANLPY=${CALCANLPY:-$HOMEgfs/ush/calcanl_gfs.py} +CALCINCPY=${CALCINCPY:-${USHgfs}/calcinc_gfs.py} +CALCANLPY=${CALCANLPY:-${USHgfs}/calcanl_gfs.py} DOGAUSFCANL=${DOGAUSFCANL-"NO"} -GAUSFCANLSH=${GAUSFCANLSH:-$HOMEgfs/ush/gaussian_sfcanl.sh} -export GAUSFCANLEXE=${GAUSFCANLEXE:-$HOMEgfs/exec/gaussian_sfcanl.x} +GAUSFCANLSH=${GAUSFCANLSH:-${USHgfs}/gaussian_sfcanl.sh} +export GAUSFCANLEXE=${GAUSFCANLEXE:-${EXECgfs}/gaussian_sfcanl.x} NTHREADS_GAUSFCANL=${NTHREADS_GAUSFCANL:-1} APRUN_GAUSFCANL=${APRUN_GAUSFCANL:-${APRUN:-""}} diff --git a/scripts/exglobal_atmos_pmgr.sh b/scripts/exglobal_atmos_pmgr.sh index 86afed962e..7f348474b6 100755 --- a/scripts/exglobal_atmos_pmgr.sh +++ b/scripts/exglobal_atmos_pmgr.sh @@ -6,7 +6,7 @@ # This script monitors the progress of the gfs_fcst job # -source "$HOMEgfs/ush/preamble.sh" +source "${USHgfs}/preamble.sh" hour=00 diff --git a/scripts/exglobal_atmos_products.sh b/scripts/exglobal_atmos_products.sh index 5ebc7432f0..9067819380 100755 --- a/scripts/exglobal_atmos_products.sh +++ b/scripts/exglobal_atmos_products.sh @@ -1,13 +1,13 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +source "${USHgfs}/preamble.sh" # Programs used export WGRIB2=${WGRIB2:-${wgrib2_ROOT}/bin/wgrib2} # Scripts used -INTERP_ATMOS_MASTERSH=${INTERP_ATMOS_MASTERSH:-"${HOMEgfs}/ush/interp_atmos_master.sh"} -INTERP_ATMOS_SFLUXSH=${INTERP_ATMOS_SFLUXSH:-"${HOMEgfs}/ush/interp_atmos_sflux.sh"} +INTERP_ATMOS_MASTERSH=${INTERP_ATMOS_MASTERSH:-"${USHgfs}/interp_atmos_master.sh"} +INTERP_ATMOS_SFLUXSH=${INTERP_ATMOS_SFLUXSH:-"${USHgfs}/interp_atmos_sflux.sh"} # Variables used in this job downset=${downset:-1} # No. of groups of pressure grib2 products to create @@ -133,7 +133,7 @@ for (( nset=1 ; nset <= downset ; nset++ )); do # Run with MPMD or serial if [[ "${USE_CFP:-}" = "YES" ]]; then - OMP_NUM_THREADS=1 "${HOMEgfs}/ush/run_mpmd.sh" "${DATA}/poescript" + OMP_NUM_THREADS=1 "${USHgfs}/run_mpmd.sh" "${DATA}/poescript" export err=$? else chmod 755 "${DATA}/poescript" diff --git a/scripts/exglobal_atmos_sfcanl.sh b/scripts/exglobal_atmos_sfcanl.sh index 60869181f3..fd358f4508 100755 --- a/scripts/exglobal_atmos_sfcanl.sh +++ b/scripts/exglobal_atmos_sfcanl.sh @@ -19,7 +19,7 @@ # Set environment. -source "${HOMEgfs}/ush/preamble.sh" +source "${USHgfs}/preamble.sh" # Directories. pwd=$(pwd) @@ -37,7 +37,7 @@ export NCP=${NCP:-"/bin/cp"} export NMV=${NMV:-"/bin/mv"} export NLN=${NLN:-"/bin/ln -sf"} export CHGRP_CMD=${CHGRP_CMD:-"chgrp ${group_name:-rstprod}"} -export NCLEN=${NCLEN:-$HOMEgfs/ush/getncdimlen} +export NCLEN=${NCLEN:-${USHgfs}/getncdimlen} COMPRESS=${COMPRESS:-gzip} UNCOMPRESS=${UNCOMPRESS:-gunzip} APRUNCFP=${APRUNCFP:-""} @@ -47,8 +47,8 @@ DOIAU=${DOIAU:-"NO"} export IAUFHRS=${IAUFHRS:-"6"} # Surface cycle related parameters -CYCLESH=${CYCLESH:-${HOMEgfs}/ush/global_cycle.sh} -export CYCLEXEC=${CYCLEXEC:-${HOMEgfs}/exec/global_cycle} +CYCLESH=${CYCLESH:-${USHgfs}/global_cycle.sh} +export CYCLEXEC=${CYCLEXEC:-${EXECgfs}/global_cycle} NTHREADS_CYCLE=${NTHREADS_CYCLE:-24} APRUN_CYCLE=${APRUN_CYCLE:-${APRUN:-""}} export SNOW_NUDGE_COEFF=${SNOW_NUDGE_COEFF:-'-2.'} @@ -70,15 +70,15 @@ export APRUN_CALCINC=${APRUN_CALCINC:-${APRUN:-""}} export APRUN_CALCANL=${APRUN_CALCANL:-${APRUN:-""}} export APRUN_CHGRES=${APRUN_CALCANL:-${APRUN:-""}} -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} +export CALCANLEXEC=${CALCANLEXEC:-${EXECgfs}/calc_analysis.x} +export CHGRESNCEXEC=${CHGRESNCEXEC:-${EXECgfs}/enkf_chgres_recenter_nc.x} +export CHGRESINCEXEC=${CHGRESINCEXEC:-${EXECgfs}/interp_inc.x} export NTHREADS_CHGRES=${NTHREADS_CHGRES:-1} -CALCINCPY=${CALCINCPY:-${HOMEgfs}/ush/calcinc_gfs.py} -CALCANLPY=${CALCANLPY:-${HOMEgfs}/ush/calcanl_gfs.py} +CALCINCPY=${CALCINCPY:-${USHgfs}/calcinc_gfs.py} +CALCANLPY=${CALCANLPY:-${USHgfs}/calcanl_gfs.py} export APRUN_CHGRES=${APRUN_CALCANL:-${APRUN:-""}} -CHGRESEXEC=${CHGRESEXEC:-${HOMEgfs}/exec/enkf_chgres_recenter.x} +CHGRESEXEC=${CHGRESEXEC:-${EXECgfs}/enkf_chgres_recenter.x} # OPS flags RUN=${RUN:-""} diff --git a/scripts/exglobal_atmos_tropcy_qc_reloc.sh b/scripts/exglobal_atmos_tropcy_qc_reloc.sh index 29ba45460f..f1272b1844 100755 --- a/scripts/exglobal_atmos_tropcy_qc_reloc.sh +++ b/scripts/exglobal_atmos_tropcy_qc_reloc.sh @@ -10,7 +10,7 @@ # echo " Oct 2013 - Use main USH vars as part of minor pkg cleanup" ############################################################################ -source "$HOMEgfs/ush/preamble.sh" +source "${USHgfs}/preamble.sh" # Make sure we are in the $DATA directory cd $DATA diff --git a/scripts/exglobal_atmos_vminmon.sh b/scripts/exglobal_atmos_vminmon.sh index aac63f3fb3..b4307c8af9 100755 --- a/scripts/exglobal_atmos_vminmon.sh +++ b/scripts/exglobal_atmos_vminmon.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +source "${USHgfs}/preamble.sh" ################################################################################ #### UNIX Script Documentation Block diff --git a/scripts/exglobal_cleanup.sh b/scripts/exglobal_cleanup.sh index 5d7c0a9788..8141de771a 100755 --- a/scripts/exglobal_cleanup.sh +++ b/scripts/exglobal_cleanup.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +source "${USHgfs}/preamble.sh" ############################################################### # Clean up previous cycles; various depths diff --git a/scripts/exglobal_diag.sh b/scripts/exglobal_diag.sh index 3836643afc..ad4c4be4a8 100755 --- a/scripts/exglobal_diag.sh +++ b/scripts/exglobal_diag.sh @@ -19,7 +19,7 @@ # Set environment. -source "$HOMEgfs/ush/preamble.sh" +source "${USHgfs}/preamble.sh" # Directories. pwd=$(pwd) @@ -34,7 +34,7 @@ export NCP=${NCP:-"/bin/cp"} export NMV=${NMV:-"/bin/mv"} export NLN=${NLN:-"/bin/ln -sf"} export CHGRP_CMD=${CHGRP_CMD:-"chgrp ${group_name:-rstprod}"} -export NCLEN=${NCLEN:-$HOMEgfs/ush/getncdimlen} +export NCLEN=${NCLEN:-${USHgfs}/getncdimlen} export CATEXEC=${CATEXEC:-${ncdiag_ROOT:-${gsi_ncdiag_ROOT}}/bin/ncdiag_cat_serial.x} COMPRESS=${COMPRESS:-gzip} UNCOMPRESS=${UNCOMPRESS:-gunzip} diff --git a/scripts/exglobal_forecast.sh b/scripts/exglobal_forecast.sh index 1db05e5d6a..0a6329910e 100755 --- a/scripts/exglobal_forecast.sh +++ b/scripts/exglobal_forecast.sh @@ -77,14 +77,14 @@ # Main body starts here ####################### -source "${HOMEgfs}/ush/preamble.sh" +source "${USHgfs}/preamble.sh" # include all subroutines. Executions later. -source "${HOMEgfs}/ush/forecast_predet.sh" # include functions for variable definition -source "${HOMEgfs}/ush/forecast_det.sh" # include functions for run type determination -source "${HOMEgfs}/ush/forecast_postdet.sh" # include functions for variables after run type determination -source "${HOMEgfs}/ush/parsing_ufs_configure.sh" # include functions for ufs_configure processing -source "${HOMEgfs}/ush/parsing_model_configure_FV3.sh" +source "${USHgfs}/forecast_predet.sh" # include functions for variable definition +source "${USHgfs}/forecast_det.sh" # include functions for run type determination +source "${USHgfs}/forecast_postdet.sh" # include functions for variables after run type determination +source "${USHgfs}/parsing_ufs_configure.sh" # include functions for ufs_configure processing +source "${USHgfs}/parsing_model_configure_FV3.sh" # Coupling control switches, for coupling purpose, off by default cpl=${cpl:-.false.} diff --git a/scripts/exglobal_stage_ic.sh b/scripts/exglobal_stage_ic.sh index c12eaa84e0..6a1be22e71 100755 --- a/scripts/exglobal_stage_ic.sh +++ b/scripts/exglobal_stage_ic.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -source "${HOMEgfs}/ush/preamble.sh" +source "${USHgfs}/preamble.sh" # Locally scoped variables and functions # shellcheck disable=SC2153