source: trunk/UTIL/PYTHON/planetoplot_v2/examples/ppclass_additional/stream.py @ 1170

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
2from ppclass import pp
3from ppplot import plot2d
4import numpy as np
5
6## load streamfunction from another file
7## ** USE kind3d="tzy" --> because 3D file is different
8pfield = 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
11t = pp()
12t.file = "histmth.1401.nc"
13t.x = "-180,180"
14t.t = 10
15t.var = "temp"
16t.logy = True
17t.get()
18t.defineplot()
19
20## add the streamfunction as contour
21t.p[0].c = pfield
22
23## make plot
24t.makeplot()
Note: See TracBrowser for help on using the repository browser.