-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add scripts for setting up an environment on GFDL's PP/AN (#365)
This PR adds scripts for setting up an environment to run the pace example notebooks on GFDL's Post Processing and Analysis Cluster (PP/AN).
- Loading branch information
1 parent
e7ec2e5
commit 749ce94
Showing
3 changed files
with
85 additions
and
0 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
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,13 @@ | ||
#!/bin/bash | ||
|
||
INSTALL_PREFIX=$1 | ||
ENVIRONMENT_NAME=$2 | ||
|
||
PACE_DIR=$(pwd)/../.. | ||
FV3NET_DIR=$INSTALL_PREFIX/fv3net | ||
|
||
module load conda | ||
module load intel_compilers/2021.3.0 | ||
|
||
conda activate $ENVIRONMENT_NAME | ||
export PYTHONPATH=$FV3NET_DIR/external/fv3viz:$PACE_DIR/external/gt4py/src |
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,46 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
INSTALL_PREFIX=$1 | ||
ENVIRONMENT_NAME=$2 | ||
|
||
PACE_DIR=$(pwd)/../.. | ||
FV3NET_DIR=$INSTALL_PREFIX/fv3net | ||
|
||
# module load necessary system software | ||
module load conda | ||
module load intel_compilers/2021.3.0 | ||
|
||
export MPICC=$(which mpicc) | ||
|
||
CONDA_PREFIX=$INSTALL_PREFIX/conda | ||
conda config --add pkgs_dirs $CONDA_PREFIX/pkgs | ||
conda config --add envs_dirs $CONDA_PREFIX/envs | ||
|
||
# enter the pace directory | ||
cd $PACE_DIR | ||
|
||
# create a conda environment with cartopy and its dependencies installed | ||
conda create -c conda-forge -y --name $ENVIRONMENT_NAME python=3.8 matplotlib==3.5.2 cartopy==0.18.0 | ||
|
||
# enter the environment and update it | ||
conda activate $ENVIRONMENT_NAME | ||
pip3 install --upgrade --no-cache-dir pip setuptools wheel | ||
|
||
# install the Pace dependencies, GT4Py, and Pace | ||
pip3 install --no-cache-dir -r requirements_dev.txt -c constraints.txt | ||
|
||
# clone fv3net | ||
git clone https://github.com/ai2cm/fv3net.git $FV3NET_DIR | ||
|
||
# install jupyter and ipyparallel | ||
pip3 install --no-cache-dir \ | ||
ipyparallel==8.4.1 \ | ||
jupyterlab==3.4.4 \ | ||
jupyterlab_code_formatter==1.5.2 \ | ||
isort==5.10.1 \ | ||
black==22.3.0 | ||
|
||
# install vcm | ||
python3 -m pip install $FV3NET_DIR/external/vcm |