other:python:jyp_steps
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
other:python:jyp_steps [2016/01/21 18:10] – numpy, scipy... jypeter | other:python:jyp_steps [2016/01/22 12:40] – added cdms2/netcdf4 jypeter | ||
---|---|---|---|
Line 11: | Line 11: | ||
==== Python 2.7 ==== | ==== Python 2.7 ==== | ||
- | [[https:// | + | [[https:// |
==== Python 3 ==== | ==== Python 3 ==== | ||
- | [[https:// | + | [[https:// |
===== Numpy and Scipy ===== | ===== Numpy and Scipy ===== | ||
- | Summary: Python provides //ordered// objects (e.g. lists, strings, ...) and some math operators, but you can't do real heavy computation with these. **Numpy** makes it possible to work with data arrays and using array syntax and masks (instead of explicit nested loops and tests) and the apropriate numpy functions will allow you to get performance similar to what you would get with a compiled program! **Scipy** adds more scientific functions | + | Summary: Python provides //ordered// objects (e.g. lists, strings, basic arrays, ...) and some math operators, but you can't do real heavy computation with these. **Numpy** makes it possible to work with multi-dimensional |
How to get started? | How to get started? | ||
Line 29: | Line 29: | ||
- Numpy Reference Guide | - Numpy Reference Guide | ||
- Scipy Reference Guide | - Scipy Reference Guide | ||
+ | |||
+ | ===== cdms2 and netcdf4 ===== | ||
+ | |||
+ | There is a good chance that your input array data will come from a file in the [[http:// | ||
+ | |||
+ | Note: the NetCDF file format is self-documented, | ||
+ | |||
+ | ==== cdms2 ==== | ||
+ | |||
+ | Summary: cdms2 can read/write netCDF files (and read //grads// dat+ctl files) and provides a higher level interface than netCDF4. Unfortunately, | ||
+ | |||
+ | How to get started: | ||
+ | - read [[http:// | ||
+ | - the tutorial is in French (soooorry!) | ||
+ | - you have to replace //cdms// with **cdms2**, and //MV// with **MV2** (sooorry about that, the tutorial was written when CDAT was based on Numeric instead of numpy to handle array data) | ||
+ | - read the [[http:// | ||
+ | - ask questions and get answers on the [[http:// | ||
+ | |||
+ | |||
+ | ==== netCDF4 ==== | ||
+ | |||
+ | Summary: netCDF4 can read/write netCDF files and is available in most python distributions | ||
+ | |||
+ | Where: [[http:// | ||
+ | |||
===== Matplotlib ===== | ===== Matplotlib ===== | ||
Line 69: | Line 94: | ||
===== Quick Reference ===== | ===== Quick Reference ===== | ||
- | * The nice Python 2.7 Quick Reference: [[http:// | + | * The nice and convenient |
===== Some good coding tips ===== | ===== Some good coding tips ===== |
other/python/jyp_steps.txt · Last modified: 2025/02/26 11:40 by jypeter