Skip to content

Commit

Permalink
Modifications to run workflow with unmodified executable names from e…
Browse files Browse the repository at this point in the history
…ach repository (ufs-community#304)

## DESCRIPTION OF CHANGES: 
The new top-level cmake build for the SRW App ([SRW App PR#27](ufs-community#27)) results in some executables having different names. This PR makes modifications that
 1. Allow the workflow to run successfully with the new cmake build and its different executable names, and
 2. Allow back-compatibility with the old build system to allow for a gradual transition to new build system

This PR also explicitly disallows running the workflow without CCPP, which we decided against supporting several months ago. I don't think the capability even works so this shouldn't effect anyone at this time.

## TESTS CONDUCTED: 
 - **Cheyenne**: Build and end-to-end test ("DOT_OR_USCORE" test case) was successful on Cheyenne with intel, both for the cmake build and the old build script (that will soon be deprecated). 
 - **Hera**: Build and end-to-end tests successful (aside from expected failures). Also built with old build script successfully.
 - **Jet**: Build test was successful. 

## ISSUE: 
It was not the primary aim of this PR, but it does partially resolve ufs-community#196
  • Loading branch information
mkavulich authored Oct 9, 2020
1 parent 90e5dc5 commit 131bc95
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion scripts/exregional_make_grid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ fi
#
# Set the name and path to the executable and make sure that it exists.
#
exec_fn="shave.x"
exec_fn="shave"
exec_fp="$EXECDIR/${exec_fn}"
if [ ! -f "${exec_fp}" ]; then
print_err_msg_exit "\
Expand Down
2 changes: 1 addition & 1 deletion scripts/exregional_make_ics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ hh="${EXTRN_MDL_CDATE:8:2}"
#
#-----------------------------------------------------------------------
#
exec_fn="chgres_cube.exe"
exec_fn="chgres_cube"
exec_fp="$EXECDIR/${exec_fn}"
if [ ! -f "${exec_fp}" ]; then
print_err_msg_exit "\
Expand Down
2 changes: 1 addition & 1 deletion scripts/exregional_make_lbcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ esac
#
#-----------------------------------------------------------------------
#
exec_fn="chgres_cube.exe"
exec_fn="chgres_cube"
exec_fp="$EXECDIR/${exec_fn}"
if [ ! -f "${exec_fp}" ]; then
print_err_msg_exit "\
Expand Down
4 changes: 2 additions & 2 deletions scripts/exregional_make_orog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ mkdir_vrfy -p "${shave_dir}"
# Set the name and path to the executable that generates the raw orography
# file and make sure that it exists.
#
exec_fn="orog.x"
exec_fn="orog"
exec_fp="$EXECDIR/${exec_fn}"
if [ ! -f "${exec_fp}" ]; then
print_err_msg_exit "\
Expand Down Expand Up @@ -531,7 +531,7 @@ Filtering of orography complete."
#
# Set the name and path to the executable and make sure that it exists.
#
exec_fn="shave.x"
exec_fn="shave"
exec_fp="$EXECDIR/${exec_fn}"
if [ ! -f "${exec_fp}" ]; then
print_err_msg_exit "\
Expand Down
22 changes: 19 additions & 3 deletions ush/generate_FV3LAM_wflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -589,12 +589,28 @@ fi
#-----------------------------------------------------------------------
#
if [ "${USE_CCPP}" = "TRUE" ]; then
exec_fn="fv3.exe"
exec_fn="NEMS.exe"
else
exec_fn="fv3_32bit.exe"
print_err_msg_exit "\
Running this workflow without CCPP is not supported at this time.
Please set USE_CCPP=TRUE in your config.sh file.
"
fi

exec_fp="${SR_WX_APP_TOP_DIR}/bin/${exec_fn}"
#Check for the old build location for fv3 executable
if [ ! -f "${exec_fp}" ]; then
exec_fp_alt="${UFS_WTHR_MDL_DIR}/build/${exec_fn}"
if [ ! -f "${exec_fp_alt}" ]; then
print_err_msg_exit "\
The executable (exec_fp) for running the forecast model does not exist:
exec_fp = \"${exec_fp}\"
Please ensure that you've built this executable."
else
exec_fp="${exec_fp_alt}"
fi
fi

exec_fp="${UFS_WTHR_MDL_DIR}/tests/${exec_fn}"
if [ ! -f "${exec_fp}" ]; then
print_err_msg_exit "\
The executable (exec_fp) for running the forecast model does not exist:
Expand Down
2 changes: 1 addition & 1 deletion ush/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ SORCDIR="$HOMErrfs/sorc"
SRC_DIR="${SR_WX_APP_TOP_DIR}/src"
PARMDIR="$HOMErrfs/parm"
MODULES_DIR="$HOMErrfs/modulefiles"
EXECDIR="${SR_WX_APP_TOP_DIR}/exec"
EXECDIR="${SR_WX_APP_TOP_DIR}/bin"
FIXrrfs="$HOMErrfs/fix"
TEMPLATE_DIR="$USHDIR/templates"

Expand Down

0 comments on commit 131bc95

Please sign in to comment.