Last change
on this file since 1062 was
1029,
checked in by aslmd, 11 years ago
|
UTIL PYTHON planetoplot_v2
- added keywords nxticks nyticks xp yp missing for improved plot settings
- added function to print contents of pp object
- added to ppplot a function figureref to easily set a figure of given size
- bug fix affecting .ppobj objects containing fields with missing values
- bug fix when size of z coordinate do not match field
- bug fix for Ls time coordinates (added changetime=correctls)
- bug fix if not connected to internet
- tidying up examples
|
-
Property svn:executable set to
*
|
File size:
1.1 KB
|
Line | |
---|
1 | #! /usr/bin/env python |
---|
2 | from ppclass import pp |
---|
3 | |
---|
4 | |
---|
5 | ### Active Clouds |
---|
6 | ### ------------- |
---|
7 | act = pp() |
---|
8 | act.file = '/planeto/tnalmd/runs/newref/MY26.ifort.modelprecise/monthlybox/concat_LT14_P.nc' |
---|
9 | act.var = 'temp' |
---|
10 | act.x = "-180,180" |
---|
11 | act.y = "-20,20" |
---|
12 | act.z = 50. |
---|
13 | ###### Change time axis from Sols to Ls: |
---|
14 | act.changetime="mars_sol2ls" |
---|
15 | act.label="GCM active clouds" |
---|
16 | act.title="Equatorial daytime temperature at 50 Pa" |
---|
17 | act.marker='-' |
---|
18 | act.color='g' |
---|
19 | act.out = "png" |
---|
20 | act.get() |
---|
21 | |
---|
22 | |
---|
23 | ### Inactive Clouds |
---|
24 | ### --------------- |
---|
25 | inac = pp() |
---|
26 | inac << act |
---|
27 | inac.file = '/planeto/tnalmd/runs/newref/MY26.inac/monthlybox/concat_LT14_P.nc' |
---|
28 | inac.label="GCM inactive clouds" |
---|
29 | inac.marker='' |
---|
30 | inac.color='r' |
---|
31 | inac.get() |
---|
32 | |
---|
33 | |
---|
34 | ### TES data |
---|
35 | ### -------- |
---|
36 | tes = pp() |
---|
37 | tes << act |
---|
38 | tes.file = '/d5/emlmd/TES/TES.MappedClimatology.nadir.MY26.nc' |
---|
39 | tes.var='T_nadir_day' |
---|
40 | #### Do nothing with time axis (is usually the default option): |
---|
41 | tes.changetime=None |
---|
42 | tes.label="TES" |
---|
43 | tes.marker='.' |
---|
44 | tes.color='b' |
---|
45 | tes.get() |
---|
46 | |
---|
47 | |
---|
48 | |
---|
49 | ### PLOT |
---|
50 | ### ---- |
---|
51 | act.superpose = True |
---|
52 | inac.superpose = True |
---|
53 | tes.superpose = True |
---|
54 | ### add two plots to act: |
---|
55 | act.plot(extraplot=2) |
---|
56 | ### plot inac: |
---|
57 | inac.plotin = act |
---|
58 | inac.plot() |
---|
59 | ### plot tes: |
---|
60 | tes.plotin = act |
---|
61 | tes.plot() |
---|
Note: See
TracBrowser
for help on using the repository browser.