Skip to content

Instantly share code, notes, and snippets.

@deeplycloudy
Last active March 7, 2019 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deeplycloudy/9d53b7436a92a4b1c0f4da701b118aa5 to your computer and use it in GitHub Desktop.
Save deeplycloudy/9d53b7436a92a4b1c0f4da701b118aa5 to your computer and use it in GitHub Desktop.
Overlay IEM NEXRAD composite on Cartopy
""" Overlay IEM NEXRAD composite on Cartopy for any date or time in the
long-running IEM archive. This works for any target projection, with the
reprojection handled by the Cartopy WMS functionality.
If you don't enter a time on an even 5 min boundary, you will get a blank map.
"""
iem_wms_nexrad = 'https://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r-t.cgi?'
layers = ["nexrad-n0r-wmst"]
wms_kw = {"time":"2017-10-22T05:15:00Z", "transparent":'true'}
fig = plt.figure()
ax = fig.add_subplot(111, projection=ccrs.InterruptedGoodeHomolosine())
ax.coastlines()
ax.add_wms(iem_wms_nexrad, layers, wms_kwargs=wms_kw)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment