| 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.colorbar = "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.legend = 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() |
|---|