Last change
on this file since 1014 was
977,
checked in by aslmd, 12 years ago
|
UTIL PYTHON planetoplot_v2. Added rainbow spahetti plot based on an idea by Alizee. Simply set a colormap for a 1D plot and you get it. Also added in pp_reload (simple rainbow function in ppplot). Added also xmin and xmax capabilitiy. Fixed various bugs related to dummy axis, logarithmic axes. Removed time_counter from set_ppclass.txt it is useless in most cases.
|
-
Property svn:executable set to
*
|
File size:
1.5 KB
|
Rev | Line | |
---|
[977] | 1 | #! /usr/bin/env python |
---|
| 2 | from ppclass import pp |
---|
| 3 | |
---|
| 4 | ################################################################## |
---|
| 5 | ################################################################## |
---|
| 6 | |
---|
| 7 | files = ["diagfi_start150.nc","diagfi_start175.nc","diagfi_start200.nc"] |
---|
| 8 | labs = ['$T_{ini}=150$ K','$T_{ini}=175$ K','$T_{ini}=200$ K'] |
---|
| 9 | name = "profile_tini" |
---|
| 10 | |
---|
| 11 | #files = ["diagfi_start200.nc","diagfi_start200_Rayleigh.nc","diagfi_start200_A034.nc"] |
---|
| 12 | #labs = ['ref ($T_{ini}=200$ K)','ref + Rayleigh scatt.','ref + $A_{surf} = 0.34$'] |
---|
| 13 | #name = "profile_tests" |
---|
| 14 | |
---|
| 15 | ################################################################## |
---|
| 16 | ################################################################## |
---|
| 17 | |
---|
| 18 | # OK retrieve pressure and temperatures |
---|
| 19 | press = pp(file=files,var="p",x=0,y=0,t=1.e15).get() |
---|
| 20 | temp = pp(file=files,var="temp",x=0,y=0,t=1.e15).get() |
---|
| 21 | |
---|
| 22 | # this must be done before the next step |
---|
| 23 | # ... because the next step is doing defineplot |
---|
| 24 | temp.superpose = True |
---|
| 25 | #temp.out = "png" |
---|
| 26 | temp.filename = name |
---|
| 27 | temp.includedate = False |
---|
| 28 | temp.colorb = "hot" |
---|
| 29 | |
---|
| 30 | # this is doing defineplot amongst other things |
---|
| 31 | temp.func(press) |
---|
| 32 | |
---|
| 33 | # customize plots |
---|
| 34 | count=0 |
---|
| 35 | for yeah in temp.p: |
---|
| 36 | yeah.logy = True |
---|
| 37 | yeah.invert = True |
---|
| 38 | yeah.swaplab = False |
---|
| 39 | yeah.ylabel = "Pressure (Pa)" |
---|
| 40 | yeah.xlabel = "Temperature (K)" |
---|
| 41 | yeah.ymin = 1. |
---|
| 42 | yeah.xmax = 230. |
---|
| 43 | yeah.xmin = 70. |
---|
| 44 | yeah.div = 32 |
---|
| 45 | yeah.label = labs[count] |
---|
| 46 | yeah.title = "Equilibrium profile with a 1D globally-averaged model after 50 Saturn years" |
---|
| 47 | count = count+1 |
---|
| 48 | |
---|
| 49 | # finally make the plot |
---|
| 50 | temp.makeplot() |
---|
Note: See
TracBrowser
for help on using the repository browser.