source: trunk/UTIL/PYTHON/mcd/examples/gale.py @ 1007

Last change on this file since 1007 was 1007, checked in by aslmd, 11 years ago

UTIL PYTHON. various updates on example + mcd + plot scripts. nothing major.

  • Property svn:executable set to *
File size: 835 bytes
RevLine 
[761]1#! /usr/bin/env python
2
[793]3#import sys
4#
5#class NullDevice():
6#    def write(self, s):
7#        pass
8#
9#original_stdout = sys.stdout  # keep a reference to STDOUT
10#
11#sys.stdout = NullDevice()  # redirect the real STDOUT
12#sys.stderr = NullDevice()  # redirect the real STDOUT
13
[761]14from mcd import mcd
15
16gale = mcd()
17
18
19gale.lat = -4.6
20gale.lon = 137.4
21gale.loct = 15.
22gale.xz = 1.
23
24gale.xdate = 150.6
25
26gale.update()
27gale.printmcd()
28gale.printallextvar()
29#gale.printextvar("rho")
30
[793]31gale.seasonal()
32gale.plot1d(["tsurf","u","v"])
[761]33
[793]34import matplotlib.pyplot as mpl
35mpl.savefig("temp.png",dpi=85,bbox_inches='tight',pad_inches=0.25)
36
[1007]37exit()
[793]38
[1007]39
40
41
[761]42#gale.xdate = 270.
43#gale.diurnal()
44#gale.plot1d(["u","v"])
45
[793]46gale.latlon()
47gale.map2d("tsurf")
[761]48
49import matplotlib.pyplot as mpl
[793]50#mpl.show()
[796]51mpl.savefig("temp.png",dpi=110,bbox_inches='tight',pad_inches=0.4)
Note: See TracBrowser for help on using the repository browser.