-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplot_flux.py
64 lines (44 loc) · 1.38 KB
/
plot_flux.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import numpy as np
import matplotlib.pylab as plt
data = np.loadtxt('FMS_RC_flx.out')
Pe = data[:,1]
sw_up = data[:,2]
sw_down = data[:,3]
sw_net = data[:,4]
lw_up = data[:,5]
lw_down = data[:,6]
lw_net = data[:,7]
tau_Ve = data[:,8]
tau_IRe = data[:,9]
fig = plt.figure()
plt.plot(sw_up,Pe/1e5,ls='dashed',lw=3,label='sw_up')
plt.plot(sw_down,Pe/1e5,lw=3,ls='dashed',label='sw_down')
plt.plot(sw_net,Pe/1e5,ls='dashed',lw=3,label='sw_net')
plt.plot(lw_up,Pe/1e5,lw=3,label='lw_up')
plt.plot(lw_down,Pe/1e5,lw=3,label='lw_down')
plt.plot(lw_net,Pe/1e5,lw=3,label='lw_net')
plt.ylabel(r'Pressure [bar]')
plt.xlabel(r'Flux [W m$^{-2}$]')
plt.legend()
plt.yscale('log')
plt.gca().invert_yaxis()
yticks = [1000,100,10,1,0.1,0.01,1e-3,1e-4,1e-5,1e-6]
yticks_lab = ['1000','100','10','1','0.1','0.01','10$^{-3}$','10$^{-4}$','10$^{-5}$','10$^{-6}$']
plt.legend()
plt.ylim(1000,1e-6)
plt.yticks(yticks,yticks_lab)
fig = plt.figure()
plt.plot(tau_Ve,Pe/1e5,ls='dashed',lw=3,label='tau Ve')
plt.plot(tau_IRe,Pe/1e5,lw=3,ls='dashed',label='tau IRe')
plt.ylabel(r'Pressure [bar]')
plt.xlabel(r'$\tau$')
plt.legend()
plt.yscale('log')
plt.xscale('log')
plt.gca().invert_yaxis()
yticks = [1000,100,10,1,0.1,0.01,1e-3,1e-4,1e-5,1e-6]
yticks_lab = ['1000','100','10','1','0.1','0.01','10$^{-3}$','10$^{-4}$','10$^{-5}$','10$^{-6}$']
plt.legend()
plt.ylim(1000,1e-6)
plt.yticks(yticks,yticks_lab)
plt.show()