forked from NOAA-EMC/global-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathload_fv3gfs_modules.sh
More file actions
executable file
·46 lines (36 loc) · 1.1 KB
/
load_fv3gfs_modules.sh
File metadata and controls
executable file
·46 lines (36 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#! /usr/bin/env bash
###############################################################
if [[ "${DEBUG_WORKFLOW:-NO}" == "NO" ]]; then
echo "Loading modules quietly..."
set +x
fi
# Setup runtime environment by loading modules
ulimit_s=$( ulimit -S -s )
# Find module command and purge:
source "${HOMEgfs}/ush/detect_machine.sh"
source "${HOMEgfs}/ush/module-setup.sh"
# Source versions file for runtime
source "${HOMEgfs}/versions/run.ver"
# Load our modules:
module use "${HOMEgfs}/modulefiles"
case "${MACHINE_ID}" in
"wcoss2" | "hera" | "orion" | "hercules" | "gaeac5" | "gaeac6" | "jet" | "s4" | "noaacloud")
module load "module_base.${MACHINE_ID}"
;;
*)
echo "WARNING: UNKNOWN PLATFORM"
;;
esac
module list
# Add wxflow to PYTHONPATH
wxflowPATH="${HOMEgfs}/ush/python"
PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${HOMEgfs}/ush:${wxflowPATH}"
export PYTHONPATH
# Restore stack soft limit:
ulimit -S -s "${ulimit_s}"
unset ulimit_s
# If this function exists in the environment, run it; else do not
ftype=$(type -t set_trace || echo "")
if [[ "${ftype}" == "function" ]]; then
set_trace
fi