Skip to content

Commit

Permalink
Fix ESCOMP#2519 so that the mksurfdata_esmf build can work in a CESM …
Browse files Browse the repository at this point in the history
…checkout
  • Loading branch information
ekluzek committed May 7, 2024
1 parent d6beae7 commit 9b5001d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tools/mksurfdata_esmf/gen_mksurfdata_build
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,16 @@ if [ "$existing_bld" = "No" ]; then
if [ "$verbose" != "YES" ]; then
options="$options --silent"
fi
$cwd/../../cime/CIME/scripts/configure --macros-format CMake --machine $MACH $options
# Try finding configure file assuming a CTSM standalone checkout and then try for a CESM checkout
configure="$cwd/../../cime/CIME/scripts/configure"
if [ ! -f "$configure" ]; then
configure="$cwd/../../../../cime/CIME/scripts/configure"
if [ ! -f "$configure" ]; then
echo "Error $configure file does NOT exist in expected location, either for a standalone checkout or CESM/CAM checkout"
exit 1
fi
fi
$configure --macros-format CMake --machine $MACH $options

if [ $? != 0 ]; then
echo "Error doing configure for machine name: $MACH"
Expand Down

0 comments on commit 9b5001d

Please sign in to comment.