Skip to content

Commit

Permalink
Add CCPP suite and FASTER option to UFS build (#2521)
Browse files Browse the repository at this point in the history
This PR updates related build scripts to (1) include the global-nest
physics in the compilation step (2) be able to use the -DFASTER=ON
compiling option through the "-f" command line switch.

Resolves #2520
  • Loading branch information
guoqing-noaa committed Apr 23, 2024
1 parent ee8cce5 commit d0e1cc8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion parm/config/gfs/config.ufs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export cplice=".false."
export cplchm=".false."
export cplwav=".false."
export cplwav2atm=".false."
export CCPP_SUITE="FV3_GFS_v17_p8_ugwpv1"
export CCPP_SUITE="${CCPP_SUITE:-FV3_GFS_v17_p8_ugwpv1}"
model_list="atm"

# Mediator specific settings
Expand Down
7 changes: 5 additions & 2 deletions sorc/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ function _usage() {
Builds all of the global-workflow components by calling the individual build
scripts in sequence.
Usage: ${BASH_SOURCE[0]} [-a UFS_app][-c build_config][-d][-h][-j n][-v][-w]
Usage: ${BASH_SOURCE[0]} [-a UFS_app][-c build_config][-d][-f][-h][-j n][-v][-w]
-a UFS_app:
Build a specific UFS app instead of the default
-d:
Build in debug mode
-f:
Build the UFS model using the -DFASTER=ON option
-g:
Build GSI
-h:
Expand Down Expand Up @@ -53,9 +55,10 @@ _build_job_max=20
_quick_kill="NO"
# Reset option counter in case this script is sourced
OPTIND=1
while getopts ":a:dghj:kuvw" option; do
while getopts ":a:dfghj:kuvw" option; do
case "${option}" in
a) _build_ufs_opt+="-a ${OPTARG} ";;
f) _build_ufs_opt+="-f ";;
d) _build_debug="-d" ;;
g) _build_gsi="YES" ;;
h) _usage;;
Expand Down
11 changes: 8 additions & 3 deletions sorc/build_ufs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ cwd=$(pwd)

# Default settings
APP="S2SWA"
CCPP_SUITES="FV3_GFS_v17_p8_ugwpv1,FV3_GFS_v17_coupled_p8_ugwpv1" # TODO: does the g-w need to build with all these CCPP_SUITES?
CCPP_SUITES="FV3_GFS_v17_p8_ugwpv1,FV3_GFS_v17_coupled_p8_ugwpv1,FV3_global_nest_v1" # TODO: does the g-w need to build with all these CCPP_SUITES?
PDLIB="ON"

while getopts ":da:j:vw" option; do
while getopts ":da:fj:vw" option; do
case "${option}" in
d) BUILD_TYPE="Debug";;
a) APP="${OPTARG}";;
f) FASTER="ON";;
j) BUILD_JOBS="${OPTARG}";;
v) export BUILD_VERBOSE="YES";;
w) PDLIB="OFF";;
Expand All @@ -31,7 +32,11 @@ source "./tests/module-setup.sh"

MAKE_OPT="-DAPP=${APP} -D32BIT=ON -DCCPP_SUITES=${CCPP_SUITES}"
[[ ${PDLIB:-"OFF"} = "ON" ]] && MAKE_OPT+=" -DPDLIB=ON"
[[ ${BUILD_TYPE:-"Release"} = "Debug" ]] && MAKE_OPT+=" -DDEBUG=ON"
if [[ ${BUILD_TYPE:-"Release"} = "DEBUG" ]] ; then
MAKE_OPT+=" -DDEBUG=ON"
elif [[ "${FASTER:-OFF}" == ON ]] ; then
MAKE_OPT+=" -DFASTER=ON"
fi
COMPILE_NR=0
CLEAN_BEFORE=YES
CLEAN_AFTER=NO
Expand Down

0 comments on commit d0e1cc8

Please sign in to comment.