| 
  
   Size: 2462 
  
  Comment:  
 | 
  
   Size: 5407 
  
  Comment:  
 | 
| Deletions are marked like this. | Additions are marked like this. | 
| Line 1: | Line 1: | 
| = LES python seminar series = | 
= LES python seminar series (Thursday, 10:30 - 12:00, Geomatikum, 1729) = | 
| Line 18: | Line 17: | 
| == Seminar outline == | = Seminar outline = == Part 1 == === Working with arrays (Gernot, Michael) (19.07.2012) === . [[PythonCourse/PythonLES/SeminarLog1|Commented examples from the seminar]]  | 
| Line 20: | Line 22: | 
| === Working with arrays (Gernot,Michael) (19.07.2012) === * numpy arrays (indexing, slicing, views ...)  | 
 * general information on [[http://docs.python.org/reference/datamodel.html|python data model]] ([[http://docs.python.org/library/copy.html|copy, references, deepcopy]]) * [[http://docs.python.org/library/functions.html#map|map]] and [[http://docs.python.org/tutorial/controlflow.html#lambda-forms|lambda]] functions * [[http://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html|numpy arrays]] (indexing, slicing, views ...)  | 
| Line 23: | Line 26: | 
|  * general information on python data model (copy, references, deepcopy) * masked arrays  | 
  * data type conversions * [[http://docs.scipy.org/doc/numpy/reference/routines.math.html|elementwise functions]] * [[http://docs.scipy.org/doc/numpy/reference/routines.linalg.html|linear algebra]] * [[http://docs.scipy.org/doc/numpy/reference/routines.statistics.html|array statistics]] * [[http://docs.scipy.org/doc/numpy/reference/maskedarray.generic.html|masked arrays]]  | 
| Line 26: | Line 32: | 
|  * map and lambda functions * pickle, cPickle  | 
  * [[http://docs.scipy.org/doc/numpy/reference/routines.io.html|numpy input and output]] * general input and output ([[http://docs.python.org/library/functions.html#open|opening a file]] and [[http://docs.python.org/library/stdtypes.html#file-objects|working with a file]]) * [[http://docs.python.org/library/pickle.html|pickle]], cPickle  | 
| Line 30: | Line 37: | 
|  * subplots, figure, axis objects * a brief tour through matplotlib gallery  | 
[[PythonCourse/PythonLES/SeminarLog2|Course material for plotting]] * subplots, figure, axis objects; easy and more sophisticated appraoches * always use figure/ax * a brief tour through [[http://matplotlib.sourceforge.net/gallery.html|matplotlib gallery]]  | 
| Line 33: | Line 44: | 
| * fill between | * fill_between | 
| Line 36: | Line 47: | 
|  * working with different axes in a single plot; twinx() * saving figures * fitting to actual content * [[http://matplotlib.sourceforge.net/users/tight_layout_guide.html|tight_layout]]  | 
|
| Line 37: | Line 52: | 
| === Geospatial data format handling and vizualization (Mikhail) (09.08.2012) === * Nio - handling netCDF  | 
=== Geospatial data format handling and vizualization (Mikhail) (16.08.2012) === [[IoBasemapNgl|Lesson code examples]] * [[http://www.pyngl.ucar.edu/Nio.shtml|PyNio]] - handling netCDF  | 
| Line 41: | Line 58: | 
|  * GDAL: the door to all available data formats ? * Basemap * pyNGL  | 
   * data type conversion * how to write a numpy array (double) in a float netcdf variable? * how to store data as scaled integers? * [[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://matplotlib.github.com/basemap/|Basemap]] * [[http://www.pyngl.ucar.edu/|PyNGL]] [[http://www.pyngl.ucar.edu/Tutorial/|Tutorial]]  | 
| Line 46: | Line 66: | 
| * replacing BASH: working with os adn system objects | [[PythonCourse/PythonLES/SeminarLog4|Commented examples from the seminar]] * replacing BASH: working with os and system objects  | 
| Line 49: | Line 71: | 
| * how to debug a python program? | |
| Line 50: | Line 73: | 
| === 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) === [[PythonCourse/PythonLES/SeminarLog5|Commented program from the seminar]]  | 
| Line 54: | Line 76: | 
| ---- |  * 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  | 
| Line 56: | Line 82: | 
| === time series analysis: the Pandas module (Mikhail) === * introduction to pandas timeseries analysis module  | 
== Part 2 == === pyCMBS (Alex) (31.10. as part of the Wednsday seminar) === * introduction to pyCMBS * cdo interfacing * anomaly calculations, hovmoeller plots etc ... * EOF, SVD analysis === time series analysis: the Pandas module (Mikhail) (25.10.) === [[/Pandas | Lesson code ]] * Indexed arrays * Merging, aligning and restructuring timeseries * Reindexing timeseries * [[http://www.youtube.com/watch?v=w26x-z-BdWQ|Video tutorial by Wes McKinney]] * [[http://pandas.pydata.org/pandas-docs/dev/api.html| Official site with documentation ]] === parallel programming (Heinrich Widmann) (08.11.) === [[/Parallel_Programming | Lesson code ]] [[/ParallelSlides | ... and slides ]]  | 
| Line 60: | Line 105: | 
|  * Threading vs. multiprocessing * The GIL issue * ParallelPython module (pp) * Processing module * Further approaches and techniques ... * Not (really) addressed : * openMP, MPI * more sophuisticated clustering, scheduling and load balancing .... * [[https://github.com/ianozsvald/ParallelPython_EuroSciPy2012| Ian Ozsvald's lesson at SciPy2012 ]]  | 
|
| Line 61: | Line 115: | 
| === pyCMBS (Alex) (???? on a separate day BEFORE the summer break ???) === * introduction to pyCMBS * cdo interfacing * anomaly calculations, hovmoeller plots etc  | 
=== python CDO interface (Ralf Mueller) (22.11.) === * cdo - python interface  | 
| Line 66: | Line 118: | 
=== Integration of other programming languages ===  | 
=== Integration of other programming languages (Alex, 06.12) === | 
| Line 72: | Line 123: | 
| * http://wiki.python.org/moin/IntegratingPythonWithOtherLanguages | |
| Line 73: | Line 125: | 
| ---- | |
| Line 74: | Line 127: | 
=== 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 ===  | 
== other topics == * statistical analysis of large data sets  | 
| Line 90: | Line 130: | 
| * GUI programming | * GUI programming (Alex, remon???) | 
| Line 93: | Line 133: | 
= projects to work on ... = * MPI-ESM in python (Christian) ;-)  | 
LES python seminar series (Thursday, 10:30 - 12:00, Geomatikum, 1729)
contact: Alex Loew, Julia Pongratz
Contents
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
Part 1
Working with arrays (Gernot, Michael) (19.07.2012)
general information on python data model (copy, references, deepcopy)
numpy arrays (indexing, slicing, views ...)
- array functions (mean, sum etc. along axes) 
- data type conversions
 
 - reading ASCII files etc. 
general input and output (opening a file and working with a file)
 pickle, cPickle
Plotting (1D,2D,3D) (Alex) (2.8.2012)
* 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
 
 
Geospatial data format handling and vizualization (Mikhail) (16.08.2012)
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?
 
 
 - data type conversion 
 
GDAL: the door to a huge number of different file formats. GDAL (Python) API 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)
Commented program from the seminar
- 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
 
Part 2
pyCMBS (Alex) (31.10. as part of the Wednsday seminar)
- introduction to pyCMBS
 - cdo interfacing
 - anomaly calculations, hovmoeller plots etc ...
 - EOF, SVD analysis
 
time series analysis: the Pandas module (Mikhail) (25.10.)
- Indexed arrays
 - Merging, aligning and restructuring timeseries
 - Reindexing timeseries
 
parallel programming (Heinrich Widmann) (08.11.)
- Threading vs. multiprocessing 
- The GIL issue
 
 ParallelPython module (pp)
- Processing module
 - Further approaches and techniques ...
 - Not (really) addressed : 
- openMP, MPI
 - more sophuisticated clustering, scheduling and load balancing ....
 
 
python CDO interface (Ralf Mueller) (22.11.)
- cdo - python interface
 
Integration of other programming languages (Alex, 06.12)
- R
 - f2py
 - C-code
 - matlab
 http://wiki.python.org/moin/IntegratingPythonWithOtherLanguages
other topics
- statistical analysis of large data sets
 - animations
 - GUI programming (Alex, remon???)
 - H5PY - simple access to HDF5 files
 - python2.x or python3.x (does it make a difference?)
 
