Last change
on this file since 1192 was
1176,
checked in by aslmd, 11 years ago
|
planetoplot. added an example script for movie. added an example script for masking.
|
-
Property svn:executable set to
*
|
File size:
1.2 KB
|
Line | |
---|
1 | #! /usr/bin/env python |
---|
2 | from ppclass import pp |
---|
3 | import numpy as np |
---|
4 | |
---|
5 | # settings |
---|
6 | fi = ["nest1_rad.nc","nest2_rad.nc","nest3_rad.nc"] |
---|
7 | limvmr=5.0 |
---|
8 | |
---|
9 | # get radius |
---|
10 | rad=pp() |
---|
11 | rad.file=fi |
---|
12 | rad.var=["RICE","VMR_ICE"] |
---|
13 | rad.vargoal=["main","contour"] |
---|
14 | rad.x=-120. |
---|
15 | rad.t=4 |
---|
16 | rad.changetime = "mars_meso_lt" |
---|
17 | rad.verbose = True |
---|
18 | rad.filename = "radius" |
---|
19 | rad.out = "png" |
---|
20 | rad.includedate = False |
---|
21 | rad.get() |
---|
22 | |
---|
23 | # radius in microns |
---|
24 | rad = rad*1.e6 |
---|
25 | rad.units = "$\mu$m" |
---|
26 | rad.fmt = "%.0f" |
---|
27 | |
---|
28 | # define plot |
---|
29 | rad.defineplot() |
---|
30 | |
---|
31 | # loop on all plots |
---|
32 | for plotobj in rad.p: |
---|
33 | # mask plotted field with contoured field |
---|
34 | plotobj.f[np.where(plotobj.c<limvmr)]=np.nan |
---|
35 | # a few plot settings |
---|
36 | # (some of them could have been actually set globally in rad object) |
---|
37 | plotobj.vmin = 0. |
---|
38 | plotobj.vmax = 10. |
---|
39 | plotobj.div = 20 |
---|
40 | plotobj.xmin = 12. |
---|
41 | plotobj.xmax = 16. |
---|
42 | plotobj.colorbar = "spectral" |
---|
43 | plotobj.ycoeff = 1.e-3 |
---|
44 | plotobj.ylabel = "Altitude above MOLA zero areoid (km)" |
---|
45 | plotobj.xlabel = 'Latitude ($^{\circ}$N)' |
---|
46 | plotobj.nxticks = 4 |
---|
47 | |
---|
48 | # set different titles |
---|
49 | rad.p[0].title = "Ice radius. Nest 1." |
---|
50 | rad.p[1].title = "Ice radius. Nest 2." |
---|
51 | rad.p[2].title = "Ice radius. Nest 3." |
---|
52 | |
---|
53 | |
---|
54 | # make final plot |
---|
55 | rad.makeplot() |
---|
Note: See
TracBrowser
for help on using the repository browser.