14:{'tta':[None,None], 'xpol':[0.58,0.41]} } labend={8:'15\n00', 9: '24\n00', 10:'17\n00', 11:'11\n00', 12:'04\n00', 13:'19\n00', 14:'27\n00' } for c, ax in zip(case, axes): wspd, wdir, time, hgt = wp.make_arrays2(resolution=res, surface=True, case=str(c), homedir=homedir) if c == 14: cbar = ax else: cbar = False wspdMerid=-wspd*cosd(wdir); ax, hcbar = wp.plot_time_height(ax=ax, wspd=wspdMerid, time=time, height=hgt, spd_range=[0, 30], spd_delta=4, cmap='nipy_spectral', cbar=cbar
for tta, time in zip(tta_range, times): drange = pd.date_range(start=wp_st, end=wp_en, freq='1H') time['tta'][0] = np.where(drange == tta[0])[0] time['tta'][1] = np.where(drange == tta[1])[0] params = [ 'WD$<140$, nh$\geq1\,(2,4)$', 'WD$<150$, nh$\geq1$', 'WD$<160$, nh$\geq1$', 'WD$<150$, nh$\geq2$', ] for c, ax in zip(case, axes): wspd, wdir, time, hgt = wp.make_arrays2( resolution=res, add_surface=True, case=str(c), ) cbar_inv = False wspdMerid = -wspd * cosd(wdir) if c == 13: foo = wspdMerid ax, hcbar, im = wp.plot_time_height(ax=ax, wspd=wspdMerid, time=time, height=hgt, spd_range=[0, 30], spd_delta=2,
time['tta'][1] = np.where(drange == tta[1])[0] ''' last xlabel ''' labend = {8: '15\n00', 9: '24\n00', 10: '17\n00', 11: '10\n00', 12: '03\n00', 13: '19\n00', 14: '26\n00' } for c, ax in zip(case, axes): wspd, wdir, time, hgt = wp.make_arrays2(resolution=res, add_surface=True, case=str(c), ) # print [time[0],time[-1]] if c == 14: cbar_inv = False else: cbar_inv = True wspdMerid = -wspd * cosd(wdir); if c == 13: foo = wspdMerid ax, hcbar = wp.plot_time_height(ax=ax, wspd=wspdMerid, time=time,
gs0 = gridspec.GridSpec(2, 1, hspace=0.15) axes = range(2) axes[0] = plt.subplot(gs0[0], gid='(a) 23-24Jan01') axes[1] = plt.subplot(gs0[1], gid='(b) 17Feb01') labend = { 3: '25\n00', 7: '18\n08', } for c, ax in zip(case, axes): out = wp.make_arrays2(resolution=res, add_surface=True, case=str(c), interp_hgts=np.linspace(0.160, 3.74, 40)) wspd, wdir, time, hgt = out if ax.get_gid() == '(a) 23-24Jan01': cbar = ax cbarinvi = False else: cbar = True cbarinvi = True ''' wind speed target ''' ucomp = -wspd * sind(wdir) vcomp = -wspd * cosd(wdir) x = ucomp * sind(230)
axes = range(2) axes[0] = plt.subplot(gs0[0],gid='(a) 23-24Jan01') axes[1] = plt.subplot(gs0[1],gid='(b) 17Feb01') labend={3:'25\n00', 7: '18\n08', } for c, ax in zip(case, axes): out = wp.make_arrays2(resolution=res, add_surface=True, case=str(c), interp_hgts=np.linspace(0.160, 3.74, 40)) wspd, wdir, time, hgt = out if ax.get_gid() == '(a) 23-24Jan01': cbar = ax cbarinvi=False else: cbar = True cbarinvi=True ''' wind speed target ''' ucomp = -wspd*sind(wdir) vcomp = -wspd*cosd(wdir)