Skip to content

Commit

Permalink
minor fixes for typos and such
Browse files Browse the repository at this point in the history
  • Loading branch information
aerorahul committed Dec 5, 2024
1 parent c26da40 commit 8bee97c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
12 changes: 6 additions & 6 deletions sorc/build_ww3prepost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@ module use "${_HOMEgfs}/sorc/ufs_model.fd/modulefiles"
module load "ufs_${MACHINE_ID}.intel"
set -x

#Set WW3 directory, switch, prep and post exes
#Set WW3 directory
cd "${_HOMEgfs}/sorc/ufs_model.fd/WW3" || exit 1
WW3_DIR=$(pwd -P)
export WW3_DIR
export SWITCHFILE="${WW3_DIR}/${ww3switch}"

# Determine which switch to use
if [[ "${PDLIB}" == "ON" ]]; then
ww3switch="model/bin/switch_meshcap_pdlib"
path_build="${WW3_DIR}/build_pdlib"
path_install="${WW3_DIR}/install_pdlib"
path_build="${WW3_DIR}/build/pdlib_ON"
path_install="${WW3_DIR}/install/pdlib_ON"
else
ww3switch="model/bin/switch_meshcap"
path_build="${WW3_DIR}/build"
path_install="install"
path_build="${WW3_DIR}/build/pdlib_OFF"
path_install="${WW3_DIR}/install/pdlib_OFF"
fi
export SWITCHFILE="${WW3_DIR}/${ww3switch}"

#create build directory:
[[ -d "${path_build}" ]] && rm -rf "${path_build}"
Expand Down
18 changes: 8 additions & 10 deletions sorc/link_workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -293,28 +293,26 @@ for utilexe in fbwndgfs.x gaussian_sfcanl.x gfs_bufr.x supvit.x syndat_getjtbul.
done

[[ -s "gfs_model.x" ]] && rm -f gfs_model.x
[[ -s "gefs_model.x" ]] && rm -f gefs_model.x
[[ -s "sfs_model.x" ]] && rm -f sfs_model.x
if [[ -f "${HOMEgfs}/sorc/ufs_model.fd/tests/gfs_model.x" ]]; then ${LINK_OR_COPY} "${HOMEgfs}/sorc/ufs_model.fd/tests/gfs_model.x" .; fi
[[ -s "gefs_model.x" ]] && rm -f gefs_model.x
if [[ -f "${HOMEgfs}/sorc/ufs_model.fd/tests/gefs_model.x" ]]; then ${LINK_OR_COPY} "${HOMEgfs}/sorc/ufs_model.fd/tests/gefs_model.x" .; fi
[[ -s "sfs_model.x" ]] && rm -f sfs_model.x
if [[ -f "${HOMEgfs}/sorc/ufs_model.fd/tests/sfs_model.x" ]]; then ${LINK_OR_COPY} "${HOMEgfs}/sorc/ufs_model.fd/tests/sfs_model.x" .; fi

# WW3 pre/post executables
declare -a ww3_exes=("ww3_grid" "ww3_prep" "ww3_prnc" "ww3_outp" "ww3_outf" "ww3_gint" "ww3_ounf" "ww3_ounp" "ww3_grib")
# TODO: ww3_prep, ww3_outf, ww3_ounf, ww3_ounp are not used in the workflow # FIXME or remove them from the list
if [[ -d "${HOMEgfs}/sorc/ufs_model.fd/WW3/install" ]]; then # installed with PDLIB=OFF (Used in GEFS)
if [[ -d "${HOMEgfs}/sorc/ufs_model.fd/WW3/install/pdlib_OFF" ]]; then # installed with PDLIB=OFF (Used in GEFS)
for ww3exe in "${ww3_exes[@]}"; do
[[ -s "gefs_${ww3exe}" ]] && rm -f "gefs_${HOMEgfs}/exec/${ww3exe}"
${LINK_OR_COPY} "${HOMEgfs}/sorc/ufs_model.fd/WW3/install/bin/${ww3exe}" \
"${HOMEgfs}/exec/gefs_${ww3exe}.x"
[[ -s "gefs_${ww3exe}.x" ]] && rm -f "gefs_${ww3exe}.x"
${LINK_OR_COPY} "${HOMEgfs}/sorc/ufs_model.fd/WW3/install/pdlib_OFF/bin/${ww3exe}" "${HOMEgfs}/exec/gefs_${ww3exe}.x"
done
fi

if [[ -d "${HOMEgfs}/sorc/ufs_model.fd/WW3/install_pdlib" ]]; then # installed with PDLIB=ON (Used in GFS, may be SFS later)
if [[ -d "${HOMEgfs}/sorc/ufs_model.fd/WW3/install/pdlib_ON" ]]; then # installed with PDLIB=ON (Used in GFS, may be SFS later)
for ww3exe in "${ww3_exes[@]}"; do
[[ -s "gfs_${ww3exe}" ]] && rm -f "gfs_${ww3exe}"
${LINK_OR_COPY} "${HOMEgfs}/sorc/ufs_model.fd/WW3/install_pdlib/bin/${ww3exe}" \
"${HOMEgfs}/exec/gfs_${ww3exe}.x"
[[ -s "gfs_${ww3exe}.x" ]] && rm -f "gfs_${ww3exe}.x"
${LINK_OR_COPY} "${HOMEgfs}/sorc/ufs_model.fd/WW3/install/pdlib_ON/bin/${ww3exe}" "${HOMEgfs}/exec/gfs_${ww3exe}.x"
done
fi

Expand Down

0 comments on commit 8bee97c

Please sign in to comment.