Skip Navig
ation Links weather.gov 
NOAA logo-Select
to go to the NOAA homepage National Oceanic Atmospheric Administration   Select to go to the N
WS homepage
National Weather Service
     
Local forecast by
"City, St"

  Home > NDFD > NDFD XML Forecasts

 

Experimental National Digital Forecast Database XML Web Service

NOAA's National Weather Service offers several XML services
|Forecasts||Watch/warnings||Current Observations||Tropical Cyclone Advisories|

What is NDFD XML?

National Digital Forecast Database (NDFD) Extensible Markup Language (XML) is a service providing the public, government agencies, and commercial enterprises with data from the National Weather Service’s (NWS) digital forecast database.   This service, which is defined in a Service Description Document, provides NWS customers and partners the ability to request NDFD data over the internet and receive the information back in an XML format.  The request/response process is made possible by the NDFD XML Simple Object Access Protocol (SOAP) server.   To see the details of the NDFD XML SOAP service, go to the following URL and click on the NDFDgen link:

http://www.nws.noaa.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php

If the web service description provided by the SOAP server does not meet your needs, similar information is available in the following Web Service Description Language (WSDL) document:

http://www.nws.noaa.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl

In addition to the SOAP technology, this service exploits XML to enhance the ease with which NWS customers and partners can integrate NDFD data into their computer applications.   XML is a W3C standard that allows its users to create languages with HTML-like tags and attributes.   The NDFD XML language is called Digital Weather Markup Language (DWML) and its schema can be found at the following link:

http://www.nws.noaa.gov/forecasts/xml/DWMLgen/schema/DWML.xsd

The schema defines the XML language’s vocabulary (available tags and attributes) and syntax (expected order of tags).   Knowing how NDFD XML is constructed, users can write programs to process the XML document to get at the data it contains.

To see a sample Digital Weather Markup Language document that conforms to the DWML schema, click on the following link:

http://www.nws.noaa.gov/forecasts/xml/DWMLgen/schema/latest_DWML.txt

Why provide an Experimental NDFD XML service?

The National Weather Service is striving to serve society’s needs for weather information by evolving its services from a text-based paradigm to one based on making NWS information available quickly, efficiently, and in convenient and understandable forms.   The NDFD is one example of this transformation.   NDFD XML takes yet another step towards a digital services era by making NDFD data available for computer to computer transfer and processing.   NWS customers and partners can then enhance the value of NDFD data through the creation of value added products.

This is an experimental service. NWS will be accepting comments on this service until August 1, 2004. At the end of the period, comments will be evaluated in order to decide if the service should become official or not.

How often is NDFD XML updated?

The NDFD is updated no more then hourly. We request developers using this SOAP service for local applications only make a request for a specific point no more than once an hour. The database is currently updated by 45 minutes after the hour.

How is NDFD XML generated?

The first step to providing NDFD XML is the creation of the NDFD.   For more information on how NDFD is created, visit the NDFD home page.   With NDFD data available, a user application creates and sends a SOAP request to the NDFD XML SOAP server.   The SOAP request is processed, creating the DWML document which is returned to the requesting application for processing.   Figure 1 provides a graphical view of the process.

NDFD XML SOAP Process

Figure 1.   NDFD XML SOAP Process

You can see an example of this process in action by visiting the following URL:

http://www.nws.noaa.gov/forecasts/xml/sample_products/meteogram/DWML_graph.htm

By clicking the “submit” button, a script will request, retrieve, and parse NDFD data and then display it in a graph.

You can download this sample application by clicking on the following links:

http://weather.gov/forecasts/xml/sample_products/ndfdXML.tar

NOTE:   The PHP script, plotMeteogramDev.php, is an example only and will not run as is.   To run the script, you will need to install NuSOAP and VH Graph.   You can review the readme file for additional information on using the sample clients.

What does NDFD XML contain?

NDFD XML contains forecasts for any combination of the following meteorological parameters:

Maximum Temperature
Minimum Temperature
3 hourly Temperature
Dewpoint Temperature
12 hour Probability of Precipitation
Liquid Precipitation Amounts (Quantitative Precipitation Forecast)
Snowfall Amounts
Cloud Cover Amounts
Wind Direction
Wind Speed
Sensible Weather
Wave Heights

For additional information on NDFD parameter definitions and available time projection, please see the NDFD technical page.

In addition to its meteorological content, NDFD XML contains meta data about the product.   A description of the meta data as well as data XML tags and attributes can be found in the Digital Weather Markup Language Specification.

How Do You Use the Web Service?

The first step to using the web service is to create a SOAP client.   The client creates and sends the SOAP request to the server.   The request sent by the client then invokes the server function NDFDgen().   NDFDgen() requires the following user supplied input:

Latitude Decimal 39.0000 The latitude of the point for which you want NDFD data.   North latitude is positive.
Longitude Decimal -77.0000 The longitude of the point for which you want NDFD data.   East longitude is negative.
Product String time-series There are two products.   The “time-series” product returns all data between the start and end times for the selected weather parameters.   The “glance” product returns all data between the start and end times for the parameters maxt, mint, sky, wx, and icons
Start time XML Date String 2004-04-27T12:00 The beginning time for which you want NDFD data.   If the string is empty, the start time is assumed to be the earliest available time in the database.
End time XML Date String 2004-04-30T12:00 The ending time for which you want NDFD data.   If the string is empty, the end time is assumed to be the last available time in the database.
Parameters Array of Booleans maxt = TRUE The parameters that you want data for.   Valid parameters include the following:

 

Maximum Temperature

maxt

Minimum Temperature

mint

3 Hourly Temperature

temp

Dewpoint Temperature

dew

12 Hour Probability of Precipitation

pop12

Liquid Precipitation Amount

qpf

Snowfall Amount

snow

Cloud Cover Amount

sky

Wind Speed

wspd

Wind Direction

wdir

Weather

wx

Weather Icons

icons

Wave Height

waveh

You can view an example of how to invoke NDFDgen() in the following web page and the SOAP client it uses.

http://www.nws.noaa.gov/forecasts/xml/SOAP_server/ndfdXML.htm

Once the SOAP server returns the XML document back to the client, you can then parse the DWML using SAX, the DOM, or XSLT.   The meteogramDev.php script discussed above is an example of SAX processing.

NWS XML Services Change Notices

Below are listed recent change notices for NWS XML services. A complete listing is available. An RSS feed of the change notices is also available. These notices are used to announce major changes, schema changes and new services.

XML Feeds of Current Weather Conditions - Station list XML extended to include lat/lon
The xml listing of weather observations stations has been updated to include the latitude and longitude of the station when available. Details...

XML Feeds of Current Weather Conditions - visibility tag
On Monday, 19 July, 2004, at 16:00 UTC (Noon, Eastern US), the visiblity tag will be updated to reflect the proper spelling of visibility. Details...

 

    US Dept of Commerce
    National Oceanic and Atmospheric Administration
    National Weather Service
    1325 East West Highway
    Silver Spring, MD 20910
    Page Author: NWS Internet Services Team
Disclaimer
Feedback
Privacy Policy
Credits
     Page last Modified: Thu 13 May, 2004 9:21 AM