-
Notifications
You must be signed in to change notification settings - Fork 0
/
environment.sh
49 lines (42 loc) · 1.64 KB
/
environment.sh
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
47
48
49
# Bash file to load modules and set environment
# variables for compilers and external libraries
# Set project home using realpath
# of current directory
export PROJECT_HOME=$(realpath .)
# Set SiteHome to realpath of SiteName
SiteHome="$PROJECT_HOME/sites/$SiteName"
# Load modules from the site directory
source $SiteHome/environment.sh
# Path to ERF and AMReX
export ERF_HOME="$PROJECT_HOME/software/erf/ERF"
export AMREX_HOME="$ERF_HOME/Submodules/AMReX"
export MODEL_HOME="$PROJECT_HOME/models"
export NOAH_HOME="$ERF_HOME/Submodules/NOAH-MP"
export NETCDF_HOME="$PROJECT_HOME/software/netcdf/netcdf-install-$SiteName"
export LD_LIBRARY_PATH="$NETCDF_HOME/lib:$LD_LIBRARY_PATH"
export PATH="$NETCDF_HOME/bin:$PATH"
# Path to parallel HDF5 installtion with fortran support
if [ $HDF5_HOME ]; then
BuildHDF5=false
else
BuildHDF5=true
export HDF5_HOME="$PROJECT_HOME/software/hdf5/HDF5/install-$SiteName"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HDF5_HOME/lib"
export LIBRARY_PATH="$LD_LIBRARY_PATH"
fi
# Output information to stdout
echo "---------------------------------------------------------------------------------------"
echo "Execution Environment:"
echo "---------------------------------------------------------------------------------------"
echo "PROJECT_HOME=$PROJECT_HOME"
echo "SITE_HOME=$SiteHome"
echo "MPI_HOME=$MPI_HOME"
echo "HDF5_HOME=$HDF5_HOME"
echo "ERF_HOME=$ERF_HOME"
echo "AMREX_HOME=$AMREX_HOME"
echo "NOAH_HOME=$NOAH_HOME"
echo "MODEL_HOME=$MODEL_HOME"
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
echo "NETCDF_HOME=$NETCDF_HOME"
echo "PATH=$PATH"
echo "---------------------------------------------------------------------------------------"