Skip to content

Commit d0051a7

Browse files
committedApr 24, 2024
Remove implicit symlink names
Lustre has a defect under Rocky 9 that results in symlink sometimes failing when the link name is not explicit. This updates all link creation to use explicit names. `config.base` is updated to turn off two monitor jobs on Hercules because the executables are not yet built there. This, combined with the previous change, should make workflow available for use on Hercules. Also removes the redundant utility names for NCP, NLN, etc. in the gdas scripts that are already defined in `config.base`. Resolves #2131 Resolves #2522
1 parent f11bf3d commit d0051a7

16 files changed

+27
-56
lines changed
 

‎parm/config/gfs/config.base

+6
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ export DO_VERFRAD="YES" # Radiance data assimilation monitoring
7878
export DO_VMINMON="YES" # GSI minimization monitoring
7979
export DO_MOS="NO" # GFS Model Output Statistics - Only supported on WCOSS2
8080

81+
if [[ ${machine} == "HERCULES" ]]; then
82+
# TODO - Monitor jobs are not yet able to build on Hercules
83+
export DO_VERFOZN="NO"
84+
export DO_VERFRAD="NO"
85+
fi
86+
8187
# NO for retrospective parallel; YES for real-time parallel
8288
# arch.sh uses REALTIME for MOS. Need to set REALTIME=YES
8389
# if want MOS written to HPSS. Should update arch.sh to

‎scripts/exgdas_atmos_chgres_forenkf.sh

-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ bPDY=$(echo $BDATE | cut -c1-8)
3636
bcyc=$(echo $BDATE | cut -c9-10)
3737

3838
# Utilities
39-
export NCP=${NCP:-"/bin/cp"}
40-
export NMV=${NMV:-"/bin/mv"}
41-
export NLN=${NLN:-"/bin/ln -sf"}
4239
export CHGRP_CMD=${CHGRP_CMD:-"chgrp ${group_name:-rstprod}"}
4340
export NCLEN=${NCLEN:-${USHgfs}/getncdimlen}
4441

‎scripts/exgdas_enkf_ecen.sh

-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ export CASE=${CASE:-384}
2929
ntiles=${ntiles:-6}
3030

3131
# Utilities
32-
NCP=${NCP:-"/bin/cp -p"}
33-
NLN=${NLN:-"/bin/ln -sf"}
3432
NCLEN=${NCLEN:-${USHgfs}/getncdimlen}
3533

3634
# Scripts

‎scripts/exgdas_enkf_post.sh

-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ source "${USHgfs}/preamble.sh"
2222
# Directories.
2323
pwd=$(pwd)
2424

25-
# Utilities
26-
NCP=${NCP:-"/bin/cp"}
27-
NLN=${NLN:-"/bin/ln -sf"}
28-
2925
APRUN_EPOS=${APRUN_EPOS:-${APRUN:-""}}
3026
NTHREADS_EPOS=${NTHREADS_EPOS:-1}
3127

‎scripts/exgdas_enkf_select_obs.sh

-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ source "${USHgfs}/preamble.sh"
2222
# Directories.
2323
pwd=$(pwd)
2424

25-
# Utilities
26-
export NLN=${NLN:-"/bin/ln -sf"}
27-
2825
# Scripts.
2926
ANALYSISSH=${ANALYSISSH:-${SCRgfs}/exglobal_atmos_analysis.sh}
3027

‎scripts/exgdas_enkf_sfc.sh

-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ export CASE=${CASE:-384}
3030
ntiles=${ntiles:-6}
3131

3232
# Utilities
33-
NCP=${NCP:-"/bin/cp -p"}
34-
NLN=${NLN:-"/bin/ln -sf"}
3533
NCLEN=${NCLEN:-${USHgfs}/getncdimlen}
3634

3735
# Scripts

‎scripts/exgdas_enkf_update.sh

-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ source "${USHgfs}/preamble.sh"
2323
pwd=$(pwd)
2424

2525
# Utilities
26-
NCP=${NCP:-"/bin/cp -p"}
27-
NLN=${NLN:-"/bin/ln -sf"}
2826
NCLEN=${NCLEN:-${USHgfs}/getncdimlen}
2927
USE_CFP=${USE_CFP:-"NO"}
3028
CFP_MP=${CFP_MP:-"NO"}

