Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CCPP suite and FASTER option to UFS build #2521

Merged
merged 6 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions parm/config/gfs/config.base
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ export DO_AERO="NO"
export WAVE_CDUMP="" # When to include wave suite: gdas, gfs, or both
export DOBNDPNT_WAVE="NO"
export FRAC_GRID=".true."
export CCPP_SUITE="FV3_GFS_v17_p8_ugwpv1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to put the CCPP_SUITE in config.base rather than config.ufs? config.base is not a catch-all for all user-configurable settings; this should only be done if it is needed by additional jobs that are not using config.ufs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only reason I have right now is that in many situations, one only need to modify one config file for new experiments.

I will remove this change. Thanks!


# Set operational resolution
export OPS_RES="C768" # Do not change # TODO: Why is this needed and where is it used?
Expand Down
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,7 +16,7 @@ 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][-h][-j n][-v][-w][-f]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please maintain alphabetical order for the new option throughout this script.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, thanks!

-a UFS_app:
Build a specific UFS app instead of the default
-d:
Expand All @@ -35,6 +35,8 @@ Usage: ${BASH_SOURCE[0]} [-a UFS_app][-c build_config][-d][-h][-j n][-v][-w]
Execute all build scripts with -v option to turn on verbose where supported
-w:
Use structured wave grid
-f:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be moved up to be in alphabetical order as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks!

Build the UFS model using the -DFASTER=ON option
EOF
exit 1
}
Expand All @@ -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:dghj:kuvwf" option; do
case "${option}" in
a) _build_ufs_opt+="-a ${OPTARG} ";;
f) _build_ufs_opt+="-j ";;
guoqing-noaa marked this conversation as resolved.
Show resolved Hide resolved
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,16 +5,17 @@ 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:j:vwf" option; do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be in alphabetical order as well. I recognize the d was already out-of-order, so just put the f after the a: and I'll fix the rest of the order later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good. thanks!

case "${option}" in
d) BUILD_TYPE="Debug";;
a) APP="${OPTARG}";;
j) BUILD_JOBS="${OPTARG}";;
v) export BUILD_VERBOSE="YES";;
w) PDLIB="OFF";;
f) FASTER="ON";;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please place this after the a) option as well.

:)
echo "[${BASH_SOURCE[0]}]: ${option} requires an argument"
;;
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
WalterKolczynski-NOAA marked this conversation as resolved.
Show resolved Hide resolved
MAKE_OPT+=" -DFASTER=ON"
fi
COMPILE_NR=0
CLEAN_BEFORE=YES
CLEAN_AFTER=NO
Expand Down
Loading