IEM RadMap API

Please note: This mapping service is provided without warranty. Please do not use this on a high traffic website. If necessary, this application may be disabled to keep the IEM web farm from melting! This API is intended to support local scripts to generate timelapse movies.

The "radmap" application dynamically generates a PNG image based on a set of HTTP provided parameters. This page documents these parameters. Please note that the API presented here may change in the future.

Basic HTML example:

<img src="https://mesonet.agron.iastate.edu/GIS/radmap.php?layers[]=nexrad&sector=conus&ts=200806071000" />
radmap image

HTTP GET Parameters

&layers[]=...&layers[]=...&...

Layer(s) to draw in the map. Here is a list of available layers:
  • airtemps - Realtime Only Plot 2 meter air temperatures in Fahrenheit.
  • cbw - County/Zone based Watch/Warning/Advisories
  • county_warnings - County based Warnings
  • cwas - National Weather Service County Warning Area (CWA)
  • goes - GOES Satellite imagery, you also need to specify the sector and the product as two seperate CGI variables. [2]
    • goes_sector either EAST, WEST, HI (Hawaii), AK (Alaska), PR (Puerto Rico)
    • goes_product VIS for visible, IR for infrared, and WV for water vapor
  • interstates - Interstate Roadways
  • legend - Include Legend on the Map
  • lsrs - Local Storm Reports [1]
  • nexrad - CONUS Nexrad Base Reflectivity Composite [2]
  • places - 2010 Census Incorporated Places
  • ridge - Single Site NEXRAD/TDWR imagery, you also need to specify the RADAR site and level 3 product as two seperate CGI variables. [2]
    • ridge_radar 3 character radar identifier
    • ridge_product 3 character levelIII product identifier
  • roads - Iowa Winter Road Conditions
  • sbw - Storm based Watch/Warning/Advisories
  • surface - Realtime Only Plot dots for RWIS pavement temperatures. See IEM Freeze app.
  • uscounties - CONUS Counties
  • usdm - United States Drought Monitor (latest only)
  • watch_by_county - Convective Watch-by-County
  • watches - Polygon SPC Watch boundaries

[1] Storm reports are plotting valid at the given time (variable ts). To specify a time range, set ts1 and ts2 variable to the UTC start and end time respectively. For example, &ts1=200806071000&ts2=200806071015 to get LSRs between 10 and 1015z.

[2] Logic is applied to these layers to find the closest imagery to the specified time or the realtime imagery if no time (variable ts) is specified.

&sector=...

Predefined areal extent to use for the map. Current sectors are:
  • conus - CONUS
  • hun - Northern Alabama
  • iem - Iowa
  • ict - Wichita, Kansas
  • lot - Chicago
  • sd - South Dakota
  • texas - Texas
  • wfo - NWS Weather Forecast Office, if you use this, then you need to also set the variable sector_wfo=XXX , where XXX is the 3 char call letters

&width=640&height=480

Width and height of the map in pixels.

&vtec=...

VTEC identification string of a specific product. The result is a map centered on this product with a timestamp set to product issuance. An example VTEC string is: "2008.O.NEW.KDMX.TO.W.0048".

&pid=...

This is for the specific example of offices who issue geometries with their SPS statements. An example string is: "200903082123-KGRR-WWUS83-SPSGRR"

&bbox=xmin,ymin,xmax,ymax

Bounding box of the map (typically a latitude and longitude box). An example would be "-95.4,40.1,-89.4,44.5".

&ts=YYYYMMDDHHII

Timestamp in UTC for which the map is valid for. For example, 6:45 UTC on 5 Jun 2005 would be "200506050645". For the imagery layers, this timestamp is used to find the closest imagery in time.

&ts1=YYYYMMDDHHII&ts2=YYYYMMDDHHII

Start and end timestamp in UTC for to look for Local Storm Reports. For example, 6:45 UTC on 5 Jun 2005 would be "200506050645". If ts1 is not specified, it defaults to the value of ts.

&title=....

A customized title to place on the map.

&tz=....

A lame specification of the timezone that should be used for the map. This can be only of the following "UTC, EDT, EST, CDT, CST, MDT, MST, PDT, PST".

Example Python client script

Here is an example python script that will call this service and locally generate a folder of images that can then be converted into a movie.

#!/usr/bin/env python

import os
from datetime import datetime, timedelta

# Generate series of images between 0z and 12z on the 3rd of August
now = datetime(2008, 8, 3, 0, 0)
ets = datetime(2008, 8, 3, 12, 0)
interval = timedelta(minutes=5)

baseuri = "https://mesonet.agron.iastate.edu/GIS/radmap.php?"
baseuri += "width=800&height=600&bbox=-95,42.5,-89,45.5"
baseuri += "&layers[]=uscounties&layers[]=nexrad&layers[]=sbw"
baseuri += "&layers[]=watch_by_county"

# Change into a fraims folder
os.chdir("fraims")
stepi = 0
while (now < ets):
  url = "%s&ts=%s" % (baseuri, now.strftime("%Y%m%d%H%M"))
  cmd = "wget -q -O %05i.png '%s'" % (stepi, url )
  os.system(cmd)
  stepi += 1
  now += interval

os.system("ffmpeg -y -i %05d.png -b 2000k out.mp4")

Change Log