Last change
on this file since 921 was
910,
checked in by aslmd, 12 years ago
|
PLANETOPLOT v2
- Spiga LMD/UPMC 24/03/2013
Contents
core
- ppclass.py --> main class with pp() objects (need ppplot and ppcompute)
- ppplot.py --> plot class (can be used independently, need ppcompute)
- ppcompute.py --> computation class (can be used independently)
scripts
- pp.py --> command line utility to use ppclass
- pp_reload.py --> command line utility to load saved plot objects *.ppobj
- example/* --> example scripts using ppclass
settings files
- set_area.txt --> setting file: predefined areas for plotting (can be omitted)
- set_back.txt --> setting file: predefined backgrounds for plotting (can be omitted)
- set_multiplot.txt --> setting file: predefined coefficients for multiplots (can be omitted)
- set_ppclass.txt --> setting file: predefined variables for x,y,z,t (can be omitted)
- set_var.txt --> setting file: predefined colorbars, format, labels, etc... for variables (can be omitted)
documentation
- README.TXT --> this README file
data
- demo_data/* --> plot objects for a demonstration tour and customizing tests
Requirements
python + numpy + matplotlib + netCDF4
- for mapping --> Basemap
- for scientific computations --> scipy
[recommended: Enthought Python Distribution (free for academics)]
Installation
- install required softwares and librairies in requirements
- add planetoplot_v2 in your PYTHONPATH environment variable (and in your PATH to use pp.py)
Take a demo tour
pp_reload.py demo_data/*
Improvements compared to v1
- code readability and structuration for future improvements
- modularity (class formulation)
+ easy definition/addition of attributes
- separation between data retrieval and plotting
- versatility
+ command line (pp.py)
--> for quick inspection
+ interactive session (ipython)
--> for testing and exploring
+ scripts
--> for powerful and fully customized results
- performance (overall and on large files)
+ memory consumption (only retrieve what is needed)
- saving/loading plot objects in/from *.ppobj
- plot aesthetics and customizing (see header in ppplot)
- multiplot flexibility with .plotin attribute
- easy definition of presets with set_*.txt files
- function: one field vs. another one
- emulation of + - / * operations on fields
(between two fields or between a field and a int/float)
- computations of min/max in addition to mean
- simple inspection of dimensions+variables in a file (pp.py -f file)
- verbose / non verbose mode
Acknowledgements
Thanks to A. Colaitis, T. Navarro, J. Leconte
for feedbacks and contributions on version 1
|
-
Property svn:executable set to
*
|
File size:
1.0 KB
|
Rev | Line | |
---|
[910] | 1 | #! /usr/bin/env python |
---|
| 2 | from ppclass import pp |
---|
| 3 | |
---|
| 4 | ## AVERAGED PROFILE |
---|
| 5 | temp = pp() |
---|
| 6 | temp.file = "/home/aymeric/Big_Data/DATAPLOT/diagfired.nc" |
---|
| 7 | temp.var = "temp" |
---|
| 8 | temp.x = "-180,180" |
---|
| 9 | temp.y = "-90,90" |
---|
| 10 | temp.t = "0,1" |
---|
| 11 | temp.get() |
---|
| 12 | temp.defineplot() |
---|
| 13 | temp.p[0].title = "This is an averaged temperature profile" |
---|
| 14 | temp.makeplot() |
---|
| 15 | |
---|
| 16 | ## ZONAL MEAN |
---|
| 17 | u = pp() |
---|
| 18 | u.file = "/home/aymeric/Big_Data/DATAPLOT/diagfired.nc" |
---|
| 19 | u.var = "u" |
---|
| 20 | u.x = "-180,180" |
---|
| 21 | u.y = None |
---|
| 22 | u.t = "0.5" |
---|
| 23 | u.get() |
---|
| 24 | u.defineplot() |
---|
| 25 | u.p[0].div = 30. |
---|
| 26 | u.p[0].colorb = "RdBu_r" |
---|
| 27 | u.p[0].title = "This is a zonal mean" |
---|
| 28 | u.makeplot() |
---|
| 29 | |
---|
| 30 | ## ZONAL MINIMUM |
---|
| 31 | u.compute = "min" |
---|
| 32 | u.get() |
---|
| 33 | u.defineplot() |
---|
| 34 | u.p[0].div = 30. |
---|
| 35 | u.p[0].colorb = "cool" |
---|
| 36 | u.p[0].title = "This is minimum over zonal axis" |
---|
| 37 | u.makeplot() |
---|
| 38 | |
---|
| 39 | ## ZONAL MAXIMUM |
---|
| 40 | u.compute = "max" |
---|
| 41 | u.get() |
---|
| 42 | u.defineplot() |
---|
| 43 | u.p[0].div = 30. |
---|
| 44 | u.p[0].colorb = "hot" |
---|
| 45 | u.p[0].title = "This is maximum over zonal axis" |
---|
| 46 | u.makeplot() |
---|
| 47 | |
---|
| 48 | ## MAP OF MAXIMUM OVER TIME |
---|
| 49 | u.compute = "max" |
---|
| 50 | u.x = None |
---|
| 51 | u.y = None |
---|
| 52 | u.t = "0,1" |
---|
| 53 | u.z = 20000. |
---|
| 54 | u.get() |
---|
| 55 | u.defineplot() |
---|
| 56 | u.p[0].div = 30. |
---|
| 57 | u.p[0].title = "This is maximum over time" |
---|
| 58 | u.makeplot() |
---|
Note: See
TracBrowser
for help on using the repository browser.