Skip to content
Snippets Groups Projects
Commit 05f470ba authored by tomrink's avatar tomrink
Browse files

minor

parent b86790f1
No related branches found
No related tags found
No related merge requests found
......@@ -204,9 +204,9 @@ def plot_image2(image, cmap='Greys'):
# Example GOES file to retrieve GEOS parameters in MetPy form (CONUS)
#exmp_file = '/Users/tomrink/data/OR_ABI-L1b-RadC-M6C14_G16_s20193140811215_e20193140813588_c20193140814070.nc'
exmp_file = '/Users/tomrink/data/OR_ABI-L1b-RadC-M6C14_G16_s20193140811215_e20193140813588_c20193140814070.nc'
# Full Disk
exmp_file = '/Users/tomrink/data/OR_ABI-L1b-RadF-M6C16_G16_s20212521800223_e20212521809542_c20212521809596.nc'
#exmp_file = '/Users/tomrink/data/OR_ABI-L1b-RadF-M6C16_G16_s20212521800223_e20212521809542_c20212521809596.nc'
exmp_name = 'Rad'
# exmp_file = '/Users/tomrink/data/H08/HS_H08_20200601_0330_B01_FLDK.nc'
# exmp_name = 'RAD'
......@@ -221,34 +221,33 @@ def plot_image3(image, cmap='Greys'):
fig = plt.figure(figsize=(15, 12))
ax = fig.add_subplot(1, 1, 1, projection=geos)
ax.imshow(image, origin='upper', extent=(x.min(), x.max(), y.min(), y.max()), transform=geos)
ax.coastlines(resolution='50m', color='black', linewidth=0.25)
ax.add_feature(ccrs.cartopy.feature.STATES, linewidth=0.25)
ax.set_extent([-105, -70, 15, 50], crs=ccrs.PlateCarree())
ax.imshow(image, cmap=cmap, origin='upper', extent=(x.min(), x.max(), y.min(), y.max()), transform=geos)
ax.coastlines(resolution='50m', color='blue', linewidth=0.25)
# ax.add_feature(ccrs.cartopy.feature.STATES, linewidth=0.25)
plt.title('GOES-16', loc='left', fontweight='bold', fontsize=15)
fig.savefig('/Users/tomrink/image')
def make_icing_image(clvrx_file, ice_lons, ice_lats, clvrx_str_time, satellite, domain, ice_lons_vld=None, ice_lats_vld=None, imagename='icing', extent=[-110, -60, 10, 55]):
h5f = h5py.File(clvrx_file, 'r')
image = get_grid_values_all(h5f, 'temp_10_4um_nom')
# exmpl_ds = xr.open_dataset(exmp_file)
# mdat = exmpl_ds.metpy.parse_cf('Rad')
# geos = mdat.metpy.cartopy_crs
# x = mdat.x
# y = mdat.y
geos, xlen, xmin, xmax, ylen, ymin, ymax = get_cartopy_crs(satellite, domain)
fig = plt.figure(figsize=(48, 30))
ax = fig.add_subplot(1, 1, 1, projection=geos)
ax.set_extent(extent, crs=ccrs.PlateCarree())
ax.imshow(image, origin='upper', extent=(xmin, xmax, ymin, ymax), cmap='Greys', transform=geos)
ax.coastlines(resolution='50m', color='blue', linewidth=0.25)
ax.add_feature(ccrs.cartopy.feature.STATES, color='blue',linewidth=0.25)
ax.coastlines(resolution='50m', color='green', linewidth=1.50)
# ax.add_feature(ccrs.cartopy.feature.STATES, linewidth=0.25)
if ice_lons is not None:
ax.scatter(ice_lons, ice_lats, s=40.0, marker='o', color='blue', transform=ccrs.PlateCarree())
if ice_lats_vld is not None:
#ax.scatter(ice_lons_vld, ice_lats_vld, s=140.0, facecolors='none', marker='o', edgecolor='red', transform=ccrs.PlateCarree())
ax.scatter(ice_lons_vld, ice_lats_vld, s=140.0, marker='o', color='red', transform=ccrs.PlateCarree())
title = 'GOES-16, '+clvrx_str_time+' >50% Probability Icing'
plt.title(title, loc='left', fontweight='bold', fontsize=24)
ImageDirAndName = os.path.join('/Users/tomrink', imagename+'_'+clvrx_str_time)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment