# Presentation: 016812

## Digital Weather XML Specification

- John Schattel
- 9 December 2003

## Overview

- Why we created the Digital Weather Markup Language (DWML)
- Review DWML data model
- Elements and Attributes
- Data relationships
- Examine two sample DWML products
- Forecast at a Glance Product
- Digital Tabular Forecast Product
- Look at DWML data types

## The Goal

- Satisfy needs expressed in the _[MDL NDFD XML Requirements ](http://www.nws.noaa.gov/mdl/XML/Design/MDL_XML_Requirements.doc)_document
- Allow NWS users to obtain _selected_ data from the National Digital Forecast Database (NDFD)
- Provide a specific set of weather elements for a specific location at a specific time
- Users can already FTP entire NDFD grids
- Involves megabytes of data
- Requires degrib software
- Make data available for _[world wide web applications ](http://www.recreation.gov/detail.cfm?ID=1)_using XML

## What is XML

- An internet technology created to facilitate data exchange and storage
- A tool for creating _[other markup languages](file:///sample_xml.txt)_
- New language follows specific rules
- Instances can be automatically validated
- Supported by a suite of technologies (XSLT, Xpath, XQL) to display and process the data

## Why Use XML

- NWS data available in a human readable self describing form
- _[Sample GRIB](file:///grib.txt)_
- _[Sample XML](file:///sample_rdf.txt)_
- User community can exploit existing internet technologies to integrate NDFD data into html pages and web applications
- _[Sample Reformatted Data](file:///samle_stylesheet.xml)_
- Character data is very portable
- Instances can be validated

## NDFD Data

## Data Model

- <dwml>
-      <head>
-           <product />
-           <source />
-      </head>
-      <data>
-           <location />
-           <time-layout />
-           <parameters />
-           <categorical-definitions />
-           <conversion-definitions />
-      </data>
- </dwml>

- more follows = **...**
- zero or one = **?**
- zero or more = *****
- one or more = **+**
- choose one = **{ }**

***version***

**...**

- Element

- Attribute

**...**

**...**

**...**

**...**

**...**

## Data Model

- <dwml>
-      <head>
-           <product />
-           <source />
-      </head>
**     ****<data>**
-           <location />
-           <time-layout />
-           <parameters />
-           **<categorical-definitions />**
**          ****<conversion-definitions />**
**     ****</data>**
- </dwml>

- more follows = **...**
- zero or one = **?**
- zero or more = *****
- one or more = **+**
- choose one = **{ }**

- _[Example](file:///categorical.txt)_

- _[Example](file:///conversion.txt)_

## Data Model

- <dwml>
-      <head>
-           **<product />**
-           <source />
-      </head>
-      <data>
-           <location />
-           <time-layout />
-           <parameters />
-           <categorical-definitions />
-           <conversion-definitions />
-      </data>
- </dwml>

- more follows = **...**
- zero or one = **?**
- zero or more = *****
- one or more = **+**
- choose one = **{ }**

## Data Model

- <dwml>
-      <head>
-           <product />
-           **<source />**
-      </head>
-      <data>
-           <location />
-           <time-layout />
-           <parameters />
-           <categorical-definitions />
-           <conversion-definitions />
-      </data>
- </dwml>

- more follows = **...**
- zero or one = **?**
- zero or more = *****
- one or more = **+**
- choose one = **{ }**

## Data Model

***latitude***
***longitude***
***summarization ?***

***state***
***summarization ?***

***state***
***summarization ?***

- <dwml>
-      <head>
-           <product />
-           <source />
-      </head>
-      <data>
-           **<location />**
-           <time-layout />
-           <parameters />
-           <categorical-definitions />
-           <conversion-definitions />
-      </data>
- </dwml>

- more follows = **...**
- zero or one = **?**
- zero or more = *****
- one or more = **+**
- choose one = **{ }**

**...**

## Data Model

- <dwml>
-      <head>
-           <product />
-           <source />
-      </head>
-      <data>
-           **<location />**
-           <time-layout />
-           <parameters />
-           <categorical-definitions />
-           <conversion-definitions />
-      </data>
- </dwml>

***datum***
***height-units***

***vertical-coordinate***

***vertical-coordinate***

**?**

**?**

**?**

- more follows = **...**
- zero or one = **?**
- zero or more = *****
- one or more = **+**
- choose one = **{ }**

## Data Model

***radius-units***

***summarization ?***

***summarization ?***

***area-type***

***latitude***
***longitude***
***summarization ?***

***latitude***
***longitude***
***summarization ?***

***latitude***
***longitude***
***summarization ?***

***latitude***
***longitude***
***summarization ?***

***latitude***
***longitude***
***summarization ?***

- <dwml>
-      <head>
-           <product />
-           <source />
-      </head>
-      <data>
-           **<location />**
-           <time-layout />
-           <parameters />
-           <categorical-definitions />
-           <conversion-definitions />
-      </data>
- </dwml>

- more follows = **...**
- zero or one = **?**
- zero or more = *****
- one or more = **+**
- choose one = **{ }**

## Data Model

- <dwml>
-      <head>
-           <product />
-           <source />
-      </head>
-      <data>
-           <location />
-           **<time-layout />**
-           <parameters />
-           <categorical-definitions />
-           <conversion-definitions />
-      </data>
- </dwml>

***time-coordinate***
***summarization***

***period-name***

**+**

*****

- more follows = **...**
- zero or one = **?**
- zero or more = *****
- one or more = **+**
- choose one = **{ }**

- _[Example](file:///time.txt)_

## Data Model

- <dwml>
-      <head>
-           <product />
-           <source />
-      </head>
-      <data>
-           <location />
-           <time-layout />
-           **<parameters />**
-           <categorical-definitions />
-           <conversion-definitions />
-      </data>
- </dwml>

- more follows = **...**
- zero or one = **?**
- zero or more = *****
- one or more = **+**
- choose one = **{ }**

**applicable-location**

## Data Model

- <dwml>
-      <head>
-           <product />
-           <source />
-      </head>
-      <data>
-           <location />
-           <time-layout />
-           **<parameters />**
-           <categorical-definitions />
-           <conversion-definitions />
-      </data>
- </dwml>

***type***
***units***
***time-layout***
***categorical-table***** ?**
***conversion-table*** **?**

***type***
***units***
***time-layout***
***categorical-table*** **?**
***conversion-table*** **?**

*****

- more follows = **...**
- zero or one = **?**
- zero or more = *****
- one or more = **+**
- choose one = **{ }**

- _[Example](file:///icon_link.txt)_

**...**

**?**

## Data Model

- <dwml>
-      <head>
-           <product />
-           <source />
-      </head>
-      <data>
-           <location />
-           <time-layout />
-           <parameters />
-           **<categorical-definitions />**
-           <conversion-definitions />
-      </data>
- </dwml>

***units***

***category***

**+**

- more follows = **...**
- zero or one = **?**
- zero or more = *****
- one or more = **+**
- choose one = **{ }**

- _[Example](file:///categorical.txt)_

## Data Model

- <dwml>
-      <head>
-           <product />
-           <source />
-      </head>
-      <data>
-           <location />
-           <time-layout />
-           <parameters />
-           <categorical-definitions />
-           **<conversion-definitions />**
-      </data>
- </dwml>

- more follows = **...**
- zero or one = **?**
- zero or more = *****
- one or more = **+**
- choose one = **{ }**

- _[Example](file:///conversion.txt)_

## Data Model

- <dwml>
-      <head>
-           <product />
-           <source />
-      </head>
-      <data>
-           <location />
-           <time-layout />
-           **<parameters />**
-           <categorical-definitions />
-           <conversion-definitions />
-      </data>
- </dwml>

- more follows = **...**
- zero or one = **?**
- zero or more = *****
- one or more = **+**
- choose one = **{ }**

- _[Example](file:///temperature.txt)_

- NOTE:  This structure applies to precipitation, probability-of-precipitation, wind-speed, direction, and humidity

**applicable-location**

## Data Model

- <dwml>
-      <head>
-           <product />
-           <source />
-      </head>
-      <data>
-           <location />
-           <time-layout />
-           **<parameters />**
-           <categorical-definitions />
-           <conversion-definitions />
-      </data>
- </dwml>

- more follows = **...**
- zero or one = **?**
- zero or more = *****
- one or more = **+**
- choose one = **{ }**

- _[Example](file:///cloud_amount.txt)_

**applicable-location**

## Data Model

- <dwml>
-      <head>
-           <product />
-           <source />
-      </head>
-      <data>
-           <location />
-           <time-layout />
-           **<parameters />**
-           <categorical-definitions />
-           <conversion-definitions />
-      </data>
- </dwml>

***coverage *****?**
***intensity *****?**
**additive ?**
**qualifier ?**
**weather-type ?**

***units***

**+**

***time-layout***
***categorical-table***** ?**
***conversion-table***** ?**

******* **(max of 5)

- more follows = **...**
- zero or one = **?**
- zero or more = *****
- one or more = **+**
- choose one = **{ }**

- _[Example](file:///weather.txt)_

**applicable-location**

## Data Model

- <dwml>
-      <head>
-           <product />
-           <source />
-      </head>
-      <data>
-           <location />
-           <time-layout />
-           **<parameters />**
-           <categorical-definitions />
-           <conversion-definitions />
-      </data>
- </dwml>

- more follows = **...**
- zero or one = **?**
- zero or more = *****
- one or more = **+**
- choose one = **{ }**

- _[Example](file:///waves.txt)_

**?**

**applicable-location**

## Data Model

- <dwml>
-      <head>
-           <product />
-           <source />
-      </head>
-      <data>
-           <location />
-           <time-layout />
-           **<parameters />**
-           <categorical-definitions />
-           <conversion-definitions />
-      </data>
- </dwml>

- more follows = **...**
- zero or one = **?**
- zero or more = *****
- one or more = **+**
- choose one = **{ }**

- _[Example](file:///seas.txt)_

***upper-range***
***lower-range***
***period***
***steepness***

***type***
***units***
***categorical-table***** ?**
***conversion-table***** ?**

***time-layout***

*****

***upper-range***
***lower-range***
***period***
***steepness***

**+**

**?**

**?**

**applicable-location**

## MDL XML Products

- Forecast at a Glance Product
- Provides high and low temperature, sky cover and a weather icon
- DWML Sample (7K)

## MDL XML Products

- Tabular Forecast Product
- Provides weather elements over a specified time range at the highest temporal resolution of each weather element
- DWML Sample (9 K)

## DWML References

- _[MDL XML Development Page](http://www.nws.noaa.gov/mdl/XML/xml_development.htm)_
- Draft MDL NDFD XML Requirements
- Draft Digital Weather Markup Language Specification
- Digital Weather Markup Language Specification Review slides
- _[NDFD Development Web Site](http://onestop.noaa3.awips.noaa.gov/ndfd/index.html)_
- _[NWS Instruction 10-506](http://www.nws.noaa.gov/ost/ifps_sst/10-506.pdf)_
- _[NWS Instruction 10-503](http://www.nws.noaa.gov/directives/010/pd01005003a.pdf)_