-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Load updated modulefiles for coupled aerosols on Hera/Intel.
A new shell function (get_platform) is introduced to increase modularity. This fuction auto-detects the local platform and returns a string identifier. As a result, load_fv3gfs_modules.sh is refactored.
- Loading branch information
Showing
2 changed files
with
80 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/sh | ||
|
||
############################################################### | ||
# Auto-detect platform and return string identifier | ||
############################################################### | ||
|
||
get_platform() { | ||
|
||
local hname=`hostname -d` | ||
local pname="unknown" | ||
|
||
if [[ $hname = 'stampede2.tacc.utexas.edu' ]] ; then | ||
# We are on Xsede stampede2 | ||
pname="stampede" | ||
elif [[ $hname = 'hpc.msstate.edu' ]] ; then | ||
# We are on MSU Orion | ||
pname="orion" | ||
elif [[ -d /lfs3 ]] ; then | ||
# We are on NOAA Jet | ||
pname="jet" | ||
elif [[ -d /scratch1 ]] ; then | ||
# We are on NOAA Hera | ||
pname="hera.intel" | ||
elif [[ -d /gpfs/hps && -e /etc/SuSE-release ]] ; then | ||
# We are on NOAA Luna or Surge | ||
pname="wcoss_c" | ||
elif [[ -L /usrx && "$( readlink /usrx 2> /dev/null )" =~ dell ]] ; then | ||
# We are on NOAA Mars or Venus | ||
pname="wcoss_dell_p3" | ||
elif [[ -d /dcom && -d /hwrf ]] ; then | ||
# We are on NOAA Tide or Gyre | ||
pname="wcoss" | ||
elif [[ -d /glade ]] ; then | ||
# We are on NCAR Cheyenne | ||
pname="cheyenne" | ||
elif [[ -d /lustre && -d /ncrc ]] ; then | ||
# We are on GAEA. | ||
pname="gaea" | ||
else | ||
echo WARNING: UNKNOWN PLATFORM | ||
fi | ||
|
||
echo "${pname}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters