• HAST 00:15
  • AKDT 02:15
  • PDT 03:15
  • MDT 04:15
  • CDT 05:15
  • EDT 06:15
  • UTC 10:15

METARs Examples

The examples are organized by constraint type. Select a constraint type from the list below to jump to a particular section.

Station String

Parameter(s) Allowed Values Example(s)
stationString
  • ICAO station ID using the four-letter specification
  • delimited by white spaces and/or commas (,)

Obtain all available METARs for KDEN, KSEA and PHNL from the past two hours

stationString=KDEN KSEA,PHNL&hoursBeforeNow=2

stationString using partial ICAO ID

Obtain METARs for KSEA and all ICAO IDs beginning with KDE (i.e. KDEN, KDEH, KDEW, ...etc.) from the past three hours

stationString=KDEN KSEA,PHNL&hoursBeforeNow=2

stationString using partial ICAO ID and wildcard (*)

Equivalent to above, obtain METARs for KSEA and all ICAO IDs beginning with KDE from the past 3 hours

stationString=KSEA KDE*&hoursBeforeNow=3

stationString using '@' and two-letter U.S. state (or two-letter Canadian province) abbreviation to obtain METARS for a state

Obtain METARs for all ICAO IDs from Washington state for the past hour

stationString=@WA&hoursBeforeNow=1

stationString Same as above

Obtain METARs for all ICAO IDs from British Columbia for the past hour

stationString=@BC&hoursBeforeNow=1

stationString using '~' and two-letter country abbreviation to obtain METARS for a country

Obtain METARs for all ICAO IDs from Australia for the past hour

stationString=~au&hoursBeforeNow=1

Time Range

Parameter(s) Allowed Values Example(s)
startTime, endTime
  • start and end times in seconds since January 1, 1970 (Unix time)
  • Query is based on validTimeFrom and validTimeTo

Obtain all METARs for PHTO collected between these start and end times

startTime=1337242535&endTime=1337249735&stationString=PHTO

startTime, endTime
  • start and end times in ISO8601 date/time format
  • Query is based on METAR obsTime

Obtain all METARs collected between the start and end times using ISO8601 date/time format with UTC offset: YYYY-MM-DDThh:mm:ssZ. Please refer to W3C date/time formats.

startTime=2012-05-17T08:15:35Z&endTime=2012-05-17T10:15:35Z&stationString=PHTO

startTime, endTime
  • start and end times in ISO8601 date/time format
  • Query is based on METAR obsTime

Obtain all METARs collected between the start and end times in ISO8601 date/time format with local offset: YYYY-MM-DDThh:mm:ss+hhmm or YYYY-MM-DDThh:mm:ss-hhmm. Please refer to W3C date/time formats.

startTime=2012-05-17T08:15:35+0000&endTime=2012-05-17T10:15:35+0000&stationString=PHTO

Note: Due to differences in character encodings by various web browsers, the + might get encoded to a whitespace. To avoid this from occurring, use %2B in place of the +.

hoursBeforeNow
  • any positive integer or floating point value
  • n = number of hours before current time
  • Query is based on METAR obsTime

Obtain all METARs collected in the last three hours for KDEN

stationString=KDEN&hoursBeforeNow=3

hoursBeforeNow Same as above

Obtain all METARs collected in the last hour and a half for KDEN

stationString=KDEN&hoursBeforeNow=1.5

Notes
The ADDS database retains only three days worth of data.

Most Recent

Parameter(s) Allowed Values Example(s)
mostRecent
  • true - get the single most recent METAR (only one value is returned) for the specified time range
  • false - don't get the most recent METAR, equivalent to omitting mostRecent parameter
  • Query based on METAR obsTime

Of all METARS corresponding to PHNL and KSEA, obtain the single most recent METAR from the past three hours. Only one METAR is returned.

hoursBeforeNow=3&mostRecent=true&stationString=PHNL KSEA

Notes
  • The mostRecent constraint is applied after all other constraints have been applied to yield only one METAR. This single METAR corresponds to the most recent in the result set defined by the other constraints.
  • The mostRecent constraint must be accompanied by a time constraint (hoursBeforeNow, start/end time, etc.).
  • The mostRecent constraint may not be used in conjunction with the mostRecentForEachStation constraint.

Most Recent for Each Station

Parameter(s) Allowed Values Example(s)
mostRecentForEachStation
  • constraint - request the most recent for each METAR station in the fastest fashion. Not appropriate for historical data retrieval
  • postfilter - post filter results after applying all other constraints
  • true - same as 'postfilter' method
  • false - don't get the most recent for each METAR station, equivalent to omitting this parameter
  • Query based on METAR obsTime

Use the constraint method to retrieve the most recent METAR for all KDE* stations that were reported in the past hour and fifteen minutes.

mostRecentForEachStation=constraint&hoursBeforeNow=1.25&stationString=KDE

Note: This is not appropriate for historical data retrieval.

mostRecentForEachStation Same as above

Obtain the METARS for PHTO, PHKO, KSEA and KSFO from the indicated start and end times, using the postfilter method. Return only the most recent for each of these stations within the time range. There should be a total of four results, one result each for PHTO, PHKO, KSEA and KSFO.