‎scripts/exgfs_wave_init.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ if (( NMEM_ENS > 0 )); then
216216
MEMDIR="mem${mem}" YMD=${PDY} HH=${cyc} declare_from_tmpl COM_WAVE_PREP_MEM:COM_WAVE_PREP_TMPL
217217
mkdir -p "${COM_WAVE_PREP_MEM}"
218218
for grdID in ${grdALL}; do
219-
${NLN} "${COM_WAVE_PREP}/${RUN}wave.mod_def.${grdID}" "${COM_WAVE_PREP_MEM}/"
219+
${NLN} "${COM_WAVE_PREP}/${RUN}wave.mod_def.${grdID}" "${COM_WAVE_PREP_MEM}/${RUN}wave.mod_def.${grdID}"
220220
done
221221
done
222222
fi

‎scripts/exglobal_atmos_analysis.sh

+7-5
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ bPDY=$(echo ${BDATE} | cut -c1-8)
3838
bcyc=$(echo ${BDATE} | cut -c9-10)
3939

4040
# Utilities
41-
export NCP=${NCP:-"/bin/cp"}
42-
export NMV=${NMV:-"/bin/mv"}
43-
export NLN=${NLN:-"/bin/ln -sf"}
4441
export CHGRP_CMD=${CHGRP_CMD:-"chgrp ${group_name:-rstprod}"}
4542
export NCLEN=${NCLEN:-${USHgfs}/getncdimlen}
4643
COMPRESS=${COMPRESS:-gzip}
@@ -387,8 +384,13 @@ ${NLN} ${FIXgfs}/gsi/IASI_CLDDET.NL IASI_CLDDET.NL
387384
#If using correlated error, link to the covariance files
388385
if [ ${USE_CORRELATED_OBERRS} == "YES" ]; then
389386
if grep -q "Rcov" ${ANAVINFO} ; then
390-
if ls ${FIXgfs}/gsi/Rcov* 1> /dev/null 2>&1; then
391-
${NLN} ${FIXgfs}/gsi/Rcov* ${DATA}
387+
# shellcheck disable=SC2312
388+
mapfile -t covfile_array < <(find "${FIXgfs}/gsi/" -name "Rcov*")
389+
if (( ${#covfile_array[@]} > 0 )); then
390+
for covfile in "${covfile_array[@]}"; do
391+
covfile_base=$(basename "${covfile}")
392+
${NLN} "${covfile}" "${DATA}/${covfile_base}"
393+
done
392394
echo "using correlated obs error"
393395
else
394396
echo "FATAL ERROR: Satellite error covariance files (Rcov) are missing."

‎scripts/exglobal_atmos_analysis_calc.sh

-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ CDUMP=${CDUMP:-"gdas"}
2929
GDUMP=${GDUMP:-"gdas"}
3030

3131
# Utilities
32-
export NCP=${NCP:-"/bin/cp"}
33-
export NMV=${NMV:-"/bin/mv"}
34-
export NLN=${NLN:-"/bin/ln -sf"}
3532
export CHGRP_CMD=${CHGRP_CMD:-"chgrp ${group_name:-rstprod}"}
3633
export NCLEN=${NCLEN:-${USHgfs}/getncdimlen}
3734
COMPRESS=${COMPRESS:-gzip}

‎scripts/exglobal_atmos_sfcanl.sh

-3
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ bPDY=${BDATE:0:8}
3333
bcyc=${BDATE:8:2}
3434

3535
# Utilities
36-
export NCP=${NCP:-"/bin/cp"}
37-
export NMV=${NMV:-"/bin/mv"}
38-
export NLN=${NLN:-"/bin/ln -sf"}
3936
export CHGRP_CMD=${CHGRP_CMD:-"chgrp ${group_name:-rstprod}"}
4037
export NCLEN=${NCLEN:-${USHgfs}/getncdimlen}
4138
COMPRESS=${COMPRESS:-gzip}

‎scripts/exglobal_diag.sh

-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ CDUMP=${CDUMP:-"gdas"}
3030
GDUMP=${GDUMP:-"gdas"}
3131

3232
# Utilities
33-
export NCP=${NCP:-"/bin/cp"}
34-
export NMV=${NMV:-"/bin/mv"}
35-
export NLN=${NLN:-"/bin/ln -sf"}
3633
export CHGRP_CMD=${CHGRP_CMD:-"chgrp ${group_name:-rstprod}"}
3734
export NCLEN=${NCLEN:-${USHgfs}/getncdimlen}
3835
export CATEXEC=${CATEXEC:-${ncdiag_ROOT:-${gsi_ncdiag_ROOT}}/bin/ncdiag_cat_serial.x}

‎ush/gaussian_sfcanl.sh

+1-11
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ SIGLEVEL=${SIGLEVEL:-${FIXgfs}/am/global_hyblev.l${LEVSP1}.txt}
122122
CDATE=${CDATE:?}
123123

124124
# Other variables.
125-
export NLN=${NLN:-"/bin/ln -sf"}
126125
export PGMOUT=${PGMOUT:-${pgmout:-'&1'}}
127126
export PGMERR=${PGMERR:-${pgmerr:-'&2'}}
128127
export REDOUT=${REDOUT:-'1>'}
@@ -133,17 +132,9 @@ export REDERR=${REDERR:-'2>'}
133132
# Preprocessing
134133
${INISCRIPT:-}
135134
pwd=$(pwd)
136-
if [[ -d $DATA ]]
137-
then
138-
mkdata=NO
139-
else
140-
mkdir -p $DATA
141-
mkdata=YES
142-
fi
143-
cd $DATA||exit 99
135+
cd "${DATA}" || exit 99
144136
[[ -d "${COM_ATMOS_ANALYSIS}" ]] || mkdir -p "${COM_ATMOS_ANALYSIS}"
145137
[[ -d "${COM_ATMOS_RESTART}" ]] || mkdir -p "${COM_ATMOS_RESTART}"
146-
cd $DATA
147138

148139
################################################################################
149140
# Make surface analysis
@@ -207,6 +198,5 @@ $ERRSCRIPT||exit 2
207198
################################################################################
208199
# Postprocessing
209200
cd $pwd
210-
[[ $mkdata = YES ]]&&rmdir $DATA
211201

212202
exit ${err}

‎ush/link_crtm_fix.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ for what in "amsre_aqua" "imgr_g11" "imgr_g12" "imgr_g13" \
2222
"ssmi_f13" "ssmi_f14" "ssmi_f15" "ssmis_f16" \
2323
"ssmis_f17" "ssmis_f18" "ssmis_f19" "ssmis_f20" \
2424
"tmi_trmm" "v.seviri_m10" "imgr_insat3d" "abi_gr" "ahi_himawari8" ; do
25-
ln -s "${CRTM_FIX}/${what}.TauCoeff.bin" .
26-
ln -s "${CRTM_FIX}/${what}.SpcCoeff.bin" .
25+
ln -s "${CRTM_FIX}/${what}.TauCoeff.bin" "${what}.TauCoeff.bin"
26+
ln -s "${CRTM_FIX}/${what}.SpcCoeff.bin" "${what}.SpcCoeff.bin"
2727
done
2828

2929
for what in 'Aerosol' 'Cloud' ; do
30-
ln -s "${CRTM_FIX}/${what}Coeff.bin" .
30+
ln -s "${CRTM_FIX}/${what}Coeff.bin" "${what}Coeff.bin"
3131
done
3232

33-
for what in ${CRTM_FIX}/*Emis* ; do
34-
ln -s ${what} .
33+
for what in "${CRTM_FIX}/"*Emis* ; do
34+
ln -s "${what}" "$(basename "${what}")"
3535
done
3636

3737
exit 0

‎ush/wave_grid_interp_sbs.sh

+6-8
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,16 @@ source "${USHgfs}/preamble.sh"
8585
rm -f ${DATA}/output_${ymdh}0000/out_grd.$grdID
8686

8787
if [ ! -f ${DATA}/${grdID}_interp.inp.tmpl ]; then
88-
cp ${PARMgfs}/wave/${grdID}_interp.inp.tmpl ${DATA}
88+
cp "${PARMgfs}/wave/${grdID}_interp.inp.tmpl" "${DATA}/${grdID}_interp.inp.tmpl"
8989
fi
90-
ln -sf ${DATA}/${grdID}_interp.inp.tmpl .
90+
ln -sf "${DATA}/${grdID}_interp.inp.tmpl" "${grdID}_interp.inp.tmpl"
9191

92-
for ID in $waveGRD
93-
do
94-
ln -sf ${DATA}/output_${ymdh}0000/out_grd.$ID .
92+
for ID in ${waveGRD}; do
93+
ln -sf "${DATA}/output_${ymdh}0000/out_grd.${ID}" "out_grd.${ID}"
9594
done
9695

97-
for ID in $waveGRD $grdID
98-
do
99-
ln -sf ${DATA}/mod_def.$ID .
96+
for ID in ${waveGRD} ${grdID}; do
97+
ln -sf "${DATA}/mod_def.${ID}" "mod_def.${ID}"
10098
done
10199

102100
# --------------------------------------------------------------------------- #

‎ush/wave_prnc_ice.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ source "${USHgfs}/preamble.sh"
3636
rm -rf ice
3737
mkdir ice
3838
cd ice
39-
ln -s ${DATA}/postmsg .
39+
ln -s "${DATA}/postmsg" postmsg
4040

4141
# 0.b Define directories and the search path.
4242
# The tested variables should be exported by the postprocessor script.

0 commit comments

Comments
 (0)