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

Load ncdiag module instead of building it in the GSI, use UFSWM build system, pull sfcanl out from anal. #905

Merged
merged 13 commits into from
Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
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
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ sorc/gfs_post.fd
sorc/gfs_wafs.fd
sorc/gldas.fd
sorc/gsi_enkf.fd
# TODO - remove ncdiag.fd once it is a module on the systems
sorc/ncdiag.fd
sorc/gsi.fd
sorc/enkf.fd
sorc/gsi_utils.fd
Expand Down
16 changes: 0 additions & 16 deletions modulefiles/gsi_monitor.hera.lua

This file was deleted.

16 changes: 0 additions & 16 deletions modulefiles/gsi_monitor.orion.lua

This file was deleted.

16 changes: 0 additions & 16 deletions modulefiles/gsi_monitor.wcoss_dell_p3.lua

This file was deleted.

1 change: 1 addition & 0 deletions modulefiles/module_base.hera.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ load(pathJoin("nemsio", "2.5.2"))
load(pathJoin("sp", "2.3.3"))
load(pathJoin("w3emc", "2.7.3"))
load(pathJoin("w3nco", "2.4.1"))
load(pathJoin("ncdiag", "1.0.0"))

load(pathJoin("wgrib2", "2.0.8"))
setenv("WGRIB2","wgrib2")
Expand Down
1 change: 1 addition & 0 deletions modulefiles/module_base.orion.lua
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ load(pathJoin("nemsio", "2.5.2"))
load(pathJoin("sp", "2.3.3"))
load(pathJoin("w3emc", "2.7.3"))
load(pathJoin("w3nco", "2.4.1"))
load(pathJoin("ncdiag", "1.0.0"))

load(pathJoin("wgrib2", "2.0.8"))
setenv("WGRIB2","wgrib2")
Expand Down
Empty file modified modulefiles/module_base.wcoss_dell_p3.lua
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion parm/config/config.fcst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export use_coldstart=".false."

export FORECASTSH="$HOMEgfs/scripts/exglobal_forecast.sh"
export FCSTEXECDIR="$HOMEgfs/exec"
export FCSTEXEC="ufs_model"
export FCSTEXEC="ufs_model.x"

#######################################################################
# Model configuration
Expand Down
2 changes: 1 addition & 1 deletion scripts/exglobal_diag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export NLN=${NLN:-"/bin/ln -sf"}
export CHGRP_CMD=${CHGRP_CMD:-"chgrp ${group_name:-rstprod}"}
export NEMSIOGET=${NEMSIOGET:-${NWPROD}/exec/nemsio_get}
export NCLEN=${NCLEN:-$HOMEgfs/ush/getncdimlen}
export CATEXEC=${CATEXEC:-$HOMEgfs/exec/ncdiag_cat_serial.x}
export CATEXEC=${CATEXEC:-$ncdiag_ROOT/bin/ncdiag_cat_serial.x}
COMPRESS=${COMPRESS:-gzip}
UNCOMPRESS=${UNCOMPRESS:-gunzip}
APRUNCFP=${APRUNCFP:-""}
Expand Down
12 changes: 0 additions & 12 deletions sorc/build_gsi_monitor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,8 @@ while getopts ":dov" option; do
done
shift $((OPTIND-1))

GSI_INSTALL_PREFIX="${cwd}/gsi_enkf.fd/install"
if [[ -d "${GSI_INSTALL_PREFIX}" ]]; then
CMAKE_OPTS="-Dncdiag_ROOT=${GSI_INSTALL_PREFIX}"
else
echo << EOF
FATAL: ${GSI_INSTALL_PREFIX} does not exist
Have you built GSI yet?
EOF
exit 2
fi

BUILD_TYPE=${BUILD_TYPE:-"Release"} \
BUILD_VERBOSE=${BUILD_VERBOSE:-"NO"} \
CMAKE_OPTS=${CMAKE_OPTS} \
${cwd}/gsi_monitor.fd/ush/build.sh

exit
48 changes: 21 additions & 27 deletions sorc/build_ufs.sh
Original file line number Diff line number Diff line change
@@ -1,44 +1,38 @@
#! /usr/bin/env bash
set -eux

cwd=$(pwd)

# Default settings
APP="S2SWA"
CCPP_SUITES="FV3_GFS_v16,FV3_GFS_v16_ugwpv1,FV3_GFS_v17_p8,FV3_GFS_v16_coupled_nsstNoahmpUGWPv1,FV3_GFS_v17_coupled_p8"

while getopts "a:v" option; do
while getopts ":dav" option; do
aerorahul marked this conversation as resolved.
Show resolved Hide resolved
case "${option}" in
d) BUILD_TYPE="Debug";;
a) APP="${OPTARG}" ;;
v) BUILD_VERBOSE="YES";;
*)
echo "Unrecognized option: ${1}"
exit 1
\?)
echo "[$BASH_SOURCE]: Unrecognized option: ${option}"
;;
:)
echo "[$BASH_SOURCE]: ${option} requires an argument"
;;
esac
done

source ./machine-setup.sh > /dev/null 2>&1
cwd=$(pwd)

