Using Jupyter Notebooks in an international summer school

How do you give a group of students simple access to a simulation model used for training, without the need to install software on many different computers? Maarten Krol, professor of Meteorology and Air Quality at Wageningen University, is a big fan of using Jupyter Notebooks on SURF's HPC infrastructure.

Cursisten achter laptops

Climate changes

The Earth’s atmosphere contains different gases, such as nitrogen, oxygen, and argon. The composition of the atmosphere, among other things, determines its ability to transmit sunlight and trap infrared light, leading to potentially long-term changes in climate. Prof. Krol’s research focus is on the modelling of the atmospheric composition on different scales of space and time.

Problems

“I teach regularly in international summer schools, and like to give students hands-on experience. I developed a number of computer assisted practicals in which students learn how to use atmospheric chemistry transport models. These are models that help us understand the composition of the atmosphere. For this I use a simplified simulation model, programmed in Fortran/C, with a simple interface. To run the model and analyze the simulation results, I used to employ visualization software like Interactive Data Language (IDL). This involves installation of specific software, and that often caused problems on foreign computers.”

Access through a browser

A few years ago Krol discovered Jupyter Notebooks. Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and explanatory text. Uses include data cleaning and transformation, numerical simulation, statistical modeling, machine learning and much more. “Since then I am a big fan and started to convert my hands-on exercises to Jupyter Notebooks. I now routinely run these Notebooks at SURF. This allows the student to access the Notebook through a browser, and with that they have full access to a machine that can interactively perform simulations and plot results.”

Flexibility

The less advanced students use only the simple widget-driven interface, and more advanced students can modify the Fortran/C code and perform advanced simulations. “I can flexibly create a number of standard Unix machines in the HPC Cloud, and once I have the IP addresses I use Docker to install and run a Docker image of my project on the virtual machines. The Docker script runs the applications needed to execute the models on the virtual machines. This way I know for certain that it will work. Recently I have employed this set-up in Finland using 24 virtual machines, and students very much appreciated the procedure. SURF’s HPC team reserved special nodes in the HPC Cloud to secure the availability of enough virtual machines. They also solved some problems with machines that ran out of disk-space.”

    With JupyterHub you can create a multi-user ‘hub’ which automatically creates and manages multiple virtual copies of the single-user Jupyter Notebook environment

    Distance learning

    Currently, says Krol, he is studying the use of JupyterHub. With JupyterHub you can create a multi-user ‘hub’ which automatically creates and manages multiple virtual copies of the single-user Jupyter Notebook environment. “Due to its flexibility and customization options, JupyterHub can be used to serve notebooks to a class of students, a corporate data science group, or a scientific research group. I learned that SURF offers a managed JupyterHub Notebook server for educational and research purposes. As a teacher, I see many applications of this infrastructure, for instance in distance learning and as support for Massive Online Open Courses.”

    More information