@@ -123,33 +123,33 @@ def __init__(self, datadir='.', iplot=True, tag=None, all=False):
123123 nml = f'log.{ tag } ' )
124124
125125 self .radius = data [:, 0 ]
126- self .us2_mean = data [:, 1 ]
127- self .us2_std = data [:, 2 ]
128- self .up2_mean = data [:, 3 ]
129- self .up2_std = data [:, 4 ]
130- self .enst_mean = data [:, 5 ]
131- self .enst_std = data [:, 6 ]
132- self .uphi_mean = data [:, 7 ]
133- self .uphi_std = data [:, 8 ]
134- self .temp_mean = data [:, 9 ]
135- self .temp_std = data [:, 10 ]
126+ self .us2_r = data [:, 1 ]
127+ self .us2_r_SD = data [:, 2 ]
128+ self .up2_r = data [:, 3 ]
129+ self .up2_r_SD = data [:, 4 ]
130+ self .enst_r = data [:, 5 ]
131+ self .enst_r_SD = data [:, 6 ]
132+ self .uphi_r = data [:, 7 ]
133+ self .uphi_r_SD = data [:, 8 ]
134+ self .temp_r = data [:, 9 ]
135+ self .temp_r_SD = data [:, 10 ]
136136 if data .shape [- 1 ] == 15 :
137- self .xi_mean = data [:, 11 ]
138- self .xi_std = data [:, 12 ]
139- self .nushell_mean = data [:, 13 ]
140- self .nushell_std = data [:, 14 ]
137+ self .xi_r = data [:, 11 ]
138+ self .xi_r_SD = data [:, 12 ]
139+ self .nushell_r = data [:, 13 ]
140+ self .nushell_r_SD = data [:, 14 ]
141141 else :
142- self .nushell_mean = data [:, 11 ]
143- self .nushell_std = data [:, 12 ]
144- self .xi_mean = np .zeros_like (self .temp_mean )
145- self .xi_mean = np .zeros_like (self .temp_mean )
142+ self .nushell_r = data [:, 11 ]
143+ self .nushell_r_SD = data [:, 12 ]
144+ self .xi_r = np .zeros_like (self .temp_r )
145+ self .xi_r = np .zeros_like (self .temp_r )
146146
147- self .vortz_mean = 1. / self .radius * get_dr (self .radius * self .uphi_mean )
147+ self .vortz_r = 1. / self .radius * get_dr (self .radius * self .uphi_r )
148148 h = np .sqrt (self .radius [0 ]** 2 - self .radius ** 2 )
149149 self .qplan = np .zeros_like (h )
150150 self .qpot = np .zeros_like (h )
151151 self .qplan [1 :] = 2. / self .ek / h [1 :]
152- self .qpot [1 :] = self .vortz_mean [1 :]/ h [1 :]+ self .qplan [1 :]
152+ self .qpot [1 :] = self .vortz_r [1 :]/ h [1 :]+ self .qplan [1 :]
153153
154154 self .qplan [0 ] = self .qplan [1 ]
155155 self .qpot [0 ] = self .qpot [1 ]
@@ -189,35 +189,35 @@ def plot(self):
189189 """
190190
191191 fig , ax = plt .subplots ()
192- ax .fill_between (self .radius , self .temp_mean - self .temp_std ,
193- self .temp_mean + self .temp_std , alpha = 0.1 )
194- ax .plot (self .radius , self .temp_mean )
192+ ax .fill_between (self .radius , self .temp_r - self .temp_r_SD ,
193+ self .temp_r + self .temp_r_SD , alpha = 0.1 )
194+ ax .plot (self .radius , self .temp_r )
195195 ax .set_xlabel ('Radius' )
196196 ax .set_ylabel ('Temperature' )
197- ax .set_ylim (self .temp_mean .min (), self .temp_mean .max ())
197+ ax .set_ylim (self .temp_r .min (), self .temp_r .max ())
198198 ax .set_xlim (self .radius [- 1 ], self .radius [0 ])
199199 fig .tight_layout ()
200200
201- if abs (self .uphi_mean ).max () > 0. :
201+ if abs (self .uphi_r ).max () > 0. :
202202 fig , ax = plt .subplots ()
203- ax .fill_between (self .radius , self .uphi_mean - self .uphi_std ,
204- self .uphi_mean + self .uphi_std , alpha = 0.1 )
205- ax .plot (self .radius , self .uphi_mean )
203+ ax .fill_between (self .radius , self .uphi_r - self .uphi_r_SD ,
204+ self .uphi_r + self .uphi_r_SD , alpha = 0.1 )
205+ ax .plot (self .radius , self .uphi_r )
206206 ax .set_xlabel ('Radius' )
207207 ax .set_ylabel ('Uphi' )
208208 ax .set_xlim (self .radius [- 1 ], self .radius [0 ])
209209 fig .tight_layout ()
210210
211211 fig , ax = plt .subplots ()
212- ax .fill_between (self .radius , self .us2_mean - self .us2_std ,
213- self .us2_mean + self .us2_std , alpha = 0.1 )
214- ax .plot (self .radius , self .us2_mean , label = 'us**2' )
215- ax .fill_between (self .radius , self .up2_mean - self .up2_std ,
216- self .up2_mean + self .up2_std , alpha = 0.1 )
217- ax .plot (self .radius , self .up2_mean , label = 'up**2' )
218- ax .fill_between (self .radius , self .enst_mean - self .enst_std ,
219- self .enst_mean + self .enst_std , alpha = 0.1 )
220- ax .plot (self .radius , self .enst_mean , label = 'omega**2' )
212+ ax .fill_between (self .radius , self .us2_r - self .us2_r_SD ,
213+ self .us2_r + self .us2_r_SD , alpha = 0.1 )
214+ ax .plot (self .radius , self .us2_r , label = 'us**2' )
215+ ax .fill_between (self .radius , self .up2_r - self .up2_r_SD ,
216+ self .up2_r + self .up2_r_SD , alpha = 0.1 )
217+ ax .plot (self .radius , self .up2_r , label = 'up**2' )
218+ ax .fill_between (self .radius , self .enst_r - self .enst_r_SD ,
219+ self .enst_r + self .enst_r_SD , alpha = 0.1 )
220+ ax .plot (self .radius , self .enst_r , label = 'omega**2' )
221221 ax .legend (loc = 'best' , frameon = False )
222222 ax .set_xlabel ('Radius' )
223223 ax .set_xlim (self .radius [- 1 ], self .radius [0 ])
@@ -233,9 +233,9 @@ def plot(self):
233233 idx = np .array ([], dtype = np .int8 )
234234 for i in range (len (self .radius )):
235235 if i > 0 :
236- if self .uphi_mean [i ] < 0. and self .uphi_mean [i - 1 ] > 0. :
236+ if self .uphi_r [i ] < 0. and self .uphi_r [i - 1 ] > 0. :
237237 idx = np .append (idx , i )
238- elif self .uphi_mean [i ] > 0. and self .uphi_mean [i - 1 ] < 0. :
238+ elif self .uphi_r [i ] > 0. and self .uphi_r [i - 1 ] < 0. :
239239 idx = np .append (idx , i )
240240
241241 plotSpan (ax , idx , self .radius )
@@ -257,8 +257,8 @@ def plot(self):
257257 for k in range (len (idx )):
258258 if k > 0 :
259259 jet_widths [k - 1 ] = self .radius [idx [k - 1 ]]- self .radius [idx [k ]]
260- vp_loc = abs (self .uphi_mean [idx [k - 1 ]:idx [k ]+ 1 ]).mean ()
261- vs_loc = np .sqrt (self .us2_mean [idx [k - 1 ]:idx [k ]+ 1 ].mean ())
260+ vp_loc = abs (self .uphi_r [idx [k - 1 ]:idx [k ]+ 1 ]).mean ()
261+ vs_loc = np .sqrt (self .us2_r [idx [k - 1 ]:idx [k ]+ 1 ].mean ())
262262 beta_loc = abs (beta [idx [k - 1 ]:idx [k ]+ 1 ]).mean ()
263263 lamb_uzon [k - 1 ] = 2. * np .pi * np .sqrt (vp_loc * self .ek / beta_loc )
264264 lamb_us [k - 1 ] = 2. * np .pi * np .sqrt (vs_loc * self .ek / beta_loc )
0 commit comments