Skip to content

Commit

Permalink
Flip the build for GFS and GEFS with waves (NOAA-EMC#2462)
Browse files Browse the repository at this point in the history
This PR:
- builds the unstructured waves as default when invoked with
`build_all.sh`.
- updates the CI testing infrastructure to handle this change.
- updates the documentation to reflect this change in behaviour.

To build with structured grid for waves, the flag `-w` needs to be
passed to `./build_all.sh`. Previously, this would trigger the
unstructured grid. Since GFSv17 will move to unstructured grid as
default for waves, this makes it easier for a majority of developers.

Resolves NOAA-EMC#2461
  • Loading branch information
aerorahul authored Apr 8, 2024
1 parent 4f0f773 commit 0237dba
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions ci/cases/yamls/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
builds:
- gefs: './build_all.sh -k'
- gfs: './build_all.sh -kwgu'
- gefs: './build_all.sh -kw'
- gfs: './build_all.sh -kgu'
2 changes: 1 addition & 1 deletion ci/scripts/clone-build_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ set +e
source "${HOMEgfs}/ush/module-setup.sh"
export BUILD_JOBS=8
rm -rf log.build
./build_all.sh -guw >> log.build 2>&1
./build_all.sh -gu >> log.build 2>&1
build_status=$?

DATE=$(date +'%D %r')
Expand Down
2 changes: 1 addition & 1 deletion docs/source/clone.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ For coupled cycling (include new UFSDA) use the `-gu` options during build:
./build_all.sh -gu


For building with PDLIB for the wave model, use the `-w` options during build:
For building without PDLIB (unstructured grid) for the wave model, use the `-w` options during build:

::

Expand Down
10 changes: 5 additions & 5 deletions sorc/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Usage: ${BASH_SOURCE[0]} [-a UFS_app][-c build_config][-d][-h][-j n][-v][-w]
-v:
Execute all build scripts with -v option to turn on verbose where supported
-w:
Use unstructured wave grid
Use structured wave grid
EOF
exit 1
}
Expand All @@ -48,7 +48,7 @@ _build_ufsda="NO"
_build_gsi="NO"
_build_debug=""
_verbose_opt=""
_wave_unst=""
_wave_opt=""
_build_job_max=20
_quick_kill="NO"
# Reset option counter in case this script is sourced
Expand All @@ -63,7 +63,7 @@ while getopts ":a:dghj:kuvw" option; do
k) _quick_kill="YES" ;;
u) _build_ufsda="YES" ;;
v) _verbose_opt="-v";;
w) _wave_unst="-w";;
w) _wave_opt="-w";;
:)
echo "[${BASH_SOURCE[0]}]: ${option} requires an argument"
_usage
Expand Down Expand Up @@ -126,7 +126,7 @@ declare -A build_opts
big_jobs=0
build_jobs["ufs"]=8
big_jobs=$((big_jobs+1))
build_opts["ufs"]="${_wave_unst} ${_verbose_opt} ${_build_ufs_opt} ${_build_debug}"
build_opts["ufs"]="${_wave_opt} ${_verbose_opt} ${_build_ufs_opt} ${_build_debug}"

build_jobs["upp"]=2
build_opts["upp"]="${_build_debug}"
Expand All @@ -138,7 +138,7 @@ build_jobs["gfs_utils"]=1
build_opts["gfs_utils"]="${_verbose_opt} ${_build_debug}"

build_jobs["ww3prepost"]=2
build_opts["ww3prepost"]="${_wave_unst} ${_verbose_opt} ${_build_ufs_opt} ${_build_debug}"
build_opts["ww3prepost"]="${_wave_opt} ${_verbose_opt} ${_build_ufs_opt} ${_build_debug}"

# Optional DA builds
if [[ "${_build_ufsda}" == "YES" ]]; then
Expand Down
3 changes: 2 additions & 1 deletion sorc/build_ufs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ 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?
PDLIB="ON"

while getopts ":da:j:vw" option; do
case "${option}" in
d) BUILD_TYPE="Debug";;
a) APP="${OPTARG}";;
j) BUILD_JOBS="${OPTARG}";;
v) export BUILD_VERBOSE="YES";;
w) PDLIB="ON";;
w) PDLIB="OFF";;
:)
echo "[${BASH_SOURCE[0]}]: ${option} requires an argument"
;;
Expand Down
4 changes: 2 additions & 2 deletions sorc/build_ww3prepost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ cd "${script_dir}" || exit 1

# Default settings
APP="S2SWA"
PDLIB="OFF"
PDLIB="ON"

while getopts ":j:a:dvw" option; do
case "${option}" in
a) APP="${OPTARG}";;
d) BUILD_TYPE="Debug";;
j) BUILD_JOBS="${OPTARG}";;
v) export BUILD_VERBOSE="YES";;
w) PDLIB="ON";;
w) PDLIB="OFF";;
:)
echo "[${BASH_SOURCE[0]}]: ${option} requires an argument"
usage
Expand Down

0 comments on commit 0237dba

Please sign in to comment.