This repository contains tools and Jupyter notebooks for the course EOAS 5004: Earth System Modeling taught in Earth, Ocean and Atmospheric Sciences Thrust at The Hong Kong University of Science and Technology (Guangzhou).
The Python package for process-oriented climate modeling climlab by Brian E. J. Rose at University at Albany is used in this course. Course materials are adapted from The Climate Laboratory by Brian E. J. Rose.
We are using The Littlest JupyterHub (TLJH) here. The TLJH is installed on our own server in the directory /opt/tljh
. Admin access is required to install the environment for all users. But users can also install a local environment for themselves in a similar way (without using sudo -E
).
Open a terminal from the JupyterHub and create a Python environment eoas5004
from the file environment.yml
.
sudo -E conda env create --file environment.yml
This will create a new Python environemnt at /opt/tljh/user/envs/eoas5004
with all the necessary packages we need. These packages are listed in the environment file environment.yml
, which can be generated by the following command from an existing environment installed manually by conda install
.
conda env export --from-history > environment.yml
First activate the new Python environment.
conda activate eoas5004
Create a new Jupyter kernel from the Python environment eoas5004
with a display name of "EOAS 5004".
python -m ipykernel install --user --name eoas5004 --display-name "EOAS 5004"
This creates a local kernel at $HOME/.local/share/jupyter/kernels/eoas5004
. To share this kernel with all users on JupyterHub, move this kernel to /opt/tljh/user/share/jupyter/kernels/
.
sudo mv ~/.local/share/jupyter/kernels/eoas5004 /opt/tljh/user/share/jupyter/kernels/