Skip to content

Plotting archived satellite data in MetPy #3159

Closed Answered by dopplershift
atmsfer asked this question in Q&A
Discussion options

You must be logged in to vote

To be clear, there's not a really a MetPy question here. This is "just" plotting a netCDF grid, opened using xarray, using Matplotlib + Cartopy:

import cartopy.crs as ccrs
import cartopy.feature as cfeature
import matplotlib.pyplot as plt
import xarray as xr

fig = plt.figure(figsize=(10, 10))
ax = fig.add_subplot(projection=ccrs.PlateCarree())

ch4 = xr.open_dataset('/Users/rmay/Downloads/GOES13_d20110714_t200150_b04')

ax.pcolormesh(ch4.lon, ch4.lat, ch4.data[0], cmap='Greys_r')

ax.add_feature(cfeature.COASTLINE)
ax.add_feature(cfeature.BORDERS)

ax.set_extent((-130, -50, 20, 55))

gives:

Note that I had to use pcolormesh here because imshow() only takes an image bounding box, and we'd…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@atmsfer
Comment options

Answer selected by dopplershift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants