Esempio n. 1
0
if __name__ == '__main__':

    import matplotlib.pyplot as plt
    from mpl_toolkits.basemap import Basemap

    import sys
    sys.path.append('/uufs/chpc.utah.edu/common/home/u0553130/pyBKB_v2/')
    from BB_basemap.draw_maps import draw_CONUS_HRRR_map, draw_Utah_map

    DATE = datetime(2017, 9, 25)
    DIR = '/uufs/chpc.utah.edu/common/home/horel-group/archive/%s/BB_test/goes16/' % DATE.strftime(
        '%Y%m%d')

    FILES = files_on_pando(DATE)

    mHRRR = draw_CONUS_HRRR_map()
    mUtah = draw_Utah_map()

    for f in FILES:
        G = get_GOES16_truecolor(DIR + f, nightIR=True)

        # Plot on HRRR domain Map
        plt.figure(1)
        plt.clf()
        plt.cla()
        newmap = mHRRR.pcolormesh(G['LONS'],
                                  G['LATS'],
                                  G['TrueColor'][:, :, 1],
                                  color=G['rgb_tuple'],
                                  linewidth=0,
                                  latlon=True)
Esempio n. 2
0
plotcode = 'MSLP_Contour,dBZ_Fill'


# === Some housekeeping variables =============================================

# Preload the latitude and longitude grid
latlonpath = '/uufs/chpc.utah.edu/common/home/horel-group7/Pando/hrrr/HRRR_latlon.h5'
latlonh5 = h5py.File(latlonpath, 'r')
gridlat = latlonh5['latitude'][:]
gridlon = latlonh5['longitude'][:]


# === Create map of the domain ================================================

m = draw_CONUS_HRRR_map(res=map_res)
m.drawcountries(zorder=500)
m.drawstates(zorder=500)
m.drawcoastlines(zorder=500)
m.fillcontinents(color='tan',lake_color='lightblue', zorder=0)
m.drawmapboundary(fill_color='lightblue')

for DATE in DATES:
    # Convert Valid Date to Run Date, adjusted by the forecast
    DATE = DATE - timedelta(hours=fxx)

    plt.title('%s' % (model.upper()), fontweight='bold')
    plt.title('Run: %s F%02d' % (DATE.strftime('%Y-%m-%d %H:%M UTC'), fxx), loc='left')
    plt.title('Valid: %s' % (DATE+timedelta(hours=fxx)).strftime('%Y-%m-%d %H:%M UTC') , loc='right')
    # =============================================================================