Skip to content

Commit

Permalink
Additional top level variable replacements
Browse files Browse the repository at this point in the history
Including preamble command

Refs NOAA-EMC#2332
  • Loading branch information
KateFriedman-NOAA committed Mar 6, 2024
1 parent a2376ef commit e819bdf
Show file tree
Hide file tree
Showing 38 changed files with 105 additions and 105 deletions.
6 changes: 3 additions & 3 deletions scripts/exgdas_atmos_chgres_forenkf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
################################################################################

source "$HOMEgfs/ush/preamble.sh"
source "${USHgfs}/preamble.sh"

# Directories.
pwd=$(pwd)
Expand All @@ -40,15 +40,15 @@ 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"}
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:-""}

Expand Down
2 changes: 1 addition & 1 deletion scripts/exgdas_atmos_nawips.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/exgdas_atmos_verfozn.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env bash

source "${HOMEgfs}/ush/preamble.sh"
source "${USHgfs}/preamble.sh"

################################################################################
# exgdas_atmos_verfozn.sh
Expand Down
2 changes: 1 addition & 1 deletion scripts/exgdas_atmos_verfrad.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env bash

source "${HOMEgfs}/ush/preamble.sh"
source "${USHgfs}/preamble.sh"

################################################################################
#### UNIX Script Documentation Block
Expand Down
8 changes: 4 additions & 4 deletions scripts/exgdas_enkf_earc.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env bash

source "${HOMEgfs}/ush/preamble.sh"
source "${USHgfs}/preamble.sh"

##############################################
# Begin JOB SPECIFIC work
Expand All @@ -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
Expand Down
22 changes: 11 additions & 11 deletions scripts/exgdas_enkf_ecen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
################################################################################

source "$HOMEgfs/ush/preamble.sh"
source "${USHgfs}/preamble.sh"

# Directories.
pwd=$(pwd)
Expand All @@ -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:-""}
Expand All @@ -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.,"}
Expand Down
6 changes: 3 additions & 3 deletions scripts/exgdas_enkf_post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
################################################################################

source "$HOMEgfs/ush/preamble.sh"
source "${USHgfs}/preamble.sh"

# Directories.
pwd=$(pwd)
Expand All @@ -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:-""}
Expand Down
4 changes: 2 additions & 2 deletions scripts/exgdas_enkf_select_obs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
################################################################################

source "$HOMEgfs/ush/preamble.sh"
source "${USHgfs}/preamble.sh"

# Directories.
pwd=$(pwd)
Expand All @@ -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"}
Expand Down
8 changes: 4 additions & 4 deletions scripts/exgdas_enkf_sfc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
################################################################################

source "$HOMEgfs/ush/preamble.sh"
source "${USHgfs}/preamble.sh"

# Directories.
pwd=$(pwd)
Expand All @@ -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

Expand All @@ -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.,"}
Expand Down
6 changes: 3 additions & 3 deletions scripts/exgdas_enkf_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
#
################################################################################

source "$HOMEgfs/ush/preamble.sh"
source "${USHgfs}/preamble.sh"

# Directories.
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=""
Expand All @@ -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"}
Expand Down
4 changes: 2 additions & 2 deletions scripts/exgfs_atmos_awips_20km_1p0deg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# echo " "
###############################################################################

source "${HOMEgfs}/ush/preamble.sh"
source "${USHgfs}/preamble.sh"

fcsthrs="$1"
num=$#
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/exgfs_atmos_fbwind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# echo " Nov 2019 - B Vuong Removed WINTEMV bulletin (retired)"
#####################################################################

source "$HOMEgfs/ush/preamble.sh"
source "${USHgfs}/preamble.sh"

cd $DATA

Expand Down
2 changes: 1 addition & 1 deletion scripts/exgfs_atmos_goes_nawips.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion scripts/exgfs_atmos_grib2_special_npoess.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# echo "-----------------------------------------------------"
#####################################################################

source "$HOMEgfs/ush/preamble.sh"
source "${USHgfs}/preamble.sh"

cd $DATA

Expand Down
8 changes: 4 additions & 4 deletions scripts/exgfs_atmos_grib_awips.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# echo " FEB 2019 - Removed grid 225"
#####################################################################

source "${HOMEgfs}/ush/preamble.sh"
source "${USHgfs}/preamble.sh"

fcsthrs="$1"
num=$#
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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}
Expand Down
4 changes: 2 additions & 2 deletions scripts/exgfs_atmos_nawips.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions scripts/exgfs_atmos_postsnd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion scripts/exgfs_pmgr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/exgfs_prdgen_manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/exgfs_wave_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# --------------------------------------------------------------------------- #
# 0. Preparations

source "${HOMEgfs}/ush/preamble.sh"
source "${USHgfs}/preamble.sh"

# 0.a Basic modes of operation

Expand Down
2 changes: 1 addition & 1 deletion scripts/exgfs_wave_nawips.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/exgfs_wave_post_gridded_sbs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# --------------------------------------------------------------------------- #
# 0. Preparations

source "${HOMEgfs}/ush/preamble.sh"
source "${USHgfs}/preamble.sh"

# 0.a Basic modes of operation

Expand Down
2 changes: 1 addition & 1 deletion scripts/exgfs_wave_post_pnt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# --------------------------------------------------------------------------- #
# 0. Preparations

source "${HOMEgfs}/ush/preamble.sh"
source "${USHgfs}/preamble.sh"

# 0.a Basic modes of operation

Expand Down
Loading

0 comments on commit e819bdf

Please sign in to comment.