Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
blaylockbk committed Jun 18, 2018
1 parent 7f462bb commit a023554
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
10 changes: 6 additions & 4 deletions GOES_downloads/download_GOES16.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import sys
sys.path.append('/uufs/chpc.utah.edu/common/home/u0553130/pyBKB_v2/')
sys.path.append('B:\pyBKB_v2')
from BB_GOES16.get_GOES16 import get_GOES16_truecolor
from BB_GOES16.get_GOES16 import get_GOES16_truecolor, get_GOES16_firetemperature
from BB_GOES16.match_GLM_to_ABI import accumulate_GLM_flashes_for_ABI
from BB_basemap.draw_maps import draw_Utah_map

Expand All @@ -54,7 +54,7 @@
# ----------------------------------------------------------------------------
# CONUS Map object
m = Basemap(projection='geos', lon_0='-75.0',
resolution='i', area_thresh=1000,
resolution='i', area_thresh=10000,
llcrnrx=-3626269.5, llcrnry=1584175.9,
urcrnrx=1381770.0, urcrnry=4588198.0)

Expand Down Expand Up @@ -130,6 +130,8 @@ def download_goes16(DATE,

# Create true color image of the file
G = get_GOES16_truecolor(OUTDIR+i[3:], only_RGB=False, night_IR=True)
FT = get_GOES16_firetemperature(OUTDIR+i[3:], only_RGB=False)
max_RGB = np.nanmax([G['rgb_tuple'], FT['rgb_tuple']], axis=0)
GLM = accumulate_GLM_flashes_for_ABI(i[3:])
plt.figure(1)
plt.clf()
Expand All @@ -148,8 +150,8 @@ def download_goes16(DATE,

# Draw Utah Map
newmap = mU.pcolormesh(G['lon'], G['lat'], G['TrueColor'][:,:,1],
color=G['rgb_tuple'],
linewidth=0)
color=max_RGB,
linewidth=0) # when plotting on cylindrical coordinates, dont set latlon=True. Only if plotting over HRRR domain
newmap.set_array(None) # must have this line if using pcolormesh and linewidth=0
mU.scatter(GLM['longitude'], GLM['latitude'], marker='+', color='yellow', latlon=True)
mU.drawstates()
Expand Down
16 changes: 14 additions & 2 deletions HRRR_downloads/download_operational_hrrr.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,20 @@ def get_grib2(DATE, model, field, fxx, DIR, idx=True, png=True, PATH='default',
# HRRR Source Path
if source == 'NOMADS':
# Download from operational products directory
NOMADS = 'http://nomads.ncep.noaa.gov/pub/data/nccf/com/hrrr/prod/%s.%s/' \
% (model, DATE.strftime('%Y%m%d'))
if datetime.utcnow() < datetime(2018, 7, 11, 14):
NOMADS = 'http://nomads.ncep.noaa.gov/pub/data/nccf/com/hrrr/prod/%s.%s/' \
% (model, DATE.strftime('%Y%m%d'))
else:
print "!!>> DOWNLOADING HRRR VERSION 3 <<!!"
if model =='hrrrak':
DOMAIN = 'alaska'
SHORT = 'ak.'
elif model == 'hrrr':
DOMAIN = 'conus'
SHORT = ''
NOMADS = 'http://nomads.ncep.noaa.gov/pub/data/nccf/com/hrrr/prod/hrrr.%s/%s/' \
% (DATE.strftime('%Y%m%d'), DOMAIN)

elif source == 'PARA':
# Download from parallel products directory
if model =='hrrrak':
Expand Down

0 comments on commit a023554

Please sign in to comment.