-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanimatedPlots
More file actions
129 lines (102 loc) · 4.39 KB
/
animatedPlots
File metadata and controls
129 lines (102 loc) · 4.39 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
from netCDF4 import Dataset
import numpy as np
import matplotlib.pyplot as plt
wrf=Dataset('/home/stepheba/new/old_wrf/WRF/test/em_quarter_ss/WRF_CURR_DFLT/bomex_zt_wrf.nc')
wrf_05=Dataset('/home/stepheba/new/old_wrf/WRF/test/em_quarter_ss/wrf_c15eq05/bomex_zt_wrf.nc')
wrf_1=Dataset('/home/stepheba/new/old_wrf/WRF/test/em_quarter_ss/wrf_c15eq1/bomex_zt_wrf.nc')
wrf_15=Dataset('/home/stepheba/new/old_wrf/WRF/test/em_quarter_ss/wrf_c15eq15/bomex_zt_wrf.nc')
wrf_3=Dataset('/home/stepheba/new/old_wrf/WRF/test/em_quarter_ss/wrf_c15eq3/bomex_zt_wrf.nc')
wrf_5=Dataset('/home/stepheba/new/old_wrf/WRF/test/em_quarter_ss/wrf_c15eq5/bomex_zt_wrf.nc')
wrf_1_op=Dataset('/home/stepheba/new/old_wrf/WRF/test/em_quarter_ss/wrf_c15eq1_oldp/bomex_zt_wrf.nc')
wrf_5_op=Dataset('/home/stepheba/new/old_wrf/WRF/test/em_quarter_ss/wrf_c15eq5_oldp/bomex_zt_wrf.nc')
wrf_p89=Dataset('/home/stepheba/new/old_wrf/WRF/test/em_quarter_ss/wrf_pre89/bomex_zt_wrf.nc')
wrf_p89_1=Dataset('/home/stepheba/new/old_wrf/WRF/test/em_quarter_ss/wrf_pre89_c15eq1/bomex_zt_wrf.nc')
wrf_p89_5=Dataset('/home/stepheba/new/old_wrf/WRF/test/em_quarter_ss/wrf_pre89_c15eq5/bomex_zt_wrf.nc')
clb=Dataset('/home/stepheba/new/old_clubb/newdefault/bomex_zt_wrf.nc')
wp3=np.mean(np.array(wrf.variables['wp3']),(2,3))
wp3_05=np.mean(np.array(wrf_05.variables['wp3']),(2,3))
wp3_1=np.mean(np.array(wrf_1.variables['wp3']),(2,3))
wp3_15=np.mean(np.array(wrf_15.variables['wp3']),(2,3))
wp3_3=np.mean(np.array(wrf_3.variables['wp3']),(2,3))
wp3_5=np.mean(np.array(wrf_5.variables['wp3']),(2,3))
wp3_1_op=np.mean(np.array(wrf_1_op.variables['wp3']),(2,3))
wp3_5_op=np.mean(np.array(wrf_5_op.variables['wp3']),(2,3))
wp3_pre89=np.mean(np.array(wrf_p89.variables['wp3']),(2,3))
wp3_pre89_1=np.mean(np.array(wrf_p89_1.variables['wp3']),(2,3))
wp3_pre89_5=np.mean(np.array(wrf_p89_5.variables['wp3']),(2,3))
wp3_clb=np.mean(np.array(clb.variables['wp3']),(2,3))
alt=np.array(wrf.variables['altitude'])
alt_clb=np.array(clb.variables['altitude'])
fig, ax = plt.subplots()
for t in range(0,360):
ax.cla()
ax.plot(wp3[t,:],alt,label='wrf-clubb c15=0')
ax.plot(wp3_05[t,:],alt,label='wrf-clubb c15=0.5')
ax.plot(wp3_1[t,:],alt,label='wrf-clubb c15=1.0')
ax.plot(wp3_15[t,:],alt,label='wrf-clubb c15=1.5')
ax.plot(wp3_3[t,:],alt,label='wrf-clubb c15=3')
ax.plot(wp3_5[t,:],alt,label='wrf-clubb c15=5')
ax.plot(wp3_1_op[t,:],alt,label='wrf-clubb oldp c15=1')
ax.plot(wp3_5_op[t,:],alt,label='wrf-clubb oldp c15=5')
ax.plot(wp3_pre89[t,:],alt,':',label='wrf-clubb pre89 c15=0.4')
ax.plot(wp3_pre89_1[t,:],alt,':',label='wrf-clubb pre89 c15=1')
ax.plot(wp3_pre89_5[t,:],alt,':',label='wrf-clubb pre89 c15=5')
ax.plot(wp3_clb[t,:],alt,'k--',label='clubb-scm c15=0')
ax.set_xlabel('wp3 [m3/s3]')
ax.set_ylabel('height [m]')
ax.set_xlim(-0.1,0.8)
ax.legend()
ax.set_title("t = {}".format(t))
plt.pause(0.05)
ax.cla()
fig, ax = plt.subplots()
for t in range(0,360):
ax.cla()
ax.plot(clb_wp3_m[t,:],label='clb m')
ax.plot(clb_wp3_nm[t,:],label='clb nm')
ax.plot(wrf_wp3_m[t,:],label='wrf m')
ax.plot(wrf_wp3_nm[t,:],label='wrf nm')
ax.plot(wp3_samm[t,:],label='sam m')
ax.plot(wp3_samnm[t,:],label='sam nm')
ax.set_xlabel('wp3 [m3/s3]')
ax.set_ylabel('height [m]')
ax.set_ylim(-0.1,0.8)
ax.legend()
ax.set_title("t = {}".format(t))
plt.pause(0.05)
ax.cla()
fig, ax = plt.subplots()
fig = plt.figure()
for t in range(1,361):
ax1=fig.add_subplot(2,1,1)
ax1.cla()
ax1.plot(wp3_clb[t,:],alt,label='clubb-scm c15=0')
ax1.set_xlabel('wp3 [m3/s3]')
ax1.set_ylabel('height [m]')
ax1.set_xlim(-0.1,0.8)
ax1.legend()
ax1.set_title("t = {}".format(t))
ax2=fig.add_subplot(2,1,2)
ax2.cla()
ax2.plot(lwpc[0:t])
ax2.set_xlabel('time [min]')
ax2.set_ylabel('LWP [kg/m2]')
ax2.set_xlim(0,360)
ax2.set_ylim(0,max(lwp))
#ax.legend()
#ax.set_title("t = {}".format(t))
plt.pause(0.05)
ax.cla()
fig, ax = plt.subplots()
for t in range(0,360):
ax.cla()
ax.plot(wp3[t,:],alt,label=”wrf-clubb c15=0”)
ax.plot(wp3_05[t,:],alt,label=’wrf-clubb c15=0.5’)
ax.plot(wp3_1[t,:],alt,label=’wrf-clubb c15=1.0’)
ax.plot(wp3_15[t,:],alt,label=’wrf-clubb c15=1.5’)
ax.plot(wp3_clb[t,:],alt,’k--’,label=’clubb c15=0’)
ax.set_xlim(-0.1,1.5)
ax.legend()
ax.set_title("t = {}".format(t))
plt.pause(0.1)
ax.cla()