source: trunk/UTIL/PYTHON/planetoplot_v2/examples/function.py @ 960

Last change on this file since 960 was 960, checked in by aslmd, 12 years ago

UTIL PYTHON planetoplot_v2. MAJOR: created an easy way to load a variable from a netcdf file, see easy_get_field.py [note: now to avoid confusion with .f attributes containing field, .f() method is named .func()] ; MINOR: generic units keyword, quiet mode, dummy xy axis when not given in ppplot, bug fixes for one-value 0D requests.

  • Property svn:executable set to *
File size: 490 bytes
Line 
1#! /usr/bin/env python
2from ppclass import pp
3
4var1 = pp(\
5file="/home/aymeric/Big_Data/DATAPLOT/diagfired.nc",\
6var="ps",\
7x=None,\
8y=10.,\
9t=2.)
10var1.get()
11
12var2 = pp(\
13file="/home/aymeric/Big_Data/DATAPLOT/diagfired.nc",\
14var="phisinit",\
15x=None,\
16y=10.,\
17t=2.)
18var2.get()
19var2 = var2 / 3.72
20
21S = var2.func(var1)
22
23S.p[0].marker = 'o'
24S.p[0].lstyle = ''
25S.p[0].ylabel = "Surface geopotential height (km)"
26S.p[0].ycoeff = 1./1000.
27S.p[0].fmt = '%.0f'
28S.filename = "function"
29S.makeplot()
30
Note: See TracBrowser for help on using the repository browser.