Skip to content

Commit

Permalink
Link staged GSI fix files instead of cloning them from gerrit (#1132)
Browse files Browse the repository at this point in the history
* disable cloning GSI recursively.  Link GSI fix files from central space
* add `gsi_ver` variable in fix.ver

Refs #1128
  • Loading branch information
aerorahul authored Nov 30, 2022
1 parent cc2f94b commit 4e3335b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 19 deletions.
21 changes: 12 additions & 9 deletions sorc/checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Usage: ${BASH_SOURCE[0]} [-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
Expand Down Expand Up @@ -50,6 +50,7 @@ function checkout() {
dir="$1"
remote="$2"
version="$3"
recursive=${4:-"YES"}

name=$(echo "${dir}" | cut -d '.' -f 1)
echo "Performing checkout of ${name}"
Expand Down Expand Up @@ -89,13 +90,15 @@ function checkout() {
echo
return "${status}"
fi
git submodule update --init --recursive >> "${logfile}" 2>&1
echo "|-- Updating submodules (if any)"
status=$?
if ((status > 0)); then
echo " WARNING: Error while updating submodules of ${name}"
echo
return "${status}"
if [[ "${recursive}" == "YES" ]]; then
git submodule update --init --recursive >> "${logfile}" 2>&1
echo "|-- Updating submodules (if any)"
status=$?
if ((status > 0)); then
echo " WARNING: Error while updating submodules of ${name}"
echo
return "${status}"
fi
fi
echo
return 0
Expand Down Expand Up @@ -158,7 +161,7 @@ checkout "ufs_utils.fd" "https://github.com/ufs-community/UFS_UTILS.git"
checkout "verif-global.fd" "https://github.com/NOAA-EMC/EMC_verif-global.git" "c267780" ; errs=$((errs + $?))

if [[ ${checkout_gsi} == "YES" ]]; then
checkout "gsi_enkf.fd" "https://github.com/NOAA-EMC/GSI.git" "48d8676"; errs=$((errs + $?))
checkout "gsi_enkf.fd" "https://github.com/NOAA-EMC/GSI.git" "48d8676" "NO"; errs=$((errs + $?))
fi

if [[ ${checkout_gdas} == "YES" ]]; then
Expand Down
13 changes: 3 additions & 10 deletions sorc/link_workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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";;
:)
Expand Down Expand Up @@ -91,6 +91,7 @@ for dir in aer \
cpl \
datm \
gldas \
gsi \
lut \
mom6 \
orog \
Expand All @@ -108,6 +109,7 @@ for dir in aer \
${LINK} "${FIX_DIR}/${dir}/${!fix_ver}" "${dir}"
done


if [[ -d "${script_dir}/ufs_utils.fd" ]]; then
cd "${script_dir}/ufs_utils.fd/fix" || exit 1
./link_fixdirs.sh "${RUN_ENVIR}" "${machine}" 2> /dev/null
Expand Down Expand Up @@ -163,15 +165,6 @@ if [[ -d "${script_dir}/gfs_wafs.fd" ]]; then
fi


#------------------------------
#--add GSI fix directory
#------------------------------
if [[ -d "${script_dir}/gsi_enkf.fd" ]]; then
cd "${top_dir}/fix" || exit 1
[[ -d gsi ]] && rm -rf gsi
${LINK} "${script_dir}/gsi_enkf.fd/fix" gsi
fi

#------------------------------
#--add GDASApp fix directory
#------------------------------
Expand Down
1 change: 1 addition & 0 deletions versions/fix.ver
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export gdas_fv3jedi_ver=20220805
export gdas_gsibec_ver=20221031
export gldas_ver=20220920
export glwu_ver=20220805
export gsi_ver=20221128
export lut_ver=20220805
export mom6_ver=20220805
export orog_ver=20220805
Expand Down

0 comments on commit 4e3335b

Please sign in to comment.