Table of Contents
DKRZ JupyterHub
The exercises are provided as Python Jupyter notebooks and are run on JupyterHub provided by DKRZ.
Log in with your u-Account at https://jupyterhub.dkrz.de/
Choose the following profile, fill in the account name "um0878" and start a notebook server
First time setup
First, you have to checkout the lecture git repository and install the required Python modules, the following step has
Getting started
The material needed for the course is distributed via a subversion repository. Subversion is a version control system and can be used via the command line client git
.
These steps have to be done only once.
Open a terminal
Run the following commands by copy'n'pasting them into the terminal:
Code Block | ||
---|---|---|
module unload netcdf_c
module load anaconda3
pip install --user /work/um0878/users/olemke/rtcourse/python/*.whl | ||
Code Block | ||
| ||
cd ~ git clone --depthbranch=1 -b wise2019 https://github.com/atmtoolswise2021 /work/um0878/users/olemke/rtcourse/arts-lectures.git |
Setting up the environment (do this once in every new terminal)
Every time you open a new terminal, you need to source the course environment. If you know that your default shell (echo $SHELL
) is bash
and not tcsh
, you can skip the first command:
Code Block | ||
---|---|---|
| ||
bash --login
source ~/arts-lectures/bin/arts-init.bash |
The following command shows the location of the ARTS API if it is successfully loaded:
Code Block | ||
---|---|---|
| ||
python -c "import typhon; \
typhon.set_loglevel('INFO'); \
import typhon.arts.workspace"
|
Updating the lecture package
If no errors occured, type "exit"
and close the browser tab.
Switching to JupyterLab
JupyterLab offers a more comfortable interface than the standard Jupyter Notebooks. To access JupyterLab, change the string ".../preset/tree/..." in the browser URL to ".../preset/lab/tree/...":
After a short loading animation, the JupyterLab user interface will appear.
Opening a notebook
Navigate in the file browser in the sidebar on the left to the exercise subfolder, e.g.Use the git pull
command to ensure that you have the latest version of the lecture files:
Code Block | ||
---|---|---|
| ||
cd ~/arts-lectures git pull |
Getting the lecture notes
Change to the directory script/
and run make:
Code Block | ||
---|---|---|
| ||
cd ~/arts-lectures/script
make
|
This will generate two PDF files, one optimised for viewing on the screen, one optimised for printing.
Running the exercises
Don't forget to run the source
command from the 'Setting up the environment' section above. You need to do this everytime you open a new terminal.
Change to the directory of the first exercise and run the Python script:
Code Block | ||
---|---|---|
| ||
cd ~/arts-lectures/exercises/01-rotational_spectra
python absorption.py
|
This opens an interactive window showing the simulated absorption cross sections.
The script will also save the plot as PDF file in the plots/
subdirectory. You can use a PDF viewer (e.g. evince) to display the plot:
/exercises/01-molecule_spectra/ |
and open the first exercise notebook "absorption.ipynb
".
Closing the notebook and server
After you're done for the day, save your notebook and shut down the notebook server. The notebook will be shutdown automatically after 12 hours. To save compute time (which will be accounted to the project even when the notebook is running in the background), please always close it down after you're done.
First save your notebook by clicking on the disk icon in the toolbar, then go to the Hub Control Panel:
And stop the notebook server
Update your local copy of arts-lecture
During the course, new exercises and updates are added to the arts-lecture repository. To update your local version of arts-lectures, open a terminal in JupyterLab.
In the terminal go to your arts-lectures folder and run "git pull"
Code Block |
---|
cd arts-lectures
git pull |
You can ignore the warning message from git. At the end of the output, you see which files have been updated. In the example below, the lecture script has received updates:
Greenhouse and Climate Sensitivity - ARTS Lectures - Introduction
Click on the image below to open the pdf for the slides of the ARTS lectures introduction.
View file name arts_intro.pdf height 250
...
language | bash |
---|
...
Web location
This document can be found at https://collaboration.cen.uni-hamburg.de/display/RaRe/ARTS+Lecture
...