The tutorials include both, coding exercises and calculations done by hand.
There's a worksheet for every tutorial: tutorial-X/worksheet/X-sheet.pdf
If the tutorial includes coding exercises (some tutorials have no coding exercises),
there are Jupyter Notebooks (tutorial-X/notebooks/tutorial-X-task-Y.ipynb
) accompanied with required data
and additional hints..
The exercises should be worked through before the tutorial. There are exercises which are covered in the tutorial and task which are for studying at home (marked with a house symbol). Questions on both types of tasks are answered in the tutorial and all tasks are relevant for the exam.
In the tutorials we will repeatedly work with the programming language Python. If you are unfamiliar with the language, you might find the following tutorials useful.
The Python notebook based notes of Robert Johansson are a comprehensive kick starter.
- Lecture 0 covers installation and getting ready.
- Lecture 1
zooms through most basic general python control structures (only
brush over it and stop reading early, i.e. if you read the word
classes
you already know too much). - Lecture 2 is the most important and closely connected to the exercises.
- You might as well stop now, but if you are hooked, have a look at Lecture 3 for more physics and Lecture 4 for prettier graphs.
Further reference material of help is are the website-books http://python-course.eu/ (English), http://python-kurs.eu/ (German); especially of interest might be the pandas bit in the end, which will make the exercises a breeze at the expense of yet another package to learn.
You can use Binder to directly run code from the Jupyter Notebooks online without a local installation. It will create the necessary software packages and open a Jupyter Notebook from a remote server. To use binder click on the blue badge or follow the link
https://mybinder.org/v2/gh/lisazeyen/ESM_tutorial.git/master
It might take a moment, so please be patient 🙃
You should now be ready to do the tutorials in the browser 🥳
If you prefer to do the tutorials locally with your own Python installation,
first download the tutorials with git
with the following command:
cd /path/where/your/tutorial/folder/should/be
git clone https://github.com/lisazeyen/ESM_tutorial.git
or if you have ssh
setup at github:
cd /path/where/your/tutorial/folder/should/be
git clone git@github.com:lisazeyen/ESM_tutorial.git
Alternatively, (not as nice as description above) you can download the tutorials as compressed zip-file from https://github.com/lisazeyen/ESM_tutorial/archive/master.zip
To manage Python environments, we recommend to use conda
to install the packages required.
Install miniconda
(or Anaconda). For instructions for your operating system see https://conda.io/projects/conda/en/latest/user-guide/install/index.html.
Create a new conda
environment from the provided environment.yml
file with the following set of commands:
Windows:
conda env create -f environment.yml
activate esm-tutorials
macOS and Linux:
conda env create -f environment.yml
conda activate esm-tutorials
On some older Linux installations the last command can be instead
source activate esm-tutorials
For detailed instructions see https://conda.io/docs/user-guide/tasks/manage-environments.html#creating-an-environment-from-an-environment-yml-file. It will take some time!
With the conda
environment installed and activated, open a Jupyter Notebook with the following command in the tutorial folder (where your notebooks are):
cd /path/where/your/tutorial/folder/should/be
cd ESM_tutorial
jupyter lab
or
cd /path/where/your/tutorial/folder/should/be
cd ESM_tutorial
jupyter notebook