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.

 

    • Day 1: Morning sessions
      • 1
        Welcome

        A short welcome to the participants and speakers.

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

        Overview of some recommendable packages

    • 12:15
      Lunch break
    • Day 4: Afternoon sessions
      • 20
        Exercise
    • 15:30
      The End