Python for Geosciences 2014
This course provides an introduction to data analysis and graphical representation of oceanographic data using the Python programming language. Topics include how to read and write data using standard formats; modern programming techniques including object oriented programming, version control systems, and the model-view-controller paradigm; plotting geophysical data using various projections, best practices in plotting, and interactive plotting.
Students will compile and run parallel codes for use on distributed memory supercomuters, use batch scheduling of computer programs, and identify and fix problems in standard supercomputer management software. Students will create programs that use multiple processors using the Message Passing Interface. Students will analyze large data sets. Students will collaborate on a class project using standard tools such as Version Control Systems for maintaining collaborative software projects. Students will create scripts in the Python programming language to solve research problems.
#####Week 1-2: Core language
Overview of the standard python programming language, standard data containers (lists, tuples, dictionaries, etc), importing packages, for/while loops, and functions.
#####Week 3-4: Numerical python
Using numpy and scipy, vector operations, and best practices for large numerical datasets.
#####Week 5: Basic plotting in python
Overview of the matplotlib plotting package.
#####Week 6-7: Plotting on the earth
The Basemap package, the proj3 library, and other geospatial applications.
#####Week 8: NetCDF
Reading and writing NetCDF files locally and over the internet.
#####Week 9-10: Object Oriented programming and data structures
Object oriented programing (OOP) techniques, and good programming practices. OOP as a surrogate for data structures.
#####Week 11: Wrapping FORTRAN code
Wrapping FORTRAN code using f2py, and other numerical performance code techniques.
#####Week 12: Creating and distributing large projects
How to create and distrubute a large python package using standard techniques, like distutils and github.
#####Week 13-14: Group project presentations.
##Get a scientific python distribution (roughly in order of awesomeness):
- Anaconda python: https://store.continuum.io/cshop/anaconda/
- Enthought Python Distribution/Canopy: https://www.enthought.com/products/epd/
- Pythonxy: https://code.google.com/p/pythonxy/
- And myriad other linux distributions through package managers…
##Some core language python language resources:
- The mothership: https://www.python.org/doc/
- Dive into Python: http://www.diveintopython.net/
- Instant hacking (no relation..): http://hetland.org/writing/instant-hacking.html
##Look at some of the scientific python documentation:
- Scipy documentation: http://scipy.org/getting-started.html http://scipy.org/docs.html
- Software carpentry: http://software-carpentry.org/
- Matplotlib galary: http://matplotlib.org/gallery.html
##Some other resources:
- Web-based iPython notebook hosting: https://www.wakari.io/
- Distributed version control systems, for homework: https://github.com/