-
Notifications
You must be signed in to change notification settings - Fork 0
/
data30min.py
154 lines (138 loc) · 4.83 KB
/
data30min.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
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
import numpy as np
from netCDF4 import Dataset
data = Dataset('NetCDF/rceiso_moovie_rceiso01_64_jour23.nc')
data2 = Dataset('NetCDF/rceiso_moovie_rceiso01_64_jour24.nc')
data3 = Dataset('NetCDF/rceiso_moovie_rceiso01_64_jour25.nc')
data4 = Dataset('NetCDF/rceiso_moovie_rceiso01_64_jour26.nc')
data5 = Dataset('NetCDF/rceiso_moovie_rceiso01_64_jour27.nc')
data6 = Dataset('NetCDF/rceiso_moovie_rceiso01_64_jour28.nc')
data7 = Dataset('NetCDF/rceiso_moovie_rceiso01_64_jour29.nc')
data8 = Dataset('NetCDF/rceiso_moovie_rceiso01_64_jour30.nc')
data9 = Dataset('NetCDF/rceiso_moovie_rceiso01_64_jour31.nc')
data10 = Dataset('NetCDF/rceiso_moovie_rceiso01_64_jour32.nc')
print("data:")
for d in data.variables:
print(d, data.variables[d].dimensions, data.variables[d].shape)
qc = data.variables['QC'][:]
qi = data.variables['QI'][:]
qsat = data.variables['QSAT'][:]
qv = data.variables['QV'][:]
x = np.asarray(data.variables['x'][:])
y = np.asarray(data.variables['y'][:])
z = np.asarray(data.variables['z'][:])
t = data.variables['time'][:]
qc2 = data2.variables['QC'][:]
qi2 = data2.variables['QI'][:]
qsat2 = data2.variables['QSAT'][:]
qv2 = data2.variables['QV'][:]
x2 = np.asarray(data2.variables['x'][:])
y2 = np.asarray(data2.variables['y'][:])
z2 = np.asarray(data2.variables['z'][:])
t2 = data2.variables['time'][:]
qc3 = data3.variables['QC'][:]
qi3 = data3.variables['QI'][:]
qsat3 = data3.variables['QSAT'][:]
qv3 = data3.variables['QV'][:]
x3 = np.asarray(data3.variables['x'][:])
y3 = np.asarray(data3.variables['y'][:])
z3 = np.asarray(data3.variables['z'][:])
t3 = data3.variables['time'][:]
qc4 = data4.variables['QC'][:]
qi4 = data4.variables['QI'][:]
qsat4 = data4.variables['QSAT'][:]
qv4 = data4.variables['QV'][:]
x4 = np.asarray(data4.variables['x'][:])
y4 = np.asarray(data4.variables['y'][:])
z4 = np.asarray(data4.variables['z'][:])
t4 = data4.variables['time'][:]
qc5 = data5.variables['QC'][:]
qi5 = data5.variables['QI'][:]
qsat5 = data5.variables['QSAT'][:]
qv5 = data5.variables['QV'][:]
x5 = np.asarray(data5.variables['x'][:])
y5 = np.asarray(data5.variables['y'][:])
z5 = np.asarray(data5.variables['z'][:])
t5 = data5.variables['time'][:]
qc6 = data6.variables['QC'][:]
qi6 = data6.variables['QI'][:]
qsat6 = data6.variables['QSAT'][:]
qv6 = data6.variables['QV'][:]
x6 = np.asarray(data6.variables['x'][:])
y6 = np.asarray(data6.variables['y'][:])
z6 = np.asarray(data6.variables['z'][:])
t6 = data6.variables['time'][:]
qc7 = data7.variables['QC'][:]
qi7 = data7.variables['QI'][:]
qsat7 = data7.variables['QSAT'][:]
qv7 = data7.variables['QV'][:]
x7 = np.asarray(data7.variables['x'][:])
y7 = np.asarray(data7.variables['y'][:])
z7 = np.asarray(data7.variables['z'][:])
t7 = data7.variables['time'][:]
qc8 = data8.variables['QC'][:]
qi8 = data8.variables['QI'][:]
qsat8 = data8.variables['QSAT'][:]
qv8 = data8.variables['QV'][:]
x8 = np.asarray(data8.variables['x'][:])
y8 = np.asarray(data8.variables['y'][:])
z8 = np.asarray(data8.variables['z'][:])
t8 = data8.variables['time'][:]
qc9 = data9.variables['QC'][:]
qi9 = data9.variables['QI'][:]
qsat9 = data9.variables['QSAT'][:]
qv9 = data9.variables['QV'][:]
x9 = np.asarray(data9.variables['x'][:])
y9 = np.asarray(data9.variables['y'][:])
z9 = np.asarray(data9.variables['z'][:])
t9 = data9.variables['time'][:]
qc10 = data10.variables['QC'][:]
qi10 = data10.variables['QI'][:]
qsat10 = data10.variables['QSAT'][:]
qv10 = data10.variables['QV'][:]
x10 = np.asarray(data10.variables['x'][:])
y10 = np.asarray(data10.variables['y'][:])
z10 = np.asarray(data10.variables['z'][:])
t10 = data10.variables['time'][:]
t = t-23
for i in np.arange(2, 11):
locals()['t'+str(i)] = locals()['t'+str(i)] - 23
w = data.variables['W'][:]
w2 = data2.variables['W'][:]
w3 = data3.variables['W'][:]
w4 = data4.variables['W'][:]
w5 = data5.variables['W'][:]
w6 = data6.variables['W'][:]
w7 = data7.variables['W'][:]
w8 = data8.variables['W'][:]
w9 = data9.variables['W'][:]
w10 = data10.variables['W'][:]
p = data.variables['p'][:]
p2 = data2.variables['p'][:]
p3 = data3.variables['p'][:]
p4 = data4.variables['p'][:]
p5 = data5.variables['p'][:]
p6 = data6.variables['p'][:]
p7 = data7.variables['p'][:]
p8 = data8.variables['p'][:]
p9 = data9.variables['p'][:]
p10 = data10.variables['p'][:]
plist = [p, p2, p3, p4, p5, p6, p7, p8, p9, p10]
nzlist = []
nz = len(p)
nzlist.append(nz)
for i in np.arange(2, 11):
locals()["nz"+str(i)] = len(plist[i-1])
nzlist.append(locals()["nz"+str(i)])
omegamaxlist = []
omegamax = 0
omegamaxlist.append(omegamax)
for i in np.arange(2,11):
locals()["omegamax" + str(i)] = 0
omegamaxlist.append(locals()["omegamax" + str(i)])
# for i in np.arange(2, 11):
# if i % 2 == 0:
# locals()["omegamax" + str(i)] = -60
# omegamaxlist.append(locals()["omegamax" + str(i)])
# else:
# locals()["omegamax" + str(i)] = 0
# omegamaxlist.append(locals()["omegamax" + str(i)])