Last change
on this file since 1170 was
1108,
checked in by aslmd, 11 years ago
|
PLANETOPLOT. How to include a streamfunction in a separate file without a longitude dimension. See stream.py in examples.
|
-
Property svn:executable set to
*
|
File size:
510 bytes
|
Line | |
---|
1 | #! /usr/bin/env python |
---|
2 | from ppclass import pp |
---|
3 | from ppplot import plot2d |
---|
4 | import numpy as np |
---|
5 | |
---|
6 | ## load streamfunction from another file |
---|
7 | ## ** USE kind3d="tzy" --> because 3D file is different |
---|
8 | pfield = pp(file="histmth.1401_PSI.nc",x=0,t=10,var="psi",verbose=True,kind3d="tzy").getf() |
---|
9 | |
---|
10 | ## get field and define a plot |
---|
11 | t = pp() |
---|
12 | t.file = "histmth.1401.nc" |
---|
13 | t.x = "-180,180" |
---|
14 | t.t = 10 |
---|
15 | t.var = "temp" |
---|
16 | t.logy = True |
---|
17 | t.get() |
---|
18 | t.defineplot() |
---|
19 | |
---|
20 | ## add the streamfunction as contour |
---|
21 | t.p[0].c = pfield |
---|
22 | |
---|
23 | ## make plot |
---|
24 | t.makeplot() |
---|
Note: See
TracBrowser
for help on using the repository browser.