Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Strawman design for THREDDS Dataset Choice

Sep 3, 2002

1. Connection to THREDDS Catalog Datasets

A THREDDS dataset choice (threddsDC) will be an optional metadata record attached to a Dataset in a THREDDS catalog. So the threddsDC will be in reference to a specific dataset, which has a service, and a URL.

Latest version of THREDDS catalogs: Example, DTD, specification.

2. Data selection

Our goal is to allow the threddsDC to describe the data choices within a dataset in a reasonably uniform way, so that generic selector widgets can be made.

3. Data retrieval

The threddsDC contains information in the access attributes that allows the application to efficiently retrieve the selected data. Exactly how this is used is dependent on the type of service. The common case will probably be to concatenate the accessPath to the service URL, eg

http://thredds.unidata.ucar.edu/dataServer?stn=ABC;param=DPA;time=latest

 

4. Example: independent choices


In this example, a datasetChoice element has one or more choices elements. A choices element has a list of choice elements, which may have nested choices. The idea is that the user must select one choice from each choices list. The simplest case is when the choices are all indepenent, then the choices all appear as children of the top element. Then the user should be presented the option of selecting among the stations, fields, and times

<?xml version="1.0" encoding="UTF-8"?>
<datasetChoice xmlns="http://www.unidata.ucar.edu/schemas/thredds/datasetChoice"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.unidata.ucar.edu/schemas/thredds/datasetChoice P:/projects/thredds/xml/datasetChoice.xsd">
<choices name="stations">
<station name="ANCHORAGE/Bethel AK" accessPath="stn=ABC">
<location lat="60.78" lon="-161.87"/>
</station>
<station name="ABERDEEN/Aberdeen SD" accessPath="stn=ABR">
<location lat="45.45" lon="-98.4"/>
</station>
<station name="ALBUQUERQUE/Albuquerque NM" accessPath="stn=ABX">
<location lat="35.13" lon="-106.82"/>
</station>
<station name="JUNEAU/Sitka AK" accessPath="stn=ACG">
<location lat="56.85" lon="-135.52"/>
</station>
</choices>

<choices name="fields">
<choice name="hourly digital precipitation array" accessPath="param=DPA">
<description>hourly digital precipitation array 81/dpa</description>
</choice>
<choice name=".5 reflectivity .54nm res" accessPath="param=N0R">
<description>.5 reflectivity .54nm res 16 levels id 19/r</description>
</choice>
<choice name=".5 storm rel. velocity" accessPath="param=N0S">
<description>.5 storm rel. velocity .54nm res 16 lvls id 56/srm</description>
</choice>
</choices>

<choices name="times">
<choice name="Latest" accessPath="time=latest"/>
<choice name="Last hour" accessPath="time=1hour"/>
<choice name="Last 6 hours" accessPath="time=6hour"/>
<choice name="Last 12 hours" accessPath="time=12hour"/>
<choice name="Last day" accessPath="time=1day"/>
<choice name="Last 2 days" accessPath="time=2day"/>
<choice name="Last 3 days" accessPath="time=3day"/>
<choice name="All" accessPath="time=all"/>
</choices>

</datasetChoice>


5. Example: dependent choices (nested choices element)

In this example, suppose that the fields depended on which station was chosen. Then we use nested choices. So now the user should be presented the option of selecting among the stations, and after selecting the station, given a list of fields to select. The times can be selected independently.
<?xml version="1.0" encoding="UTF-8"?>
<datasetChoice xmlns="http://www.unidata.ucar.edu/schemas/thredds/datasetChoice"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.unidata.ucar.edu/schemas/thredds/datasetChoice P:/projects/thredds/xml/datasetChoice.xsd">
<choices name="stations">
<station name="ANCHORAGE/Bethel AK" accessPath="stn=ABC">

<choices name="fields">
<choice name="hourly digital precipitation array" accessPath="param=DPA">
<description>hourly digital precipitation array 81/dpa</description>
</choice>
<choice name=".5 reflectivity .54nm res" accessPath="param=N0R">
<description>.5 reflectivity .54nm res 16 levels id 19/r</description>
</choice>
<choice name=".5 storm rel. velocity" accessPath="param=N0S">
<description>.5 storm rel. velocity .54nm res 16 lvls id 56/srm</description>
</choice>
</choices>

<location lat="60.78" lon="-161.87"/>

</station>
<station name="ABERDEEN/Aberdeen SD" accessPath="stn=ABR">
<choices name="fields">
<choice name="half-hourly digital precipitation array" accessPath="param=DPA">
<description>half-hourly digital precipitation array 81/dpa</description>
</choice>
<choice name=".15 reflectivity .54nm res" accessPath="param=N0R">
<description>.15 reflectivity .54nm res 16 levels id 19/r</description>
</choice>
<choice name=".15 storm rel. velocity" accessPath="param=N0S">
<description>.15 storm rel. velocity .54nm res 16 lvls id 56/srm</description>
</choice>
</choices>

<location lat="45.45" lon="-98.4"/>
</station> </choices>
<choices name="times">
<choice name="Latest" accessPath="time=latest"/>
<choice name="Last hour" accessPath="time=1hour"/>
<choice name="Last 6 hours" accessPath="time=6hour"/>
<choice name="Last 12 hours" accessPath="time=12hour"/>
<choice name="Last day" accessPath="time=1day"/>
<choice name="Last 2 days" accessPath="time=2day"/>
<choice name="Last 3 days" accessPath="time=3day"/>
<choice name="All" accessPath="time=all"/>
</choices>
</datasetChoice>

Preliminary schema for Dataset Choice

http://www.unidata.ucar.edu/projects/thredds/xml/datasetChoice.xsd

Examples:

http://www.unidata.ucar.edu/projects/thredds/xml/DatasetChoice.xml

http://www.unidata.ucar.edu/projects/thredds/xml/DatasetChoiceNested.xml

 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Office of Programs University Corporation for Atmospheric Research (UCAR)   Unidata is a member of the UCAR Office of Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690