Differences between revisions 25 and 26
Revision 25 as of 2012-08-30 07:23:13
Size: 4471
Comment:
Revision 26 as of 2012-09-12 13:05:12
Size: 4641
Editor: MikhailItkin
Comment:
Deletions are marked like this. Additions are marked like this.
Line 60: Line 60:
 * [[http://www.gdal.org/|GDAL]]: the door to a huge number of different file formats. [[ http://www.gdal.org/gdal_tutorial.html | GDAL (Python) API tutorial ]]   * [[http://www.gdal.org/|GDAL]]: the door to a huge number of different file formats. [[http://www.gdal.org/gdal_tutorial.html|GDAL (Python) API tutorial]]
Line 62: Line 62:
 * [[http://www.pyngl.ucar.edu/|PyNGL]] [[ http://www.pyngl.ucar.edu/Tutorial/ | Tutorial ]]  * [[http://www.pyngl.ucar.edu/|PyNGL]] [[http://www.pyngl.ucar.edu/Tutorial/|Tutorial]]
Line 65: Line 65:
Line 73: Line 72:
=== structuring a program (Mikhail) (13.9.2012) ===
 * python functions with optional and kwargs
 * python object oriented programming (classes etc)
=== Structuring a program (Mikhail) (13.9.2012) ===
 * general structure of python scripts
 * writing python functions, what are the keyworded and the non-keyworded arguments
 * writing modules and classes, why and how to create custom objects
 * naming convention
 * how to parse command line input for options and arguments

LES python seminar series (Thursday, 10:30 - 12:00, Geomatikum, 1729)

contact: Alex Loew, Julia Pongratz

What you should be able to do in advance

  • python programming structures
  • if clauses
  • function calling
  • print statements
  • well, running python scripts (in python shell and interactive shell like ipython)
  • edit python scripts in the editor of your choice
  • ...


Seminar outline

Working with arrays (Gernot, Michael) (19.07.2012)

Plotting (1D,2D,3D) (Alex) (2.8.2012)

Course material for plotting

* subplots, figure, axis objects; easy and more sophisticated appraoches

  • always use figure/ax
  • a brief tour through matplotlib gallery

    • lineplots
    • fill_between
    • contour plots
  • nice colorbars, colormaps handling etc.
  • working with different axes in a single plot; twinx()
  • saving figures
    • fitting to actual content
  • tight_layout

Geospatial data format handling and vizualization (Mikhail) (16.08.2012)

Lesson code examples

  • PyNio - handling netCDF

    • read netCDF
    • write netCDF
      • data type conversion
        • how to write a numpy array (double) in a float netcdf variable?
        • how to store data as scaled integers?
  • GDAL: the door to a huge number of different file formats. GDAL (Python) API tutorial

  • Basemap

  • PyNGL Tutorial

system operations (Michael) (30.8.2012)

Commented examples from the seminar

  • replacing BASH: working with os and system objects
  • os.system, subprocess etc.
  • python as a replacement for bash
  • how to debug a python program?

Structuring a program (Mikhail) (13.9.2012)

  • general structure of python scripts
  • writing python functions, what are the keyworded and the non-keyworded arguments
  • writing modules and classes, why and how to create custom objects
  • naming convention
  • how to parse command line input for options and arguments


time series analysis: the Pandas module (Mikhail)

  • introduction to pandas timeseries analysis module

pyCMBS (Alex)

  • introduction to pyCMBS
  • cdo interfacing
  • anomaly calculations, hovmoeller plots etc

Integration of other programming languages (Alex, no date yet)

  • R
  • f2py
  • C-code
  • matlab

scientific data analysis in python

  • EOF, SVD analysis

running JSBACH offline in a python environment (Gernot)

parallel programming (Heinrich Widmann)

  • openMP, MPI, subprocesses, threads

statistics in python (???)

  • statistical analysis of large data sets

other topics

  • animations
  • GUI programming (Alex, remon???)
  • H5PY - simple access to HDF5 files
  • python2.x or python3.x (does it make a difference?)

projects to work on ...

  • MPI-ESM in python (Christian) ;-)

LehreWiki: PythonCourse/PythonLES (last edited 2012-12-19 13:14:36 by AlexanderLoew)