Syllabus#

Please read this syllabus carefully at the beginning of the class, and return to it as often as necessary.

Learning outcomes#

This class aims at teaching modern programming techniques for (geo-)scientists. After completing the class and actively participating throughout the semester, you will:

  • be familiar with a modern and open-source programming language (Python) and its use for scientific applications

  • be able to program in a structured, extendable and reproducible manner

  • be able to read and write python programs of intermediate complexity, as well as python packages

  • understand how numbers are handled by computers and be aware of numerical accuracy errors

  • be aware of simple performance considerations (vectorization)

  • know how to write and run formal tests for your code (with pytest)

  • be acquainted with various programming utility tools: IDEs, debugger

  • be able to search for, understand, install and take advantage of existing packages and libraries available in the rich scientific Python ecosystem

Non-objectives of this class:

This class is not about learning data analysis, plotting or numerics. Nor is it about learning the details of the python packages you will use for the rest of your studies such as matplotlib, pandas, xarray, etc, although we will be using some of these packages.

The objective here is to provide you with a solid foundational knowledge about core programming concepts, in order to to make you an independent learner, able to expand and deepen your programming skills by yourself.

Don’t worry: you will have ample time to play with fancy libraries in other classes of the master curriculum.

Prerequisites#

The targeted audience for this course are students at the master level with previous experience in programming. No prior knowledge of python is required, but it is assumed that you are familiar with a similar language (Matlab, IDL, R…) and basic programming structures (loops, functions, conditional blocks…).

Ideally you will have the programming level of a student having completed the introduction to programming for atmospheric scientists in the BSc. The first few units will be catching up on the materials from the BSc class, but quickly enough we will move towards more advanced topics.

Organisation of the class#

The class is taught in English. It is okay to ask questions in German as well!

This class follows the flipped classroom model. You will acquire new knowledge at home by reading online materials (and watching videos when appropriate). We will then use the time together in class to discuss the materials and write code.

This semester the course will be taught in 11 weeks, so that it ends already in mid-December. Each week will be organised in the following way:

  • On Fridays, you will receive instructions for the following week (which materials to read/watch and the programming assignments). You study them at home during the week.

  • On Mondays (13:15-14:00), we meet to discuss the assignment solutions from the previous week (assignments are mandatory but not graded, see “Grading” below).

  • On Tuesdays (10:15-12:00) and Fridays (11:15-13:00), we meet to discuss the current material and work on the assignments together. We will often start with a short, individual online assessment, so that you can check if you have understood the new material correctly. Based on these short quizzes, we will together choose the topics and questions to discuss further.

Important

Please note that on Friday 4 October, we meet from 14:30 to 16:00, and on Friday 25 October from 13:30 to 15:00 instead of the usual time.

Important

You will receive 5 ECTS if you pass the course: with 1 ECTS corresponding to 25 hours of work, this represents 11 to 12 hours of work per week (11 weeks). For this course, it means that you will spend more time doing homework than sitting in class.

It is strongly recommended that you work regularly for the class. Programming is quite different from other disciplines, and “doing nothing for a few months” cannot be replaced by a “no-sleep-48-hours-push” at the end of semester. Programming is a bit like learning how to ski or climb: it is best learned by doing, and you will notice that regular practice will make you better each week.

Learning checklist#

At the end of each lesson, there is a “learning checklist”: go over it at the end of the lecture and see if you can check all the boxes. It’s a good way for you to check if you are ready to go on, or if you still need to go back to some reading and learning!

Grading#

Your final grade will be a combination of a mid-term exam (20%), a final exam (50%), assignments (0%), and a programming project (30%). Participation in both exams, handing in and presenting the programming project, and at least one assignment presentation are necessary to pass the class.

  1. The mid-term exam (open-book exam, combination of muliple choice, essay, and programming questions) will take place on Tuesday 5.11.2024 from 10:15 to 12:00.

  2. The final exam (open-book exam, combination of muliple choice, essay, and programming questions) will take place on Tuesday 14.01.2025 from 10:15 to 12:00.

  3. Each week there will be an assignment (unless specified otherwise, e.g. while you are working on the group project). These assignments can be worked through alone or in groups. The assignments will be discussed on Mondays and, each week, one group will be asked to present their results to the rest of the class. The presentation is not graded, but participation and at least one group presentation are required to pass the class. Further information about the style of the presentations will be provided in class.

  4. Towards the beginning of November, you will be given a programming project, on which you will work several weeks. You will have to present your code packages to the class on 13.12.2024 and hand in the final packages before Christmas. To make sure that you make good progress on your project and to receive feedback while you are working on your code, there will be intermediate deadlines that will be announced later. Your project grade will consist of an individual component (50%) and a group component (50%).

Weekly lesson plan#

This is a tentative schedule for the semester, which will likely be subject to some changes.

  • Week 01 (01-04 Oct) - Welcome and getting started with Python and the command line

  • Week 02 (07-11 Oct) - Python packages, language fundamentals, variable scopes, modules, and strings

  • Week 03 (14-18 Oct) - Floating point arithmetics and introduction to numpy

  • Week 04 (21-25 Oct) - Numpy arrays, scientific python stack, programming style, and using AI for programming

  • Week 05 (28 Oct-1 Nov) - Revision

  • Week 06 (04-08 Nov) - Mid-term exam, code testing

  • Week 07 (11-15 Nov) - Python packages, code documentation, and Group Project

  • Week 08 (18-22 Nov) - no class meetings - work on the project

  • Week 09 (25-29 Nov) - Object Oriented Programming

  • Week 10 (02-06 Dec) - Object Oriented Programming

  • Week 11 (09-13 Dec) - Project presentations

  • 20 Dec 2024 - Final project submission

  • 14 Jan 2025 - Final exam