NDFDgen - Weather Forecast with Specific Parameters

This section provides a tutorial example on obtaining weather forecast with a list of specific weather parameters.

In the previous sections, we used the "glance" product type to obtain weather forecast with primary weather parameters. In this tutorial, we are going to use "time-series" product type to obtain weather forecast with specific weather parameters.

Here is the request message of NDFDgen to obtain a 3-day weather forecast data for the location at latitude of 35.4 and longitude of -97.6, Oklahoma City in Oklahoma state in US. The request asks the server to return weather forecast in 3 parameters: maxt - Maximum temperature, mint - Minimum temperature and sky - Sky condition.

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
 xmlns:ndf="http://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl">
 <soapenv:Header/>
 <soapenv:Body>
  <ndf:NDFDgen 
   soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
   <latitude xsi:type="xsd:decimal">35.4</latitude>
   <longitude xsi:type="xsd:decimal">-97.6</longitude>
   <product xsi:type="dwml:productType" 
    xmlns:dwml="http://graphical.weather.gov/xml/DWMLgen/schema/DWML.xsd">
    glance</product>
   <startTime xsi:type="xsd:dateTime">2020-10-10T00:00:00</startTime>
   <endTime xsi:type="xsd:dateTime">2020-10-13T00:00:00</endTime>
   <Unit xsi:type="dwml:unitType"  
    xmlns:dwml="http://graphical.weather.gov/xml/DWMLgen/schema/DWML.xsd">
    m</Unit>
   <weatherParameters xsi:type="dwml:weatherParametersType" 
    xmlns:dwml="http://graphical.weather.gov/xml/DWMLgen/schema/DWML.xsd">
    <maxt xsi:type="xsd:boolean">true</maxt>
    <mint xsi:type="xsd:boolean">true</mint>
    <sky xsi:type="xsd:boolean">true</sky>
   </weatherParameters>
  </ndf:NDFDgen>
 </soapenv:Body>
</soapenv:Envelope>

Here is the response message:

<SOAP-ENV:Envelope 
 SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
 xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
   <SOAP-ENV:Body>
    <ns1:NDFDgenResponse 
     xmlns:ns1="http://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl">
   <dwmlOut xsi:type="xsd:string"><![CDATA[<?xml version="1.0"?>
<dwml version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xsi:noNamespaceSchemaLocation=
 "http://www.nws.noaa.gov/forecasts/xml/DWMLgen/schema/DWML.xsd">
  <head>
  <product srsName="WGS 1984" concise-name="glance" 
   operational-mode="official">
  <title>NOAA's National Weather Service Forecast at a Glance</title>
  <field>meteorological</field>
  <category>forecast</category>
  <creation-date refresh-frequency="PT1H">2020-10-10T01:16:42Z
  </creation-date>
  </product>
  <source>
  <more-information>http://www.nws.noaa.gov/forecasts/xml/
  </more-information>
  <production-center>Meteorological Development Laboratory
   <sub-center>Product Generation Branch</sub-center></production-center>
  <disclaimer>http://www.nws.noaa.gov/disclaimer.html</disclaimer>
  <credit>http://www.weather.gov/</credit>
  <credit-logo>http://www.weather.gov/images/xml_logo.gif</credit-logo>
  <feedback>http://www.weather.gov/feedback.php</feedback>
  </source>
  </head>
  <data>
  <location>
  <location-key>point1</location-key>
  <point latitude="35.40" longitude="-97.60"/>
  </location>
  <moreWeatherInformation applicable-location="point1">
   http://forecast.weather.gov/MapClick.php?textField1=35.40&textField2=-97.60
  </moreWeatherInformation>
  <time-layout time-coordinate="local" summarization="none">
  <layout-key>k-p24h-n3-1</layout-key>
  <start-valid-time period-name="Saturday">2020-10-10T08:00:00-05:00
  </start-valid-time>
  <end-valid-time>2020-10-11T20:00:00-05:00</end-valid-time>
  <start-valid-time period-name="Sunday">2020-10-11T08:00:00-05:00
  </start-valid-time>
  <end-valid-time>2020-10-12T20:00:00-05:00</end-valid-time>
  <start-valid-time period-name="Monday">2020-10-12T08:00:00-05:00
  </start-valid-time>
  <end-valid-time>2020-10-13T20:00:00-05:00</end-valid-time>
  </time-layout>
  ...
  <parameters applicable-location="point1">
  <temperature type="maximum" units="Celsius" time-layout="k-p24h-n3-1">
    <name>Daily Maximum Temperature</name>
    <value>33</value>
    <value>31</value>
    <value>30</value>
  </temperature>
  <temperature type="minimum" units="Celsius" time-layout="k-p24h-n4-2">
    <name>Daily Minimum Temperature</name>
    <value>23</value>
    <value>22</value>
    <value>19</value>
    <value>20</value>
  </temperature>
  <cloud-amount type="total" units="percent" time-layout="k-p6h-n13-3">
    <name>Cloud Cover Amount</name>
    <value>50</value>
    <value>26</value>
    <value>31</value>
    <value>52</value>
    <value>54</value>
    <value>58</value>
    <value>50</value>
    <value>53</value>
    <value>50</value>
    <value>50</value>
    <value>50</value>
    <value>30</value>
    <value>26</value>
  </cloud-amount>
  <weather time-layout="k-p6h-n13-3">
    <name>Weather Type, Coverage, and Intensity</name>
    <weather-conditions>
    <value coverage="chance" intensity="none" 
     weather-type="thunderstorms" qualifier="none">
    <visibility xsi:nil="true"/>
    </value>
    <value coverage="chance" intensity="light" 
     additive="and" weather-type="rain showers" qualifier="none">
    <visibility xsi:nil="true"/>
    </value>
    </weather-conditions>
    ...
  </weather>
  <conditions-icon type="forecast-NWS" time-layout="k-p6h-n13-3">
    <name>Conditions Icons</name>
    <icon-link>http://forecast.weather.gov/images/wtf/sct.jpg</icon-link>
    ...
  </conditions-icon>
  <hazards time-layout="k-p1h-n23-4">
    <name>Watches, Warnings, and Advisories</name>
    <hazard-conditions/>
    ...
  </hazards>
  </parameters>
  </data>
</dwml>]]></dwmlOut>
  </ns1:NDFDgenResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Table of Contents

 About This Book

 Python SOAP Client: Zeep

 SoapUI - Web Service Testing Tool

 SOAP Web Service and SoapUI

 REST Web Service and SoapUI

 Mock Web Services - herongyang.com/Service

 "SoapResponder" and Web Service Test Tool

 "Calculator" for 4 Integer Operations

 DataFlex Web Service for Country Information

 LatLonListCityNames - Return Latitudes and Longitudes of US Cities

 LatLonListZipCode - Return Latitudes and Longitudes of US Zip Code

 TempConvert Web Service for Temperature Conversion

 NDFDgenByDay - US Weather Forecast by Day

