source: trunk/UTIL/PYTHON/planetoplot_v2/examples/easy_get_field.py @ 943

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

UTIL PYTHON. planetoplot_v2. no squeeze in self.allfield, this is causing problems with differing time axis lengths. this feature will be improved in the future. also forgot to report in previous commit the addition of exapi.py to easily interpolate mesoscale fields using api_wrapper.py

  • Property svn:executable set to *
File size: 847 bytes
Line 
1#! /usr/bin/env python
2from ppclass import pp
3import numpy as np
4import matplotlib.pyplot as mpl
5
6test = pp()
7test.file = [ \
8  "/planeto/jllmd/Earth/Nmix/F1525/output/diagfi4.nc", \
9  "/planeto/jllmd/Earth/Nmix/F1550/output/diagfi4.nc", \
10  "/planeto/jllmd/Earth/Nmix/F1500/output/diagfi4.nc" ]
11test.var = ["tsurf","ASR"]
12test.x = "-180.,175."
13test.y = "-90.,90."
14test.t = "0,1000"
15#test.verbose = True
16test.compute = "meanarea"
17test.get()
18
19# -----------------------------
20# self.allfield contains data !
21# -----------------------------
22# index ordering:
23# - file
24# - var
25# - request t
26# - request z
27# - request y
28# - request x
29# - field dimensions
30# -----------------------------
31
32
33for ii in range(test.nfin):
34    print "tsurf",test.allfield[ii][0][0][0][0][0]
35    print "asr",test.allfield[ii][1][0][0][0][0]
36
37#mpl.plot(tsurf,asr)
38#mpl.show()
Note: See TracBrowser for help on using the repository browser.