# Set target platform
case "${target}" in
hera|orion|stampede|jet|cheyenne)
target=${target}.intel
;;
esac
cd $cwd/ufs_model.fd

MOD_PATH=$cwd/ufs_model.fd/modulefiles
export RT_COMPILER="intel"
source $cwd/ufs_model.fd/tests/detect_machine.sh
MAKE_OPT="-DAPP=${APP} -DCCPP_SUITES=${CCPP_SUITES}"
[[ ${BUILD_TYPE:-"Release"} = "DEBUG" ]] && MAKE_OPT+=" -DDEBUG=ON"
COMPILE_NR=0
CLEAN_BEFORE=YES
CLEAN_AFTER=NO

cd ufs_model.fd/
set +x
module purge
module use ${MOD_PATH}
module load ufs_${target}
set -x
./tests/compile.sh $MACHINE_ID "$MAKE_OPT" $COMPILE_NR $CLEAN_BEFORE $CLEAN_AFTER
mv ./tests/fv3_${COMPILE_NR}.exe ./tests/ufs_model.x
mv ./tests/modules.fv3_${COMPILE_NR} ./tests/modules.ufs_model

# Remove previous build directory if it exists
if [ -d build ]; then
rm -R build
fi
mkdir -p build && cd build
cmake -DAPP=${APP} -DCCPP_SUITES=${CCPP_SUITES} ..
OMP_NUM_THREADS=1 make -j ${BUILD_JOBS:-8} VERBOSE=${BUILD_VERBOSE:-}
exit 0
6 changes: 3 additions & 3 deletions sorc/checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ mkdir -p ${logdir}
# The checkout version should always be a speciifc commit (hash or tag), not a branch
errs=0
checkout "ufs_model.fd" "https://github.com/ufs-community/ufs-weather-model" "${ufs_model_hash:-Prototype-P8c}"; errs=$((errs + $?))
checkout "gsi_enkf.fd" "https://github.com/NOAA-EMC/GSI.git" "1a3fb13" ; errs=$((errs + $?))
checkout "gsi_utils.fd" "https://github.com/NOAA-EMC/GSI-Utils.git" "2a15d3b" ; errs=$((errs + $?))
checkout "gsi_monitor.fd" "https://github.com/NOAA-EMC/GSI-Monitor.git" "e60e56a" ; errs=$((errs + $?))
checkout "gsi_enkf.fd" "https://github.com/NOAA-EMC/GSI.git" "67f5ab4" ; errs=$((errs + $?))
checkout "gsi_utils.fd" "https://github.com/NOAA-EMC/GSI-Utils.git" "00c95c4" ; errs=$((errs + $?))
checkout "gsi_monitor.fd" "https://github.com/NOAA-EMC/GSI-Monitor.git" "acf8870" ; errs=$((errs + $?))
checkout "gldas.fd" "https://github.com/NOAA-EMC/GLDAS.git" "fd8ba62" ; errs=$((errs + $?))
checkout "ufs_utils.fd" "https://github.com/ufs-community/UFS_UTILS.git" "a2b0817" ; errs=$((errs + $?))
checkout "verif-global.fd" "https://github.com/NOAA-EMC/EMC_verif-global.git" "c267780" ; errs=$((errs + $?))
Expand Down
7 changes: 3 additions & 4 deletions sorc/link_workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ for workflowexec in enkf_chgres_recenter.x enkf_chgres_recenter_nc.x fv3nc2nemsi
$LINK ../sorc/install/bin/$workflowexec .
done

[[ -s ufs_model ]] && rm -f ufs_model
$LINK ../sorc/ufs_model.fd/build/ufs_model .
[[ -s ufs_model.x ]] && rm -f ufs_model.x
$LINK ../sorc/ufs_model.fd/tests/ufs_model.x .

[[ -s gfs_ncep_post ]] && rm -f gfs_ncep_post
$LINK ../sorc/upp.fd/exec/upp.x gfs_ncep_post
Expand All @@ -229,8 +229,7 @@ for ufs_utilsexe in \
done

# GSI
# TODO - remove ncdiag_cat_serial.x when ncdiag becomes a module
for exe in ncdiag_cat_serial.x enkf.x gsi.x; do
for exe in enkf.x gsi.x; do
[[ -s $exe ]] && rm -f $exe
$LINK ../sorc/gsi_enkf.fd/install/bin/$exe .
done
Expand Down
4 changes: 2 additions & 2 deletions ush/forecast_predet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ FV3_GFS_predet(){
IAU_OFFSET=${IAU_OFFSET:-0}

# Model specific stuff
FCSTEXECDIR=${FCSTEXECDIR:-$HOMEgfs/sorc/ufs_model.fd/build}
FCSTEXEC=${FCSTEXEC:-ufs_model}
FCSTEXECDIR=${FCSTEXECDIR:-$HOMEgfs/exec}
FCSTEXEC=${FCSTEXEC:-ufs_model.x}
PARM_FV3DIAG=${PARM_FV3DIAG:-$HOMEgfs/parm/parm_fv3diag}
PARM_POST=${PARM_POST:-$HOMEgfs/parm/post}

Expand Down