startTime=1337242535&endTime=1337249735&stationString=PHTO,PHKO,KSEA,KSFO&mostRecentForEachStation=postfilter

mostRecentForEachStation Same as above

Same as above, this defaults to the postfilter method to obtain the most recent METARs for PHTO, PHKO, KSEA and KSFO.

startTime=1337242535&endTime=1337249735&stationString=PHTO,PHKO,KSEA,KSFO&mostRecentForEachStation=true

Notes
  • See version 1.2 release notes for further details on the different types.
  • This constraint may not be used with the mostRecent constraint.

Lon-Lat Rectangle

Parameter(s) Allowed Values Example(s)
minLat, minLon, maxLat, maxLon
  • longitude and latititude in decimal degrees
  • -180<= lon <=180
  • -90<= lat <=90
  • parameters can be listed in any order

Obtain METARs collected within the last 3 hours for a rectangular region (bounding box) defined by the min and max lon and lat

minLat=25&minLon=-130&maxLat=65&maxLon=-40&hoursBeforeNow=3

Notes
  • The LonLatRect constraint can accommodate situations where the bounding box crosses the International Date Line
  • The LonLatRect constraint does not support bounding boxes that encompass a pole.

Radial Distance

Parameter(s) Allowed Values Example(s)
radialDistance
  • a radius (statute miles) around a point (longitude and latitude in decimal degrees)
  • -180<= lon <=180
  • -90<= lat <=90
  • 0< radius <=500
  • Radius and origin are separated by a semicolon(;)
  • Described area may not cross the international dateline or either pole

Obtain METARs collected within the last 3 hours for all the stations within 20 statute miles of -104.65,39.83 (KDEN)

radialDistance=20;-104.65,39.83&hoursBeforeNow=3

Flight Path

Parameter(s) Allowed Values Example(s)
flightPath
  • maximum distance in statute miles
  • two or more way points
  • Waypoints may take the form of (lon,lat) or station IDs or a mixture of (lon,lat) and station ID
  • lon, lat are delimited by a comma (,)
  • maximum distance MUST precede the way points
  • maximium distance and way points are delimited by a semicolon(;)
  • time range:
    • use start, end times
    • use hoursBeforeNow
    • default: (hoursBeforeNow=1)
  • the ordering of way points is significant: always start with origin, end with destination

Obtain all METARS collected in the past 3 hours for the flight path from Campbell River, BC to Denver, CO using a 57.5 statute mile maximum distance

flightPath=57.5;-125.27,49.95;-104.65,39.83&hoursBeforeNow=3

flightPath Same as above

Same as above, except using the default time range of hoursBeforeNow=1

flightPath=57.5;-125.27,49.95;-104.65,39.83

flightPath Same as above

A flight path from Denver, CO to Corpus Cristi, TX to Orlando, FL to Burlington, VT using the default time range and a 57.5 statute mile maximum distance.

flightPath=57.5;-104.65,39.83;-97.5,27.77;-81.33,28.42;-73.15,44.47

flightPath Same as above

Same as above, except the station name for Denver and Orlando are employed, rather than their lon,lat values.

flightPath=57.5;KDEN;-97.5,27.77;KMCO;-73.15,44.47

Notes
  • Flight path results are sorted by distance along the flight path, from origin to destination.
  • The flight path constraint cannot accommodate the following situations:
    • flight paths that cross the poles
    • flight paths that cross the International Date Line

Density

Parameter(s) Allowed Values Example(s)
minDegreeDistance
  • 0 $lt; any value <=90
  • The degree distance is the distance (based on longitude and latitude) between stations. The larger the value of minDegreeDistance, the less dense the results.
  • Duplicate stations are filtered and the most recent of duplicate stations is reported.

Obtain all METARS collected in the past 3 hours for the flight path from Denver, CO to Orlando, FL using a 157.5 statute mile maximum distance and requesting a lower density of results.

flightPath=157.5;KDEN;KMCO&minDegreeDistance=50

minDegreeDistance Same as above

Obtain all METARS collected in the past 3 hours for the flight path from Denver, CO to Orlando, FL using a 157.5 statute mile maximum distance and requesting a higher density of results.

flightPath=157.5;KDEN;KMCO&minDegreeDistance=1

Field Parameters

Parameter(s) Allowed Values Example(s)
fields
  • Constrain the results to contain only the fields of interest.
  • Indicate the fields of interest by a list of space or comma(,) delimited field names (as indicated in the METAR Field Description)
  • If no fields are indicated, the default condition is assumed and all available fields in the METAR Field Description are returned.

Obtain all METARS collected in the past 3 hours for the flight path Campbell River, BC to Denver, CO using a 57.5 statute mile maximum distance. Only the available sky cover, cloud base, elevation and vertical visibility results are returned.

flightPath=57.5;-125.27,49.95;-104.65,39.83&hoursBeforeNow=3&fields=sky_cover,cloud_base_ft_agl,elevation_m,vert_vis_ft

128.117.200.197 thrust.rap.ucar.edu thrust adds-web1