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, cmap='jet', cbar=(ax, cbar_inv), cbar_label='meridional wind $[' 'm\ s^{-1}]$') wp.add_windstaff( wspd, wdir, time, hgt, # color=(0.6,0.6,0.6), color='k', ax=ax, vdensity=1, hdensity=0,
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 ) wp.add_windstaff(wspd, wdir, time, hgt, color='k',ax=ax, vdensity=2, hdensity=2) ''' add arrow annotations ''' scale = 4.1 # use for adjust png output alpha = 0.6 if None not in times[c]['xpol']: st = times[c]['xpol'][0] en = times[c]['xpol'][1]
cbar = True cbarinvi = True ''' wind speed target ''' ucomp = -wspd * sind(wdir) vcomp = -wspd * cosd(wdir) x = ucomp * sind(230) y = vcomp * cosd(230) upslope = -(x + y) wspd_target = vcomp ax, hcbar = wp.plot_time_height( ax=ax, wspd=wspd_target, time=time, height=hgt, spd_range=[-4, 32], spd_delta=2, cmap='nipy_spectral', cbar=(ax, cbarinvi), kind='pcolormesh', ) wp.add_windstaff(wspd, wdir, time, hgt, color=(0.4, 0.4, 0.4), ax=ax, vdensity=2, hdensity=1, head_size=0.08,
if c == 14: cbar_inv = False else: cbar_inv = True wspdMerid = -wspd * cosd(wdir) if c == 13: foo = wspdMerid ax, hcbar, img = wp.plot_time_height(ax=ax, wspd=wspdMerid, time=time, height=hgt, spd_range=[-5, 30], spd_delta=4, cmap='nipy_spectral', cbar=ax, cbarinvi=cbar_inv ) wp.add_windstaff(wspd, wdir, time, hgt, color=(0.0, 0.0, 0.0), ax=ax, vdensity=2, hdensity=2, head_size=0.07, tail_length=4.5, ) if c == 8:
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, cmap='jet', cbar=(ax, cbar_inv) ) wp.add_windstaff(wspd, wdir, time, hgt, # color=(0.6,0.6,0.6), color='k', ax=ax, vdensity=1, hdensity=0, head_size=0.08, tail_length=5 )
''' wind speed target ''' ucomp = -wspd*sind(wdir) vcomp = -wspd*cosd(wdir) x = ucomp*sind(230) y = vcomp*cosd(230) upslope = -(x+y) wspd_target = vcomp ax, hcbar = wp.plot_time_height(ax = ax, wspd = wspd_target, time = time, height = hgt, spd_range = [-4, 32], spd_delta = 2, cmap = 'nipy_spectral', cbar = (ax,cbarinvi), kind = 'pcolormesh', ) wp.add_windstaff(wspd, wdir, time, hgt, color = (0.4,0.4,0.4), ax = ax, vdensity = 2, hdensity = 1, head_size = 0.08, tail_length = 5) ''' determine xticks '''
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) wp.add_windstaff(wspd, wdir, time, hgt, color='k', ax=ax, vdensity=2, hdensity=2) ''' add arrow annotations ''' scale = 4.1 # use for adjust png output alpha = 0.6