Skip to content

Commit

Permalink
Updates requested by reviewer; testing -- DO NOT REVIEW.
Browse files Browse the repository at this point in the history
  • Loading branch information
henrywinterbottom-wxdev committed Feb 16, 2024
1 parent ed25bbd commit 4624ce2
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 58 deletions.
59 changes: 35 additions & 24 deletions ush/load_fv3gfs_modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,41 @@ source "${HOMEgfs}/versions/run.ver"
# Load our modules:
module use "${HOMEgfs}/modulefiles"

if [[ "${MACHINE_ID}" == "wcoss2" || "${MACHINE_ID}" == "acorn" ]]; then
# We are on WCOSS2 (Cactus or Dogwood)
module load module_base.wcoss2
elif [[ "${MACHINE_ID}" == "jet" ]] ; then
# We are on NOAA Jet
module load module_base.jet
elif [[ "${MACHINE_ID}" == "hera" ]] ; then
# We are on NOAA Hera
module load module_base.hera
elif [[ "${MACHINE_ID}" == "orion" ]] ; then
# We are on MSU Orion
module load module_base.orion
elif [[ "${MACHINE_ID}" == "hercules" ]] ; then
# We are on MSU Hercules
module load module_base.hercules
elif [[ "${MACHINE_ID}" == "gaea" ]] ; then
# We are on GAEA.
module load module_base.gaea
elif [[ "${MACHINE_ID}" == "s4" ]] ; then
# We are on SSEC S4
module load module_base.s4
else
echo WARNING: UNKNOWN PLATFORM # TODO: Should an exception be raised here?
fi
# TODO: Testing.

#if [[ "${MACHINE_ID}" == "wcoss2" || "${MACHINE_ID}" == "acorn" ]]; then
# # We are on WCOSS2 (Cactus or Dogwood)
# module load module_base.wcoss2
#elif [[ "${MACHINE_ID}" == "jet" ]] ; then
# # We are on NOAA Jet
# module load module_base.jet
#elif [[ "${MACHINE_ID}" == "hera" ]] ; then
# # We are on NOAA Hera
# module load module_base.hera
#elif [[ "${MACHINE_ID}" == "orion" ]] ; then
# # We are on MSU Orion
# module load module_base.orion
#elif [[ "${MACHINE_ID}" == "hercules" ]] ; then
# # We are on MSU Hercules
# module load module_base.hercules
#elif [[ "${MACHINE_ID}" == "gaea" ]] ; then
# # We are on GAEA.
# module load module_base.gaea
#elif [[ "${MACHINE_ID}" == "s4" ]] ; then
# # We are on SSEC S4
# module load module_base.s4
#else
# echo WARNING: UNKNOWN PLATFORM # TODO: Should an exception be raised here?
#fi

case "${MACHINE_ID}" in
"wcoss2" | "hera" | "orion" | "hercules" | "gaea" | "jet" | "s4")
module load "module_base.${MACHINE_ID}"
;;
*)
echo "WARNING: UNKNOWN PLATFORM"
;;
esac

module list

Expand Down
82 changes: 48 additions & 34 deletions ush/load_ufsda_modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,41 +33,55 @@ source "${HOMEgfs}/ush/module-setup.sh"
# Load our modules:
module use "${HOMEgfs}/sorc/gdas.cd/modulefiles"

if [[ "${MACHINE_ID}" == "wcoss2" || "${MACHINE_ID}" == "acorn" ]]; then
# We are on WCOSS2 (Cactus or Dogwood)
echo WARNING: UFSDA NOT SUPPORTED ON THIS PLATFORM
elif [[ "${MACHINE_ID}" == "jet" ]] ; then
# We are on NOAA Jet
echo WARNING: UFSDA NOT SUPPORTED ON THIS PLATFORM
elif [[ "${MACHINE_ID}" == "hera" ]] ; then
# We are on NOAA Hera
module load "${MODS}/hera"
# set NETCDF variable based on ncdump location
NETCDF=$( command -v ncdump)
export NETCDF
elif [[ "${MACHINE_ID}" == "orion" ]] ; then
# We are on MSU Orion
module load "${MODS}/orion"
# set NETCDF variable based on ncdump location
ncdump=$( command -v ncdump)
NETCDF=$( echo "${ncdump}" | cut -d " " -f 3 )
export NETCDF
elif [[ "${MACHINE_ID}" == "hercules" ]] ; then
# We are on MSU Hercules
module load "${MODS}/hercules"
# set NETCDF variable based on ncdump location
ncdump=$( command -v ncdump )
NETCDF=$( echo "${ncdump}" | cut -d " " -f 3 )
export NETCDF
elif [[ "${MACHINE_ID}" == "gaea" ]] ; then
#if [[ "${MACHINE_ID}" == "wcoss2" || "${MACHINE_ID}" == "acorn" ]]; then
# # We are on WCOSS2 (Cactus or Dogwood)
# echo WARNING: UFSDA NOT SUPPORTED ON THIS PLATFORM
#elif [[ "${MACHINE_ID}" == "jet" ]] ; then
# # We are on NOAA Jet
# echo WARNING: UFSDA NOT SUPPORTED ON THIS PLATFORM
#elif [[ "${MACHINE_ID}" == "hera" ]] ; then
# # We are on NOAA Hera
# module load "${MODS}/hera"
# # set NETCDF variable based on ncdump location
# NETCDF=$( command -v ncdump)
# export NETCDF
#elif [[ "${MACHINE_ID}" == "orion" ]] ; then
# # We are on MSU Orion
# module load "${MODS}/orion"
# # set NETCDF variable based on ncdump location
# ncdump=$( command -v ncdump)
# NETCDF=$( echo "${ncdump}" | cut -d " " -f 3 )
# export NETCDF
#elif [[ "${MACHINE_ID}" == "hercules" ]] ; then
# # We are on MSU Hercules
# module load "${MODS}/hercules"
# # set NETCDF variable based on ncdump location
# ncdump=$( command -v ncdump )
# NETCDF=$( echo "${ncdump}" | cut -d " " -f 3 )
# export NETCDF
#elif [[ "${MACHINE_ID}" == "gaea" ]] ; then
# We are on GAEA.
echo WARNING: UFSDA NOT SUPPORTED ON THIS PLATFORM
elif [[ "${MACHINE_ID}" == "s4" ]] ; then
# We are on SSEC S4
echo WARNING: UFSDA NOT SUPPORTED ON THIS PLATFORM
else
echo WARNING: UNKNOWN PLATFORM
fi
# echo WARNING: UFSDA NOT SUPPORTED ON THIS PLATFORM
#elif [[ "${MACHINE_ID}" == "s4" ]] ; then
# # We are on SSEC S4
# echo WARNING: UFSDA NOT SUPPORTED ON THIS PLATFORM
#else
# echo WARNING: UNKNOWN PLATFORM
#fi

case "${MACHINE_ID}" in
("hera" | "orion" | "hercules")
module load "${MODS}/${MACHINE_ID}"
NETCDF=$( command -v ncdump )
export NETCDF
;;
("wcoss2" | "acorn" | "jet" | "gaea" | "s4")
echo WARNING: UFSDA NOT SUPPORTED ON THIS PLATFORM
;;
*)
echo "WARNING: UNKNOWN PLATFORM"
;;
esac

module list
pip list
Expand Down

0 comments on commit 4624ce2

Please sign in to comment.