Last change
on this file since 1004 was
933,
checked in by aslmd, 12 years ago
|
UTIL PYTHON planetoplot_v2. units: set an additional column set_var.txt and put units over colorbar. 1D bounding and formatting. possible mode nothing. corrected bug coast/sea.
|
-
Property svn:executable set to
*
|
File size:
847 bytes
|
Rev | Line | |
---|
[910] | 1 | #! /usr/bin/env python |
---|
| 2 | from ppclass import pp |
---|
| 3 | |
---|
| 4 | u = pp() |
---|
| 5 | u.file = "/home/aymeric/Big_Data/DATAPLOT/diagfired.nc" |
---|
| 6 | u.var = "u" |
---|
| 7 | u.t = "0.5,0.8" |
---|
| 8 | u.z = "10,20" |
---|
| 9 | u.getdefineplot(extraplot=2) # prepare 2 extraplots (do not show) |
---|
| 10 | u.p[0].proj = "ortho" |
---|
[933] | 11 | u.p[0].title = "$u$" |
---|
[910] | 12 | u.makeplot() |
---|
| 13 | |
---|
| 14 | v = pp() |
---|
| 15 | v << u # NB: initialize v object with u object's attributes |
---|
| 16 | v.var = "v" |
---|
| 17 | v.get() |
---|
| 18 | v.plotin = u # plotin must be defined before .defineplot() |
---|
| 19 | v.defineplot() |
---|
| 20 | v.p[1].proj = "ortho" |
---|
[933] | 21 | v.p[1].title = "$v$" |
---|
[910] | 22 | v.makeplot() # plot within the previous one (do not show) |
---|
| 23 | |
---|
| 24 | wind = u**2 + v**2 |
---|
| 25 | wind = wind**0.5 |
---|
| 26 | wind.plotin = v |
---|
[923] | 27 | wind.filename = "windspeed" |
---|
[910] | 28 | wind.defineplot() |
---|
[933] | 29 | wind.p[2].title = "$\sqrt{u^2+v^2}$" |
---|
[910] | 30 | wind.p[2].proj = "ortho" |
---|
| 31 | wind.makeplot() # plot within the previous one (show because complete) |
---|
| 32 | |
---|
| 33 | |
---|
| 34 | ## in this case it is not possible to make another plot afterwards... |
---|
| 35 | |
---|
Note: See
TracBrowser
for help on using the repository browser.