source: trunk/UTIL/PYTHON/planetoplot_v2/examples/ppclass_reference/anomaly.py @ 1247

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

planetoplot_v2. added trans back showcb attributes to ppclass. simplified example scripts. added the web home page example.

  • Property svn:executable set to *
File size: 477 bytes
Line 
1#! /usr/bin/env python
2from ppclass import pp
3
4## A SIMPLE EXAMPLE
5simple = pp()
6simple.file = "/home/aymeric/Big_Data/DATAPLOT/diagfired.nc"
7simple.var = "tsurf"
8simple.t = "0.5"
9simple.getplot()
10
11## GET A TIME AVERAGE WITHOUT A PLOT
12mean = pp()
13mean << simple
14mean.t = "0,1"
15mean.get()
16
17## COMPUTE AND PLOT RELATIVE ANOMALY in %
18anomaly = ((simple-mean)/mean)*100.
19anomaly.filename = "anomaly"
20anomaly.title = "surface temperature anomaly"
21anomaly.units = '%'
22anomaly.plot()
Note: See TracBrowser for help on using the repository browser.