Python Course for Geoscientists

Europe/Berlin
Fabian Wachsmann (DKRZ), Jannek Squar (Uni HH), Karin Meier-Fleischer (DKRZ), Marco Kulüke (DKRZ), Ralf Mueller (DKRZ)
Description

In today's world, there is usually no way around the Python programming language in the geosciences. However, learning Python on your own is usually associated with many difficulties and leads only to unsatisfactory results, which is why this course was developed especially for beginners.

Python is an easy to learn but powerful programming language. It has abstract data structures and a simple approach to object-oriented programming. The very extensive standard library offers almost everything you need. And if you need something more specific, you can usually download it for free from third-party distributions.

This workshop will take place via Zoom videoconference.

 

Attention

Due to the high demand, the course was fully booked within a short period of time. Unfortunately we have closed the registration.

By virtue of the enormous response, we will offer further courses in the near future. Therefore we ask for your patience.
Thank you for your understanding.

 

    • 09:00 12:00
      Day 1: Morning sessions
      • 09:00
        Welcome 15m

        A short welcome to the participants and speakers.

      • 09:15
        Hardware for Python: Difference between a supercomputer and your mobile phone 45m
        • what is a node, cpu
        • Historical development
        • Architecture
      • 10:00
        Break 15m
      • 10:15
        What is Python – short intro 30m
        • Difference between programming language and Python
        • Assembler, compiler, interpreter
      • 10:45
        Break 15m
      • 11:00
        Introduction to Linux system and setting up work environment 1h
        • terminal
        • via WSL
        • command line and shell: (basics to transfer/run files and data in/out Mistral)
        • editor
    • 12:00 13:00
      Lunch Break 1h
    • 13:00 15:30
      Day 1: Afternoon sessions
      • 13:00
        Installation 30m
        • conda
        • python
        • modules/environments
        • envkernel conda --name=kernel-name --user $conda-env
        • python-related package management
        • testing installation and libraries
      • 13:30
        Break (optional) 15m
      • 13:45
        Version control, code sharing 30m
        • git
        • gitlab
        • get the workshop material (in $HOME)
      • 14:15
        Break (optional) 15m
      • 14:30
        Jupyter notebooks, connecting to Mistral 1h
        • Jupyter lab
        • Jupyter hub
        • Jupyter lab
    • 09:00 13:00
      Day 2: Morning sessions
      • 09:00
        Warmup about content of Day 1 15m
      • 09:15
        Syntax, variables, data types, strings, ... 1h 45m
        • Syntax
        • Variables
        • Data types
        • Strings
        • List, tuples, sets, and arrays, slices
        • Dictionaries
        • Intro to logic and (binary algebra, bit, byte)
      • 11:00
        Break 15m
      • 11:15
        Copy objects, math operators, conditions, ... 1h 45m
        • Copying objects, deep copy
        • Mathematical operators and math functions
        • Conditional statements
        • Iteration
        • Loops
        • List comprehensions
    • 13:00 14:00
      Lunch break 1h
    • 14:00 15:45
      Day 2: Afternoon sessions
      • 14:00
        Functions, classes, scripts, ... 1h 45m
        • Functions
        • Classes and methods
        • Command line arguments for python scripts
    • 09:00 12:30
      Day 3: Morning sessions
      • 09:00
        Warmup about content of Day 2 15m
      • 09:15
        File I/O, numpy, ... 1h 45m
        • File I/O (file and stdin)
        • CSV
        • Numpy
      • 11:00
        Break 15m
      • 11:15
        Read/Write netCDF, GRIB files, exeptions, ... 1h 15m
        • xarray
        • Exceptions/Error handling/Logging, and Debugging
    • 12:30 13:30
      Lunch break 1h
    • 13:30 15:30
      Day 3: Afternoon sessions
      • 13:30
        Data analysis 1h 30m
      • 15:00
        Python in action (GLOBAGRIM) 30m
    • 09:00 12:15
      Day 4: Morning sessions
      • 09:00
        Warmup about content of Day 3 15m
      • 09:15
        Visualization 1h 30m
        • matplotlib and cartopy
        • Numpy's and xarray's plot
      • 10:45
        Break 15m
      • 11:00
        Interesting packages 1h 15m

        Overview of some recommendable packages

    • 12:15 13:15
      Lunch break 1h
    • 13:15 15:30
      Day 4: Afternoon sessions
      • 13:15
        Exercise 2h 15m
    • 15:30 15:45
      The End 15m