NDFDgen - US-Weather Forecast for a Single Location

 NDFDgen - Usage Description

 NDFDgen - Request Message Sample

 NDFDgen - Response Message Sample

NDFDgen - Weather Forecast with Specific Parameters

 Currency Exchange Rate

 Bitcoin Blockchain Data API (or Explorer)

 flickr.interestingness.getList - Get Interesting Photos

 UUID/GUID Generator

 NumberToWords - Convert Number in Digits to Words

 TitleCaseWordsWithToken - Words to Title Case Format

 "PUG SOAP" Web Service for PubChem Database

 RSC - ChemSpider APIs

 Discontinued: Currency Converter by kowabunga.net

 Discontinued: GetCountries - Get All Countries and Territories

 Discontinued: GetCurrencies - Get Currencies from All Countries

 Discontinued: GetGMTbyCountry - Get GMT Information of a Given Country

 Discontinued: GetISD - Get ISD Phone Code of a Given Country

 Discontinued: GetCitiesByCountry - Get Cities by Country

 Discontinued: GetInfoByState - Get ZIP Codes of a Given US State

 Discontinued: GetAirportInformationByCountry - Get Airport Code by Country

 Discontinued: GetGeoIP - Get Country by IP Address

 Discontinued: ConvertTemp - Convert Temperature Unit

 Discontinued: ChangeLengthUnit - Convert Length Unit

 Discontinued: ConvertWeight - Convert Weight Unit

 Discontinued: ChangeAreaUnit - Convert Area Unit

 Discontinued: Code39 - Generate Bar Code Images in Code 39 Format

 Discontinued: GenerateBarCode - Generate Bar Code Images

 Discontinued: GetMortgagePayment - Calculate Mortgage Payment

 Discontinued: ConversionRate - Get Currency Exchange Rate

 Discontinued: GetQuote - Get Stock Quote

 Discontinued: GetSunSetRiseTime - Get Sunrise and Sunset Time

 Discontinued: GetWeatherByZipCode - Get Weather by ZIP Code in US

 Discontinued: getTime - Get the Current Time

 Discontinued: questionSearch - Search Yahoo! Questions and Answers

 Discontinued: Hotwire - Get Travel Ticker Deals

 Archived Tutorials

 References

 Full Version in PDF/EPUB