source: trunk/UTIL/PYTHON/planetoplot_v2/examples/ppclass_additional/archean.sh @ 1062

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

planetoplot. added possibility to retrieve attribute from netCDF file. added an option to set value formatting through ppclass or pp.py. added a nice example used in a press release.

  • Property svn:executable set to *
File size: 962 bytes
Line 
1#! /usr/bin/env python
2import ppclass
3import numpy as np
4
5asr = ppclass.pp()
6asr.file = "diagfi115.nc"
7asr.var = "ASR"
8asr.t = 360
9asr.get()
10
11isr = ppclass.pp()
12isr << asr
13isr.var = "ISR"
14isr.get()
15
16tau = ppclass.pp()
17tau << asr
18tau.var = "tau_col"
19tau.get()
20
21alb = ppclass.pp()
22alb << asr
23alb.var = "ALB"
24alb.get()
25
26tsurf = ppclass.pp()
27tsurf << asr
28tsurf.var = "tsurf"
29add = tsurf.getf()
30
31
32
33##alb.smooth(20)
34#tau.smooth(2)
35
36
37#albedo = asr/isr
38##albedo = 1.-albedo
39#albedo = albedo + taucol
40
41albedo = alb + tau/100.
42
43albedo.colorb = "Blues_r"
44albedo.div = 20 #10
45#albedo.vmin = 0.3
46#albedo.vmax = 0.7
47albedo.proj = "ortho"
48
49
50albedo.defineplot()
51albedo.p[0].blat = 15.
52albedo.p[0].showcb = False
53albedo.p[0].title = ""
54
55albedo.p[0].addcontour = add - 273.15
56
57#dafield = albedo.p[0].field
58#dafield[np.where(dafield < 0.4)] = 0.0
59#dafield[np.where(dafield > 0.6)] = 1.0
60albedo.p[0].vmin = 0.1
61albedo.p[0].vmax = 0.6
62
63#albedo.p[0].back = "coast"
64
65albedo.makeplot()
Note: See TracBrowser for help on using the repository browser.