How to use this book#
I wrote this book with a strong emphasis on reproducibility of the content. For example, most of the figures in the notes are generated interactively, often using data pulled from public servers. This means that readers are able to reproduce all the results and use the code as starting points for their own investigations.
In some cases the code to produce figures and animations may be hidden by default, but you will always be able to click to reveal the Python code, and/or open the underlying Jupyter notebook with all the details.
The notes are designed to be fully self-explanatory and readable. However to get the most of the material, you’ll probably want to interact with the Python code contained in the Jupyter notebooks.
There are several different ways to do this.
UAlbany users: interact through our dedicated JupyterHub#
This is the preferred route for UAlbany students. Anyone with login credentials to our server will have a point-and-click interface to a completely interactive version of the notes, and will be able to save their work and pull in new updates.
Here’s what to do:
In a web browser, open this link to the JupyterHub: https://lore.atmos.albany.edu:8000 This should bring you to a login screen. Use your standard UAlbany netid and password.
You should now see a JupyterHub screen showing your home space on the DAES linux system.
In a different browser window, navigate to the desired page of this book.
Find the “Rocket ship” icon at top right. Hover over the icon and you should see several buttons appear.
Click on the button that says
There may be a brief delay while a local copy of the notes is made for you (or updated) on the server.
You should then see the notebook open and running live on the JupyterHub.
IMPORTANT you need to manually change the kernel before things will run properly:
Kernel --> Change kernel --> ATM415: Python 3
You should then be able to run all the code without any trouble.
Do this step every time! If you get errors trying to run any
import statements, double check that you’re using the
ATM415: Python 3 kernel.
UAlbany users, please let me know if things don’t seem to be working correctly.
Public users: interact through a cloud-based Binder service#
This will work well for many of the simple examples, but some of the notes require more computational resources. Binder is good for tinkering, but there is no easy way to save your work and come back to it.
To launch a notebook in Binder, hover over the “Rocket ship” icon at top right and click the
Anyone: run the code in your own Python environment#
You will need the following:
Basic knowledge of version control with git
Basic knowledge of Jupyter notebooks
The first step is to clone the source repository for this book on github.
Once you have the source repo, the following commands will create a self-contained conda environment with everything you need to run the notebooks (Mac, Linux and Windows), including the specialized climlab toolkit.
From within the
ClimateLaboratoryBook directory in your favorite terminal, do this:
conda env create --file environment.yml conda activate climlab-courseware
Then find all the Jupyter notebook
*.ipynb files in
You may find it useful to do all your work in a separate git branch,
and leave your
main branch untouched so you can keep it up to date with
the source repository.