You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.
I tried your CONUS water vapor (mapping_GOES_16_data_CONUS_WaterVapor.py) almost verbatim. The only difference was I used an infrared channel instead of the wv channel. It displayed correctly for the initial GEOS figure, but I received a blank image for the LCC. I had the vmin=170 and vmax=370. I also used the 'Greys_r' cmap.
from netCDF4 import Dataset
import numpy as np
from datetime import datetime, timedelta
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
from pyproj import Proj
p = Proj(proj='geos', h='35786023.0', lon_0='-89.5', sweep='x')
C_file = '/home/awips/scripts/Data/raw/CH13/OR_ABI-L2-CMIPF- M3C13_G16_s20182691245351_e20182691256129_c20182691256207.nc'
C = Dataset(C_file, 'r')
#from matplotlib.colors import LinearSegmentedColormap
#cmap_WV = LinearSegmentedColormap.from_list('this', ['darkgreen', 'green', 'lightgreen', 'white', 'blue', 'yellow', 'red', 'k'])
# Channel 13 Data
WV10 = C.variables['CMI']
h = C.variables['goes_imager_projection'].perspective_point_height
X = C.variables['x'][:] * h
Y = C.variables['y'][:] * h
# GOES-16 image on geostationary projection
m = Basemap(projection='geos', lon_0='-89.5',
resolution='i', area_thresh=1500,
llcrnrx=X.min(),llcrnry=Y.min(),
urcrnrx=X.max(),urcrnry=Y.max())
# Long-Wave IR GEOS
plt.figure(1)
m.imshow(np.flipud(WV10), cmap='Greys_r', vmax=378, vmin=170)
m.drawcoastlines()
m.drawcountries()
m.drawstates()
plt.title('GOES-16 ABI Channel 10: Low-Level Troposphere WV Band' % ())
cb = plt.colorbar(orientation='horizontal', pad=.01, shrink=.75)
cb.set_label('Brightness Temperature (K)')
# Convert map points to lats/lons
Xs, Ys = np.meshgrid(X, Y)
lons, lats = p(Xs, Ys, inverse=True)
## Plot GOES-16 on HRRR Map:
Hm = Basemap(resolution='i', projection='lcc', area_thresh=1000, \
width=1800*3000, height=1060*3000, \
lat_1=38.5, lat_2=38.5, \
lat_0=38.5, lon_0=-97.5)
Hx, Hy = Hm(lons, lats)
#Long-Wave IR
plt.figure(4)
m = Hm.pcolormesh(Hx, Hy, WV10, cmap='Greys_r', vmax=378, vmin=170)
Hm.drawstates()
Hm.drawcountries()
Hm.drawcoastlines()
plt.title('GOES-16 ABI Channel 10: Low-Level Troposphere WV Band' % ())
cb = plt.colorbar(orientation='horizontal', pad=.01, shrink=.75)
cb.set_label('Brightness Temperature (K)')
plt.show()
The text was updated successfully, but these errors were encountered:
Interesting. Look at the values and variable properties for the channel you are using and make sure they look right.
Also, try adding the latlon=True argument in the line where you have m = Hm.pcolormesh(Hx, Hy, WV10, cmap='Greys_r', vmax=378, vmin=170) . Since you say the plt.imshow image worked, I'm pretty sure that missing argument is the problem for the LCC map projected image.
I tried your CONUS water vapor (mapping_GOES_16_data_CONUS_WaterVapor.py) almost verbatim. The only difference was I used an infrared channel instead of the wv channel. It displayed correctly for the initial GEOS figure, but I received a blank image for the LCC. I had the vmin=170 and vmax=370. I also used the 'Greys_r' cmap.
The text was updated successfully, but these errors were encountered: