-
Notifications
You must be signed in to change notification settings - Fork 172
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
Allow building of the ufs-weather-model, WW3 pre/post execs for GFS, GEFS, SFS in the same clone of global-workflow #3098
base: develop
Are you sure you want to change the base?
Conversation
I am going to mark this as ready for review to gather feedback on the code changes before I commence extensive testing. |
fix for wht_OK
|
||
export pgm="${NET,,}_ww3_outp.x" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does SFS get its own executable or does it use the GEFS executable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually, it will. For now, SFS_POST=YES
will use the gefs
prefix.
@@ -8,8 +8,9 @@ APP="S2SWA" | |||
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" | |||
HYDRO="OFF" | |||
EXEC_NAME="ufs_model.x" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Under what circumstances should ufs_model.x
be used? Since both config.fcst
s reference gfs_model.x
, gefs_model.x
, or sfs_model.x
, it may cause issues to have ufs_model.x
as the default. I'd suggest at least a warning be raised if build_ufs.sh
is called without specifying an executable to build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can completely remove ufs_model.x
if that is the source of confusion. ufs_model.x
is going to be used if EXEC_NAME
is not provided.
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}.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_ON" ]]; then # installed with PDLIB=ON (Used in GFS, may be SFS later) | ||
for ww3exe in "${ww3_exes[@]}"; do | ||
[[ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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}.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_ON" ]]; then # installed with PDLIB=ON (Used in GFS, may be SFS later) | |
for ww3exe in "${ww3_exes[@]}"; do | |
[[ -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 | |
declare -A wave_systems | |
wave_systems["gfs"]="pdlib_ON" | |
wave_systems["gefs"]="pdlib_OFF" | |
wave_systems["sfs"]="pdlib_OFF" | |
for sys in ${!wave_systems[@]}; do | |
build_loc="${wave_systems[${sys}]}" | |
if [[ -d "${HOMEgfs}/sorc/ufs_model.fd/WW3/install/${build_loc}" ]]; then | |
for ww3exe in "${ww3_exes[@]}"; do | |
target_ww3_exe="${sys}_${ww3exe}.x" | |
if [[ -s "${target_ww3_exe}" ]]; then | |
rm -f "${target_ww3_exe}" | |
fi | |
${LINK_OR_COPY} "${HOMEgfs}/sorc/ufs_model.fd/WW3/install/${build_loc}/bin/${ww3exe}.x" "${HOMEgfs}/exec/${target_ww3_exe}" | |
done | |
fi | |
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a typo in the suggestion. Line 310
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when GFS/GEFS/SFS change their wave option? Sorry I didn't catch this before, but seeing this brought it to my attention. This should be tied to the options you pass the build, not assumptions here.. and while yes, if someone did that there would be other changes to make in terms of grid choices, but this seems pretty hidden and potentially arbitrary.
Co-authored-by: Walter Kolczynski - NOAA <[email protected]>
Co-authored-by: Walter Kolczynski - NOAA <[email protected]>
Co-authored-by: Walter Kolczynski - NOAA <[email protected]>
Co-authored-by: Walter Kolczynski - NOAA <[email protected]>
Co-authored-by: Walter Kolczynski - NOAA <[email protected]>
Co-authored-by: Walter Kolczynski - NOAA <[email protected]>
Description
GFS and GEFS (and now SFS) uses different compile time options for the UFS-weather-model. For the purposes of CI testing, a multi-build pipeline under Jenkins was created by @TerrenceMcGuinness-NOAA. This served well, until now. With the inclusion of SFS, a third variety of the model is being built. Under the multi-build pipeline paradigm, a second (or third) clone and build of the global-workflow is required. This adds cloning and compilation time of the global-workflow.
This PR allows compiling the ufs-weather-model in a single clone of the global-workflow. The compiled executables based on the options for GFS, GEFS, and SFS results in a model executable as
gfs_model.x
,gefs_model.x
, andsfs_model.x
. The forecast script uses the right executable.This PR also differentiates the WW3 pre/post executables based on
gfs_
orgefs_
. SFS variants need to be introduced, whenNET=sfs
is added.In the process of updating the WW3 pre/post executable names, it was discovered (via
grep
) the following are not used:ww3_prep
ww3_outf
ww3_ounf
ww3_ounp
These need to be confirmed by running the workflow to ensure they are indeed not used at runtime.
This PR also updates the
Jenkinsfile
to use the multi-build from the single location.Type of change
Change characteristics
This PR does not update any submodules.
How has this been tested?
In progress
Checklist