<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.opendap.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=TomSgouros</id>
	<title>OPeNDAP Documentation - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.opendap.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=TomSgouros"/>
	<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php/Special:Contributions/TomSgouros"/>
	<updated>2026-04-21T12:12:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>https://docs.opendap.org/index.php?title=FreeForm&amp;diff=4953</id>
		<title>FreeForm</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=FreeForm&amp;diff=4953"/>
		<updated>2009-10-07T00:03:12Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Using FreeForm ND with OPeNDAP, a researcher can easily make his or her data&lt;br /&gt;
available to the wider community of OPeNDAP users without having to&lt;br /&gt;
convert that data into another data file format.  This document&lt;br /&gt;
presents the FreeForm ND software, and shows how to use it with the OPeNDAP server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Tasks Illustrated in this Guide==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For a quick start to getting, installing, and using the FreeForm ND&lt;br /&gt;
software, see the list below of tasks described in this document.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Quick start. ([http://docs.opendap.org/index.php/Wiki_Testing/dquick&amp;lt;cite&amp;gt;here&amp;lt;/cite&amp;gt;])&lt;br /&gt;
*Getting and installing the FreeForm ND software.  ([http://docs.opendap.org/index.php/Wiki_Testing/dintro#Installing_the_OPeNDAP_FreeForm_ND_Data_Handler&amp;lt;cite&amp;gt;here&amp;lt;/cite&amp;gt;])&lt;br /&gt;
*Serving tabular data. ([http://docs.opendap.org/index.php/Wiki_Testing/tblfmt&amp;lt;cite&amp;gt;here&amp;lt;/cite&amp;gt;])&lt;br /&gt;
*Array tabular data. ([http://docs.opendap.org/index.php/Wiki_Testing/arrayfmt&amp;lt;cite&amp;gt;here&amp;lt;/cite&amp;gt;])&lt;br /&gt;
*Dealing with data file headers ([http://docs.opendap.org/index.php/Wiki_Testing/hdrfmts&amp;lt;cite&amp;gt;here&amp;lt;/cite&amp;gt;])&lt;br /&gt;
&lt;br /&gt;
==Who is this Guide for?==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This guide is for people who wish to use FreeForm ND to serve scientific&lt;br /&gt;
datasets using the OPeNDAP software.  Scientists who wish to share their&lt;br /&gt;
data with colleagues may also find this a useful system, since it is a&lt;br /&gt;
relatively simple matter to set up a server that can allow remote&lt;br /&gt;
access to your data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This documentation assumes that the readers are familiar with&lt;br /&gt;
computers and the internet, but are not necessarily programmers. More&lt;br /&gt;
than a passing familiarity with different data file formats will be&lt;br /&gt;
useful, as will an understanding of elementary internet concepts, such&lt;br /&gt;
as URLs and http.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This manual also assumes some familiarity with the OPeNDAP software.  If&lt;br /&gt;
you are starting from scratch, knowing nothing at all about OPeNDAP, we&lt;br /&gt;
strongly encourage you to read the [http://docs.opendap.org/index.php/UserGuide&amp;lt;cite&amp;gt;The OPeNDAP User Guide&amp;lt;/cite&amp;gt;] before reading further&lt;br /&gt;
here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Organization of this Document==&lt;br /&gt;
&lt;br /&gt;
This book contains both introductory and reference material. There is&lt;br /&gt;
also a description of the installation procedure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/dintro | Introduction]] : contains an overview of the OPeNDAP FreeForm ND Data Handler software, including how to get it and install it.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/dquick | Quick Start]] : provides a brief introduction to writing format descriptions and using the OPeNDAP FreeForm ND Data Handler.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/tblfmt | Table Format]] :provides detailed information about writing format descriptions to facilitate access to data in tabular formats.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/arrayfmt | Array Format]] : provides detailed information about writing format descriptions to facilitate access to data in non-tabular (array) formats.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/hdrfmts | Header Formats]] : tells you how to work with header formats.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/ff-server | FreeForm Server]] : describes the operation of the OPeNDAP FreeForm ND Data Handler, with tips for writing format files.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/convs | FreeForm Conventions]] : presents FreeForm ND file name conventions, the search rules for locating format files, and standard command line arguments for FreeForm ND programs.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/fmtconv | Format Conversion]] : shows you how to use the FreeForm ND program &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; to convert data from one format to another and also how to read the data in a binary file.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/datachk | Data Check]] : discusses the FreeForm ND program &amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt;, which you can use to check data distribution and quality.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A position box is often used in this book to indicate column position&lt;br /&gt;
of field values in data files. It is shown at the beginning of a data&lt;br /&gt;
list in the documentation, but does not appear in the data file&lt;br /&gt;
itself.  It looks something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1         2         3         4         5         6&lt;br /&gt;
012345678901234567890123456789012345678901234567890&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Wiki_Testing/datachk&amp;diff=4952</id>
		<title>Wiki Testing/datachk</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Wiki_Testing/datachk&amp;diff=4952"/>
		<updated>2009-10-07T00:01:48Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[FreeForm|return to FreeForm]]&lt;br /&gt;
&lt;br /&gt;
=Data Checking=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The FreeForm ND-based utility program &amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt; creates variable&lt;br /&gt;
summary files, lists of maximum and minimum values, and summaries of&lt;br /&gt;
processing activity. You can use this information to check data&lt;br /&gt;
quality and to examine the distribution of the data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Generating the Summaries==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A variable summary file (or list file), which contains histogram&lt;br /&gt;
information showing the variable&#039;s distribution in the data file, is&lt;br /&gt;
created for each variable (or designated variables) in the specified&lt;br /&gt;
data file. You can optionally specify an output file in which a&lt;br /&gt;
summary of processing activity is saved.&lt;br /&gt;
&lt;br /&gt;
Variable summaries (list files) can be helpful for performing quality&lt;br /&gt;
control checks of data. For example, you could run &amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt; on&lt;br /&gt;
an ASCII file, convert the file to binary, and then run &amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt;&lt;br /&gt;
on the binary file. The output from &amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt; should be the same&lt;br /&gt;
for both the ASCII and binary files. You can also use variable&lt;br /&gt;
summaries to look at the data distribution in a data set before&lt;br /&gt;
extracting data.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt; command has the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    checkvar input_file [-f format_file] [-if input_format_file] [-of output_format_file]&lt;br /&gt;
&lt;br /&gt;
    [-ft &amp;quot;title&amp;quot;] [-ift &amp;quot;title&amp;quot;] [-oft &amp;quot;title&amp;quot;] [-b local_buffer_size] [-c count] [-v var_file] [-q query_file]  [-p precision] [-m maxbins] [-md missing_data_flag] [-mm] [-o processing_summary]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt; program needs to find only an input format&lt;br /&gt;
description. Output format descriptions will be ignored. If conversion&lt;br /&gt;
variables are included in input or output formats, no conversion is&lt;br /&gt;
performed when you run &amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt;, since it ignores output&lt;br /&gt;
formats.&lt;br /&gt;
&lt;br /&gt;
For descriptions of the standard arguments (first eleven arguments&lt;br /&gt;
above), see [[Wiki_Testing/convs|Conventions]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; -p precision:&lt;br /&gt;
Option flag followed by the number of decimal places. The number&lt;br /&gt;
represents the power of 10 that data is multiplied by prior to&lt;br /&gt;
binning. A value of 0 bins on one&#039;s, 1 on tenth&#039;s, and so on. This&lt;br /&gt;
option allows an adjustment of the resolution of the &amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt;&lt;br /&gt;
output.&lt;br /&gt;
The default is 0; maximum is 5.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;NOTE:If you use the &amp;lt;font color=&#039;green&#039;&amp;gt;-p&amp;lt;/font&amp;gt; option on the command line, the precision set in the relevant format file is overridden. The precision in&lt;br /&gt;
the format file serves as the default. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; -m maxbins:&lt;br /&gt;
Option flag followed by the approximate maximum number of bins&lt;br /&gt;
desired in &amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt; output. The &amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt; program keeps track of the number of bins filled as the data is processed. The&lt;br /&gt;
smaller the number of bins, the faster &amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt; runs. By&lt;br /&gt;
keeping the number of bins small, you can check the gross aspects of&lt;br /&gt;
data distribution rather than the details. The number of bins is adjusted dynamically as &amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt; runs depending on the distribution of data in the input file. If the number of filled bins becomes &amp;gt; 1.5 * maxbins, the width of the bins is doubled to keep the total number near the desired maximum. The default is 100 bins; minimum is 6. Must be &amp;lt; 10,000.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;NOTE: The precision (-p) and maxbins (-m) options have no effect on&lt;br /&gt;
character variables. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; -md missing_data_flag:&lt;br /&gt;
Option flag followed by a flag value that &amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt; should&lt;br /&gt;
ignore across all variables in creating histogram data. Missing data flags are used in a data file to indicate missing or meaningless data. If you want &amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt; to ignore more than one value, use the query (&amp;lt;font color=&#039;green&#039;&amp;gt;-q&amp;lt;/font&amp;gt;) option in conjunction with the variable file (&amp;lt;font color=&#039;green&#039;&amp;gt;-v&amp;lt;/font&amp;gt;) option.&lt;br /&gt;
&lt;br /&gt;
; -mm :&lt;br /&gt;
Option flag indicating that only the maximum and minimum values of variables are calculated and displayed in the processing summary. Variable summary files are not created.&lt;br /&gt;
&lt;br /&gt;
; -o &#039;&#039;processing_summary&#039;&#039; :&lt;br /&gt;
Option flag followed by the name of the file in which summary information displayed during processing is stored.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will use &amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt; with a precision of 3 to create a&lt;br /&gt;
processing summary file and summary files for the two variables&lt;br /&gt;
latitude and longitude in the file &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dat&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here is &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dat&amp;lt;/font&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-47.303545 -176.161101&lt;br /&gt;
-0.928001    0.777265&lt;br /&gt;
-28.286662   35.591879&lt;br /&gt;
12.588231  149.408117&lt;br /&gt;
-83.223548   55.319598&lt;br /&gt;
54.118314 -136.940570&lt;br /&gt;
38.818812   91.411330&lt;br /&gt;
-34.577065   30.172129&lt;br /&gt;
27.331551 -155.233735&lt;br /&gt;
11.624981 -113.660611&lt;br /&gt;
77.652742  -79.177679&lt;br /&gt;
77.883119  -77.505502&lt;br /&gt;
-65.864879  -55.441896&lt;br /&gt;
-63.211962  134.124014&lt;br /&gt;
35.130219 -153.543091&lt;br /&gt;
29.918847  144.804390&lt;br /&gt;
-69.273601   38.875778&lt;br /&gt;
-63.002874   36.356024&lt;br /&gt;
35.086084  -21.643402&lt;br /&gt;
-12.966961   62.152266&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create the summary files, enter the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
checkvar latlon.dat -p 3 -o latlon.sum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A summary of processing information and the maximum and minimum for&lt;br /&gt;
each variable are displayed on the screen. The following three files&lt;br /&gt;
are created:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;font color=&#039;green&#039;&amp;gt;latlon.sum&amp;lt;/font&amp;gt; recaps processing activity, maximums and minimums&lt;br /&gt;
*&amp;lt;font color=&#039;green&#039;&amp;gt;latitude.lst&amp;lt;/font&amp;gt; shows distribution of the latitude values in &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dat&amp;lt;/font&amp;gt;&lt;br /&gt;
*&amp;lt;font color=&#039;green&#039;&amp;gt;longitude.lst&amp;lt;/font&amp;gt; shows distribution of the longitude values in &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dat&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Interpreting the Summaries==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The processing and variable summary files output by &amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt;&lt;br /&gt;
from the example in the previous section are shown and discussed&lt;br /&gt;
below.&lt;br /&gt;
&lt;br /&gt;
===Processing Summary===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you specify an output file on the command line, it stores the&lt;br /&gt;
information that is displayed on the screen during processing. The&lt;br /&gt;
file &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.sum&amp;lt;/font&amp;gt; was specified as the output file in the example&lt;br /&gt;
above.&lt;br /&gt;
&lt;br /&gt;
Here is &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.sum&amp;lt;/font&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Input file : latlon.dat&lt;br /&gt;
Requested precision = 3, Approximate number of sorting bins = 100&lt;br /&gt;
&lt;br /&gt;
Input data format       (latlon.fmt)&lt;br /&gt;
ASCII_input_data       &amp;quot;ASCII format&amp;quot;&lt;br /&gt;
The format contains 2 variables; length is 24.&lt;br /&gt;
&lt;br /&gt;
Output data format       (latlon.fmt)&lt;br /&gt;
binary_output_data       &amp;quot;binary format&amp;quot;&lt;br /&gt;
The format contains 2 variables; length is 16.&lt;br /&gt;
&lt;br /&gt;
Histogram data precision: 3, Number of sorting bins: 20&lt;br /&gt;
latitude: 20 values read&lt;br /&gt;
minimum: -83.223548 found at record  5&lt;br /&gt;
maximum:  77.883119 found at record 12&lt;br /&gt;
Summary file: latitude.lst&lt;br /&gt;
&lt;br /&gt;
Histogram data precision: 3, Number of sorting bins: 20&lt;br /&gt;
longitude: 20 values read&lt;br /&gt;
minimum: -176.161101 found at record 1&lt;br /&gt;
maximum:  149.408117 found at record 4&lt;br /&gt;
Summary file: longitude.lst.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The processing summary file &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.sum&amp;lt;/font&amp;gt; first shows the name of&lt;br /&gt;
the input data file (&amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dat&amp;lt;/font&amp;gt;). If you specified precision and&lt;br /&gt;
a maximum number of bins on the command line, those values are given&lt;br /&gt;
as Requested precision, in this case 3, and Approximate number of&lt;br /&gt;
sorting bins, in this case the default value of 100. If precision is&lt;br /&gt;
not specified, No requested precision is shown.&lt;br /&gt;
&lt;br /&gt;
A summary of each format shows the type of format (in this case, Input&lt;br /&gt;
data format and Output data format) and the name of the format file&lt;br /&gt;
containing the format descriptions (&amp;lt;font color=&#039;green&#039;&amp;gt;latlon.fmt&amp;lt;/font&amp;gt;), whether&lt;br /&gt;
specified on the command line or located through the default search&lt;br /&gt;
sequence. In this case, it was located by&lt;br /&gt;
default. Since &amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt; only needs an input format description,&lt;br /&gt;
it ignores output format descriptions. Next, you see the format&lt;br /&gt;
descriptor as resolved by FreeForm ND (e.g., &amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_input_data&amp;lt;/font&amp;gt;)&lt;br /&gt;
and the format title (e.g., &amp;quot;ASCII format&amp;quot;). Then the number of&lt;br /&gt;
variables in a record and total record length are given; for ASCII,&lt;br /&gt;
record length includes the end-of-line character (1 byte for Unix).&lt;br /&gt;
&lt;br /&gt;
A section for each variable processed by &amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt; indicates the&lt;br /&gt;
histogram precision and actual number of sorting bins. Under some&lt;br /&gt;
circumstances, the precision of values in the histogram file may be&lt;br /&gt;
different than the precision you specified on the command line. The&lt;br /&gt;
default value for precision, if none is specified on the command line,&lt;br /&gt;
is the precision specified in the relevant format description file or&lt;br /&gt;
5, whichever is smaller. The second line shows the name of the&lt;br /&gt;
variable (latitude, longitude) and the number of values in the data&lt;br /&gt;
file for the variable (20 for both latitude and longitude).&lt;br /&gt;
&lt;br /&gt;
The minimum and maximum values for the variable are shown next&lt;br /&gt;
(-83.223548 is the minimum and 77.883119 is the maximum value for&lt;br /&gt;
latitude). The maximum and minimum values are given here with a&lt;br /&gt;
precision of 6, which is the precision specified in the format&lt;br /&gt;
description file. The locations of the maximum and minimum values in&lt;br /&gt;
the input file are indicated. (-83.223548 is the fifth latitude value&lt;br /&gt;
in &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dat&amp;lt;/font&amp;gt; and 77.883119 is the twelfth). Finally, the name&lt;br /&gt;
of the histogram data (or variable summary) file generated for each&lt;br /&gt;
variable is given (&amp;lt;font color=&#039;green&#039;&amp;gt;latitude.lst&amp;lt;/font&amp;gt; and &amp;lt;font color=&#039;green&#039;&amp;gt;longitude.lst&amp;lt;/font&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===Variable Summaries===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The name of each variable summary file (list file) output by&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt; is of the form &amp;lt;font color=&#039;green&#039;&amp;gt;variable.lst&amp;lt;/font&amp;gt; for numeric variables and &amp;lt;font color=&#039;green&#039;&amp;gt;variable.cst&amp;lt;/font&amp;gt; for character variables. The data in *&amp;lt;font color=&#039;green&#039;&amp;gt;.lst&amp;lt;/font&amp;gt;, and *&amp;lt;font color=&#039;green&#039;&amp;gt;.cst&amp;lt;/font&amp;gt; files can be loaded into histogram plot programs for graphical representation. (You must be familiar enough&lt;br /&gt;
with your program of choice to manipulate the data as necessary in order to achieve the desired result.) In Unix, there is no need to abbreviate the base file name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;NOTE: If you use the -v option, the order of variables in var_file has&lt;br /&gt;
no effect on the numbering of base file names of the variable summary files. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The two example variable summary files, &amp;lt;font color=&#039;green&#039;&amp;gt;latitude.lst&amp;lt;/font&amp;gt; and&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;longitude.lst&amp;lt;/font&amp;gt;, are shown next.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| &lt;br /&gt;
|&lt;br /&gt;
{| border=&amp;quot;2&amp;quot;&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;latitude.lst&amp;lt;/font&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
| -83.224  1 &lt;br /&gt;
|-&lt;br /&gt;
| -69.274  1&lt;br /&gt;
|-&lt;br /&gt;
| -65.865  1&lt;br /&gt;
|-&lt;br /&gt;
| -63.212  1&lt;br /&gt;
|-&lt;br /&gt;
| -63.003  1&lt;br /&gt;
|-&lt;br /&gt;
| -47.304  1&lt;br /&gt;
|-&lt;br /&gt;
| -34.578  1&lt;br /&gt;
|-&lt;br /&gt;
| -28.287  1&lt;br /&gt;
|-&lt;br /&gt;
| -12.967  1&lt;br /&gt;
|-&lt;br /&gt;
| -0.929  1&lt;br /&gt;
|-&lt;br /&gt;
| 11.624  1&lt;br /&gt;
|-&lt;br /&gt;
| 12.588  1&lt;br /&gt;
|-&lt;br /&gt;
| 27.331  1&lt;br /&gt;
|-&lt;br /&gt;
| 29.918  1&lt;br /&gt;
|-&lt;br /&gt;
| 35.086  1&lt;br /&gt;
|-&lt;br /&gt;
| 35.130  1&lt;br /&gt;
|-&lt;br /&gt;
| 38.818  1&lt;br /&gt;
|-&lt;br /&gt;
| 54.118  1&lt;br /&gt;
|-&lt;br /&gt;
| 77.652  1&lt;br /&gt;
|-&lt;br /&gt;
| 77.883  1&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
||&lt;br /&gt;
{| border=&amp;quot;2&amp;quot;&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;longitude.lst&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| -176.162  1&lt;br /&gt;
|-&lt;br /&gt;
| -155.234  1&lt;br /&gt;
|-&lt;br /&gt;
| -153.544  1&lt;br /&gt;
|-&lt;br /&gt;
| -136.941  1&lt;br /&gt;
|-&lt;br /&gt;
| -113.661  1&lt;br /&gt;
|-&lt;br /&gt;
| -79.178  1&lt;br /&gt;
|-&lt;br /&gt;
| -77.506  1&lt;br /&gt;
|-&lt;br /&gt;
| -55.442  1&lt;br /&gt;
|-&lt;br /&gt;
| -21.644  1&lt;br /&gt;
|-&lt;br /&gt;
| 0.777  1&lt;br /&gt;
|-&lt;br /&gt;
| 30.172  1&lt;br /&gt;
|-&lt;br /&gt;
| 35.591  1&lt;br /&gt;
|-&lt;br /&gt;
| 36.356  1&lt;br /&gt;
|-&lt;br /&gt;
| 38.875  1&lt;br /&gt;
|-&lt;br /&gt;
| 55.319  1&lt;br /&gt;
|-&lt;br /&gt;
| 62.152  1&lt;br /&gt;
|-&lt;br /&gt;
| 91.411  1&lt;br /&gt;
|-&lt;br /&gt;
| 134.124  1&lt;br /&gt;
|-&lt;br /&gt;
| 144.804  1&lt;br /&gt;
|-&lt;br /&gt;
| 149.408  1&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The variable summary files consist of two columns. The first indicates&lt;br /&gt;
boundary values for data bins and the second gives the number of data&lt;br /&gt;
points in each bin. Because a precision of 3 was specified in the&lt;br /&gt;
example, each boundary value has three decimal places. The boundary&lt;br /&gt;
values are determined dynamically by &amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt; and often do not&lt;br /&gt;
correspond to data values in the input file, even if the&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt; and data file precisions are the same.&lt;br /&gt;
&lt;br /&gt;
The first data bin in &amp;lt;font color=&#039;green&#039;&amp;gt;latitude.lst&amp;lt;/font&amp;gt; contains data points in the&lt;br /&gt;
range -83.224 (inclusive) to -69.274 (exclusive); neither boundary&lt;br /&gt;
number exists in &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dat&amp;lt;/font&amp;gt;. The first bin has one data point,&lt;br /&gt;
-83.223548. The fourth data bin contains latitude values from -63.212&lt;br /&gt;
(inclusive) to -63.003 (exclusive), again with neither boundary value&lt;br /&gt;
occurring in the data file. The data point in the fourth bin is&lt;br /&gt;
-63.211962.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Wiki_Testing/fmtconv&amp;diff=4951</id>
		<title>Wiki Testing/fmtconv</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Wiki_Testing/fmtconv&amp;diff=4951"/>
		<updated>2009-10-06T23:59:45Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[FreeForm|return to FreeForm]]&lt;br /&gt;
&lt;br /&gt;
=Format Conversion=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The FreeForm ND utility program newform lets you convert data from one&lt;br /&gt;
format to another. This allows you to pass data to applications in the&lt;br /&gt;
format they require. You may also want to create binary archives for&lt;br /&gt;
efficient data storage and access. With newform, conversion of ASCII&lt;br /&gt;
data to binary format is straightforward. If you wish to read the data&lt;br /&gt;
in a binary file, you can convert it to ASCII with newform, or use the&lt;br /&gt;
interactive program readfile. You can also convert data from one ASCII&lt;br /&gt;
format to another ASCII format with newform.&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The FreeForm ND-based program &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; is a general tool for changing the format ofa data file. The only required command line argument, if you use FreeForm ND naming conventions, is the name of the input data file.&lt;br /&gt;
The reformatted data is written to standard output (the screen) unless&lt;br /&gt;
you specify an output file. If you reformat to binary, you will&lt;br /&gt;
generally want to store the output in a file.&lt;br /&gt;
&lt;br /&gt;
You must create a format description file (or files) with format&lt;br /&gt;
descriptions for the data files involved in a conversion before you&lt;br /&gt;
can use &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; to perform the conversion. The standard&lt;br /&gt;
extension for format description files is &amp;lt;font color=&#039;green&#039;&amp;gt;.fmt&amp;lt;/font&amp;gt;. If you do not&lt;br /&gt;
explicitly specify the format description file on the command line,&lt;br /&gt;
which is unnecessary if you use FreeForm ND naming conventions,&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; follows the FreeForm ND search sequence to find a format&lt;br /&gt;
file.&lt;br /&gt;
&lt;br /&gt;
For details about FreeForm ND naming conventions and the search&lt;br /&gt;
sequence, see [[Wiki_Testing/convs|Conventions]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; command has the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; &#039;&#039;input_file&#039;&#039; [-f format_file] [-if-if input_format_file] [-of output_format_file]&lt;br /&gt;
&lt;br /&gt;
[-ft &amp;quot;title&amp;quot;] [-ift &amp;quot;title&amp;quot;] [-oft &amp;quot;title&amp;quot;] [-b local_buffer_size] [-c count] [-v var_file] [-q query_file] [-o output_file]&lt;br /&gt;
&lt;br /&gt;
For descriptions of the arguments, see [[Wiki_Testing/convs|Conventions]].&lt;br /&gt;
&lt;br /&gt;
If you want to convert an ASCII file to a binary file, and you follow&lt;br /&gt;
the FreeForm ND naming conventions, the command is simply:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
newform datafile.dat -o datafile.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where datafile is the file name of your choosing.&lt;br /&gt;
&lt;br /&gt;
If data files and format files are not in the current directory or in&lt;br /&gt;
the same directory, you can specify the appropriate path name.  For&lt;br /&gt;
example, if the input data file is not in the current directory, you&lt;br /&gt;
can enter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
newform /path/datafile.dat -o datafile.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To read the data in the resulting binary file, you can reformat back&lt;br /&gt;
to ASCII using the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
newform datafile.bin -o datafile.ext&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or you can use the &amp;lt;font color=&#039;green&#039;&amp;gt;readfile&amp;lt;/font&amp;gt; program, described in&lt;br /&gt;
[[Wiki_Testing/fmtconv|Format Conversion]].&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;font color=&#039;green&#039;&amp;gt;chkform&amp;lt;/font&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Though &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; is useful for checking data formats, it is&lt;br /&gt;
limited by requiring a format file to specify an output format.  Since&lt;br /&gt;
some OPeNDAP FreeForm ND applications (such as the OPeNDAP FreeForm handler) do not&lt;br /&gt;
require an output format, this is extra work for the dataset&lt;br /&gt;
administrator.  For these occasions, OPeNDAP FreeForm ND provides a simpler&lt;br /&gt;
format-checking program, called &amp;lt;font color=&#039;green&#039;&amp;gt;chkform&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;font color=&#039;green&#039;&amp;gt;chkform&amp;lt;/font&amp;gt; program attempts to read an ASCII file, using the&lt;br /&gt;
specified input format.  If the format allows the file to be read&lt;br /&gt;
&lt;br /&gt;
properly, &amp;lt;font color=&#039;green&#039;&amp;gt;chkform&amp;lt;/font&amp;gt; says so.  However, if the input format&lt;br /&gt;
contains errors, or does not accurately reflect the contents of the&lt;br /&gt;
given data file, &amp;lt;font color=&#039;green&#039;&amp;gt;chkform&amp;lt;/font&amp;gt; delivers an error message, and attempts&lt;br /&gt;
to provide a rudimentary diagnosis of the problem.&lt;br /&gt;
&lt;br /&gt;
You must create a format description file (or files) with format&lt;br /&gt;
descriptions for the data files involved before you can use&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;chkform&amp;lt;/font&amp;gt; to chack the format.  As with &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt;, the&lt;br /&gt;
standard extension for format description files is &amp;lt;font color=&#039;green&#039;&amp;gt;.fmt&amp;lt;/font&amp;gt;. If you&lt;br /&gt;
do not explicitly specify the format description file on the command&lt;br /&gt;
line (unnecessary if you use FreeForm ND naming conventions)&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;chkform&amp;lt;/font&amp;gt; follows the FreeForm ND search sequence to find a format&lt;br /&gt;
file.&lt;br /&gt;
&lt;br /&gt;
For details about FreeForm ND naming conventions and the search&lt;br /&gt;
sequence, see [[Wiki_Testing/convs|Conventions]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;font color=&#039;green&#039;&amp;gt;chkform&amp;lt;/font&amp;gt; command has the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chkform input_file [-if input_format_file] [-ift &amp;quot;title&amp;quot;] [-b local_buffer_size]&lt;br /&gt;
[-c count] [-q query_file] [-ol log_file] [-el error_log_file] [-ep]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Most of the arguments are described in&lt;br /&gt;
[[Wiki_Testing/convs|Conventions]].  The following are specific to&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;chkform&amp;lt;/font&amp;gt;:&lt;br /&gt;
 &lt;br /&gt;
; -ol log_file: Puts a log of processing information into the specified &#039;&#039;log_file&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
; -el error_log_file: Creates an error log file that contains whatever error messages are issued by &amp;lt;font color=&#039;green&#039;&amp;gt;chkform&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
; -ep : In normal operation, &amp;lt;font color=&#039;green&#039;&amp;gt;chkform&amp;lt;/font&amp;gt; asks you to manually acknowledge each important error by typing something on the keyboard.  If you use this option, &amp;lt;font color=&#039;green&#039;&amp;gt;chkform&amp;lt;/font&amp;gt; will not stop to prompt, but will continue processing until either the file is procesed, or there is an error preventing more processing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
As in the above examples, if you have an ASCII data file called&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;datafile.dat&amp;lt;/font&amp;gt;, supposedly described in a format file called&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;datafile.fmt&amp;lt;/font&amp;gt;, you can use &amp;lt;font color=&#039;green&#039;&amp;gt;chkform&amp;lt;/font&amp;gt; like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chkform datafile.dat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If processing is successful, you will see something like the&lt;br /&gt;
following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Welcome to Chkform release 4.2.3 -- an NGDC FreeForm ND application&lt;br /&gt;
&lt;br /&gt;
(llmaxmin.fmt) ASCII_input_file_header  &amp;quot;Latitude/Longitude Limits&amp;quot;&lt;br /&gt;
File llmaxmin.dat contains 1 header record (71 bytes)&lt;br /&gt;
Each record contains 6 fields and is 71 characters long.&lt;br /&gt;
&lt;br /&gt;
(llmaxmin.fmt) ASCII_input_data &amp;quot;lat/lon&amp;quot;&lt;br /&gt;
File llmaxmin.dat contains 10 data records (230 bytes)&lt;br /&gt;
Each record contains 3 fields and is 23 characters long.&lt;br /&gt;
&lt;br /&gt;
100&lt;br /&gt;
&lt;br /&gt;
No errors found (11 lines checked)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;font color=&#039;green&#039;&amp;gt;readfile&amp;lt;/font&amp;gt;==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FreeForm ND includes &amp;lt;font color=&#039;green&#039;&amp;gt;readfile&amp;lt;/font&amp;gt;, a simple interactive binary file&lt;br /&gt;
reader. The program has one required command line argument, the name&lt;br /&gt;
of the file to be read. You do not have to write format descriptions&lt;br /&gt;
to use &amp;lt;font color=&#039;green&#039;&amp;gt;readfile&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;font color=&#039;green&#039;&amp;gt;readfile&amp;lt;/font&amp;gt; command has the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;readfile&amp;lt;/font&amp;gt; &#039;&#039;binary_data_file&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When the program starts, it shows the available options, shown in&lt;br /&gt;
table 9.3. At the &amp;lt;font color=&#039;green&#039;&amp;gt;readfile&amp;lt;/font&amp;gt; prompt, type&lt;br /&gt;
these option codes to view binary encoded values. (Pressing return&lt;br /&gt;
repeats the last option.)&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;center&amp;gt;&lt;br /&gt;
 The &amp;lt;font color=&#039;green&#039;&amp;gt;readfile&amp;lt;/font&amp;gt; program options&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;c&amp;lt;/font&amp;gt; || char --- 1 byte character&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;s&amp;lt;/font&amp;gt; || short --- 2 byte signed integer&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;l&amp;lt;/font&amp;gt; || long --- 4 byte signed integer&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;f&amp;lt;/font&amp;gt; || float --- 4 byte single-precision floating point&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;d&amp;lt;/font&amp;gt; || double --- 8 byte double-precision floating point&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;uc&amp;lt;/font&amp;gt; || uchar --- 1 byte unsigned integer&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;us&amp;lt;/font&amp;gt; || ushort --- 2 byte unsigned integer&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;ul&amp;lt;/font&amp;gt; || ulong --- 4 byte unsigned integer&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;b&amp;lt;/font&amp;gt; || Toggle between &amp;quot;big-endian&amp;quot; and your machine&#039;s native byte&lt;br /&gt;
order&lt;br /&gt;
|-&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;p&amp;lt;/font&amp;gt; || Set new file position&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;P&amp;lt;/font&amp;gt; ||Show present file position and length&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;h&amp;lt;/font&amp;gt; || Display this help screen&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;q&amp;lt;/font&amp;gt; || Quit&lt;br /&gt;
 &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The options let you interactively read your way through the specified&lt;br /&gt;
binary file. The first position in the file is 0. You must type the&lt;br /&gt;
character(s) indicating variable type (e.g., us for unsigned short) to&lt;br /&gt;
view each value, so you need to know the data types of variables in&lt;br /&gt;
the file and the order in which they occur. If successive variables&lt;br /&gt;
are of the same type, you can press Return to view each value after&lt;br /&gt;
the first of that type.&lt;br /&gt;
&lt;br /&gt;
You can toggle the byte-order switch on and off by typing b. The&lt;br /&gt;
byte-order option is used to read a binary data file that requires&lt;br /&gt;
byte swapping. This is the case when you need cross-platform access to&lt;br /&gt;
a file that is not byte-swapped, for example, if you are on a Unix&lt;br /&gt;
machine reading data from a CD-ROM formatted for a PC. When the switch&lt;br /&gt;
is on, type s or l to swap short or long integers&lt;br /&gt;
respectively, or type f or d to swap floats or doubles.&lt;br /&gt;
The &amp;lt;font color=&#039;green&#039;&amp;gt;readfile&amp;lt;/font&amp;gt; program does not byte swap the file itself (the&lt;br /&gt;
file is unchanged) but byte swaps the data values internally for&lt;br /&gt;
display purposes only.&lt;br /&gt;
&lt;br /&gt;
To go to another position in the file, type p. You are prompted&lt;br /&gt;
to enter the new file position in bytes. If, for example, each value&lt;br /&gt;
in the file is 4 bytes long and you type 16, you will be positioned at&lt;br /&gt;
the first byte of the fifth value. If you split fields (by not&lt;br /&gt;
repositioning at the beginning of a field), the results will probably&lt;br /&gt;
be garbage. Type P to find out your current position in the file&lt;br /&gt;
and total file length in bytes. Type q to exit from&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;readfile&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
You can also use an input command file rather than entering commands&lt;br /&gt;
directly. In that case, the &amp;lt;font color=&#039;green&#039;&amp;gt;readfile&amp;lt;/font&amp;gt; command has the following&lt;br /&gt;
form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
readfile binary_data_file &amp;lt; input_command_file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Creating a Binary Archive==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By storing data files in binary, you save disk space and make access&lt;br /&gt;
by applications more efficient. An ASCII data file can take two to&lt;br /&gt;
five times the disk space of a comparable binary data file. Not only&lt;br /&gt;
is there less information in each byte, but extra bytes are needed for&lt;br /&gt;
decimal points, delimiters, and end-of-line markers.&lt;br /&gt;
&lt;br /&gt;
It is very easy to create a binary archive using &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; as the&lt;br /&gt;
following examples show. The input data for these examples are in the&lt;br /&gt;
ASCII file &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dat&amp;lt;/font&amp;gt; (shown below). They consist of 20 random&lt;br /&gt;
latitude and longitude values. The size of the file on a Unix system&lt;br /&gt;
is 460 bytes.&lt;br /&gt;
&lt;br /&gt;
Here is the &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dat&amp;lt;/font&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-47.303545 -176.161101&lt;br /&gt;
-0.928001    0.777265&lt;br /&gt;
-28.286662   35.591879&lt;br /&gt;
12.588231  149.408117&lt;br /&gt;
-83.223548   55.319598&lt;br /&gt;
54.118314 -136.940570&lt;br /&gt;
38.818812   91.411330&lt;br /&gt;
-34.577065   30.172129&lt;br /&gt;
27.331551 -155.233735&lt;br /&gt;
11.624981 -113.660611&lt;br /&gt;
77.652742  -79.177679&lt;br /&gt;
77.883119  -77.505502&lt;br /&gt;
-65.864879  -55.441896&lt;br /&gt;
-63.211962  134.124014&lt;br /&gt;
35.130219 -153.543091&lt;br /&gt;
29.918847  144.804390&lt;br /&gt;
-69.273601   38.875778&lt;br /&gt;
-63.002874   36.356024&lt;br /&gt;
35.086084  -21.643402&lt;br /&gt;
-12.966961   62.152266&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Simple ASCII to Binary Conversion===&lt;br /&gt;
&lt;br /&gt;
In this example, you will use &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; to convert the ASCII data&lt;br /&gt;
file &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dat&amp;lt;/font&amp;gt; into the binary file &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.bin&amp;lt;/font&amp;gt;. The input&lt;br /&gt;
and output data formats are described in &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.fmt&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here is the &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.fmt&amp;lt;/font&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/ This is the format description file for data files latlon.bin&lt;br /&gt;
/ and latlon.dat. Each record in both files contains two fields,&lt;br /&gt;
/ latitude and longitude.&lt;br /&gt;
&lt;br /&gt;
binary_data &amp;quot;binary format&amp;quot;&lt;br /&gt;
latitude 1 8 double 6&lt;br /&gt;
longitude 9 16 double 6&lt;br /&gt;
&lt;br /&gt;
ASCII_data &amp;quot;ASCII format&amp;quot;&lt;br /&gt;
latitude 1 10 double 6&lt;br /&gt;
longitude 12 22 double 6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The binary and ASCII variables both have the same names. The binary&lt;br /&gt;
variable latitude occupies positions 1 to 8 and longitude occupies&lt;br /&gt;
positions 9-16. The corresponding ASCII variables occupy positions&lt;br /&gt;
1-10 and 12-22. Both the binary and ASCII variables are stored as&lt;br /&gt;
doubles and have a precision of 6.&lt;br /&gt;
&lt;br /&gt;
===Converting to Binary===&lt;br /&gt;
&lt;br /&gt;
To convert from an ASCII representation of the numbers in&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dat&amp;lt;/font&amp;gt; to a binary representation:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#Change to the directory that contains the FreeForm ND example files.&lt;br /&gt;
#Enter the following command:  &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt; newform latlon.dat -o latlon.bin  &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because FreeForm ND filenaming conventions have been used,&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; will locate and use &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.fmt&amp;lt;/font&amp;gt; for the&lt;br /&gt;
translation. The &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; program creates a new data file&lt;br /&gt;
(effectively a binary archive) called &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.bin&amp;lt;/font&amp;gt;. The size of&lt;br /&gt;
the archive file is 2/3 the size of &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dat&amp;lt;/font&amp;gt;. Additionally,&lt;br /&gt;
the data do not have to be converted to machine-readable&lt;br /&gt;
representation by applications.&lt;br /&gt;
&lt;br /&gt;
There are two methods for checking the data in &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.bin&amp;lt;/font&amp;gt; to&lt;br /&gt;
make sure they converted correctly. You can reformat back to ASCII and&lt;br /&gt;
view the resulting file, or use &amp;lt;font color=&#039;green&#039;&amp;gt;readfile&amp;lt;/font&amp;gt; to read&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;latlon.bin&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Reconverting to Native Format===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use the following &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; command to reformat the binary data in&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;latlon.bin&amp;lt;/font&amp;gt; to its native ASCII format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
newform latlon.bin -o latlon.rf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ASCII file &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.rf&amp;lt;/font&amp;gt; matches (but does not overwrite) the&lt;br /&gt;
original input file &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dat&amp;lt;/font&amp;gt;. You can confirm this by using a&lt;br /&gt;
file comparison utility. The &amp;lt;font color=&#039;green&#039;&amp;gt;diff&amp;lt;/font&amp;gt; command is generally available on&lt;br /&gt;
Unix platforms.&lt;br /&gt;
&lt;br /&gt;
To use &amp;lt;font color=&#039;green&#039;&amp;gt;diff&amp;lt;/font&amp;gt; to compare the &amp;lt;font color=&#039;green&#039;&amp;gt;latlon&amp;lt;/font&amp;gt; ASCII files, enter the&lt;br /&gt;
command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
diff latlon.dat latlon.rf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should be something along these lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Files are effectively identical.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Several implementations of the &amp;lt;font color=&#039;green&#039;&amp;gt;diff&amp;lt;/font&amp;gt; utility don&#039;t print anything&lt;br /&gt;
if the two input files are identical.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;NOTE: The &amp;lt;font color=&#039;green&#039;&amp;gt;diff&amp;lt;/font&amp;gt; utility may detect a difference in other similar&lt;br /&gt;
cases because FreeForm ND adds a leading zero in front of a decimal&lt;br /&gt;
and interprets a blank as a zero if the field is described as a&lt;br /&gt;
number. (A blank described as a character is interpreted as a&lt;br /&gt;
blank.) &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conversion to a More Portable Binary===&lt;br /&gt;
&lt;br /&gt;
In this example, you will use &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; to reformat the latitude&lt;br /&gt;
and longitude values in the ASCII data file &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dat&amp;lt;/font&amp;gt; into&lt;br /&gt;
binary longs in the binary file &amp;lt;font color=&#039;green&#039;&amp;gt;latlon2.bin&amp;lt;/font&amp;gt;. The input and&lt;br /&gt;
output data formats are described in &amp;lt;font color=&#039;green&#039;&amp;gt;latlon2.fmt&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This is what&#039;s in &amp;lt;font color=&#039;green&#039;&amp;gt;latlon2.fmt&amp;lt;/font&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/ This is the format description file for data files latlon.dat&lt;br /&gt;
/ and latlon2.bin. Each record in both files contains two fields,&lt;br /&gt;
/ latitude and longitude.&lt;br /&gt;
&lt;br /&gt;
ASCII_data &amp;quot;ASCII format&amp;quot;&lt;br /&gt;
latitude 1 10 double 6&lt;br /&gt;
longitude 12 22 double 6&lt;br /&gt;
&lt;br /&gt;
binary_data &amp;quot;binary format&amp;quot;&lt;br /&gt;
latitude 1 4 long 6&lt;br /&gt;
longitude 5 8 long 6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ASCII and binary variables both have the same names. The ASCII&lt;br /&gt;
variable latitude occupies positions 1-10 and longitude occupies&lt;br /&gt;
positions 12-22. The ASCII variables are defined to be of type double.&lt;br /&gt;
The binary variables occupy four bytes each (positions 1-4 and 5-8)&lt;br /&gt;
and are of type long. The precision for all is 6.&lt;br /&gt;
&lt;br /&gt;
===Converting to Binary Long===&lt;br /&gt;
&lt;br /&gt;
In the previous example, both the ASCII and binary variables were&lt;br /&gt;
defined to be doubles. Binary longs, which are 4-byte integers, may be&lt;br /&gt;
more portable across different platforms than binary doubles or&lt;br /&gt;
floats.&lt;br /&gt;
&lt;br /&gt;
To convert the ASCII data in &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dat&amp;lt;/font&amp;gt; to binary longs:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#Change to the directory that contains the FreeForm ND example&lt;br /&gt;
files.&lt;br /&gt;
#Enter the following command:   &amp;lt;pre&amp;gt; newform latlon.dat -f latlon2.fmt -o latlon2.bin  &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It creates the binary archive file &amp;lt;font color=&#039;green&#039;&amp;gt;latlon2.bin&amp;lt;/font&amp;gt; with the 20&lt;br /&gt;
latitude and longitude values in &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dat&amp;lt;/font&amp;gt; stored as binary&lt;br /&gt;
longs.&lt;br /&gt;
&lt;br /&gt;
This example duplicates one in [[Wiki_Testing/dquick|Quick Start]]. If you completed that&lt;br /&gt;
example, an error message will indicate that &amp;lt;font color=&#039;green&#039;&amp;gt;latlon2.bin&amp;lt;/font&amp;gt; exists.&lt;br /&gt;
You can rename, move, or delete the existing file.&lt;br /&gt;
&lt;br /&gt;
The size of the archive file &amp;lt;font color=&#039;green&#039;&amp;gt;latlon2.bin&amp;lt;/font&amp;gt; is about 1/3 the size&lt;br /&gt;
of &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dat&amp;lt;/font&amp;gt;. Also, the data do not have to be converted to&lt;br /&gt;
machine representation by applications. The main tradeoff in achieving&lt;br /&gt;
savings in space and access time is that although binary longs are&lt;br /&gt;
more portable than binary doubles or floats, any binary representation&lt;br /&gt;
is less portable than ASCII.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;CAUTION: There may be a loss of precision when input data of&lt;br /&gt;
type double is converted to long. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Reading the Binary File===&lt;br /&gt;
&lt;br /&gt;
Once again, you can use &amp;lt;font color=&#039;green&#039;&amp;gt;readfile&amp;lt;/font&amp;gt; to check the data in the binary&lt;br /&gt;
archive you created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#Enter the following command:   &amp;lt;pre&amp;gt; readfile latlon2.bin  &amp;lt;/pre&amp;gt;&lt;br /&gt;
#The data are stored as longs, so enter l to view each value (or press Return to view each value after the first).&lt;br /&gt;
#Enter q to quit &amp;lt;font color=&#039;green&#039;&amp;gt;readfile&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If desired, you can enter the commands to &amp;lt;font color=&#039;green&#039;&amp;gt;readfile&amp;lt;/font&amp;gt; from an input command file rather than directly from the command line. The example&lt;br /&gt;
command file &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.in&amp;lt;/font&amp;gt; is shown next.&lt;br /&gt;
&lt;br /&gt;
Here is &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.in&amp;lt;/font&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
llllllp0 llPq&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The 6 l&#039;s (l for &amp;lt;font color=&#039;green&#039;&amp;gt;long&amp;lt;/font&amp;gt;) cause the first 6 values in the file to be&lt;br /&gt;
displayed. The sequence p0 causes a return to the top (position 0) of&lt;br /&gt;
the file. A position number (0) must be followed by a blank space. The&lt;br /&gt;
2 l&#039;s display the first two values again. The P displays the&lt;br /&gt;
current file position and length, and q closes &amp;lt;font color=&#039;green&#039;&amp;gt;readfile&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you enter the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
readfile latlon2.bin &amp;lt; latlon.in&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you should see the following output on the screen:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
long:  -47303545&lt;br /&gt;
long: -176161101&lt;br /&gt;
long:    -928001&lt;br /&gt;
long:     777265&lt;br /&gt;
long:  -28286662&lt;br /&gt;
long:   35591879&lt;br /&gt;
New File Position = 0&lt;br /&gt;
long:  -47303545&lt;br /&gt;
long: -176161101&lt;br /&gt;
File Position: 8       File Length: 160&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The floating point numbers have been multiplied by 106, the precision&lt;br /&gt;
of the long variables in &amp;lt;font color=&#039;green&#039;&amp;gt;latlon2.fmt&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Including a Query===&lt;br /&gt;
&lt;br /&gt;
You can use the query option (&amp;lt;font color=&#039;green&#039;&amp;gt;-q&amp;lt;/font&amp;gt; &#039;&#039;query_file&#039;&#039;) to specify&lt;br /&gt;
exactly which records in the data file &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; should process.&lt;br /&gt;
The query file contains query criteria. Query syntax is summarized in&lt;br /&gt;
Appendix C.&lt;br /&gt;
&lt;br /&gt;
In this example, you will specify a query so that &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; will&lt;br /&gt;
reformat only those value pairs in &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dat&amp;lt;/font&amp;gt; where latitude is&lt;br /&gt;
positive and longitude is negative into the binary file&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;llposneg.bin&amp;lt;/font&amp;gt;. The input and output data formats are described in&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;latlon2.fmt&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The query criteria are specified in the following file, called&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;llposneg.qry&amp;lt;/font&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[latitude] &amp;gt; 0 &amp;amp; [longitude] &amp;lt; 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To convert the desired data in &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dat&amp;lt;/font&amp;gt; to binary and then&lt;br /&gt;
view the results:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#Enter the following command:   &amp;lt;pre&amp;gt; newform latlon.dat -f latlon2.fmt -q llposneg.qry -o llposneg.bin  &amp;lt;/pre&amp;gt;  The &amp;lt;font color=&#039;green&#039;&amp;gt;llposneg.bin&amp;lt;/font&amp;gt; file now contains the positive/negative latitude/longitude pairs in binary form.&lt;br /&gt;
#To view the data, first convert the data in &amp;lt;font color=&#039;green&#039;&amp;gt;llposneg.bin&amp;lt;/font&amp;gt; back to ASCII format:  newform llposneg.bin -f latlon2.fmt -o llposneg.dat&lt;br /&gt;
#Enter the appropriate command to display the data in &amp;lt;font color=&#039;green&#039;&amp;gt;llposneg.dat&amp;lt;/font&amp;gt;, e.g. &amp;lt;font color=&#039;green&#039;&amp;gt;more&amp;lt;/font&amp;gt;: The following output appears on the screen:  &lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
54.118314 -136.940570&lt;br /&gt;
27.331551 -155.233735&lt;br /&gt;
11.624981 -113.660611&lt;br /&gt;
77.652742  -79.177679&lt;br /&gt;
77.883119  -77.505502&lt;br /&gt;
35.130219 -153.543091&lt;br /&gt;
35.086084  -21.643402&lt;br /&gt;
&amp;lt;/pre&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;NOTE: As demonstrated in the examples above, you can check the data in&lt;br /&gt;
a binary file either by using &amp;lt;font color=&#039;green&#039;&amp;gt;readfile&amp;lt;/font&amp;gt; or by converting the&lt;br /&gt;
data back to ASCII using &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; and then viewing it.  &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==File Names and Context==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the preceding examples, the read/write type (input or output) was&lt;br /&gt;
not included in the format descriptors (&amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_data&amp;lt;/font&amp;gt; and&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;binary_data&amp;lt;/font&amp;gt;). FreeForm ND naming conventions were used, so&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; can determine from the context which format should be&lt;br /&gt;
used for input and which for output. Consider the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
newform latlon.dat -o latlon.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The input file extension is &amp;lt;font color=&#039;green&#039;&amp;gt;.dat&amp;lt;/font&amp;gt; and the output file extension&lt;br /&gt;
is &amp;lt;font color=&#039;green&#039;&amp;gt;.bin&amp;lt;/font&amp;gt;. These extensions provide context indicating that ASCII&lt;br /&gt;
should be used as the input format and binary should be used as the&lt;br /&gt;
output format. The format description file that &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; will&lt;br /&gt;
look for is the file with the same name as the input file and the&lt;br /&gt;
extension &amp;lt;font color=&#039;green&#039;&amp;gt;.fmt&amp;lt;/font&amp;gt;, i.e., &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.fmt&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you use the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
newform latlon.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to translate the binary archive &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.bin&amp;lt;/font&amp;gt; back to ASCII,&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; identifies the input format as binary and uses the ASCII&lt;br /&gt;
format for output. The ASCII data is written to the screen because an&lt;br /&gt;
output file was not specified.&lt;br /&gt;
&lt;br /&gt;
For information about FreeForm ND file name conventions, see&lt;br /&gt;
[[Wiki_Testing/convs|Conventions]].&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;Nonstandard&amp;quot; Data File Names===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are working with data files that do not use FreeForm ND naming&lt;br /&gt;
conventions, you need to more explicitly define the context. For&lt;br /&gt;
example, the files &amp;lt;font color=&#039;green&#039;&amp;gt;lldat1.ll&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;lldat2.ll&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;lldat3.ll&amp;lt;/font&amp;gt;,&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;lldat4.ll&amp;lt;/font&amp;gt;, and &amp;lt;font color=&#039;green&#039;&amp;gt;lldat5.ll&amp;lt;/font&amp;gt; all have latitude and longitude values in the ASCII format given in the format description file &amp;lt;font color=&#039;green&#039;&amp;gt;lldat.fmt&amp;lt;/font&amp;gt;. If you wanted to archive these files in binary format, you could not use a command of the form used in the previous&lt;br /&gt;
examples, i.e., &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; &amp;lt;font color=&#039;green&#039;&amp;gt;datafile.dat&amp;lt;/font&amp;gt; -o &amp;lt;font color=&#039;green&#039;&amp;gt;datafile.bin&amp;lt;/font&amp;gt;&lt;br /&gt;
with &amp;lt;font color=&#039;green&#039;&amp;gt;datafile.fmt&amp;lt;/font&amp;gt; as the default format description file.&lt;br /&gt;
&lt;br /&gt;
First, the ASCII data files do not have the extension &amp;lt;font color=&#039;green&#039;&amp;gt;.dat&amp;lt;/font&amp;gt;,&lt;br /&gt;
which identifies them as ASCII files. Second, you would need five&lt;br /&gt;
separate format description files, all with the same content:&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;lldat1.fmt&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;lldat2.fmt&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;lldat3.fmt&amp;lt;/font&amp;gt;,&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;lldat4.fmt&amp;lt;/font&amp;gt;, and &amp;lt;font color=&#039;green&#039;&amp;gt;lldat5.fmt&amp;lt;/font&amp;gt;. Creating the format&lt;br /&gt;
description file &amp;lt;font color=&#039;green&#039;&amp;gt;ll.fmt&amp;lt;/font&amp;gt; solves both problems.&lt;br /&gt;
&lt;br /&gt;
Here is the &amp;lt;font color=&#039;green&#039;&amp;gt;ll.fmt&amp;lt;/font&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/ This is the format description file that describes latlon&lt;br /&gt;
/ data in files with the extension .ll&lt;br /&gt;
&lt;br /&gt;
ASCII_input_data &amp;quot;ASCII format for .ll latlon data&amp;quot;&lt;br /&gt;
latitude 1 10 double 6&lt;br /&gt;
longitude 12 22 double 6&lt;br /&gt;
&lt;br /&gt;
binary_output_data &amp;quot;binary format for .ll latlon data&amp;quot;&lt;br /&gt;
latitude 1 4 long 6&lt;br /&gt;
longitude 5 8 long 6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The name used for the format description file, &amp;lt;font color=&#039;green&#039;&amp;gt;ll.fmt&amp;lt;/font&amp;gt;, follows the FreeForm ND convention that one format description file can be&lt;br /&gt;
utilized for multiple data files, all with the same extension, if the&lt;br /&gt;
format description file is named &amp;lt;font color=&#039;green&#039;&amp;gt;ext.fmt&amp;lt;/font&amp;gt;. Also, the read/write type (input or output) is made explicit by including it in the format&lt;br /&gt;
descriptors &amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_input_data&amp;lt;/font&amp;gt; and &amp;lt;font color=&#039;green&#039;&amp;gt;binary_output_data&amp;lt;/font&amp;gt;. This provides the context needed for FreeForm ND programs to determine which format to use for input and which for output.&lt;br /&gt;
&lt;br /&gt;
Use the following commands to produce binary versions of the ASCII&lt;br /&gt;
input files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
newform lldat1.ll -o llbin1.ll&lt;br /&gt;
newform lldat2.ll -o llbin2.ll&lt;br /&gt;
newform lldat3.ll -o llbin3.ll&lt;br /&gt;
newform lldat4.ll -o llbin4.ll&lt;br /&gt;
newform lldat5.ll -o llbin5.ll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to convert back to ASCII, you can switch the words input&lt;br /&gt;
and output in the format description file &amp;lt;font color=&#039;green&#039;&amp;gt;ll.fmt&amp;lt;/font&amp;gt;. You could then use the following commands to convert back to native ASCII format with&lt;br /&gt;
output written to the screen:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
newform llbin1.ll&lt;br /&gt;
newform llbin2.ll&lt;br /&gt;
newform llbin3.ll&lt;br /&gt;
newform llbin4.ll&lt;br /&gt;
newform llbin5.ll&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is also possible to convert back to ASCII without switching the&lt;br /&gt;
read/write types input and output in &amp;lt;font color=&#039;green&#039;&amp;gt;ll.fmt&amp;lt;/font&amp;gt;. You can specify input and output formats by title instead. In this case, you want to&lt;br /&gt;
use the output format in &amp;lt;font color=&#039;green&#039;&amp;gt;ll.fmt&amp;lt;/font&amp;gt; as the input format and the input format in &amp;lt;font color=&#039;green&#039;&amp;gt;ll.fmt&amp;lt;/font&amp;gt; as the output format. Use the following command to convert &amp;lt;font color=&#039;green&#039;&amp;gt;llbin1.ll&amp;lt;/font&amp;gt; back to ASCII:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
newform &amp;lt;font color=&#039;green&#039;&amp;gt;llbin1.ll&amp;lt;/font&amp;gt; -ift &amp;quot;binary format for .ll latlon data&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-oft &amp;quot;ASCII format for .ll latlon data&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; reports back the read/write type actually used. Since &amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_input_data&amp;lt;/font&amp;gt; was used as the output format, &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; reports it as &amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_output_data&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now assume that you want to convert the ASCII data file &amp;lt;font color=&#039;green&#039;&amp;gt;llvals.asc&amp;lt;/font&amp;gt; (not included in the example file set) to the binary&lt;br /&gt;
file &amp;lt;font color=&#039;green&#039;&amp;gt;latlon3.bin&amp;lt;/font&amp;gt;, and the input and output data formats are described in &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.fmt&amp;lt;/font&amp;gt;. The data file names do not provide the context allowing &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; to find &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.fmt&amp;lt;/font&amp;gt; by default, so you must include all file names on the command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
newform llvals.asc -f latlon.fmt -o latlon3.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;Nonstandard&amp;quot; Format Description File Names===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are using a format description file that does not follow&lt;br /&gt;
FreeForm ND file naming conventions, you must include its name on the&lt;br /&gt;
command line. Assume that you want to convert the ASCII data file&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dat&amp;lt;/font&amp;gt; to the binary file &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.bin&amp;lt;/font&amp;gt;, and the input&lt;br /&gt;
and output data formats are both described in &amp;lt;font color=&#039;green&#039;&amp;gt;llvals.frm&amp;lt;/font&amp;gt; (not included in the example file set). The data file names follow FreeForm&lt;br /&gt;
ND conventions, but the name of the format description file does not,&lt;br /&gt;
so it will not be located through the default search sequence. Use the&lt;br /&gt;
following command to convert to binary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
newform latlon.dat -f llvals.frm -o latlon.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Suppose now that the input format is described in &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.fmt&amp;lt;/font&amp;gt; and&lt;br /&gt;
the output format in &amp;lt;font color=&#039;green&#039;&amp;gt;llvals.frm&amp;lt;/font&amp;gt;. You do not need to explicitly specify the input format description file because it will be located&lt;br /&gt;
by default, but you must specify the output format description file&lt;br /&gt;
name. In this case, the command would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
newform latlon.dat -of llvals.frm -o latlon.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can always unambiguously specify the names of format description&lt;br /&gt;
files and data files, whether or not their names follow FreeForm ND&lt;br /&gt;
conventions. Assume you want to look only at longitude values in&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;latlon.bin&amp;lt;/font&amp;gt; and that you want them defined as integers (longs) which are right-justified at column 30. You will reformat the&lt;br /&gt;
specified binary data in &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.bin&amp;lt;/font&amp;gt; into ASCII data in&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;longonly.dat&amp;lt;/font&amp;gt; and then view it. The input format is found in &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.fmt&amp;lt;/font&amp;gt;, the output format in &amp;lt;font color=&#039;green&#039;&amp;gt;longonly.fmt&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here is &amp;lt;font color=&#039;green&#039;&amp;gt;longonly.fmt&amp;lt;/font&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/ This is the format description file for viewing longitude as an&lt;br /&gt;
/ integer value right-justified at column 30.&lt;br /&gt;
&lt;br /&gt;
ASCII_data &amp;quot;ASCII output format, right-justified at 30&amp;quot;&lt;br /&gt;
longitude 20 30 long 6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, you have decided to look at the first 5 longitude values. Use the following command to unambiguously designate all files involved:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
newform latlon.bin -if latlon.fmt -of longonly.fmt -c 5&lt;br /&gt;
-o longonly.dat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you view &amp;lt;font color=&#039;green&#039;&amp;gt;longonly.dat&amp;lt;/font&amp;gt;, you should see the following 5 values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1         2         3         4&lt;br /&gt;
1234567890123456789012345678901234567890&lt;br /&gt;
&lt;br /&gt;
-176161101&lt;br /&gt;
777265&lt;br /&gt;
35591879&lt;br /&gt;
149408117&lt;br /&gt;
55319598&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changing ASCII Formats==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may encounter situations where a specific ASCII format is&lt;br /&gt;
required, and your data cannot be used in its native ASCII format.&lt;br /&gt;
With &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt;, you can easily reformat one ASCII format to&lt;br /&gt;
another. In this example, you will reformat California earthquake data&lt;br /&gt;
from one ASCII format to three other ASCII formats commonly used for&lt;br /&gt;
such data.The file &amp;lt;font color=&#039;green&#039;&amp;gt;calif.tap&amp;lt;/font&amp;gt; contains data about earthquakes in&lt;br /&gt;
California with magnitudes &amp;gt; 5.0 since 1980. The data were initially&lt;br /&gt;
distributed by NGDC on tape, hence the &amp;lt;font color=&#039;green&#039;&amp;gt;.tap&amp;lt;/font&amp;gt; extension. The data&lt;br /&gt;
format is described in &amp;lt;font color=&#039;green&#039;&amp;gt;eqtape.fmt&amp;lt;/font&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
Here is the &amp;lt;font color=&#039;green&#039;&amp;gt;eqtape.fmt&amp;lt;/font&amp;gt; file:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/ This is the format description file for the NGDC .tap format,&lt;br /&gt;
/ which is used for data distributed on floppy disks or tapes.&lt;br /&gt;
&lt;br /&gt;
ASCII_data &amp;quot;.tap format&amp;quot;&lt;br /&gt;
source_code 1 3 char 0&lt;br /&gt;
century 4 6 short 0&lt;br /&gt;
year 7 8 short 0&lt;br /&gt;
month 9 10 short 0&lt;br /&gt;
day 11 12 short 0&lt;br /&gt;
hour 13 14 short 0&lt;br /&gt;
minute 15 16 short 0&lt;br /&gt;
second 17 19 short 1&lt;br /&gt;
latitude_abs 20 24 long 3&lt;br /&gt;
latitude_ns 25 25 char 0&lt;br /&gt;
longitude_abs 26 31 long 3&lt;br /&gt;
longitude_ew 32 32 char 0&lt;br /&gt;
depth 33 35 short 0&lt;br /&gt;
magnitude_mb 36 38 short 2&lt;br /&gt;
MB 39 40 constant 0&lt;br /&gt;
isoseismal 41 43 char 0&lt;br /&gt;
intensity 44 44 char 0&lt;br /&gt;
&lt;br /&gt;
/ The NGDC record check format includes&lt;br /&gt;
/ six flags in characters 45 to 50. These&lt;br /&gt;
/ can be treated as one variable to allow&lt;br /&gt;
/ multiple flags to be set in a single pass,&lt;br /&gt;
/ or each can be set by itself.&lt;br /&gt;
&lt;br /&gt;
ngdc_flags 45 50 char 0&lt;br /&gt;
diastrophic 45 45 char 0&lt;br /&gt;
tsunami 46 46 char 0&lt;br /&gt;
seiche 47 47 char 0&lt;br /&gt;
volcanism 48 48 char 0&lt;br /&gt;
non_tectonic 49 49 char 0&lt;br /&gt;
infrasonic 50 50 char 0&lt;br /&gt;
&lt;br /&gt;
fe_region 51 53 short 0&lt;br /&gt;
magnitude_ms 54 55 short 1&lt;br /&gt;
MS 56 57 char 0&lt;br /&gt;
z_h 58 58 char 0&lt;br /&gt;
cultural 59 59 char 0&lt;br /&gt;
other 60 60 char 0&lt;br /&gt;
magnitude_other 61 63 short 2&lt;br /&gt;
other_authority 64 66 char 0&lt;br /&gt;
ide 67 67 char 0&lt;br /&gt;
depth_control 68 68 char 0&lt;br /&gt;
number_stations_qual 69 71 char 0&lt;br /&gt;
time_authority 72 72 char 0&lt;br /&gt;
magnitude_local 73 75 short 2&lt;br /&gt;
local_scale 76 77 char 0&lt;br /&gt;
local_authority 78 80 char 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Three other formats used for California earthquake data are&lt;br /&gt;
hypoellipse, hypoinverse, and hypo71. Subsets of these formats are&lt;br /&gt;
described in the format description file &amp;lt;font color=&#039;green&#039;&amp;gt;hypo.fmt&amp;lt;/font&amp;gt;. The format&lt;br /&gt;
descriptions include the parameters required by the AcroSpin program&lt;br /&gt;
that is distributed as part of the IASPEI Software Library (Volume 2).&lt;br /&gt;
AcroSpin shows 3D views of earthquake point data.&lt;br /&gt;
&lt;br /&gt;
Here is the &amp;lt;font color=&#039;green&#039;&amp;gt;hypo.fmt&amp;lt;/font&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/ This format description file describes subsets of the&lt;br /&gt;
/ hypoellipse, hypoinverse, and hypo71 formats.&lt;br /&gt;
&lt;br /&gt;
ASCII_data &amp;quot;hypoellipse format&amp;quot;&lt;br /&gt;
&lt;br /&gt;
year 1 2 uchar 0&lt;br /&gt;
month 3 4 uchar 0&lt;br /&gt;
day 5 6 uchar 0&lt;br /&gt;
hour 7 8 uchar 0&lt;br /&gt;
minute 9 10 uchar 0&lt;br /&gt;
second 11 14 ushort 2&lt;br /&gt;
latitude_deg_abs 15 16 uchar 0&lt;br /&gt;
latitude_ns 17 17 char 0&lt;br /&gt;
latitude_min 18 21 ushort 2&lt;br /&gt;
longitude_deg_abs 22 24 uchar 0&lt;br /&gt;
longitude_ew 25 25 char 0&lt;br /&gt;
longitude_min 26 29 ushort 2&lt;br /&gt;
depth 30 34 short 2&lt;br /&gt;
magnitude_local 35 36 uchar 1&lt;br /&gt;
&lt;br /&gt;
ASCII_data &amp;quot;hypoinverse format&amp;quot;&lt;br /&gt;
year 1 2 uchar 0&lt;br /&gt;
month 3 4 uchar 0&lt;br /&gt;
day 5 6 uchar 0&lt;br /&gt;
hour 7 8 uchar 0&lt;br /&gt;
minute 9 10 uchar 0&lt;br /&gt;
second 11 14 ushort 2&lt;br /&gt;
latitude_deg_abs 15 16 uchar 0&lt;br /&gt;
latitude_ns 17 17 char 0&lt;br /&gt;
latitude_min 18 21 ushort 2&lt;br /&gt;
longitude_deg_abs 22 24 uchar 0&lt;br /&gt;
longitude_ew 25 25 char 0&lt;br /&gt;
longitude_min 26 29 ushort 2&lt;br /&gt;
depth 30 34 short 2&lt;br /&gt;
magnitude_local 35 36 uchar 1&lt;br /&gt;
number_of_times 37 39 short 0&lt;br /&gt;
maximum_azimuthal_gap 40 42 short 0&lt;br /&gt;
nearest_station 43 45 short 1&lt;br /&gt;
rms_travel_time_residual 46 49 short 2&lt;br /&gt;
&lt;br /&gt;
ASCII_data &amp;quot;hypo71 format&amp;quot;&lt;br /&gt;
year 1 2 uchar 0&lt;br /&gt;
month 3 4 uchar 0&lt;br /&gt;
day 5 6 uchar 0&lt;br /&gt;
hour 8 9 uchar 0&lt;br /&gt;
minute 10 11 uchar 0&lt;br /&gt;
second 12 17 float 2&lt;br /&gt;
latitude_deg_abs 18 20 uchar 0&lt;br /&gt;
latitude_ns 21 21 char 0&lt;br /&gt;
latitude_min 22 26 float 2&lt;br /&gt;
longitude_deg_abs 27 30 uchar 0&lt;br /&gt;
longitude_ew 31 31 char 0&lt;br /&gt;
longitude_min 32 36 float 2&lt;br /&gt;
depth 37 43 float 2&lt;br /&gt;
magnitude_local 44 50 float 2&lt;br /&gt;
number_of_times 51 53 short 0&lt;br /&gt;
maximum_azimuthal_gap 54 57 float 0&lt;br /&gt;
nearest_station 58 62 short 1&lt;br /&gt;
rms_travel_time_residual 63 67 float 2&lt;br /&gt;
error_horizontal 68 72 float 1&lt;br /&gt;
error_vertical 73 77 float 1&lt;br /&gt;
s_waves_used 79 79 char 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
The parameters from the California earthquake data in the NGDC format&lt;br /&gt;
needed for use with the AcroSpin program can be extracted and&lt;br /&gt;
converted using the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
newform calif.tap -if eqtape.fmt -of hypo.fmt&lt;br /&gt;
&lt;br /&gt;
-oft &amp;quot;hypoellipse format&amp;quot; -o calif.he&lt;br /&gt;
newform calif.tap -if eqtape.fmt -of hypo.fmt&lt;br /&gt;
&lt;br /&gt;
-oft &amp;quot;hypoinverse format&amp;quot; -o calif.hi&lt;br /&gt;
newform calif.tap -if eqtape.fmt -of hypo.fmt&lt;br /&gt;
&lt;br /&gt;
-oft &amp;quot;hypo71 format&amp;quot; -o calif.h71&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you develop an application that accesses seismicity data in a&lt;br /&gt;
particular ASCII format, you need only to write an appropriate format&lt;br /&gt;
description file in order to convert NGDC data into the format used by&lt;br /&gt;
the application. This lets you make use of the data that NGDC provides&lt;br /&gt;
in a format that works for you.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Wiki_Testing/convs&amp;diff=4950</id>
		<title>Wiki Testing/convs</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Wiki_Testing/convs&amp;diff=4950"/>
		<updated>2009-10-06T23:56:00Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[FreeForm|return to FreeForm]]&lt;br /&gt;
&lt;br /&gt;
=FreeForm ND Conventions=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File name conventions have been defined for FreeForm ND. If you follow&lt;br /&gt;
these conventions, FreeForm ND can locate format files through a&lt;br /&gt;
default search sequence. Using the file name conventions also lets you&lt;br /&gt;
reduce the number of arguments on the command line. In addition to&lt;br /&gt;
standard file names, FreeForm ND programs recognize various standard&lt;br /&gt;
command line arguments.&lt;br /&gt;
&lt;br /&gt;
==File Name Conventions==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Naming conventions have been established for files accessed by&lt;br /&gt;
FreeForm ND. Although you are not required to follow these&lt;br /&gt;
conventions, using them lets you enter abbreviated commands when you&lt;br /&gt;
are using FreeForm ND-based programs. FreeForm ND can then&lt;br /&gt;
automatically execute several operations:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  Determination of input and output formats when they are not explicitly identified in the relevant format descriptions in format files&lt;br /&gt;
*  Location of format files when they are not specified on the command line&lt;br /&gt;
&lt;br /&gt;
==File Name Extensions==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The expected extensions for data files are as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;.dat&amp;lt;/font&amp;gt; :  For ASCII, e.g., &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dat&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;.dab&amp;lt;/font&amp;gt; : For dBASE, e.g., &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dab&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;.bin&amp;lt;/font&amp;gt; : binary or anything that is not &amp;lt;font color=&#039;green&#039;&amp;gt;.dat&amp;lt;/font&amp;gt; or &amp;lt;font color=&#039;green&#039;&amp;gt;.dab&amp;lt;/font&amp;gt;, e.g., &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.bin&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The expected extension for format description files is &amp;lt;font color=&#039;green&#039;&amp;gt;.fmt&amp;lt;/font&amp;gt;, e.g.,&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;latlon.fmt&amp;lt;/font&amp;gt;. You should not use mixed case extensions for format&lt;br /&gt;
description files if you want to take advantage of FreeForm ND&#039;s&lt;br /&gt;
default search capabilities. If you explicitly specify the names of&lt;br /&gt;
format description files on the command line, you can use mixed case&lt;br /&gt;
extensions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Previous versions of FreeForm ND used variable description files&lt;br /&gt;
(formerly called format specification files) each of which contained&lt;br /&gt;
variable descriptions for one file. Expected extensions for these&lt;br /&gt;
files were &amp;lt;font color=&#039;green&#039;&amp;gt;.afm&amp;lt;/font&amp;gt; (ASCII), &amp;lt;font color=&#039;green&#039;&amp;gt;.bfm&amp;lt;/font&amp;gt; (binary), and &amp;lt;font color=&#039;green&#039;&amp;gt;.dfm&amp;lt;/font&amp;gt; (dBASE). Variable descriptions for one or more files can now be&lt;br /&gt;
incorporated into a single format description file. It is&lt;br /&gt;
recommended that you convert and combine (as appropriate) existing&lt;br /&gt;
variable description files into format description files.  &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==File Name Relationships==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FreeForm ND-based programs expect certain relationships between data&lt;br /&gt;
file and format description file names as outlined below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  The data file is named datafile.ext where datafile is the file name of your choosing and ext is the extension. Example: &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.dat&amp;lt;/font&amp;gt;&lt;br /&gt;
*  The corresponding format description file should be named datafile.fmt. Example: &amp;lt;font color=&#039;green&#039;&amp;gt;latlon.fmt&amp;lt;/font&amp;gt;&lt;br /&gt;
*  If one format description file is used for multiple data files, all with the same extension, the format description file should be named ext.fmt. Example: &amp;lt;font color=&#039;green&#039;&amp;gt;ll.fmt&amp;lt;/font&amp;gt; is the format description file for &amp;lt;font color=&#039;green&#039;&amp;gt;lldat1.ll&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;lldat2.ll&amp;lt;/font&amp;gt;, and &amp;lt;font color=&#039;green&#039;&amp;gt;lldat3.ll&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Again, although not required, it is to your advantage to use these&lt;br /&gt;
conventions.&lt;br /&gt;
&lt;br /&gt;
==Determining Input and Output Formats==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can optionally include the read/write type (&amp;quot;&amp;lt;font color=&#039;green&#039;&amp;gt;input&amp;lt;/font&amp;gt;&amp;quot; or&lt;br /&gt;
&amp;quot;&amp;lt;font color=&#039;green&#039;&amp;gt;output&amp;lt;/font&amp;gt;&amp;quot;) in format descriptors, e.g.,&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_input_data&amp;lt;/font&amp;gt;. You may not want to specify the read/write&lt;br /&gt;
type in some circumstances. For example, you may need to translate&lt;br /&gt;
from native ASCII to binary, then back to ASCII. ASCII is the input&lt;br /&gt;
format in the first translation and the output format in the second&lt;br /&gt;
translation, vice versa for binary. You would need to edit the format&lt;br /&gt;
description file before executing the second translation if you&lt;br /&gt;
included read/write type in the format descriptors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;If you use the -ft option, you do not need to edit the format&lt;br /&gt;
description file. See below.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you do not specify read/write type, FreeForm ND can nevertheless&lt;br /&gt;
determine which format in a format description file is input and which&lt;br /&gt;
is output as long as you have adhered to FreeForm ND filenaming&lt;br /&gt;
conventions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*If the input format is not specified, and&lt;br /&gt;
**the input data filename extension is &amp;lt;font color=&#039;green&#039;&amp;gt;.bin&amp;lt;/font&amp;gt;, assume binary input.&lt;br /&gt;
**the input data filename extension is &amp;lt;font color=&#039;green&#039;&amp;gt;.dab&amp;lt;/font&amp;gt;, assume dBASE input.&lt;br /&gt;
**the input data filename extension is &amp;lt;font color=&#039;green&#039;&amp;gt;.dat&amp;lt;/font&amp;gt;, assume ASCII input.&lt;br /&gt;
**the input data filename extension is anything else, assume binary input.&lt;br /&gt;
*:&lt;br /&gt;
*If the output format is not specified, and&lt;br /&gt;
**the input format is dBASE, the output is ASCII or binary, whichever is found first.&lt;br /&gt;
**the input format is ASCII, the output is binary or dBASE, whichever is found first.&lt;br /&gt;
*:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;The appropriate format descriptions must be in the format&lt;br /&gt;
description file(s) used by FreeForm ND for a translation. If, for&lt;br /&gt;
example, FreeForm ND determines the input format is binary and the&lt;br /&gt;
output format is ASCII, there must be a format description for each&lt;br /&gt;
type. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The checkvar program needs only an input format.&lt;br /&gt;
&lt;br /&gt;
==Locating Format Files==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FreeForm ND programs use the following search sequence to find a&lt;br /&gt;
format file (format or variable description file) for the data file&lt;br /&gt;
datafile.ext when the format file name is not explicitly specified on&lt;br /&gt;
the command line. In summary, FreeForm ND searches the directory&lt;br /&gt;
specified by the GeoVu keyword &amp;lt;font color=&#039;green&#039;&amp;gt;format_dir&amp;lt;/font&amp;gt; (defined in a equivalence&lt;br /&gt;
table or in the environment), the current or working directory, and&lt;br /&gt;
the data file&#039;s home directory. The rules are applied in the order&lt;br /&gt;
given below until a format file is found or all rules have been&lt;br /&gt;
exhausted. If the relevant format file does not follow FreeForm ND&lt;br /&gt;
conventions for name or location, it should be explicitly specified on&lt;br /&gt;
the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;GeoVu is a FreeForm ND-based application for data access and&lt;br /&gt;
visualization. FreeForm ND applications other than GeoVu use GeoVu&lt;br /&gt;
keywords. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For information about equivalence tables, see the GeoVu Tools&lt;br /&gt;
Reference Guide, available from the NGDC.&lt;br /&gt;
&lt;br /&gt;
===Search Sequence===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#Search the directory given by the GeoVu keyword &amp;lt;font color=&#039;green&#039;&amp;gt;format_dir&amp;lt;/font&amp;gt; for a format description file named datafile.fmt.&lt;br /&gt;
#Search the directory given by the GeoVu keyword &amp;lt;font color=&#039;green&#039;&amp;gt;format_dir&amp;lt;/font&amp;gt; for variable description files named &amp;lt;font color=&#039;green&#039;&amp;gt;datafile.afm&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;datafile.bfm&amp;lt;/font&amp;gt;, and &amp;lt;font color=&#039;green&#039;&amp;gt;datafile.dfm&amp;lt;/font&amp;gt;. &amp;lt;blockquote&amp;gt;Step 2 is included to accommodate variable description files that were created using previous versions of FreeForm ND. It is recommended that you convert existing variable description files to format description files. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
#Search the directory given by the GeoVu keyword &amp;lt;font color=&#039;green&#039;&amp;gt;format_dir&amp;lt;/font&amp;gt; for a format description file named ext.fmt. If the GeoVu keyword &amp;lt;font color=&#039;green&#039;&amp;gt;format_dir&amp;lt;/font&amp;gt; is not found, FreeForm ND continues the search for a format file as follows.&lt;br /&gt;
#Search the current (default) directory for a format description file named datafile.fmt.&lt;br /&gt;
#Search the current directory for variable description files named &amp;lt;font color=&#039;green&#039;&amp;gt;datafile.afm&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;datafile.bfm&amp;lt;/font&amp;gt;, and &amp;lt;font color=&#039;green&#039;&amp;gt;datafile.dfm&amp;lt;/font&amp;gt;. Use the criteria in step 2 for determining input and output format files.&lt;br /&gt;
#Search the current directory for a format description file named &amp;lt;font color=&#039;green&#039;&amp;gt;ext.fmt&amp;lt;/font&amp;gt;. If the data file&#039;s home directory is not the same as the current directory, FreeForm ND continues the search for a format file with steps 7-9. The data file&#039;s home directory is given by the directory path component of the data file name. If the data file name has no directory path component, the home directory search is not done.&lt;br /&gt;
#Search the data file&#039;s home directory for a format description file named &amp;lt;font color=&#039;green&#039;&amp;gt;datafile.fmt&amp;lt;/font&amp;gt;.&lt;br /&gt;
#Search the data file&#039;s home directory for variable description files named &amp;lt;font color=&#039;green&#039;&amp;gt;datafile.afm&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;datafile.bfm&amp;lt;/font&amp;gt;, and &amp;lt;font color=&#039;green&#039;&amp;gt;datafile.dfm&amp;lt;/font&amp;gt;. Use the criteria in step 2 for determining input and output format files.&lt;br /&gt;
#Search the data file&#039;s home directory for a format description file named &amp;lt;font color=&#039;green&#039;&amp;gt;ext.fmt&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Case Sensitivity===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FreeForm ND adheres to the following rules for case sensitivity (in&lt;br /&gt;
applicable operating systems) when it searches for a format file for&lt;br /&gt;
the data file datafile.ext.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*FreeForm ND preserves the case of datafile, for example, the default format file for the data file &amp;lt;font color=&#039;green&#039;&amp;gt;LATLON.BIN&amp;lt;/font&amp;gt; is &amp;lt;font color=&#039;green&#039;&amp;gt;LATLON.fmt&amp;lt;/font&amp;gt; (or &amp;lt;font color=&#039;green&#039;&amp;gt;LATLON.bfm&amp;lt;/font&amp;gt;).&lt;br /&gt;
*FreeForm ND searches for a format file with a lower case extension. That is, the format file must have its extension in lower case no matter what the case of datafile. For example, the default format file for the data file &amp;lt;font color=&#039;green&#039;&amp;gt;LatLon.dat&amp;lt;/font&amp;gt; is &amp;lt;font color=&#039;green&#039;&amp;gt;LatLon.fmt&amp;lt;/font&amp;gt; (or &amp;lt;font color=&#039;green&#039;&amp;gt;LatLon.afm&amp;lt;/font&amp;gt;), and &amp;lt;font color=&#039;green&#039;&amp;gt;TIMEDATE.fmt&amp;lt;/font&amp;gt; (or &amp;lt;font color=&#039;green&#039;&amp;gt;TIMEDATE.bfm&amp;lt;/font&amp;gt;) is the default format file for &amp;lt;font color=&#039;green&#039;&amp;gt;TIMEDATE.bin&amp;lt;/font&amp;gt;.&lt;br /&gt;
*In searching for a format description file of type &amp;lt;font color=&#039;green&#039;&amp;gt;ext.fmt&amp;lt;/font&amp;gt;, FreeForm ND preserves the case of ext. For example, for data files named &amp;lt;font color=&#039;green&#039;&amp;gt;lldat1.LL&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;lldat2.LL&amp;lt;/font&amp;gt;, and &amp;lt;font color=&#039;green&#039;&amp;gt;latlon3.LL&amp;lt;/font&amp;gt;, the default format description file is &amp;lt;font color=&#039;green&#039;&amp;gt;LL.fmt&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Command Line Arguments==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FreeForm ND programs can take various command line arguments. The most&lt;br /&gt;
widely used or standard arguments are discussed in this section. They&lt;br /&gt;
are used for several different purposes: identifying input and output&lt;br /&gt;
files, identifying format files and titles, changing run-time&lt;br /&gt;
operation parameters, and defining data filters.&lt;br /&gt;
&lt;br /&gt;
The only required argument for any FreeForm ND program is the name of&lt;br /&gt;
the input file or file to be processed. All other arguments are&lt;br /&gt;
optional and can be in any order following the input file name. The&lt;br /&gt;
command line of a FreeForm ND program with the standard arguments has&lt;br /&gt;
the following form:&lt;br /&gt;
&lt;br /&gt;
application_name input_file [-f format_file]&lt;br /&gt;
&lt;br /&gt;
[-if input_format_file] [-of output_format_file] [-ft &amp;quot;title&amp;quot;] [-ift &amp;quot;title&amp;quot;] [-oft &amp;quot;title&amp;quot;] [-b local_buffer_size] [-c count] [-v var_file] [-q query_file] [-o output_file]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;NOTE: To see a summary of command line usage for a FreeForm ND&lt;br /&gt;
program, enter the program&#039;s name on the command line without any&lt;br /&gt;
arguments.  &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Specifying Input and Output Files===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;input_file&#039;&#039;&#039; : Name of the file to be processed. Following FreeForm ND naming&lt;br /&gt;
conventions, the standard extensions for data files are &amp;lt;font color=&#039;green&#039;&amp;gt;.dat&amp;lt;/font&amp;gt; for ASCII format, &amp;lt;font color=&#039;green&#039;&amp;gt;.bin&amp;lt;/font&amp;gt; for binary, and &amp;lt;font color=&#039;green&#039;&amp;gt;.dab&amp;lt;/font&amp;gt; for dBASE.&lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;-o output_file&#039;&#039;&#039; : Option flag followed by the name of the output file. The standard extensions are the same as for input files.&lt;br /&gt;
&lt;br /&gt;
===Specifying Format Description Source===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FreeForm ND offers a number of command line options for specifying the&lt;br /&gt;
source of the format descriptions that a program must find in order to&lt;br /&gt;
process data. The proper option or combination of options to use&lt;br /&gt;
depends on how you have constructed your format files.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
; -f format_file : Option flag followed by the name of the format description file&lt;br /&gt;
describing both input and output data.&lt;br /&gt;
&lt;br /&gt;
; -if input_format_file : Option flag followed by the name of the format description file describing the input data. Also use this option for an input variable description file written using earlier versions of FreeForm ND.&lt;br /&gt;
&lt;br /&gt;
; -of output_format_file : Option flag followed by the name of the format description file describing the output data. Also use this option for an output variable description file written using earlier versions of FreeForm ND.&lt;br /&gt;
&lt;br /&gt;
; -ft title : Option flag followed by the title (enclosed in quotes) of the format to be used for both input and output data, in which case there is no reformatting. The title follows format type on the first line of a format description in a format description file.&lt;br /&gt;
&lt;br /&gt;
; -ift title : Option flag followed by the title (enclosed in quotes) of the desired input format.&lt;br /&gt;
&lt;br /&gt;
; -oft title : Option flag followed by the title (enclosed in quotes) of the desired output format.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;NOTE: Previous versions of FreeForm ND used variable description files&lt;br /&gt;
(&amp;lt;font color=&#039;green&#039;&amp;gt;.afm&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;.bfm&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;.dfm&amp;lt;/font&amp;gt;). It is recommended that you&lt;br /&gt;
convert and combine (as appropriate) existing variable description&lt;br /&gt;
files into format description files. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The various options available for specifying the source of a format&lt;br /&gt;
description offer you a great deal of flexibility-in naming files,&lt;br /&gt;
setting up format description files, and on the command line. In using&lt;br /&gt;
these options, you need to consider the content of your format&lt;br /&gt;
description files and how FreeForm ND will interpret the arguments on&lt;br /&gt;
the command line.&lt;br /&gt;
&lt;br /&gt;
===Changing Run-time Parameters===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FreeForm ND includes three arguments that let you change run-time&lt;br /&gt;
parameters according to your needs. One argument lets you specify&lt;br /&gt;
local buffer size, another indicates the number of records to process,&lt;br /&gt;
and the third indicates which variables to process.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
; -b local_buffer_size: Option flag followed by the size of the memory buffer used to&lt;br /&gt;
process the data and format files. Default buffer size is 32,768. You many want to decrease the buffer size if you are running with low memory. Keep in mind that too small a buffer may result in unexpected behavior.&lt;br /&gt;
&lt;br /&gt;
; -c count: Option flag followed by a number that specifies how many data&lt;br /&gt;
records at the head or tail of the file to process. If &amp;lt;math&amp;gt;count &amp;gt; 0&amp;lt;/math&amp;gt;, &#039;&#039;count&#039;&#039; records at the beginning of the file are processed. If &amp;lt;math&amp;gt;count &amp;lt; 0&amp;lt;/math&amp;gt;, &#039;&#039;count&#039;&#039; records at the tail or end of the file are processed.&lt;br /&gt;
&lt;br /&gt;
; -v var_file : Option flag followed by the name of a variable file. The file&lt;br /&gt;
contains names of the variables in the input data file to be processed by the FreeForm ND program. Variable names in var_file can be separated by one or more spaces or each name can be on a separate line.&lt;br /&gt;
&lt;br /&gt;
===Defining Filters===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The query option lets you define data filters via a query file so you&lt;br /&gt;
can precisely specify which data to process. The FreeForm ND program&lt;br /&gt;
will process only those records meeting the query criteria.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
; -q query_file :&lt;br /&gt;
Option flag followed by the name of the file containing query&lt;br /&gt;
criteria.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Wiki_Testing/ff-server&amp;diff=4949</id>
		<title>Wiki Testing/ff-server</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Wiki_Testing/ff-server&amp;diff=4949"/>
		<updated>2009-10-06T23:53:34Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[FreeForm|return to FreeForm]]&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP FreeForm ND Data Handler=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP FreeForm ND Data Handler is a OPeNDAP server add-on that uses OPeNDAP FreeForm ND to convert and serve data&lt;br /&gt;
in formats that are not directly supported by existing [[Hyrax]] data handlers.  Bringing&lt;br /&gt;
OPeNDAP FreeForm ND &#039;s data conversion capacity into the OPeNDAP world widens data&lt;br /&gt;
access for DAP2 clients, since any format that can be described in&lt;br /&gt;
OPeNDAP FreeForm ND can now be served by the OPeNDAP data server.&lt;br /&gt;
&lt;br /&gt;
Like all DAP2 servers, the OPeNDAP FreeForm ND Data Handler responds to client requests for data&lt;br /&gt;
by returning either data values or information about the data.  It&lt;br /&gt;
differs from other DAP2 servers because it invokes OPeNDAP FreeForm ND to read the&lt;br /&gt;
data from disk before serving it to the client.&lt;br /&gt;
&lt;br /&gt;
The following sequence of steps illustrates how the OPeNDAP FreeForm ND Data Handler works:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#A DAP2 client sends a request for data to a OPeNDAP FreeForm ND Data Handler .  The request must include the name of the file that contains the data, and may include a constraint expression to sample the data.&lt;br /&gt;
#The OPeNDAP FreeForm ND Data Handler looks in its path for two files: a data file with the name sent by the client, and a format definition file to use with the data file.  The format definition file contains a description of the data format, constructed according to the OPeNDAP FreeForm ND syntax. &lt;br /&gt;
#The server uses both files in invoking the OPeNDAP FreeForm ND engine.  The OPeNDAP FreeForm ND engine reads the data file and the format file, using the instructions in the latter to convert the former into data which is then passed back to the OPeNDAP FreeForm ND Data Handler .&lt;br /&gt;
#On receiving the converted data, the OPeNDAP FreeForm ND Data Handler converts the data into the DAP2 transmission format.  The conversion may involve some adjustment of data types; these are listed below.  The server also applies any constraint expressions the client sent along with the URL.&lt;br /&gt;
#The server then constructs DDS and DAS files based on the format of the converted data.  If the server has access to DDS and DAS files that describe the data, it applies those definition before sending them back to the client.&lt;br /&gt;
#Finally, the server sends the DDS, DAS, and converted data back to the client.&lt;br /&gt;
&lt;br /&gt;
For information about how to write a OPeNDAP FreeForm ND data description, refer to&lt;br /&gt;
the [[Wiki_Testing/tblfmt|Table Format]] for sequence data and&lt;br /&gt;
[[Wiki_Testing/arrayfmt|Array Format]] for array data.&lt;br /&gt;
&lt;br /&gt;
For an introduction to DAP2 and to the OPeNDAP project, please refer&lt;br /&gt;
to The Opendap User Guide.&lt;br /&gt;
&lt;br /&gt;
==Differences between OPeNDAP FreeForm ND and the OPeNDAP FreeForm ND Data Handler==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP FreeForm ND Data Handler is based on the same libraries used to make the OPeNDAP FreeForm ND utilities.  However, there are some important differences in the&lt;br /&gt;
resulting software:&lt;br /&gt;
&lt;br /&gt;
*The OPeNDAP FreeForm ND Data Handler is a OPeNDAP FreeForm ND application that converts data &#039;&#039;on receiving a client request for that data&#039;&#039;, and not before.  Data served by the OPeNDAP FreeForm ND Data Handler remains in its original format.&lt;br /&gt;
*The OPeNDAP FreeForm ND Data Handler does not produce an output file containing the converted data, but serves it directly over the network to the DAP2 client.  Therefore, the OPeNDAP FreeForm ND Data Handler ignores the output section of the format definition file.&lt;br /&gt;
*To sample a data file, you do not write format definitions that cause the OPeNDAP FreeForm ND engine to sample the data file.  Instead, you add a DAP2 &amp;quot;constraint expression&amp;quot; to the URL that the client sends to the OPeNDAP FreeForm ND Data Handler .&lt;br /&gt;
*The OPeNDAP FreeForm ND Data Handler performs data conversion on the fly.  Conversion only takes place when the client sends a URL requesting data from the OPeNDAP FreeForm ND Data Handler .&lt;br /&gt;
*Unlike OPeNDAP FreeForm ND , there is no static file created by the conversion.&lt;br /&gt;
(If you wish to create or work with such a file, use the OPeNDAP FreeForm ND&lt;br /&gt;
utilities, such as &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
==Data Type Conversions==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP FreeForm ND Data Handler performs data conversions, based on the data it receives&lt;br /&gt;
from the OPeNDAP FreeForm ND engine.  Note that OPeNDAP does not recommend the use of&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;int64&amp;lt;/font&amp;gt; and &amp;lt;font color=&#039;green&#039;&amp;gt;uint64&amp;lt;/font&amp;gt; in the format definition file.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
DAP2 Data Type Conversions&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
! &#039;&#039;&#039;OPeNDAP FreeForm ND&#039;&#039;&#039;   !!  &#039;&#039;&#039;DAP2&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;text&amp;lt;/font&amp;gt; || &amp;lt;font color=&#039;green&#039;&amp;gt;String&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;int8&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;uint8&amp;lt;/font&amp;gt; || &amp;lt;font color=&#039;green&#039;&amp;gt;Byte&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;int16&amp;lt;/font&amp;gt; || &amp;lt;font color=&#039;green&#039;&amp;gt;Int16&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;int32&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;int64&amp;lt;/font&amp;gt; || &amp;lt;font color=&#039;green&#039;&amp;gt;Int32&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;uint16&amp;lt;/font&amp;gt; || &amp;lt;font color=&#039;green&#039;&amp;gt;UInt16&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;uint32&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;uint64&amp;lt;/font&amp;gt; || &amp;lt;font color=&#039;green&#039;&amp;gt;UInt32&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;float32&amp;lt;/font&amp;gt; || &amp;lt;font color=&#039;green&#039;&amp;gt;Float32&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;float64&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;enote&amp;lt;/font&amp;gt; || &amp;lt;font color=&#039;green&#039;&amp;gt;Float64&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Conversion Examples===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The examples show how the OPeNDAP FreeForm ND Data Handler treats data&lt;br /&gt;
received from the OPeNDAP FreeForm ND engine.  Please see the OPeNDAP&lt;br /&gt;
FreeForm ND Data Handler distribution for more test data and format&lt;br /&gt;
definition files, and the ([[Wiki_Testing/tblfmt|Table Format]]) for&lt;br /&gt;
more information on writing format definitions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Arrays====&lt;br /&gt;
&lt;br /&gt;
If you define a variable as an array in the OPeNDAP FreeForm ND format definition&lt;br /&gt;
file, the OPeNDAP FreeForm ND Data Handler produces an array of variables with matching types.&lt;br /&gt;
&lt;br /&gt;
For exmple, this entry in the format definition file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
binary_input_data &amp;quot;array&amp;quot;&lt;br /&gt;
fvar1 1 4 ARRAY[&amp;quot;records&amp;quot; 1 to 101] of int32 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in converted by the OPeNDAP FreeForm ND Data Handler to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Int32 fvar1[records = 101]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Collections of Variables====&lt;br /&gt;
&lt;br /&gt;
If you define several variables in the format definition file, the&lt;br /&gt;
OPeNDAP FreeForm ND Data Handler produces a Sequence of variables with matching types.&lt;br /&gt;
&lt;br /&gt;
For example, this entry in the format definition file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ASCII_input_data &amp;quot;ASCII_data&amp;quot;&lt;br /&gt;
fvar1   1 10  int32 2&lt;br /&gt;
svar1  13 18  int16 0&lt;br /&gt;
usvar1 21 26 uint16 1&lt;br /&gt;
lvar1  29 39  int32 0&lt;br /&gt;
ulvar1 42 52 uint32 4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is converted by the OPeNDAP FreeForm ND Data Handler to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sequence {&lt;br /&gt;
Int32 fvar1;&lt;br /&gt;
Int32 svar1;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
} ASCII_data;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Multiple Arrays====&lt;br /&gt;
&lt;br /&gt;
If you define a collection of arrays in the format definition file, as&lt;br /&gt;
you would expect, the OPeNDAP FreeForm ND Data Handler produces a dataset containing multiple&lt;br /&gt;
arrays.&lt;br /&gt;
&lt;br /&gt;
For example, this entry in the format definition file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
binary_input_data &amp;quot;arrays&amp;quot;&lt;br /&gt;
fvar1 1 4 ARRAY[&amp;quot;records&amp;quot; 1 to 101] of int32 0&lt;br /&gt;
fvar2 1 4 ARRAY[&amp;quot;records&amp;quot; 1 to 101] of int32 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is converted by the OPeNDAP FreeForm ND Data Handler to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Dataset {&lt;br /&gt;
Int32 fvar1[records=101]&lt;br /&gt;
Int32 fvar2[records=101]&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Wiki_Testing/hdrfmts&amp;diff=4948</id>
		<title>Wiki Testing/hdrfmts</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Wiki_Testing/hdrfmts&amp;diff=4948"/>
		<updated>2009-10-06T23:50:09Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[FreeForm|return to FreeForm]]&lt;br /&gt;
&lt;br /&gt;
=Header Formats=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Headers are one of the most commonly encountered forms of&lt;br /&gt;
metadata-data about data. Applications need the information contained&lt;br /&gt;
in headers for reading the data that the headers describe. To access&lt;br /&gt;
these data, applications must be able to read the headers. Just as&lt;br /&gt;
there are many data formats, there are numerous header formats. You&lt;br /&gt;
can include header format descriptions, which have exactly the same&lt;br /&gt;
form as data format descriptions, in format description files.&lt;br /&gt;
&lt;br /&gt;
==Header Treatment in FreeForm ND==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FreeForm ND is not 100 percent backwards compatible with FreeForm in&lt;br /&gt;
the area of header treatment.&lt;br /&gt;
&lt;br /&gt;
Headers have traditionally been handled differently from data in&lt;br /&gt;
FreeForm ND. If a header format was not specified as either input or&lt;br /&gt;
output, it was taken as both input and output. &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; did&lt;br /&gt;
little in processing headers, and FreeForm ND relied on extraneous&lt;br /&gt;
utilities to work with headers.&lt;br /&gt;
&lt;br /&gt;
===New Behavior===&lt;br /&gt;
&lt;br /&gt;
In FreeForm ND, header formats are treated the same as data formats.&lt;br /&gt;
This means that header formats must be identified as either input or&lt;br /&gt;
output, explicitly or implicitly. If done explicitly, then either the&lt;br /&gt;
input or the output descriptor will form the format type (e.g.,&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_input_header&amp;lt;/font&amp;gt;). If done implicitly, then the same&lt;br /&gt;
ambiguity resolution rules that apply to data formats will be applied&lt;br /&gt;
to header formats. This means that ASCII header formats will be taken&lt;br /&gt;
as input for data files with a &amp;lt;font color=&#039;green&#039;&amp;gt;.dat&amp;lt;/font&amp;gt; extension, dBASE header&lt;br /&gt;
formats will be taken as input for data files with a &amp;lt;font color=&#039;green&#039;&amp;gt;.dab&amp;lt;/font&amp;gt;&lt;br /&gt;
extension, and binary header formats will be taken as input for all&lt;br /&gt;
other data files.&lt;br /&gt;
&lt;br /&gt;
If an embedded header and the data have different file types, then&lt;br /&gt;
either the header format or data format (preferably both) must be&lt;br /&gt;
explicitly identified as input or output (for example, an ASCII header&lt;br /&gt;
embedded in a binary data file). Obviously, ambiguous formats with&lt;br /&gt;
different file types cannot both be resolved as input formats.&lt;br /&gt;
&lt;br /&gt;
The same header format is no longer used as both an input and an&lt;br /&gt;
output header format.&lt;br /&gt;
&lt;br /&gt;
In FreeForm ND, &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; honors output header formats that are&lt;br /&gt;
separate (e.g., &amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_output_header_separate&amp;lt;/font&amp;gt;). The header is&lt;br /&gt;
written to a separate file which, unless otherwise specified, is named&lt;br /&gt;
after the output data file with a &amp;lt;font color=&#039;green&#039;&amp;gt;.hdr&amp;lt;/font&amp;gt; extension. This requires&lt;br /&gt;
that you name the output file using the &amp;lt;font color=&#039;green&#039;&amp;gt;-o&amp;lt;/font&amp;gt; option flag; redirected&lt;br /&gt;
output cannot be used with separate output headers. The output header&lt;br /&gt;
file name and path can be specified using the same keywords that tell&lt;br /&gt;
FreeForm ND how to find an input separate header file (i.e.,&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;header_file_ext&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;header_file_name&amp;lt;/font&amp;gt;, and&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;header_file_path&amp;lt;/font&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
When defining keywords to specify how an output header file is to be&lt;br /&gt;
named, you must use a new type of equivalence section,&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;input_eqv&amp;lt;/font&amp;gt;, which must appear in the format file along with&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;output_eqv&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Header Types==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FreeForm ND recognizes two types of headers. File headers describe all&lt;br /&gt;
the data in a file whereas record headers describe the data in a&lt;br /&gt;
single record or data block. FreeForm ND can read headers included in&lt;br /&gt;
the data file or stored in a separate file. Header formats, like data&lt;br /&gt;
formats, are described in format description files.&lt;br /&gt;
&lt;br /&gt;
===File Headers===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A file header included in a data file is at the beginning of the file.&lt;br /&gt;
Only one file header can be associated with a data file.&lt;br /&gt;
Alternatively, a file header can be stored in a file separate from the&lt;br /&gt;
data file.&lt;br /&gt;
&lt;br /&gt;
In the following example, a file header is used to store the minimum&lt;br /&gt;
and maximum for each variable and the data are converted from ASCII to&lt;br /&gt;
binary. There are two variables, latitude and longitude. The file&lt;br /&gt;
header format and data formats are described in the format description&lt;br /&gt;
file &amp;lt;font color=&#039;green&#039;&amp;gt;llmaxmin.fmt&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here is &amp;lt;font color=&#039;green&#039;&amp;gt;llmaxmin.fmt&amp;lt;/font&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ASCII_file_header &amp;quot;Latitude/Longitude Limits&amp;quot;&lt;br /&gt;
minmax_title 1 24 char 0&lt;br /&gt;
latitude_min 25 36 double 6&lt;br /&gt;
latitude_max 37 46 double 6&lt;br /&gt;
longitude_min 47 59 double 6&lt;br /&gt;
longitude_max 60 70 double 6&lt;br /&gt;
&lt;br /&gt;
ASCII_data &amp;quot;lat/lon&amp;quot;&lt;br /&gt;
latitude 1 10 double 6&lt;br /&gt;
longitude 12 22 double 6&lt;br /&gt;
&lt;br /&gt;
binary_data &amp;quot;lat/lon&amp;quot;&lt;br /&gt;
latitude 1 4 long 6&lt;br /&gt;
longitude 5 8 long 6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The example ASCII data file &amp;lt;font color=&#039;green&#039;&amp;gt;llmaxmin.dat&amp;lt;/font&amp;gt; contains a file header&lt;br /&gt;
and data as described in &amp;lt;font color=&#039;green&#039;&amp;gt;llmaxmin.fmt&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;llmaxmin.dat&amp;lt;/font&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1         2         3         4         5         6         7&lt;br /&gt;
1234567890123456789012345678901234567890123456789012345678901234567890&lt;br /&gt;
&lt;br /&gt;
Latitude and Longitude:   -83.223548 54.118314  -176.161101 149.408117&lt;br /&gt;
-47.303545 -176.161101&lt;br /&gt;
-25.928001    0.777265&lt;br /&gt;
-28.286662   35.591879&lt;br /&gt;
&lt;br /&gt;
12.588231  149.408117&lt;br /&gt;
-83.223548   55.319598&lt;br /&gt;
&lt;br /&gt;
54.118314 -136.940570&lt;br /&gt;
&lt;br /&gt;
38.818812   91.411330&lt;br /&gt;
-34.577065   30.172129&lt;br /&gt;
&lt;br /&gt;
27.331551 -155.233735&lt;br /&gt;
&lt;br /&gt;
11.624981 -113.660611&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This use of a file header would be appropriate if you were interested&lt;br /&gt;
in creating maps from large data files. By including maximums and&lt;br /&gt;
minimums in a header, the scale of the axes can be determined without&lt;br /&gt;
reading the entire file.&lt;br /&gt;
&lt;br /&gt;
FreeForm ND naming conventions have been followed in this example, so&lt;br /&gt;
to convert the ASCII data in the example to binary format, use the&lt;br /&gt;
following simple command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
newform llmaxmin.dat -o llmaxmin.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file header in the example will be written into the binary file as&lt;br /&gt;
ASCII text because the header descriptor in &amp;lt;font color=&#039;green&#039;&amp;gt;llmaxmin.fmt&amp;lt;/font&amp;gt;&lt;br /&gt;
(&amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_file_header&amp;lt;/font&amp;gt;) does not specify read/write type, so the&lt;br /&gt;
format is used for both the input and output header.&lt;br /&gt;
&lt;br /&gt;
===Record Headers===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Record headers occur once for every block of data in a file. They are&lt;br /&gt;
interspersed with the data, a configuration sometimes called a format&lt;br /&gt;
sandwich. Record headers can also be stored together in a separate&lt;br /&gt;
file.&lt;br /&gt;
&lt;br /&gt;
The following format description file specifies a record header and&lt;br /&gt;
ASCII and binary data formats for aeromagnetic trackline data.&lt;br /&gt;
&lt;br /&gt;
Here is &amp;lt;font color=&#039;green&#039;&amp;gt;aeromag.fmt&amp;lt;/font&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ASCII_record_header &amp;quot;Aeromagnetic Record Header Format&amp;quot;&lt;br /&gt;
flight_line_number 1 5 long 0&lt;br /&gt;
count 6 13 long 0&lt;br /&gt;
fiducial_number_corresponding_to_first_logical_record 14 22 long 0&lt;br /&gt;
date_MMDDYY_or_julian_day 23 30 long 0&lt;br /&gt;
flight_number 31 38 long 0&lt;br /&gt;
utm_easting_of_first_record 39 48 float 0&lt;br /&gt;
utm_northing_of_first_record 49 58 float 0&lt;br /&gt;
utm_easting_of_last_record 59 68 float 0&lt;br /&gt;
utm_northing_of_last_record 69 78 float 0&lt;br /&gt;
blank_padding 79 104 char 0&lt;br /&gt;
&lt;br /&gt;
ASCII_data &amp;quot;Aeromagnetic ASCII Data Format&amp;quot;&lt;br /&gt;
flight_line_number 1 5 long 0&lt;br /&gt;
fiducial_number 6 15 long 0&lt;br /&gt;
utm_easting_meters 16 25 float 0&lt;br /&gt;
utm_northing_meters 26 35 float 0&lt;br /&gt;
mag_total_field_intensity_nT 36 45 long 0&lt;br /&gt;
mag_residual_field_nT 46 55 long 0&lt;br /&gt;
alt_radar_meters 56 65 long 0&lt;br /&gt;
alt_barometric_meters 66 75 long 0&lt;br /&gt;
blank 76 80 char 0&lt;br /&gt;
latitude 81 92 float 6&lt;br /&gt;
longitude 93 104 float 6&lt;br /&gt;
&lt;br /&gt;
binary_data &amp;quot;Aeromagnetic Binary Data Format&amp;quot;&lt;br /&gt;
flight_line_number 1 4 long 0&lt;br /&gt;
fiducial_number 5 8 long 0&lt;br /&gt;
utm_easting_meters 9 12 long 0&lt;br /&gt;
utm_northing_meters 13 16 long 0&lt;br /&gt;
mag_total_field_intensity_nT 17 20 long 0&lt;br /&gt;
mag_residual_field_nT 21 24 long 0&lt;br /&gt;
alt_radar_meters 25 28 long 0&lt;br /&gt;
alt_barometric_meters 29 32 long 0&lt;br /&gt;
blank 33 37 char 0&lt;br /&gt;
latitude 38 41 long 6&lt;br /&gt;
longitude 42 45 long 6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The example ASCII file &amp;lt;font color=&#039;green&#039;&amp;gt;aeromag.dat&amp;lt;/font&amp;gt; contains two record headers&lt;br /&gt;
followed by a number of data records. The header and data formats are&lt;br /&gt;
described in &amp;lt;font color=&#039;green&#039;&amp;gt;aeromag.fmt&amp;lt;/font&amp;gt;. The variable count (second variable&lt;br /&gt;
defined in the header format description) is used to indicate how many&lt;br /&gt;
data records occur after each header.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;aeromag.dat&amp;lt;/font&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1         2         3         4         5         6         7         8         9         10&lt;br /&gt;
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345&lt;br /&gt;
&lt;br /&gt;
420       5     5272     178       2   413669.  6669740.   333345.  6751355.                   &lt;br /&gt;
&lt;br /&gt;
420      5272   413669.  6669740.   2715963   2715449      1088      1348        60.157307 -154.555191&lt;br /&gt;
&lt;br /&gt;
420      5273   413635.  6669773.   2715977   2715464      1088      1350        60.157593 -154.555817&lt;br /&gt;
&lt;br /&gt;
420      5274   413601.  6669807.   2716024   2715511      1088      1353        60.157894 -154.556442&lt;br /&gt;
&lt;br /&gt;
420      5275   413567.  6669841.   2716116   2715603      1079      1355        60.158188 -154.557068&lt;br /&gt;
&lt;br /&gt;
420      5276   413533.  6669875.   2716263   2715750      1079      1358        60.158489 -154.557693&lt;br /&gt;
&lt;br /&gt;
411      10     8366     178       2   332640.  6749449.   412501.  6668591.                   &lt;br /&gt;
&lt;br /&gt;
411      8366   332640.  6749449.   2736555   2736538       963      1827        60.846806 -156.080185&lt;br /&gt;
&lt;br /&gt;
411      8367   332674.  6749415.   2736539   2736522       932      1827        60.846516 -156.079529&lt;br /&gt;
&lt;br /&gt;
411      8368   332708.  6749381.   2736527   2736510       917      1829        60.846222 -156.078873&lt;br /&gt;
&lt;br /&gt;
411      8369   332742.  6749347.   2736516   2736499       922      1832        60.845936 -156.078217&lt;br /&gt;
&lt;br /&gt;
411      8370   332776.  6749313.   2736508   2736491       946      1839        60.845642 -156.077560&lt;br /&gt;
&lt;br /&gt;
411      8371   332810.  6749279.   2736505   2736488       961      1846        60.845348 -156.076904&lt;br /&gt;
&lt;br /&gt;
411      8372   332844.  6749245.   2736493   2736476       982      1846        60.845062 -156.076248&lt;br /&gt;
&lt;br /&gt;
411      8373   332878.  6749211.   2736481   2736463      1015      1846        60.844769 -156.075607&lt;br /&gt;
&lt;br /&gt;
411      8374   332912.  6749177.   2736470   2736452      1029      1846        60.844479 -156.074951&lt;br /&gt;
&lt;br /&gt;
411      8375   332946.  6749143.   2736457   2736439      1041      1846        60.844189 -156.074295&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This file contains two record headers. The first occurs on the first&lt;br /&gt;
line of the file and has a count of 5, so it is followed by 5 data&lt;br /&gt;
records. The second record header follows the first 5 data records. It&lt;br /&gt;
has a count of 10 and is followed by 10 data records.&lt;br /&gt;
&lt;br /&gt;
The FreeForm ND default naming conventions have been used here so you&lt;br /&gt;
could use the following abbreviated command to reformat&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;aeromag.dat&amp;lt;/font&amp;gt; to a binary file named &amp;lt;font color=&#039;green&#039;&amp;gt;aeromag.bin&amp;lt;/font&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
newform aeromag.dat -o aeromag.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ASCII record headers are written into the binary file as ASCII&lt;br /&gt;
text.&lt;br /&gt;
&lt;br /&gt;
===Separate Header Files===&lt;br /&gt;
&lt;br /&gt;
You may need to describe a data set with external headers. An external or separate header file can contain only headers-one file header or multiple record headers.&lt;br /&gt;
&lt;br /&gt;
====Separate File Header====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Suppose you want the file header used to store the minimum and maximum&lt;br /&gt;
values for latitude and longitude (from the llmaxmin example) in a&lt;br /&gt;
separate file so that the data file is homogenous, thus easier for&lt;br /&gt;
applications to read. Instead of one ASCII file (&amp;lt;font color=&#039;green&#039;&amp;gt;llmaxmin.dat&amp;lt;/font&amp;gt;),&lt;br /&gt;
you will have an ASCII header file, say it is named &amp;lt;font color=&#039;green&#039;&amp;gt;llmxmn.hdr&amp;lt;/font&amp;gt;,&lt;br /&gt;
and an ASCII data file-call it &amp;lt;font color=&#039;green&#039;&amp;gt;llmxmn.dat&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here is &amp;lt;font color=&#039;green&#039;&amp;gt;llmxmn.hdr&amp;lt;/font&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Latitude and Longitude:   -83.223548 54.118314  -176.161101 149.408117&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And here is &amp;lt;font color=&#039;green&#039;&amp;gt;llmxmn.dat&amp;lt;/font&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-47.303545 -176.161101&lt;br /&gt;
-25.928001    0.777265&lt;br /&gt;
-28.286662   35.591879&lt;br /&gt;
&lt;br /&gt;
12.588231  149.408117&lt;br /&gt;
-83.223548   55.319598&lt;br /&gt;
&lt;br /&gt;
54.118314 -136.940570&lt;br /&gt;
&lt;br /&gt;
38.818812   91.411330&lt;br /&gt;
-34.577065   30.172129&lt;br /&gt;
&lt;br /&gt;
27.331551 -155.233735&lt;br /&gt;
&lt;br /&gt;
11.624981 -113.660611&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will need to make one change to &amp;lt;font color=&#039;green&#039;&amp;gt;llmaxmin.fmt&amp;lt;/font&amp;gt;, adding the&lt;br /&gt;
qualifier separate to the header descriptor, so that FreeForm ND will&lt;br /&gt;
look for the header in a separate file. The first line of&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;llmaxmin.fmt&amp;lt;/font&amp;gt; becomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ASCII_file_header_separate &amp;quot;Latitude/Longitude Limits&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save &amp;lt;font color=&#039;green&#039;&amp;gt;llmaxmin.fmt&amp;lt;/font&amp;gt; as &amp;lt;font color=&#039;green&#039;&amp;gt;llmxmn.fmt&amp;lt;/font&amp;gt; after you make the change.&lt;br /&gt;
&lt;br /&gt;
To convert the data in &amp;lt;font color=&#039;green&#039;&amp;gt;llmxmn.dat&amp;lt;/font&amp;gt; to binary format in&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;llmxmn.bin&amp;lt;/font&amp;gt;, use the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
newform llmxmn.dat -o llmxmn.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;NOTE: When you run &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt;, it will write the separate header to &amp;lt;font color=&#039;green&#039;&amp;gt;llmxmn.bin&amp;lt;/font&amp;gt; along with the data in &amp;lt;font color=&#039;green&#039;&amp;gt;llmxmn.dat&amp;lt;/font&amp;gt;.  &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Separate Record Headers====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Record headers in separate files can act as indexes into data files if&lt;br /&gt;
the headers specify the positions of the data in the data file. For&lt;br /&gt;
example, if you have a file containing data from 25 observation&lt;br /&gt;
stations, you could effectively index the file by including a station&lt;br /&gt;
ID and the starting position of the data for that station in each&lt;br /&gt;
record header. Then you could use the index to quickly locate the data&lt;br /&gt;
for a particular station.&lt;br /&gt;
&lt;br /&gt;
Returning to the &amp;lt;font color=&#039;green&#039;&amp;gt;aeromag&amp;lt;/font&amp;gt; example, suppose you want to place the&lt;br /&gt;
two record headers in a separate file. Again, the only change you need&lt;br /&gt;
to make to the format description file (&amp;lt;font color=&#039;green&#039;&amp;gt;aeromag.fmt&amp;lt;/font&amp;gt;) is to add&lt;br /&gt;
the qualifier separate to the header descriptor. The first line would&lt;br /&gt;
then be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ASCII_record_header_separate &amp;quot;Aeromagnetic Record Header Format&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The separate header file would contain the following two lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
420       5     5272     178       2   413669.  6669740.   333345.  6751355.&lt;br /&gt;
411      10     8366     178       2   332640.  6749449.   412501.  6668591.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data file would look like the current &amp;lt;font color=&#039;green&#039;&amp;gt;aeromag.dat&amp;lt;/font&amp;gt; with the&lt;br /&gt;
first and seventh lines removed.&lt;br /&gt;
&lt;br /&gt;
Assuming the data file is named &amp;lt;font color=&#039;green&#039;&amp;gt;aeromag.dat&amp;lt;/font&amp;gt;, the default name&lt;br /&gt;
and location of the header file would be &amp;lt;font color=&#039;green&#039;&amp;gt;aeromag.hdr&amp;lt;/font&amp;gt; in the same&lt;br /&gt;
directory as the data file. Otherwise, the separate header file name&lt;br /&gt;
and location need to be defined in an equivalence table. (For&lt;br /&gt;
information about equivalence tables, see the GeoVu Tools Reference&lt;br /&gt;
Guide.)&lt;br /&gt;
&lt;br /&gt;
===The dBASEfile Format===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Headers and data records in dBASE format are represented in ASCII but&lt;br /&gt;
are not separated by end-of-line characters. They can be difficult to&lt;br /&gt;
read or to use in applications that expect newlines to separate&lt;br /&gt;
records. By using &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt;, dBASE data can be reformatted to&lt;br /&gt;
include end-of-line characters.&lt;br /&gt;
&lt;br /&gt;
In this example, you will reformat the dBASE data file&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;oceantmp.dab&amp;lt;/font&amp;gt; (see below) into the ASCII data file&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;oceantmp.dat&amp;lt;/font&amp;gt;. The input file &amp;lt;font color=&#039;green&#039;&amp;gt;oceantmp.dab&amp;lt;/font&amp;gt; contains a&lt;br /&gt;
record header at the beginning of each line. The header is followed by&lt;br /&gt;
data on the same line. When you convert the file to ASCII, the header&lt;br /&gt;
will be on one line followed by the data on the number of lines&lt;br /&gt;
specified by the variable count. The format description file&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;oceantmp.fmt&amp;lt;/font&amp;gt; is used for this reformatting.&lt;br /&gt;
&lt;br /&gt;
Here is &amp;lt;font color=&#039;green&#039;&amp;gt;oceantmp.fmt&amp;lt;/font&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dbase_record_header &amp;quot;NODC-01 record header format&amp;quot;&lt;br /&gt;
WMO_quad 1 1 char 0&lt;br /&gt;
latitude_deg_abs 2 3 uchar 0&lt;br /&gt;
latitude_min 4 5 uchar 0&lt;br /&gt;
longitude_deg_abs 6 8 uchar 0&lt;br /&gt;
longitude_min 9 10 uchar 0&lt;br /&gt;
date_yymmdd 11 16 long 0&lt;br /&gt;
hours 17 19 uchar 1&lt;br /&gt;
country_code 20 21 char 0&lt;br /&gt;
vessel 22 23 char 0&lt;br /&gt;
count 24 26 short 0&lt;br /&gt;
data_type_code 27 27 char 0&lt;br /&gt;
cruise 28 32 long 0&lt;br /&gt;
station 33 36 short 0&lt;br /&gt;
&lt;br /&gt;
dbase_data &amp;quot;IBT input format&amp;quot;&lt;br /&gt;
depth_m 1 4 short 0&lt;br /&gt;
temperature 5 8 short 2&lt;br /&gt;
&lt;br /&gt;
RETURN &amp;quot;NEW LINE INDICATOR&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ASCII_data &amp;quot;ASCII output format&amp;quot;&lt;br /&gt;
depth_m 1 5 short 0&lt;br /&gt;
temperature 27 31 float 2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This format description file contains a header format description, a&lt;br /&gt;
description for dBASE input data, the special RETURN descriptor, and a&lt;br /&gt;
description for ASCII output data. The variable &#039;&#039;count&#039;&#039; (fourth&lt;br /&gt;
from the bottom in the header format description) indicates the number&lt;br /&gt;
of data records that follow each header. The descriptor RETURN lets&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; skip over the end-of-line marker at the end of each data&lt;br /&gt;
block in the input file &amp;lt;font color=&#039;green&#039;&amp;gt;oceantmp.dab&amp;lt;/font&amp;gt; as it is meaningless to&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; here. Because the end-of-line marker appears at the end&lt;br /&gt;
of the data records in each input data block, RETURN is placed after&lt;br /&gt;
the input data format description in the format description file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;oceantmp.dab&amp;lt;/font&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1         2         3         4         5         6         7&lt;br /&gt;
1234567890123456789012345678901234567890123456789012345678901234567890&lt;br /&gt;
11000171108603131109998  4686021000000002767001027670020276700302767&lt;br /&gt;
110011751986072005690AM  4686091000000002928001028780020287200302872&lt;br /&gt;
11111176458102121909998  4681011000000002728009126890241110005000728&lt;br /&gt;
112281795780051918090PI  268101100000000268900402711&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each dBASE header in &amp;lt;font color=&#039;green&#039;&amp;gt;oceantmp.dab&amp;lt;/font&amp;gt; is located from position 1 to&lt;br /&gt;
36. It is followed by four data records of 8 bytes each. Each record&lt;br /&gt;
comprises a depth and temperature reading. The variable count in the&lt;br /&gt;
header (positions 24-26) indicates that there are 4 data records each&lt;br /&gt;
in the first 3 lines and 2 on the last line. This will all be more&lt;br /&gt;
obvious after conversion.&lt;br /&gt;
&lt;br /&gt;
To reformat &amp;lt;font color=&#039;green&#039;&amp;gt;oceantmp.dab&amp;lt;/font&amp;gt; to ASCII, use the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
newform oceantmp.dab -o oceantmp.dat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The resulting file &amp;lt;font color=&#039;green&#039;&amp;gt;oceantmp.dat&amp;lt;/font&amp;gt; is much easier to read. It is&lt;br /&gt;
readily apparent that there are 4 data records after the first three&lt;br /&gt;
headers and 2 after the last.&lt;br /&gt;
&lt;br /&gt;
Here is &amp;lt;font color=&#039;green&#039;&amp;gt;oceantmp.dat&amp;lt;/font&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1         2         3         4&lt;br /&gt;
1234567890123456789012345678901234567890&lt;br /&gt;
11000171108603131109998  46860210000&lt;br /&gt;
&lt;br /&gt;
0                     27.67&lt;br /&gt;
&lt;br /&gt;
10                     27.67&lt;br /&gt;
&lt;br /&gt;
20                     27.67&lt;br /&gt;
&lt;br /&gt;
30                     27.67&lt;br /&gt;
110011751986072005690AM  46860910000&lt;br /&gt;
&lt;br /&gt;
0                     29.28&lt;br /&gt;
&lt;br /&gt;
10                     28.78&lt;br /&gt;
&lt;br /&gt;
20                     28.72&lt;br /&gt;
&lt;br /&gt;
30                     28.72&lt;br /&gt;
11111176458102121909998  46810110000&lt;br /&gt;
&lt;br /&gt;
0                     27.28&lt;br /&gt;
&lt;br /&gt;
91                     26.89&lt;br /&gt;
&lt;br /&gt;
241                     11.00&lt;br /&gt;
&lt;br /&gt;
500                     07.28&lt;br /&gt;
112281795780051918090PI  26810110000&lt;br /&gt;
&lt;br /&gt;
0                     26.89&lt;br /&gt;
&lt;br /&gt;
40                     27.11&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Wiki_Testing/arrayfmt&amp;diff=4947</id>
		<title>Wiki Testing/arrayfmt</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Wiki_Testing/arrayfmt&amp;diff=4947"/>
		<updated>2009-10-06T23:47:41Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[FreeForm|return to FreeForm]]&lt;br /&gt;
&lt;br /&gt;
=Format Descriptions for Array Data=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the tabular format discussed in [[Wiki_Testing/tblfmt|Table Format]] doesn&#039;t&lt;br /&gt;
describe your data well, FreeForm ND&#039;s array notation may prove&lt;br /&gt;
useful. Describing a data file&#039;s organization as a set of as&lt;br /&gt;
n-dimensional arrays allows for much more flexibility in writing&lt;br /&gt;
format definitions. It also enables subsetting, pixel-manipulation,&lt;br /&gt;
and reorienting arrays of arbitrary dimension and character.&lt;br /&gt;
&lt;br /&gt;
==Array Descriptor Syntax==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FreeForm ND allows you to describe the same fundamental FreeForm ND&lt;br /&gt;
data types in array notation. The arrays can have any number of&lt;br /&gt;
dimensions, any number of elements in each dimension, and either an&lt;br /&gt;
increasing or a decreasing sequencing in each dimension. Furthermore,&lt;br /&gt;
elements in any dimension may be separated from each other&lt;br /&gt;
(demultiplexed) and may even be placed in separate files. However,&lt;br /&gt;
every element of an array must be of the same type.&lt;br /&gt;
&lt;br /&gt;
Array descriptors are a string of n dimension descriptions for arrays&lt;br /&gt;
of n dimensions.  FreeForm ND accepts descriptions with the most&lt;br /&gt;
significant dimension first (i.e. row-major order for 2 dimensions,&lt;br /&gt;
plane-major order in 3 dimensions).&lt;br /&gt;
&lt;br /&gt;
Individual dimension descriptions are enclosed in brackets. Each&lt;br /&gt;
dimension description can contain various keywords and values which&lt;br /&gt;
specify how the dimension is set up. Some of the specifications are&lt;br /&gt;
optional; if you do not specify them, they default to a specific&lt;br /&gt;
value.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;You must not mix array and tabular formats within the input and&lt;br /&gt;
output sections of the format definition file. Only one type of&lt;br /&gt;
notation can be used within each section of the format description&lt;br /&gt;
file, although the sections may use different forms. For example, a&lt;br /&gt;
file&#039;s input format could use array definitions, but the output&lt;br /&gt;
format might be entirely tabular.  &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The dimension description variables include:&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; dimension name (REQUIRED) :&lt;br /&gt;
A name for the dimension. This can be any ASCII string enclosed in&lt;br /&gt;
double-quotes (&amp;quot;). The name for each dimension must be unique&lt;br /&gt;
throughout the array descriptor.&lt;br /&gt;
This example specifies that a dimension named &amp;quot;latitude&amp;quot; exists:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[&amp;quot;latitude&amp;quot; 0 to 180]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; starting and ending indices (REQUIRED) :&lt;br /&gt;
A starting and ending index specifying a range for the dimension.&lt;br /&gt;
The starting and ending indices are specified as integers separated&lt;br /&gt;
by the word &amp;quot;to&amp;quot; following the dimension name. As long as both&lt;br /&gt;
numbers are integral, there are no other restrictions on their&lt;br /&gt;
values.&lt;br /&gt;
This example specifies that the dimension &amp;quot;temperature&amp;quot; has&lt;br /&gt;
indices ranging from -50 to +50:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[&amp;quot;temperature&amp;quot; -50 to 50]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; granularity (optional) :&lt;br /&gt;
A specification for the density of elements in the indices. The&lt;br /&gt;
number provided after the &amp;quot;by&amp;quot; keyword specifies how many index&lt;br /&gt;
positions are to be skipped to find the next element.&lt;br /&gt;
This example specifies that index values 0, 50, 100, 150 and 200 are&lt;br /&gt;
the only valid index values for the dimension &amp;quot;height&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[&amp;quot;height&amp;quot; 0 to 200 by 50]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; grouping (optional) :&lt;br /&gt;
A specification for splitting an array across &amp;quot;partitions&amp;quot; (files&lt;br /&gt;
or buffers in memory). The number provided after the &amp;quot;gb&amp;quot; or&lt;br /&gt;
&amp;quot;groupedby&amp;quot; keyword specifies how many elements of the dimension&lt;br /&gt;
are in each partition. If no value is specified, the default is 0&lt;br /&gt;
(no partitioning). Each partition must have the same number of&lt;br /&gt;
elements. Every more-significant dimension description (those to the&lt;br /&gt;
left) must also have a grouping specified- &amp;quot;dangling&amp;quot; grouping&lt;br /&gt;
specifications are not allowed. If a dimension is not partitioned,&lt;br /&gt;
but is required to have a grouping specification because a&lt;br /&gt;
less-significant dimension is partitioned, a grouping of M can be&lt;br /&gt;
specified, where:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
M = [end_index -  start_index] + 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example specifies that the dimension &amp;quot;latitude&amp;quot; is partitioned&lt;br /&gt;
into 9 chunks of 10 &amp;quot;bands&amp;quot; of latitude each:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[&amp;quot;latitude&amp;quot; 1 to 90 gb 10]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; separation (optional)  :&lt;br /&gt;
A specification for &amp;quot;unused space&amp;quot; in the array. The number&lt;br /&gt;
provided after the &amp;quot;sb&amp;quot; or &amp;quot;separation&amp;quot; keyword specifies how&lt;br /&gt;
many bytes of data following each element in the dimension should&lt;br /&gt;
not be considered part of the array. An &amp;quot;element in the dimension&amp;quot;&lt;br /&gt;
is considered to be everything which occurs in one index of that&lt;br /&gt;
dimension. separation takes on a slightly different meaning if the&lt;br /&gt;
dimension also has a specified grouping. In dimensions with a&lt;br /&gt;
specified grouping, the separation occurs at the end of each&lt;br /&gt;
partition, not after every element.&lt;br /&gt;
This example specifies a 2-dimensional array with 4 bytes between&lt;br /&gt;
the elements in the &amp;quot;columns&amp;quot; and an additional 2 bytes at the end&lt;br /&gt;
of every row:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[&amp;quot;lat&amp;quot; -90 to 90 sb 2][&amp;quot;lon&amp;quot; -180 to 179 sb 4]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Handling Newlines==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The convention of expecting a newline to follow each record of ASCII&lt;br /&gt;
data becomes troublesome when dealing with array data, especially when&lt;br /&gt;
expressed using format description notation that is intended for&lt;br /&gt;
tabular data. It is the FreeForm ND convention that there is an&lt;br /&gt;
implicit newline after the last variable of an ASCII format.&lt;br /&gt;
&lt;br /&gt;
For example, these two format descriptions are equivalent:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ASCII_data &amp;quot;broken time --- BIP&amp;quot;&lt;br /&gt;
year 1 2 uint8 0&lt;br /&gt;
month 3 4 uint8 0&lt;br /&gt;
day 5 6 uint8 0&lt;br /&gt;
hour 7 8 uint8 0&lt;br /&gt;
minute 9 10 uint8 0&lt;br /&gt;
second 11 14 uint16 2&lt;br /&gt;
&lt;br /&gt;
dBASE_data &amp;quot;broken time --- BIP&amp;quot;&lt;br /&gt;
year 1 2 uint8 0&lt;br /&gt;
month 3 4 uint8 0&lt;br /&gt;
day 5 6 uint8 0&lt;br /&gt;
hour 7 8 uint8 0&lt;br /&gt;
minute 9 10 uint8 0&lt;br /&gt;
second 11 14 uint16 2&lt;br /&gt;
EOL 15 16 constant 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, the EOL variable shown here assumes that newlines are two&lt;br /&gt;
bytes long, which is true only on a PC. FreeForm ND adjusts to this by&lt;br /&gt;
assuming that ASCII data always has native newlines, and it updates&lt;br /&gt;
the starting and ending position of EOL variables and subsequent&lt;br /&gt;
variables accordingly.&lt;br /&gt;
&lt;br /&gt;
The EOL variable is typically used to define a record layout that&lt;br /&gt;
spans multiple lines. However, the EOL variable in combination with&lt;br /&gt;
the dBASE format type can completely replace the ASCII format type.We&lt;br /&gt;
recommend using the dBASE format type when describing ASCII arrays, to&lt;br /&gt;
ensure that separation, if specified, takes into account the length of&lt;br /&gt;
any newlines.&lt;br /&gt;
In this output format a newline separates each band of data, but it&lt;br /&gt;
would be just as easy to omit the newlines entirely.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dBASE_input_data &amp;quot;broken time --- BIP&amp;quot;&lt;br /&gt;
year 1 2 array[&amp;quot;x&amp;quot; 1 to 10 sb 14] of uint8 0&lt;br /&gt;
month 3 4 array[&amp;quot;x&amp;quot; 1 to 10 sb 14] of uint8 0&lt;br /&gt;
day 5 6 array[&amp;quot;x&amp;quot; 1 to 10 sb 14] of uint8 0&lt;br /&gt;
hour 7 8 array[&amp;quot;x&amp;quot; 1 to 10 sb 14] of uint8 0&lt;br /&gt;
minute 9 10 array[&amp;quot;x&amp;quot; 1 to 10 sb 14] of uint8 0&lt;br /&gt;
second 11 14 array[&amp;quot;x&amp;quot; 1 to 10 sb 12] of uint16 2&lt;br /&gt;
EOL 15 16 array[&amp;quot;x&amp;quot; 1 to 10 sb 14] of constant 0&lt;br /&gt;
&lt;br /&gt;
dBASE_output_data &amp;quot;broken time - BSQ&amp;quot;&lt;br /&gt;
year 1 2 array[&amp;quot;x&amp;quot; 1 to 10] of uint8 0&lt;br /&gt;
EOL 21 22 constant 0&lt;br /&gt;
month 23 24 array[&amp;quot;x&amp;quot; 1 to 10] of uint8 0&lt;br /&gt;
EOL 43 44 constant 0&lt;br /&gt;
day 45 46 array[&amp;quot;x&amp;quot; 1 to 10] of uint8 0&lt;br /&gt;
EOL 65 66 constant 0&lt;br /&gt;
hour 67 68 array[&amp;quot;x&amp;quot; 1 to 10] of uint8 0&lt;br /&gt;
EOL 87 89 constant 0&lt;br /&gt;
minute 90 91 array[&amp;quot;x&amp;quot; 1 to 10] of uint8 0&lt;br /&gt;
EOL 110 111 constant 0&lt;br /&gt;
second 112 115 array[&amp;quot;x&amp;quot; 1 to 10] of uint16 2&lt;br /&gt;
EOL 132 133 constant 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;The separation size now takes into account the two-character PC&lt;br /&gt;
newline. To use this format description with a native ASCII file on&lt;br /&gt;
UNIX platforms, it would be necessary to change the separation sizes&lt;br /&gt;
of 12 and 14 to 11 and 13, respectively. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following examples should be helpful in understanding the array&lt;br /&gt;
notation.&lt;br /&gt;
&lt;br /&gt;
===Tabular versus Array Descriptions===&lt;br /&gt;
&lt;br /&gt;
Array notation can simply replace the tabular format description, as&lt;br /&gt;
in these examples.&lt;br /&gt;
&lt;br /&gt;
A single element can be described in tabular format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
year 1 2 uint8 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or as an array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
year 1 2 array[&amp;quot;x&amp;quot; 1 to 10] of uint8 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An image file can be described in tabular format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
binary_input_data &amp;quot;grid data&amp;quot;&lt;br /&gt;
data 1 1 uint8 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or as an array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
binary_input_data &amp;quot;grid data&amp;quot;&lt;br /&gt;
data 1 1 array[&amp;quot;rows&amp;quot; 1 to 180] [&amp;quot;cols&amp;quot; 1 to 360] of uint8 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Multiplexed data can be described in tabular format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ASCII_data &amp;quot;broken time --- tabular&amp;quot;&lt;br /&gt;
year 1 2 uint8 0&lt;br /&gt;
month 3 4 uint8 0&lt;br /&gt;
day 5 6 uint8 0&lt;br /&gt;
hour 7 8 uint8 0&lt;br /&gt;
minute 9 10 uint8 0&lt;br /&gt;
second 11 14 uint16 2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or as an array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ASCII_data &amp;quot;broken time -- BIP&amp;quot;&lt;br /&gt;
year 1 2 array[&amp;quot;x&amp;quot; 1 to 10 sb 12] of uint8 0&lt;br /&gt;
month 3 4 array[&amp;quot;x&amp;quot; 1 to 10 sb 12] of uint8 0&lt;br /&gt;
day 5 6 array[&amp;quot;x&amp;quot; 1 to 10 sb 12] of uint8 0&lt;br /&gt;
hour 7 8 array[&amp;quot;x&amp;quot; 1 to 10 sb 12] of uint8 0&lt;br /&gt;
minute 9 10 array[&amp;quot;x&amp;quot; 1 to 10 sb 12] of uint8 0&lt;br /&gt;
second 11 14 array[&amp;quot;x&amp;quot; 1 to 10 sb 10] of uint16 2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These two format descriptions communicate much the same information,&lt;br /&gt;
but the array example also indicates that the data file is blocked&lt;br /&gt;
into ten data values for each variable.&lt;br /&gt;
&lt;br /&gt;
In this example, the data is not multiplexed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ASCII_data &amp;quot;broken time -- BSQ&amp;quot;&lt;br /&gt;
year 1 2 array[&amp;quot;x&amp;quot; 1 to 10] of uint8 0&lt;br /&gt;
month 21 22 array[&amp;quot;x&amp;quot; 1 to 10] of uint8 0&lt;br /&gt;
day 41 42 array[&amp;quot;x&amp;quot; 1 to 10] of uint8 0&lt;br /&gt;
hour 61 62 array[&amp;quot;x&amp;quot; 1 to 10] of uint8 0&lt;br /&gt;
minute 81 82 array[&amp;quot;x&amp;quot; 1 to 10] of uint8 0&lt;br /&gt;
second 101 104 array[&amp;quot;x&amp;quot; 1 to 10] of uint16 2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The starting position indicates the file offset of the first element&lt;br /&gt;
of each array, the same as with the alternative definition given for&lt;br /&gt;
starting position in tabular data format descriptions.&lt;br /&gt;
&lt;br /&gt;
===Array Manipulation===&lt;br /&gt;
&lt;br /&gt;
Consider a 6x6 array of data with an &amp;quot;XXXX&amp;quot; header and a &amp;quot;YY&amp;quot;&lt;br /&gt;
trailer on each line.  Each data element is a space, a row (&amp;quot;y&amp;quot;)&lt;br /&gt;
index, a comma, and a column (&amp;quot;x&amp;quot;) index, as shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
XXXX 0,0 0,1 0,2 0,3 0,4 0,5YY&lt;br /&gt;
XXXX 1,0 1,1 1,2 1,3 1,4 1,5YY&lt;br /&gt;
XXXX 2,0 2,1 2,2 2,3 2,4 2,5YY&lt;br /&gt;
XXXX 3,0 3,1 3,2 3,3 3,4 3,5YY&lt;br /&gt;
XXXX 4,0 4,1 4,2 4,3 4,4 4,5YY&lt;br /&gt;
XXXX 5,0 5,1 5,2 5,3 5,4 5,5YY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The goal is to produce a data file that looks like the data below. To&lt;br /&gt;
do that, we need to strip the headers and trailers, and transpose rows&lt;br /&gt;
and columns:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0,0 1,0 2,0 3,0 4,0 5,0&lt;br /&gt;
0,1 1,1 2,1 3,1 4,1 5,1&lt;br /&gt;
0,2 1,2 2,2 3,2 4,2 5,2&lt;br /&gt;
0,3 1,3 2,3 3,3 4,3 5,3&lt;br /&gt;
0,4 1,4 2,4 3,4 4,4 5,4&lt;br /&gt;
0,5 1,5 2,5 3,5 4,5 5,5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The key to writing the input format description is understanding that&lt;br /&gt;
the input data file is composed of four interleaved arrays:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#The &amp;quot;XXXX&amp;quot; headers&lt;br /&gt;
#The data&lt;br /&gt;
#The &amp;quot;YY&amp;quot; trailers&lt;br /&gt;
#The newlines&lt;br /&gt;
&lt;br /&gt;
The array of headers is a one-dimensional array composed of six&lt;br /&gt;
elements (one for each line) with each element being four characters&lt;br /&gt;
wide and separated from the next element by 28 bytes (24 + 2 + 2 ---&lt;br /&gt;
24 bytes for a row of data plus 2 bytes for the trailer plus two bytes&lt;br /&gt;
for the newline).&lt;br /&gt;
&lt;br /&gt;
The array of data is a two-dimensional array of six elements in each&lt;br /&gt;
dimension with each element being four characters wide, each row is&lt;br /&gt;
separated from the next by eight bytes (columns are adjacent and so&lt;br /&gt;
have zero separation), and the first element begins in the fifth byte&lt;br /&gt;
of the file (counting from one).&lt;br /&gt;
&lt;br /&gt;
The array of trailers is a one-dimensional array composed of six&lt;br /&gt;
elements with each element being two characters wide, each element is&lt;br /&gt;
separated from the next by 30 bytes, and the first element begins in&lt;br /&gt;
the 29th byte of the file.&lt;br /&gt;
&lt;br /&gt;
The array of newlines is a one-dimensional array composed of six&lt;br /&gt;
elements with each element being two characters wide (on a PC), each&lt;br /&gt;
element is separated from the next by 30 bytes, and the first element&lt;br /&gt;
begins in the 31st byte of the file.&lt;br /&gt;
&lt;br /&gt;
The FreeForm ND input format description needed is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dBASE_input_data &amp;quot;one&amp;quot;&lt;br /&gt;
headers 1 4 ARRAY[&amp;quot;line&amp;quot; 1 to 6 separation 28] OF text 0&lt;br /&gt;
data 5 8 ARRAY[&amp;quot;y&amp;quot; 1 to 6 separation 8][&amp;quot;x&amp;quot; 1 to 6] OF text 0&lt;br /&gt;
trailers 29 30 ARRAY[&amp;quot;line&amp;quot; 1 to 6 separation 30] OF text 0&lt;br /&gt;
PCnewline 31 32 ARRAY[&amp;quot;line&amp;quot; 1 to 6 separation 30] OF text 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output data is composed of two interleaved arrays:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#The data&lt;br /&gt;
#The newlines&lt;br /&gt;
&lt;br /&gt;
The array of data now has a separation of two bytes between each row,&lt;br /&gt;
the first element begins in the first byte of the file, and the order&lt;br /&gt;
of the dimensions has been switched.&lt;br /&gt;
&lt;br /&gt;
The array of newlines now has a separation of 24 bytes and the first&lt;br /&gt;
element begins in the 25th byte of the file. Each array can be&lt;br /&gt;
operated on independently.  In the case of the data array we simply&lt;br /&gt;
transposed rows and columns, but we could do other reorientations as&lt;br /&gt;
well, such as resequencing elements within either or both dimensions.&lt;br /&gt;
&lt;br /&gt;
The FreeForm ND output format description needed is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dBASE_output_data &amp;quot;two&amp;quot;&lt;br /&gt;
data 1 4 ARRAY[&amp;quot;x&amp;quot; 1 to 6 separation 2][&amp;quot;y&amp;quot; 1 to 6] OF text 0&lt;br /&gt;
PCnewline 25 26 ARRAY[&amp;quot;line&amp;quot; 1 to 6 separation 24] OF text 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Sampling and Data Manipulation===&lt;br /&gt;
&lt;br /&gt;
With a wider range of descriptive possibilities, FreeForm can more&lt;br /&gt;
easily be used for sampling and subsetting data, as in these examples.&lt;br /&gt;
&lt;br /&gt;
The following array descriptor pair subsets a two-dimensional array,&lt;br /&gt;
retrieving one quarter (the north-west quarter of the earth).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
INPUT: [&amp;quot;latitude&amp;quot; -90 to 90] [&amp;quot;longitude&amp;quot; -179 to 180]&lt;br /&gt;
OUTPUT: [&amp;quot;latitude&amp;quot; 0 to 90] [&amp;quot;longitude&amp;quot; -179 to 0]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following array descriptor pair flips a two-dimensional array&lt;br /&gt;
row-wise (vertically).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
INPUT: [&amp;quot;row&amp;quot; 0 to 100] [&amp;quot;column&amp;quot; 13 to 42]&lt;br /&gt;
OUTPUT: [&amp;quot;row&amp;quot; 100 to 0] [&amp;quot;column&amp;quot; 13 to 42]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following array descriptor pair rotates a two-dimensional array 90&lt;br /&gt;
degrees (exchanging rows and columns).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
INPUT: [&amp;quot;row&amp;quot; 0 to 10] [&amp;quot;column&amp;quot; 0 to 42]&lt;br /&gt;
OUTPUT: [&amp;quot;column&amp;quot; 0 to 42] [&amp;quot;row&amp;quot; 0 to 10]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following array descriptor pair outputs every other plane from a&lt;br /&gt;
three-dimensional array (essentially cutting the depth resolution in&lt;br /&gt;
half).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
INPUT: [&amp;quot;plane&amp;quot; 1 to 18] [&amp;quot;row&amp;quot; 0 to 10] [&amp;quot;column&amp;quot; 0 to 42]&lt;br /&gt;
OUTPUT: [&amp;quot;plane&amp;quot; 1 to 18 by 2] [&amp;quot;row&amp;quot; 0 to 10] [&amp;quot;column&amp;quot; 0 to 42]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following array descriptor pair replicates every plane from a&lt;br /&gt;
three-dimensional array three times (essentially tripling the depth).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
INPUT: [&amp;quot;plane&amp;quot; 1 to 54 by 3] [&amp;quot;row&amp;quot; 0 to 10] [&amp;quot;column&amp;quot; 0 to 42]&lt;br /&gt;
OUTPUT: [&amp;quot;plane&amp;quot; 1 to 54] [&amp;quot;row&amp;quot; 0 to 10] [&amp;quot;column&amp;quot; 0 to 42]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This array descriptor pair outputs the middle 1/27 of a three&lt;br /&gt;
dimensional array with depth and width exchanged and height halved and&lt;br /&gt;
flipped:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
INPUT: [&amp;quot;plane&amp;quot; 1 to 27] [&amp;quot;row&amp;quot; 1 to 27] [&amp;quot;column&amp;quot; 1 to 27]&lt;br /&gt;
OUTPUT: [&amp;quot;column&amp;quot; 10 to 18] [&amp;quot;row&amp;quot; 18 to 10 by 2] [&amp;quot;plane&amp;quot; 10 to 18]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Wiki_Testing/tblfmt&amp;diff=4946</id>
		<title>Wiki Testing/tblfmt</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Wiki_Testing/tblfmt&amp;diff=4946"/>
		<updated>2009-10-06T23:45:19Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[FreeForm|return to FreeForm]]&lt;br /&gt;
&lt;br /&gt;
=Format Descriptions for Tabular Data=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Format descriptions define the formats of input and output data and&lt;br /&gt;
headers. FreeForm ND provides an easy-to-use mechanism for describing&lt;br /&gt;
data. FreeForm ND programs and FreeForm ND-based applications that you&lt;br /&gt;
develop use these format descriptions to correctly access data. Any&lt;br /&gt;
data file used by FreeForm ND programs must be described in a format&lt;br /&gt;
description file.&lt;br /&gt;
&lt;br /&gt;
This page explains how to write format descriptions for data&lt;br /&gt;
arranged in tabular format---rows and columns---only. For data in&lt;br /&gt;
non-tabular formats, see [[Wiki_Testing/arrayfmt|Array Format]].&lt;br /&gt;
&lt;br /&gt;
==FreeForm ND Variable Types==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The data sets you produce and use may contain a variety of variable&lt;br /&gt;
types. The characteristics of the types that FreeForm ND supports are&lt;br /&gt;
summarized in the table below, which is followed by a&lt;br /&gt;
description of each type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
 OPeNDAP FreeForm ND Data Types&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! Name  !! Minimum Value !! Maximum Value !! Size in Bytes !! Precision*&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;char&amp;lt;/font&amp;gt; ||  ||  || ** ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;uchar&amp;lt;/font&amp;gt; || 0 || 255 || 1 ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;short&amp;lt;/font&amp;gt; || -32,767 || 32,767 || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;font color=&#039;green&#039;&amp;gt;ushort&amp;lt;/font&amp;gt; || 0 || 65,535 || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;long&amp;lt;/font&amp;gt; || -2,147,483,647 || 2,147,483,647 || 4 ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;ulong&amp;lt;/font&amp;gt; || 0 || 4,294,967,295 || 4 ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;float&amp;lt;/font&amp;gt; || &amp;lt;math&amp;gt;10^{-37}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;10^{38}&amp;lt;/math&amp;gt; || 4 || 6***&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;double&amp;lt;/font&amp;gt; || &amp;lt;math&amp;gt;10^{-307}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;10^{308}&amp;lt;/math&amp;gt; || 8 || 15***&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;constant&amp;lt;/font&amp;gt; ||  ||  || ** ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;initial&amp;lt;/font&amp;gt; ||  ||  || record length ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;convert&amp;lt;/font&amp;gt; ||  ||  || ** ||&lt;br /&gt;
|-&lt;br /&gt;
| * Expressed as the number of significant digits  &lt;br /&gt;
|-&lt;br /&gt;
| ** User-specified  &lt;br /&gt;
|-&lt;br /&gt;
| *** Can vary depending on environment   &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;NOTE: The sizes in table 3.1 are machine-dependent.&lt;br /&gt;
Those given are for most Unix workstations.  &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;char&amp;lt;/font&amp;gt; : The &amp;lt;font color=&#039;green&#039;&amp;gt;char&amp;lt;/font&amp;gt; variable type is used for character strings. Variables of this type, including numerals, are interpreted as characters, not as numbers.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;uchar&amp;lt;/font&amp;gt; : The &amp;lt;font color=&#039;green&#039;&amp;gt;uchar&amp;lt;/font&amp;gt; (unsigned character) variable type can be used for integers between 0 and 255 (28- 1). Variables that can be represented by the &amp;lt;font color=&#039;green&#039;&amp;gt;uchar&amp;lt;/font&amp;gt; type (for example: month, day, hour, minute) occur in many data sets. An advantage of using the &amp;lt;font color=&#039;green&#039;&amp;gt;uchar&amp;lt;/font&amp;gt; type in binary formats is that only one byte is used for each variable. Variables of this type are interpreted as numbers, not characters.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;short&amp;lt;/font&amp;gt; : A &amp;lt;font color=&#039;green&#039;&amp;gt;short&amp;lt;/font&amp;gt; variable can hold integers between -32,767 and 32,767 (&amp;lt;math&amp;gt;2^{15}- 1&amp;lt;/math&amp;gt;). This type can be used for signed integers with less than 5 digits, or for real numbers with a total of 4 or fewer digits on both sides of the decimal point (-99 to 99 with a precision of 2, -999 to 999 with a precision of 1, and so on).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;ushort&amp;lt;/font&amp;gt; : A &amp;lt;font color=&#039;green&#039;&amp;gt;ushort&amp;lt;/font&amp;gt; (unsigned short) variable can hold integers between 0 and 65,535 (&amp;lt;math&amp;gt;2^{16} - 1&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;long&amp;lt;/font&amp;gt; : A &amp;lt;font color=&#039;green&#039;&amp;gt;long&amp;lt;/font&amp;gt; variable can hold integers between -2,147,483,647 and +2,147,483,647 (&amp;lt;math&amp;gt;2^{31} - 1&amp;lt;/math&amp;gt;). This variable type is commonly used to represent floating point data as integers, which may be more portable. It can be used for numbers with 9 or fewer digits with up to 9 digits of precision, for example, latitude or longitude (-180.000000 to 180.000000).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;ulong&amp;lt;/font&amp;gt; : The &amp;lt;font color=&#039;green&#039;&amp;gt;ulong&amp;lt;/font&amp;gt; (unsigned long) variable type can be used for integers between 0 and 4,294,967,295 (&amp;lt;math&amp;gt;2^{32} - 1&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;float, double&amp;lt;/font&amp;gt; : Numbers that include explicit decimal points are either &amp;lt;font color=&#039;green&#039;&amp;gt;float&amp;lt;/font&amp;gt; or &amp;lt;font color=&#039;green&#039;&amp;gt;double&amp;lt;/font&amp;gt; depending on the desired number of digits. A &amp;lt;font color=&#039;green&#039;&amp;gt;float&amp;lt;/font&amp;gt; has a maximum of 6 significant digits, a &amp;lt;font color=&#039;green&#039;&amp;gt;double&amp;lt;/font&amp;gt; has 15 maximum. The extra digits of a &amp;lt;font color=&#039;green&#039;&amp;gt;double&amp;lt;/font&amp;gt; are useful, for example, for precisely specifying time of day within a month as decimal days. One second of time is approximately 0.00001 day. The number specifying day (maximum = 31) can occupy up to 2 digits. A &amp;lt;font color=&#039;green&#039;&amp;gt;float&amp;lt;/font&amp;gt; can therefore only specify decimal days to a whole second (31.00001 occupies seven digits). A &amp;lt;font color=&#039;green&#039;&amp;gt;double&amp;lt;/font&amp;gt; can, however, be used to track decimal parts of a second (for example, 31.000001).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==FreeForm ND File Types==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FreeForm ND supports binary, ASCII, and dBASE file types. Binary data&lt;br /&gt;
are stored in a fixed amount of space with a fixed range of values.&lt;br /&gt;
This is a very efficient way to store data, but the files are&lt;br /&gt;
machine-readable rather than human-readable. Binary numbers can be&lt;br /&gt;
integers or floating point numbers.&lt;br /&gt;
&lt;br /&gt;
Numbers and character strings are stored as text strings in ASCII. The&lt;br /&gt;
amount of space used to store a string is variable, with each&lt;br /&gt;
character occupying one byte.&lt;br /&gt;
&lt;br /&gt;
The dBASE file type, used by the dBASE product, is ASCII text without&lt;br /&gt;
end-of-line markers.&lt;br /&gt;
&lt;br /&gt;
==Format Description Files==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Format description files accompany data files. A format description&lt;br /&gt;
file can contain descriptions for one or more formats. You include&lt;br /&gt;
descriptions for header, input, and output formats as appropriate.&lt;br /&gt;
Format descriptions for more than one file may be included in a single&lt;br /&gt;
format description file.&lt;br /&gt;
&lt;br /&gt;
An example format description file is shown next. The sections that&lt;br /&gt;
follow describe each element of a format description file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/ This format description file is for&lt;br /&gt;
/ data files latlon.bin and latlon.dat.&lt;br /&gt;
&lt;br /&gt;
binary_data &amp;quot;Default binary format&amp;quot;&lt;br /&gt;
latitude 1 4 long 6&lt;br /&gt;
longitude 5 8 long 6&lt;br /&gt;
&lt;br /&gt;
ASCII_data &amp;quot;Default ASCII format&amp;quot;&lt;br /&gt;
latitude 1 10 double 6&lt;br /&gt;
longitude 12 22 double 6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lines 1 and 2 are comment lines.  Lines 4 and 8 give the format type and title. Lines 5, 6,&lt;br /&gt;
9, and 10 contain variable descriptions.  Blank lines signify the end of a format&lt;br /&gt;
description&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can include blank lines between format descriptions and comments&lt;br /&gt;
in a format description file as necessary.  Comment lines begin with a&lt;br /&gt;
slash (/). FreeForm ND ignores comments.&lt;br /&gt;
&lt;br /&gt;
==Format Descriptions==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A format description file comprises one or more format descriptions. A&lt;br /&gt;
format description consists of a line specifying the format type and&lt;br /&gt;
title followed by one or more variable descriptions, as in the&lt;br /&gt;
following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
binary_data &amp;quot;Default binary format&amp;quot;&lt;br /&gt;
latitude 1 4 long 6&lt;br /&gt;
longitude 5 8 long 6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format Type and Title===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A line specifying the format type and title begins a format&lt;br /&gt;
description. A &#039;&#039;format descriptor&#039;&#039;, for example, &amp;lt;font color=&#039;green&#039;&amp;gt;binary_data&amp;lt;/font&amp;gt;, is&lt;br /&gt;
used to indicate format type to FreeForm ND. The &#039;&#039;format title&#039;&#039;, for&lt;br /&gt;
example, &amp;quot;Default binary format&amp;quot;, briefly describes the format. It&lt;br /&gt;
must be surrounded by quotes and follow the format descriptor on the&lt;br /&gt;
same line. The maximum number of characters for the format title is 80&lt;br /&gt;
including the quotes.&lt;br /&gt;
&lt;br /&gt;
====Format Descriptors====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Format descriptors indicate (in the order given) file type, read/write&lt;br /&gt;
type, and file section. Possible values for each descriptor component&lt;br /&gt;
are shown in the following table.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format Descriptor Components&lt;br /&gt;
 &lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
|+&lt;br /&gt;
! File Type  !! Read/Write Type (optional) !! File Section&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
  |+&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;ASCII&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;binary&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;dBASE&amp;lt;/font&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
||&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
  |+&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;input&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;output&amp;lt;/font&amp;gt;&lt;br /&gt;
 |} &lt;br /&gt;
||&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
  |+&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;data&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;file_header&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  |&amp;lt;font color=&#039;green&#039;&amp;gt;record_header&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  |&amp;lt;font color=&#039;green&#039;&amp;gt;file_header_separate&amp;lt;/font&amp;gt;*&lt;br /&gt;
  |-&lt;br /&gt;
  |&amp;lt;font color=&#039;green&#039;&amp;gt;record_header_separate&amp;lt;/font&amp;gt;*&lt;br /&gt;
|}&lt;br /&gt;
|- &lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; | * The qualifier &amp;lt;font color=&#039;green&#039;&amp;gt;separate&amp;lt;/font&amp;gt; indicates there is a header file separate from the data file.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The components of a format descriptor are separated by underscores&lt;br /&gt;
(_). For example, &amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_output_data&amp;lt;/font&amp;gt; indicates that the format&lt;br /&gt;
description is for ASCII data in an output file. The order of&lt;br /&gt;
descriptors in a format description should reflect the order of format&lt;br /&gt;
types in the file. For instance, the descriptor&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_file_header&amp;lt;/font&amp;gt; would be listed in the format description&lt;br /&gt;
file before &amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_data&amp;lt;/font&amp;gt;. The format descriptors you can use in&lt;br /&gt;
FreeForm ND are listed in the next table, where &amp;lt;font color=&#039;green&#039;&amp;gt;XXX&amp;lt;/font&amp;gt; stands for&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;ASCII&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;binary&amp;lt;/font&amp;gt;, or &amp;lt;font color=&#039;green&#039;&amp;gt;dBASE&amp;lt;/font&amp;gt;.  (Example: &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_data&amp;lt;/font&amp;gt;&lt;br /&gt;
= &amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_data&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;binary_data&amp;lt;/font&amp;gt;, or &amp;lt;font color=&#039;green&#039;&amp;gt;dBASE_data&amp;lt;/font&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
Format Descriptors&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! Data !! Header !! Special&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
|+&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_data&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_input_data&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_output_data&amp;lt;/font&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
||&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
|+ &lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_file_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_file_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_record_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_record_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_input_file_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_input_file_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_input_record_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_input_record_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_output_file_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_output_file_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_output_record_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_output_record_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
||&lt;br /&gt;
{|&lt;br /&gt;
|&amp;lt;font color=&#039;green&#039;&amp;gt;RETURN&amp;lt;/font&amp;gt;*&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;font color=&#039;green&#039;&amp;gt;EOL&amp;lt;/font&amp;gt;**&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |* The RETURN descriptor lets FreeForm ND skip&lt;br /&gt;
over end-of-line characters in the data. &lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |** The EOL descriptor is a constant&lt;br /&gt;
indicating an end-of-line character should be inserted in a&lt;br /&gt;
multi-line record. &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information about header formats, see ([[Wiki_Testing/hdrfmts|Header Formats]]).&lt;br /&gt;
&lt;br /&gt;
===Variable Descriptions===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A variable description defines the name, start and end column&lt;br /&gt;
position, type, and precision for each variable. The fields in a&lt;br /&gt;
variable description are separated by white space. Two variable&lt;br /&gt;
descriptions are shown below with the fields indicated. Each field is&lt;br /&gt;
then described.&lt;br /&gt;
&lt;br /&gt;
Here are two example variable descriptions.  Each one consists of a&lt;br /&gt;
name, a start position, and end position, a type, and a precision.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
latitude    1  10  double  6&lt;br /&gt;
longitude  12  22  double  6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
; Name :&lt;br /&gt;
The variable name is case-sensitive, up to 63 characters long with&lt;br /&gt;
no blanks. The variable names in the example are latitude and&lt;br /&gt;
longitude. If the same variable is included in more than one format&lt;br /&gt;
description within a format description file, its name must be the&lt;br /&gt;
same in each format description.&lt;br /&gt;
&lt;br /&gt;
; Start Position :&lt;br /&gt;
The column position where the first character (ASCII) or byte&lt;br /&gt;
(binary) of a variable value is placed. The first position is 1, not&lt;br /&gt;
0. In the example, the variable latitude is defined to start at&lt;br /&gt;
position 1 and longitude at 12.&lt;br /&gt;
&lt;br /&gt;
; End Position :&lt;br /&gt;
The column position where the last character (ASCII) or byte&lt;br /&gt;
(binary) of a variable value is placed. In the example, the variable&lt;br /&gt;
latitude is defined to end at position 10 and longitude at 22.&lt;br /&gt;
&lt;br /&gt;
; Type :&lt;br /&gt;
The variable type can be a standard type such as char, float,&lt;br /&gt;
double, or a special FreeForm ND type. The type for both variables&lt;br /&gt;
in the example is double. See above for&lt;br /&gt;
descriptions of supported types.&lt;br /&gt;
&lt;br /&gt;
; Precision :&lt;br /&gt;
Precision defines the number of digits to the right of the decimal&lt;br /&gt;
point. For float or double variables, precision only controls the&lt;br /&gt;
number of digits printed or displayed to the right of the decimal&lt;br /&gt;
point in an ASCII representation. The precision for both variables&lt;br /&gt;
in the example is 6.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Wiki_Testing/tblfmt&amp;diff=4945</id>
		<title>Wiki Testing/tblfmt</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Wiki_Testing/tblfmt&amp;diff=4945"/>
		<updated>2009-10-06T23:44:54Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Format Descriptions for Tabular Data=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Format descriptions define the formats of input and output data and&lt;br /&gt;
headers. FreeForm ND provides an easy-to-use mechanism for describing&lt;br /&gt;
data. FreeForm ND programs and FreeForm ND-based applications that you&lt;br /&gt;
develop use these format descriptions to correctly access data. Any&lt;br /&gt;
data file used by FreeForm ND programs must be described in a format&lt;br /&gt;
description file.&lt;br /&gt;
&lt;br /&gt;
This page explains how to write format descriptions for data&lt;br /&gt;
arranged in tabular format---rows and columns---only. For data in&lt;br /&gt;
non-tabular formats, see [[Wiki_Testing/arrayfmt|Array Format]].&lt;br /&gt;
&lt;br /&gt;
==FreeForm ND Variable Types==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The data sets you produce and use may contain a variety of variable&lt;br /&gt;
types. The characteristics of the types that FreeForm ND supports are&lt;br /&gt;
summarized in the table below, which is followed by a&lt;br /&gt;
description of each type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
 OPeNDAP FreeForm ND Data Types&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! Name  !! Minimum Value !! Maximum Value !! Size in Bytes !! Precision*&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;char&amp;lt;/font&amp;gt; ||  ||  || ** ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;uchar&amp;lt;/font&amp;gt; || 0 || 255 || 1 ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;short&amp;lt;/font&amp;gt; || -32,767 || 32,767 || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;font color=&#039;green&#039;&amp;gt;ushort&amp;lt;/font&amp;gt; || 0 || 65,535 || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;long&amp;lt;/font&amp;gt; || -2,147,483,647 || 2,147,483,647 || 4 ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;ulong&amp;lt;/font&amp;gt; || 0 || 4,294,967,295 || 4 ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;float&amp;lt;/font&amp;gt; || &amp;lt;math&amp;gt;10^{-37}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;10^{38}&amp;lt;/math&amp;gt; || 4 || 6***&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;double&amp;lt;/font&amp;gt; || &amp;lt;math&amp;gt;10^{-307}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;10^{308}&amp;lt;/math&amp;gt; || 8 || 15***&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;constant&amp;lt;/font&amp;gt; ||  ||  || ** ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;initial&amp;lt;/font&amp;gt; ||  ||  || record length ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;convert&amp;lt;/font&amp;gt; ||  ||  || ** ||&lt;br /&gt;
|-&lt;br /&gt;
| * Expressed as the number of significant digits  &lt;br /&gt;
|-&lt;br /&gt;
| ** User-specified  &lt;br /&gt;
|-&lt;br /&gt;
| *** Can vary depending on environment   &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;NOTE: The sizes in table 3.1 are machine-dependent.&lt;br /&gt;
Those given are for most Unix workstations.  &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;char&amp;lt;/font&amp;gt; : The &amp;lt;font color=&#039;green&#039;&amp;gt;char&amp;lt;/font&amp;gt; variable type is used for character strings. Variables of this type, including numerals, are interpreted as characters, not as numbers.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;uchar&amp;lt;/font&amp;gt; : The &amp;lt;font color=&#039;green&#039;&amp;gt;uchar&amp;lt;/font&amp;gt; (unsigned character) variable type can be used for integers between 0 and 255 (28- 1). Variables that can be represented by the &amp;lt;font color=&#039;green&#039;&amp;gt;uchar&amp;lt;/font&amp;gt; type (for example: month, day, hour, minute) occur in many data sets. An advantage of using the &amp;lt;font color=&#039;green&#039;&amp;gt;uchar&amp;lt;/font&amp;gt; type in binary formats is that only one byte is used for each variable. Variables of this type are interpreted as numbers, not characters.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;short&amp;lt;/font&amp;gt; : A &amp;lt;font color=&#039;green&#039;&amp;gt;short&amp;lt;/font&amp;gt; variable can hold integers between -32,767 and 32,767 (&amp;lt;math&amp;gt;2^{15}- 1&amp;lt;/math&amp;gt;). This type can be used for signed integers with less than 5 digits, or for real numbers with a total of 4 or fewer digits on both sides of the decimal point (-99 to 99 with a precision of 2, -999 to 999 with a precision of 1, and so on).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;ushort&amp;lt;/font&amp;gt; : A &amp;lt;font color=&#039;green&#039;&amp;gt;ushort&amp;lt;/font&amp;gt; (unsigned short) variable can hold integers between 0 and 65,535 (&amp;lt;math&amp;gt;2^{16} - 1&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;long&amp;lt;/font&amp;gt; : A &amp;lt;font color=&#039;green&#039;&amp;gt;long&amp;lt;/font&amp;gt; variable can hold integers between -2,147,483,647 and +2,147,483,647 (&amp;lt;math&amp;gt;2^{31} - 1&amp;lt;/math&amp;gt;). This variable type is commonly used to represent floating point data as integers, which may be more portable. It can be used for numbers with 9 or fewer digits with up to 9 digits of precision, for example, latitude or longitude (-180.000000 to 180.000000).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;ulong&amp;lt;/font&amp;gt; : The &amp;lt;font color=&#039;green&#039;&amp;gt;ulong&amp;lt;/font&amp;gt; (unsigned long) variable type can be used for integers between 0 and 4,294,967,295 (&amp;lt;math&amp;gt;2^{32} - 1&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;float, double&amp;lt;/font&amp;gt; : Numbers that include explicit decimal points are either &amp;lt;font color=&#039;green&#039;&amp;gt;float&amp;lt;/font&amp;gt; or &amp;lt;font color=&#039;green&#039;&amp;gt;double&amp;lt;/font&amp;gt; depending on the desired number of digits. A &amp;lt;font color=&#039;green&#039;&amp;gt;float&amp;lt;/font&amp;gt; has a maximum of 6 significant digits, a &amp;lt;font color=&#039;green&#039;&amp;gt;double&amp;lt;/font&amp;gt; has 15 maximum. The extra digits of a &amp;lt;font color=&#039;green&#039;&amp;gt;double&amp;lt;/font&amp;gt; are useful, for example, for precisely specifying time of day within a month as decimal days. One second of time is approximately 0.00001 day. The number specifying day (maximum = 31) can occupy up to 2 digits. A &amp;lt;font color=&#039;green&#039;&amp;gt;float&amp;lt;/font&amp;gt; can therefore only specify decimal days to a whole second (31.00001 occupies seven digits). A &amp;lt;font color=&#039;green&#039;&amp;gt;double&amp;lt;/font&amp;gt; can, however, be used to track decimal parts of a second (for example, 31.000001).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==FreeForm ND File Types==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FreeForm ND supports binary, ASCII, and dBASE file types. Binary data&lt;br /&gt;
are stored in a fixed amount of space with a fixed range of values.&lt;br /&gt;
This is a very efficient way to store data, but the files are&lt;br /&gt;
machine-readable rather than human-readable. Binary numbers can be&lt;br /&gt;
integers or floating point numbers.&lt;br /&gt;
&lt;br /&gt;
Numbers and character strings are stored as text strings in ASCII. The&lt;br /&gt;
amount of space used to store a string is variable, with each&lt;br /&gt;
character occupying one byte.&lt;br /&gt;
&lt;br /&gt;
The dBASE file type, used by the dBASE product, is ASCII text without&lt;br /&gt;
end-of-line markers.&lt;br /&gt;
&lt;br /&gt;
==Format Description Files==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Format description files accompany data files. A format description&lt;br /&gt;
file can contain descriptions for one or more formats. You include&lt;br /&gt;
descriptions for header, input, and output formats as appropriate.&lt;br /&gt;
Format descriptions for more than one file may be included in a single&lt;br /&gt;
format description file.&lt;br /&gt;
&lt;br /&gt;
An example format description file is shown next. The sections that&lt;br /&gt;
follow describe each element of a format description file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/ This format description file is for&lt;br /&gt;
/ data files latlon.bin and latlon.dat.&lt;br /&gt;
&lt;br /&gt;
binary_data &amp;quot;Default binary format&amp;quot;&lt;br /&gt;
latitude 1 4 long 6&lt;br /&gt;
longitude 5 8 long 6&lt;br /&gt;
&lt;br /&gt;
ASCII_data &amp;quot;Default ASCII format&amp;quot;&lt;br /&gt;
latitude 1 10 double 6&lt;br /&gt;
longitude 12 22 double 6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lines 1 and 2 are comment lines.  Lines 4 and 8 give the format type and title. Lines 5, 6,&lt;br /&gt;
9, and 10 contain variable descriptions.  Blank lines signify the end of a format&lt;br /&gt;
description&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can include blank lines between format descriptions and comments&lt;br /&gt;
in a format description file as necessary.  Comment lines begin with a&lt;br /&gt;
slash (/). FreeForm ND ignores comments.&lt;br /&gt;
&lt;br /&gt;
==Format Descriptions==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A format description file comprises one or more format descriptions. A&lt;br /&gt;
format description consists of a line specifying the format type and&lt;br /&gt;
title followed by one or more variable descriptions, as in the&lt;br /&gt;
following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
binary_data &amp;quot;Default binary format&amp;quot;&lt;br /&gt;
latitude 1 4 long 6&lt;br /&gt;
longitude 5 8 long 6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format Type and Title===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A line specifying the format type and title begins a format&lt;br /&gt;
description. A &#039;&#039;format descriptor&#039;&#039;, for example, &amp;lt;font color=&#039;green&#039;&amp;gt;binary_data&amp;lt;/font&amp;gt;, is&lt;br /&gt;
used to indicate format type to FreeForm ND. The &#039;&#039;format title&#039;&#039;, for&lt;br /&gt;
example, &amp;quot;Default binary format&amp;quot;, briefly describes the format. It&lt;br /&gt;
must be surrounded by quotes and follow the format descriptor on the&lt;br /&gt;
same line. The maximum number of characters for the format title is 80&lt;br /&gt;
including the quotes.&lt;br /&gt;
&lt;br /&gt;
====Format Descriptors====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Format descriptors indicate (in the order given) file type, read/write&lt;br /&gt;
type, and file section. Possible values for each descriptor component&lt;br /&gt;
are shown in the following table.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format Descriptor Components&lt;br /&gt;
 &lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
|+&lt;br /&gt;
! File Type  !! Read/Write Type (optional) !! File Section&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
  |+&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;ASCII&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;binary&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;dBASE&amp;lt;/font&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
||&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
  |+&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;input&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;output&amp;lt;/font&amp;gt;&lt;br /&gt;
 |} &lt;br /&gt;
||&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
  |+&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;data&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;file_header&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  |&amp;lt;font color=&#039;green&#039;&amp;gt;record_header&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  |&amp;lt;font color=&#039;green&#039;&amp;gt;file_header_separate&amp;lt;/font&amp;gt;*&lt;br /&gt;
  |-&lt;br /&gt;
  |&amp;lt;font color=&#039;green&#039;&amp;gt;record_header_separate&amp;lt;/font&amp;gt;*&lt;br /&gt;
|}&lt;br /&gt;
|- &lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; | * The qualifier &amp;lt;font color=&#039;green&#039;&amp;gt;separate&amp;lt;/font&amp;gt; indicates there is a header file separate from the data file.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The components of a format descriptor are separated by underscores&lt;br /&gt;
(_). For example, &amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_output_data&amp;lt;/font&amp;gt; indicates that the format&lt;br /&gt;
description is for ASCII data in an output file. The order of&lt;br /&gt;
descriptors in a format description should reflect the order of format&lt;br /&gt;
types in the file. For instance, the descriptor&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_file_header&amp;lt;/font&amp;gt; would be listed in the format description&lt;br /&gt;
file before &amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_data&amp;lt;/font&amp;gt;. The format descriptors you can use in&lt;br /&gt;
FreeForm ND are listed in the next table, where &amp;lt;font color=&#039;green&#039;&amp;gt;XXX&amp;lt;/font&amp;gt; stands for&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;ASCII&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;binary&amp;lt;/font&amp;gt;, or &amp;lt;font color=&#039;green&#039;&amp;gt;dBASE&amp;lt;/font&amp;gt;.  (Example: &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_data&amp;lt;/font&amp;gt;&lt;br /&gt;
= &amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_data&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;binary_data&amp;lt;/font&amp;gt;, or &amp;lt;font color=&#039;green&#039;&amp;gt;dBASE_data&amp;lt;/font&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
Format Descriptors&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! Data !! Header !! Special&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
|+&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_data&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_input_data&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_output_data&amp;lt;/font&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
||&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
|+ &lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_file_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_file_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_record_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_record_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_input_file_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_input_file_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_input_record_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_input_record_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_output_file_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_output_file_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_output_record_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_output_record_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
||&lt;br /&gt;
{|&lt;br /&gt;
|&amp;lt;font color=&#039;green&#039;&amp;gt;RETURN&amp;lt;/font&amp;gt;*&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;font color=&#039;green&#039;&amp;gt;EOL&amp;lt;/font&amp;gt;**&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |* The RETURN descriptor lets FreeForm ND skip&lt;br /&gt;
over end-of-line characters in the data. &lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |** The EOL descriptor is a constant&lt;br /&gt;
indicating an end-of-line character should be inserted in a&lt;br /&gt;
multi-line record. &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information about header formats, see ([[Wiki_Testing/hdrfmts|Header Formats]]).&lt;br /&gt;
&lt;br /&gt;
===Variable Descriptions===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A variable description defines the name, start and end column&lt;br /&gt;
position, type, and precision for each variable. The fields in a&lt;br /&gt;
variable description are separated by white space. Two variable&lt;br /&gt;
descriptions are shown below with the fields indicated. Each field is&lt;br /&gt;
then described.&lt;br /&gt;
&lt;br /&gt;
Here are two example variable descriptions.  Each one consists of a&lt;br /&gt;
name, a start position, and end position, a type, and a precision.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
latitude    1  10  double  6&lt;br /&gt;
longitude  12  22  double  6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
; Name :&lt;br /&gt;
The variable name is case-sensitive, up to 63 characters long with&lt;br /&gt;
no blanks. The variable names in the example are latitude and&lt;br /&gt;
longitude. If the same variable is included in more than one format&lt;br /&gt;
description within a format description file, its name must be the&lt;br /&gt;
same in each format description.&lt;br /&gt;
&lt;br /&gt;
; Start Position :&lt;br /&gt;
The column position where the first character (ASCII) or byte&lt;br /&gt;
(binary) of a variable value is placed. The first position is 1, not&lt;br /&gt;
0. In the example, the variable latitude is defined to start at&lt;br /&gt;
position 1 and longitude at 12.&lt;br /&gt;
&lt;br /&gt;
; End Position :&lt;br /&gt;
The column position where the last character (ASCII) or byte&lt;br /&gt;
(binary) of a variable value is placed. In the example, the variable&lt;br /&gt;
latitude is defined to end at position 10 and longitude at 22.&lt;br /&gt;
&lt;br /&gt;
; Type :&lt;br /&gt;
The variable type can be a standard type such as char, float,&lt;br /&gt;
double, or a special FreeForm ND type. The type for both variables&lt;br /&gt;
in the example is double. See above for&lt;br /&gt;
descriptions of supported types.&lt;br /&gt;
&lt;br /&gt;
; Precision :&lt;br /&gt;
Precision defines the number of digits to the right of the decimal&lt;br /&gt;
point. For float or double variables, precision only controls the&lt;br /&gt;
number of digits printed or displayed to the right of the decimal&lt;br /&gt;
point in an ASCII representation. The precision for both variables&lt;br /&gt;
in the example is 6.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Wiki_Testing/tblfmt&amp;diff=4944</id>
		<title>Wiki Testing/tblfmt</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Wiki_Testing/tblfmt&amp;diff=4944"/>
		<updated>2009-10-06T23:42:12Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Format Descriptions for Tabular Data=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Format descriptions define the formats of input and output data and&lt;br /&gt;
headers. FreeForm ND provides an easy-to-use mechanism for describing&lt;br /&gt;
data. FreeForm ND programs and FreeForm ND-based applications that you&lt;br /&gt;
develop use these format descriptions to correctly access data. Any&lt;br /&gt;
data file used by FreeForm ND programs must be described in a format&lt;br /&gt;
description file.&lt;br /&gt;
&lt;br /&gt;
This page explains how to write format descriptions for data&lt;br /&gt;
arranged in tabular format---rows and columns---only. For data in&lt;br /&gt;
non-tabular formats, see [[Wiki_Testing/arrayfmt|Array Format]].&lt;br /&gt;
&lt;br /&gt;
==FreeForm ND Variable Types==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The data sets you produce and use may contain a variety of variable&lt;br /&gt;
types. The characteristics of the types that FreeForm ND supports are&lt;br /&gt;
summarized in the table below, which is followed by a&lt;br /&gt;
description of each type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
 OPeNDAP FreeForm ND Data Types&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! Name  !! Minimum Value !! Maximum Value !! Size in Bytes !! Precision*&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;char&amp;lt;/font&amp;gt; ||  ||  || ** ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;uchar&amp;lt;/font&amp;gt; || 0 || 255 || 1 ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;short&amp;lt;/font&amp;gt; || -32,767 || 32,767 || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;font color=&#039;green&#039;&amp;gt;ushort&amp;lt;/font&amp;gt; || 0 || 65,535 || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;long&amp;lt;/font&amp;gt; || -2,147,483,647 || 2,147,483,647 || 4 ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;ulong&amp;lt;/font&amp;gt; || 0 || 4,294,967,295 || 4 ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;float&amp;lt;/font&amp;gt; || &amp;lt;math&amp;gt;10^{-37}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;10^{38}&amp;lt;/math&amp;gt; || 4 || 6***&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;double&amp;lt;/font&amp;gt; || &amp;lt;math&amp;gt;10^{-307}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;10^{308}&amp;lt;/math&amp;gt; || 8 || 15***&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;constant&amp;lt;/font&amp;gt; ||  ||  || ** ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;initial&amp;lt;/font&amp;gt; ||  ||  || record length ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;convert&amp;lt;/font&amp;gt; ||  ||  || ** ||&lt;br /&gt;
|-&lt;br /&gt;
| * Expressed as the number of significant digits  &lt;br /&gt;
|-&lt;br /&gt;
| ** User-specified  &lt;br /&gt;
|-&lt;br /&gt;
| *** Can vary depending on environment   &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;NOTE: The sizes in table 3.1 are machine-dependent.&lt;br /&gt;
Those given are for most Unix workstations.  &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;char&amp;lt;/font&amp;gt; : The &amp;lt;font color=&#039;green&#039;&amp;gt;char&amp;lt;/font&amp;gt; variable type is used for character strings. Variables of this type, including numerals, are interpreted as characters, not as numbers.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;uchar&amp;lt;/font&amp;gt; : The &amp;lt;font color=&#039;green&#039;&amp;gt;uchar&amp;lt;/font&amp;gt; (unsigned character) variable type can be used for integers between 0 and 255 (28- 1). Variables that can be represented by the &amp;lt;font color=&#039;green&#039;&amp;gt;uchar&amp;lt;/font&amp;gt; type (for example: month, day, hour, minute) occur in many data sets. An advantage of using the &amp;lt;font color=&#039;green&#039;&amp;gt;uchar&amp;lt;/font&amp;gt; type in binary formats is that only one byte is used for each variable. Variables of this type are interpreted as numbers, not characters.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;short&amp;lt;/font&amp;gt; : A &amp;lt;font color=&#039;green&#039;&amp;gt;short&amp;lt;/font&amp;gt; variable can hold integers between -32,767 and 32,767 (&amp;lt;math&amp;gt;2^{15}- 1&amp;lt;/math&amp;gt;). This type can be used for signed integers with less than 5 digits, or for real numbers with a total of 4 or fewer digits on both sides of the decimal point (-99 to 99 with a precision of 2, -999 to 999 with a precision of 1, and so on).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;ushort&amp;lt;/font&amp;gt; : A &amp;lt;font color=&#039;green&#039;&amp;gt;ushort&amp;lt;/font&amp;gt; (unsigned short) variable can hold integers between 0 and 65,535 (&amp;lt;math&amp;gt;2^{16} - 1&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;long&amp;lt;/font&amp;gt; : A &amp;lt;font color=&#039;green&#039;&amp;gt;long&amp;lt;/font&amp;gt; variable can hold integers between -2,147,483,647 and +2,147,483,647 (&amp;lt;math&amp;gt;2^{31} - 1&amp;lt;/math&amp;gt;). This variable type is commonly used to represent floating point data as integers, which may be more portable. It can be used for numbers with 9 or fewer digits with up to 9 digits of precision, for example, latitude or longitude (-180.000000 to 180.000000).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;ulong&amp;lt;/font&amp;gt; : The &amp;lt;font color=&#039;green&#039;&amp;gt;ulong&amp;lt;/font&amp;gt; (unsigned long) variable type can be used for integers between 0 and 4,294,967,295 (&amp;lt;math&amp;gt;2^{32} - 1&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;float, double&amp;lt;/font&amp;gt; : Numbers that include explicit decimal points are either &amp;lt;font color=&#039;green&#039;&amp;gt;float&amp;lt;/font&amp;gt; or &amp;lt;font color=&#039;green&#039;&amp;gt;double&amp;lt;/font&amp;gt; depending on the desired number of digits. A &amp;lt;font color=&#039;green&#039;&amp;gt;float&amp;lt;/font&amp;gt; has a maximum of 6 significant digits, a &amp;lt;font color=&#039;green&#039;&amp;gt;double&amp;lt;/font&amp;gt; has 15 maximum. The extra digits of a &amp;lt;font color=&#039;green&#039;&amp;gt;double&amp;lt;/font&amp;gt; are useful, for example, for precisely specifying time of day within a month as decimal days. One second of time is approximately 0.00001 day. The number specifying day (maximum = 31) can occupy up to 2 digits. A &amp;lt;font color=&#039;green&#039;&amp;gt;float&amp;lt;/font&amp;gt; can therefore only specify decimal days to a whole second (31.00001 occupies seven digits). A &amp;lt;font color=&#039;green&#039;&amp;gt;double&amp;lt;/font&amp;gt; can, however, be used to track decimal parts of a second (for example, 31.000001).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==FreeForm ND File Types==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FreeForm ND supports binary, ASCII, and dBASE file types. Binary data&lt;br /&gt;
are stored in a fixed amount of space with a fixed range of values.&lt;br /&gt;
This is a very efficient way to store data, but the files are&lt;br /&gt;
machine-readable rather than human-readable. Binary numbers can be&lt;br /&gt;
integers or floating point numbers.&lt;br /&gt;
&lt;br /&gt;
Numbers and character strings are stored as text strings in ASCII. The&lt;br /&gt;
amount of space used to store a string is variable, with each&lt;br /&gt;
character occupying one byte.&lt;br /&gt;
&lt;br /&gt;
The dBASE file type, used by the dBASE product, is ASCII text without&lt;br /&gt;
end-of-line markers.&lt;br /&gt;
&lt;br /&gt;
==Format Description Files==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Format description files accompany data files. A format description&lt;br /&gt;
file can contain descriptions for one or more formats. You include&lt;br /&gt;
descriptions for header, input, and output formats as appropriate.&lt;br /&gt;
Format descriptions for more than one file may be included in a single&lt;br /&gt;
format description file.&lt;br /&gt;
&lt;br /&gt;
An example format description file is shown next. The sections that&lt;br /&gt;
follow describe each element of a format description file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/ This format description file is for&lt;br /&gt;
/ data files latlon.bin and latlon.dat.&lt;br /&gt;
&lt;br /&gt;
binary_data &amp;quot;Default binary format&amp;quot;&lt;br /&gt;
latitude 1 4 long 6&lt;br /&gt;
longitude 5 8 long 6&lt;br /&gt;
&lt;br /&gt;
ASCII_data &amp;quot;Default ASCII format&amp;quot;&lt;br /&gt;
latitude 1 10 double 6&lt;br /&gt;
longitude 12 22 double 6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lines 1 and 2 are comment lines.  Lines 4 and 8 give the format type and title, as described in ([[Wiki_Testing/tblfmt |Section 3.4.1]]). Lines 5, 6,&lt;br /&gt;
9, and 10 contain variable descriptions, described in&lt;br /&gt;
([[Wiki_Testing/tblfmt |Section 3.4.2]]).  Blank lines signify the end of a format&lt;br /&gt;
description&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can include blank lines between format descriptions and comments&lt;br /&gt;
in a format description file as necessary.  Comment lines begin with a&lt;br /&gt;
slash (/). FreeForm ND ignores comments.&lt;br /&gt;
&lt;br /&gt;
==Format Descriptions==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A format description file comprises one or more format descriptions. A&lt;br /&gt;
format description consists of a line specifying the format type and&lt;br /&gt;
title followed by one or more variable descriptions, as in the&lt;br /&gt;
following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
binary_data &amp;quot;Default binary format&amp;quot;&lt;br /&gt;
latitude 1 4 long 6&lt;br /&gt;
longitude 5 8 long 6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format Type and Title===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A line specifying the format type and title begins a format&lt;br /&gt;
description. A &#039;&#039;format descriptor&#039;&#039;, for example, &amp;lt;font color=&#039;green&#039;&amp;gt;binary_data&amp;lt;/font&amp;gt;, is&lt;br /&gt;
used to indicate format type to FreeForm ND. The &#039;&#039;format title&#039;&#039;, for&lt;br /&gt;
example, &amp;quot;Default binary format&amp;quot;, briefly describes the format. It&lt;br /&gt;
must be surrounded by quotes and follow the format descriptor on the&lt;br /&gt;
same line. The maximum number of characters for the format title is 80&lt;br /&gt;
including the quotes.&lt;br /&gt;
&lt;br /&gt;
====Format Descriptors====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Format descriptors indicate (in the order given) file type, read/write&lt;br /&gt;
type, and file section. Possible values for each descriptor component&lt;br /&gt;
are shown in the following table.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format Descriptor Components&lt;br /&gt;
 &lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
|+&lt;br /&gt;
! File Type  !! Read/Write Type (optional) !! File Section&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
  |+&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;ASCII&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;binary&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;dBASE&amp;lt;/font&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
||&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
  |+&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;input&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;output&amp;lt;/font&amp;gt;&lt;br /&gt;
 |} &lt;br /&gt;
||&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
  |+&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;data&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;file_header&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  |&amp;lt;font color=&#039;green&#039;&amp;gt;record_header&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  |&amp;lt;font color=&#039;green&#039;&amp;gt;file_header_separate&amp;lt;/font&amp;gt;*&lt;br /&gt;
  |-&lt;br /&gt;
  |&amp;lt;font color=&#039;green&#039;&amp;gt;record_header_separate&amp;lt;/font&amp;gt;*&lt;br /&gt;
|}&lt;br /&gt;
|- &lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; | * The qualifier &amp;lt;font color=&#039;green&#039;&amp;gt;separate&amp;lt;/font&amp;gt; indicates there is a header file separate from the data file.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The components of a format descriptor are separated by underscores&lt;br /&gt;
(_). For example, &amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_output_data&amp;lt;/font&amp;gt; indicates that the format&lt;br /&gt;
description is for ASCII data in an output file. The order of&lt;br /&gt;
descriptors in a format description should reflect the order of format&lt;br /&gt;
types in the file. For instance, the descriptor&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_file_header&amp;lt;/font&amp;gt; would be listed in the format description&lt;br /&gt;
file before &amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_data&amp;lt;/font&amp;gt;. The format descriptors you can use in&lt;br /&gt;
FreeForm ND are listed in the next table, where &amp;lt;font color=&#039;green&#039;&amp;gt;XXX&amp;lt;/font&amp;gt; stands for&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;ASCII&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;binary&amp;lt;/font&amp;gt;, or &amp;lt;font color=&#039;green&#039;&amp;gt;dBASE&amp;lt;/font&amp;gt;.  (Example: &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_data&amp;lt;/font&amp;gt;&lt;br /&gt;
= &amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_data&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;binary_data&amp;lt;/font&amp;gt;, or &amp;lt;font color=&#039;green&#039;&amp;gt;dBASE_data&amp;lt;/font&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
Format Descriptors&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! Data !! Header !! Special&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
|+&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_data&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_input_data&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_output_data&amp;lt;/font&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
||&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
|+ &lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_file_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_file_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_record_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_record_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_input_file_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_input_file_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_input_record_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_input_record_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_output_file_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_output_file_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_output_record_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_output_record_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
||&lt;br /&gt;
{|&lt;br /&gt;
|&amp;lt;font color=&#039;green&#039;&amp;gt;RETURN&amp;lt;/font&amp;gt;*&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;font color=&#039;green&#039;&amp;gt;EOL&amp;lt;/font&amp;gt;**&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |* The RETURN descriptor lets FreeForm ND skip&lt;br /&gt;
over end-of-line characters in the data. &lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |** The EOL descriptor is a constant&lt;br /&gt;
indicating an end-of-line character should be inserted in a&lt;br /&gt;
multi-line record. &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information about header formats, see ([[Wiki_Testing/hdrfmts|Header Formats]]).&lt;br /&gt;
&lt;br /&gt;
===Variable Descriptions===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A variable description defines the name, start and end column&lt;br /&gt;
position, type, and precision for each variable. The fields in a&lt;br /&gt;
variable description are separated by white space. Two variable&lt;br /&gt;
descriptions are shown below with the fields indicated. Each field is&lt;br /&gt;
then described.&lt;br /&gt;
&lt;br /&gt;
Here are two example variable descriptions.  Each one consists of a&lt;br /&gt;
name, a start position, and end position, a type, and a precision.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
latitude    1  10  double  6&lt;br /&gt;
longitude  12  22  double  6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
; Name :&lt;br /&gt;
The variable name is case-sensitive, up to 63 characters long with&lt;br /&gt;
no blanks. The variable names in the example are latitude and&lt;br /&gt;
longitude. If the same variable is included in more than one format&lt;br /&gt;
description within a format description file, its name must be the&lt;br /&gt;
same in each format description.&lt;br /&gt;
&lt;br /&gt;
; Start Position :&lt;br /&gt;
The column position where the first character (ASCII) or byte&lt;br /&gt;
(binary) of a variable value is placed. The first position is 1, not&lt;br /&gt;
0. In the example, the variable latitude is defined to start at&lt;br /&gt;
position 1 and longitude at 12.&lt;br /&gt;
&lt;br /&gt;
; End Position :&lt;br /&gt;
The column position where the last character (ASCII) or byte&lt;br /&gt;
(binary) of a variable value is placed. In the example, the variable&lt;br /&gt;
latitude is defined to end at position 10 and longitude at 22.&lt;br /&gt;
&lt;br /&gt;
; Type :&lt;br /&gt;
The variable type can be a standard type such as char, float,&lt;br /&gt;
double, or a special FreeForm ND type. The type for both variables&lt;br /&gt;
in the example is double. See ([[Wiki_Testing/tblfmt|Section 3.1]]) for&lt;br /&gt;
descriptions of supported types.&lt;br /&gt;
&lt;br /&gt;
; Precision :&lt;br /&gt;
Precision defines the number of digits to the right of the decimal&lt;br /&gt;
point. For float or double variables, precision only controls the&lt;br /&gt;
number of digits printed or displayed to the right of the decimal&lt;br /&gt;
point in an ASCII representation. The precision for both variables&lt;br /&gt;
in the example is 6.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Wiki_Testing/tblfmt&amp;diff=4943</id>
		<title>Wiki Testing/tblfmt</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Wiki_Testing/tblfmt&amp;diff=4943"/>
		<updated>2009-10-06T23:39:37Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Format Descriptions for Tabular Data=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Format descriptions define the formats of input and output data and&lt;br /&gt;
headers. FreeForm ND provides an easy-to-use mechanism for describing&lt;br /&gt;
data. FreeForm ND programs and FreeForm ND-based applications that you&lt;br /&gt;
develop use these format descriptions to correctly access data. Any&lt;br /&gt;
data file used by FreeForm ND programs must be described in a format&lt;br /&gt;
description file.&lt;br /&gt;
&lt;br /&gt;
This chapter explains how to write format descriptions for data&lt;br /&gt;
arranged in tabular format---rows and columns---only. For data in&lt;br /&gt;
non-tabular formats, see the next chapter.&lt;br /&gt;
&lt;br /&gt;
==FreeForm ND Variable Types==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The data sets you produce and use may contain a variety of variable&lt;br /&gt;
types. The characteristics of the types that FreeForm ND supports are&lt;br /&gt;
summarized in the table below, which is followed by a&lt;br /&gt;
description of each type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
 OPeNDAP FreeForm ND Data Types&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! Name  !! Minimum Value !! Maximum Value !! Size in Bytes !! Precision*&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;char&amp;lt;/font&amp;gt; ||  ||  || ** ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;uchar&amp;lt;/font&amp;gt; || 0 || 255 || 1 ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;short&amp;lt;/font&amp;gt; || -32,767 || 32,767 || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;font color=&#039;green&#039;&amp;gt;ushort&amp;lt;/font&amp;gt; || 0 || 65,535 || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;long&amp;lt;/font&amp;gt; || -2,147,483,647 || 2,147,483,647 || 4 ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;ulong&amp;lt;/font&amp;gt; || 0 || 4,294,967,295 || 4 ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;float&amp;lt;/font&amp;gt; || &amp;lt;math&amp;gt;10^{-37}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;10^{38}&amp;lt;/math&amp;gt; || 4 || 6***&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;double&amp;lt;/font&amp;gt; || &amp;lt;math&amp;gt;10^{-307}&amp;lt;/math&amp;gt; || &amp;lt;math&amp;gt;10^{308}&amp;lt;/math&amp;gt; || 8 || 15***&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;constant&amp;lt;/font&amp;gt; ||  ||  || ** ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;initial&amp;lt;/font&amp;gt; ||  ||  || record length ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;convert&amp;lt;/font&amp;gt; ||  ||  || ** ||&lt;br /&gt;
|-&lt;br /&gt;
| * Expressed as the number of significant digits  &lt;br /&gt;
|-&lt;br /&gt;
| ** User-specified  &lt;br /&gt;
|-&lt;br /&gt;
| *** Can vary depending on environment   &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;NOTE: The sizes in table 3.1 are machine-dependent.&lt;br /&gt;
Those given are for most Unix workstations.  &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;char&amp;lt;/font&amp;gt; : The &amp;lt;font color=&#039;green&#039;&amp;gt;char&amp;lt;/font&amp;gt; variable type is used for character strings. Variables of this type, including numerals, are interpreted as characters, not as numbers.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;uchar&amp;lt;/font&amp;gt; : The &amp;lt;font color=&#039;green&#039;&amp;gt;uchar&amp;lt;/font&amp;gt; (unsigned character) variable type can be used for integers between 0 and 255 (28- 1). Variables that can be represented by the &amp;lt;font color=&#039;green&#039;&amp;gt;uchar&amp;lt;/font&amp;gt; type (for example: month, day, hour, minute) occur in many data sets. An advantage of using the &amp;lt;font color=&#039;green&#039;&amp;gt;uchar&amp;lt;/font&amp;gt; type in binary formats is that only one byte is used for each variable. Variables of this type are interpreted as numbers, not characters.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;short&amp;lt;/font&amp;gt; : A &amp;lt;font color=&#039;green&#039;&amp;gt;short&amp;lt;/font&amp;gt; variable can hold integers between -32,767 and 32,767 (&amp;lt;math&amp;gt;2^{15}- 1&amp;lt;/math&amp;gt;). This type can be used for signed integers with less than 5 digits, or for real numbers with a total of 4 or fewer digits on both sides of the decimal point (-99 to 99 with a precision of 2, -999 to 999 with a precision of 1, and so on).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;ushort&amp;lt;/font&amp;gt; : A &amp;lt;font color=&#039;green&#039;&amp;gt;ushort&amp;lt;/font&amp;gt; (unsigned short) variable can hold integers between 0 and 65,535 (&amp;lt;math&amp;gt;2^{16} - 1&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;long&amp;lt;/font&amp;gt; : A &amp;lt;font color=&#039;green&#039;&amp;gt;long&amp;lt;/font&amp;gt; variable can hold integers between -2,147,483,647 and +2,147,483,647 (&amp;lt;math&amp;gt;2^{31} - 1&amp;lt;/math&amp;gt;). This variable type is commonly used to represent floating point data as integers, which may be more portable. It can be used for numbers with 9 or fewer digits with up to 9 digits of precision, for example, latitude or longitude (-180.000000 to 180.000000).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;ulong&amp;lt;/font&amp;gt; : The &amp;lt;font color=&#039;green&#039;&amp;gt;ulong&amp;lt;/font&amp;gt; (unsigned long) variable type can be used for integers between 0 and 4,294,967,295 (&amp;lt;math&amp;gt;2^{32} - 1&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;float, double&amp;lt;/font&amp;gt; : Numbers that include explicit decimal points are either &amp;lt;font color=&#039;green&#039;&amp;gt;float&amp;lt;/font&amp;gt; or &amp;lt;font color=&#039;green&#039;&amp;gt;double&amp;lt;/font&amp;gt; depending on the desired number of digits. A &amp;lt;font color=&#039;green&#039;&amp;gt;float&amp;lt;/font&amp;gt; has a maximum of 6 significant digits, a &amp;lt;font color=&#039;green&#039;&amp;gt;double&amp;lt;/font&amp;gt; has 15 maximum. The extra digits of a &amp;lt;font color=&#039;green&#039;&amp;gt;double&amp;lt;/font&amp;gt; are useful, for example, for precisely specifying time of day within a month as decimal days. One second of time is approximately 0.00001 day. The number specifying day (maximum = 31) can occupy up to 2 digits. A &amp;lt;font color=&#039;green&#039;&amp;gt;float&amp;lt;/font&amp;gt; can therefore only specify decimal days to a whole second (31.00001 occupies seven digits). A &amp;lt;font color=&#039;green&#039;&amp;gt;double&amp;lt;/font&amp;gt; can, however, be used to track decimal parts of a second (for example, 31.000001).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;header&amp;lt;/font&amp;gt; : Older versions of FreeForm ND included header variables. You can now specify header formats in format description files. For details, see ([[Wiki_Testing/tblfmt | Chapter 3&amp;lt;/cite&amp;gt;]]) and also ([[Wiki_Testing/hdrfmt |Chapter 4&amp;lt;/cite&amp;gt;]]).&lt;br /&gt;
&lt;br /&gt;
==FreeForm ND File Types==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FreeForm ND supports binary, ASCII, and dBASE file types. Binary data&lt;br /&gt;
are stored in a fixed amount of space with a fixed range of values.&lt;br /&gt;
This is a very efficient way to store data, but the files are&lt;br /&gt;
machine-readable rather than human-readable. Binary numbers can be&lt;br /&gt;
integers or floating point numbers.&lt;br /&gt;
&lt;br /&gt;
Numbers and character strings are stored as text strings in ASCII. The&lt;br /&gt;
amount of space used to store a string is variable, with each&lt;br /&gt;
character occupying one byte.&lt;br /&gt;
&lt;br /&gt;
The dBASE file type, used by the dBASE product, is ASCII text without&lt;br /&gt;
end-of-line markers.&lt;br /&gt;
&lt;br /&gt;
==Format Description Files==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Format description files accompany data files. A format description&lt;br /&gt;
file can contain descriptions for one or more formats. You include&lt;br /&gt;
descriptions for header, input, and output formats as appropriate.&lt;br /&gt;
Format descriptions for more than one file may be included in a single&lt;br /&gt;
format description file.&lt;br /&gt;
&lt;br /&gt;
An example format description file is shown next. The sections that&lt;br /&gt;
follow describe each element of a format description file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/ This format description file is for&lt;br /&gt;
/ data files latlon.bin and latlon.dat.&lt;br /&gt;
&lt;br /&gt;
binary_data &amp;quot;Default binary format&amp;quot;&lt;br /&gt;
latitude 1 4 long 6&lt;br /&gt;
longitude 5 8 long 6&lt;br /&gt;
&lt;br /&gt;
ASCII_data &amp;quot;Default ASCII format&amp;quot;&lt;br /&gt;
latitude 1 10 double 6&lt;br /&gt;
longitude 12 22 double 6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lines 1 and 2 are comment lines.  Lines 4 and 8 give the format type and title, as described in ([[Wiki_Testing/tblfmt |Section 3.4.1]]). Lines 5, 6,&lt;br /&gt;
9, and 10 contain variable descriptions, described in&lt;br /&gt;
([[Wiki_Testing/tblfmt |Section 3.4.2]]).  Blank lines signify the end of a format&lt;br /&gt;
description&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can include blank lines between format descriptions and comments&lt;br /&gt;
in a format description file as necessary.  Comment lines begin with a&lt;br /&gt;
slash (/). FreeForm ND ignores comments.&lt;br /&gt;
&lt;br /&gt;
==Format Descriptions==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A format description file comprises one or more format descriptions. A&lt;br /&gt;
format description consists of a line specifying the format type and&lt;br /&gt;
title followed by one or more variable descriptions, as in the&lt;br /&gt;
following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
binary_data &amp;quot;Default binary format&amp;quot;&lt;br /&gt;
latitude 1 4 long 6&lt;br /&gt;
longitude 5 8 long 6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Format Type and Title===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A line specifying the format type and title begins a format&lt;br /&gt;
description. A &#039;&#039;format descriptor&#039;&#039;, for example, &amp;lt;font color=&#039;green&#039;&amp;gt;binary_data&amp;lt;/font&amp;gt;, is&lt;br /&gt;
used to indicate format type to FreeForm ND. The &#039;&#039;format title&#039;&#039;, for&lt;br /&gt;
example, &amp;quot;Default binary format&amp;quot;, briefly describes the format. It&lt;br /&gt;
must be surrounded by quotes and follow the format descriptor on the&lt;br /&gt;
same line. The maximum number of characters for the format title is 80&lt;br /&gt;
including the quotes.&lt;br /&gt;
&lt;br /&gt;
====Format Descriptors====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Format descriptors indicate (in the order given) file type, read/write&lt;br /&gt;
type, and file section. Possible values for each descriptor component&lt;br /&gt;
are shown in the following table.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Format Descriptor Components&lt;br /&gt;
 &lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
|+&lt;br /&gt;
! File Type  !! Read/Write Type (optional) !! File Section&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
  |+&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;ASCII&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;binary&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;dBASE&amp;lt;/font&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
||&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
  |+&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;input&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;output&amp;lt;/font&amp;gt;&lt;br /&gt;
 |} &lt;br /&gt;
||&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
  |+&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;data&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  | &amp;lt;font color=&#039;green&#039;&amp;gt;file_header&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  |&amp;lt;font color=&#039;green&#039;&amp;gt;record_header&amp;lt;/font&amp;gt;&lt;br /&gt;
  |-&lt;br /&gt;
  |&amp;lt;font color=&#039;green&#039;&amp;gt;file_header_separate&amp;lt;/font&amp;gt;*&lt;br /&gt;
  |-&lt;br /&gt;
  |&amp;lt;font color=&#039;green&#039;&amp;gt;record_header_separate&amp;lt;/font&amp;gt;*&lt;br /&gt;
|}&lt;br /&gt;
|- &lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; | * The qualifier &amp;lt;font color=&#039;green&#039;&amp;gt;separate&amp;lt;/font&amp;gt; indicates there is a header file separate from the data file.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The components of a format descriptor are separated by underscores&lt;br /&gt;
(_). For example, &amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_output_data&amp;lt;/font&amp;gt; indicates that the format&lt;br /&gt;
description is for ASCII data in an output file. The order of&lt;br /&gt;
descriptors in a format description should reflect the order of format&lt;br /&gt;
types in the file. For instance, the descriptor&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_file_header&amp;lt;/font&amp;gt; would be listed in the format description&lt;br /&gt;
file before &amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_data&amp;lt;/font&amp;gt;. The format descriptors you can use in&lt;br /&gt;
FreeForm ND are listed in the next table, where &amp;lt;font color=&#039;green&#039;&amp;gt;XXX&amp;lt;/font&amp;gt; stands for&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;ASCII&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;binary&amp;lt;/font&amp;gt;, or &amp;lt;font color=&#039;green&#039;&amp;gt;dBASE&amp;lt;/font&amp;gt;.  (Example: &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_data&amp;lt;/font&amp;gt;&lt;br /&gt;
= &amp;lt;font color=&#039;green&#039;&amp;gt;ASCII_data&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;binary_data&amp;lt;/font&amp;gt;, or &amp;lt;font color=&#039;green&#039;&amp;gt;dBASE_data&amp;lt;/font&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
Format Descriptors&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
! Data !! Header !! Special&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
|+&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_data&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_input_data&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_output_data&amp;lt;/font&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
||&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; &lt;br /&gt;
|+ &lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_file_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_file_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_record_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_record_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_input_file_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_input_file_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_input_record_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_input_record_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_output_file_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_output_file_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_output_record_header&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;font color=&#039;green&#039;&amp;gt;XXX_output_record_header_separate&amp;lt;/font&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
||&lt;br /&gt;
{|&lt;br /&gt;
|&amp;lt;font color=&#039;green&#039;&amp;gt;RETURN&amp;lt;/font&amp;gt;*&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;font color=&#039;green&#039;&amp;gt;EOL&amp;lt;/font&amp;gt;**&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |* The RETURN descriptor lets FreeForm ND skip&lt;br /&gt;
over end-of-line characters in the data. &lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; |** The EOL descriptor is a constant&lt;br /&gt;
indicating an end-of-line character should be inserted in a&lt;br /&gt;
multi-line record. &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information about header formats, see ([[Wiki_Testing/hdrfmts |Chapter 5]])&lt;br /&gt;
on page 89.&lt;br /&gt;
&lt;br /&gt;
===Variable Descriptions===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A variable description defines the name, start and end column&lt;br /&gt;
position, type, and precision for each variable. The fields in a&lt;br /&gt;
variable description are separated by white space. Two variable&lt;br /&gt;
descriptions are shown below with the fields indicated. Each field is&lt;br /&gt;
then described.&lt;br /&gt;
&lt;br /&gt;
Here are two example variable descriptions.  Each one consists of a&lt;br /&gt;
name, a start position, and end position, a type, and a precision.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
latitude    1  10  double  6&lt;br /&gt;
longitude  12  22  double  6&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
; Name :&lt;br /&gt;
The variable name is case-sensitive, up to 63 characters long with&lt;br /&gt;
no blanks. The variable names in the example are latitude and&lt;br /&gt;
longitude. If the same variable is included in more than one format&lt;br /&gt;
description within a format description file, its name must be the&lt;br /&gt;
same in each format description.&lt;br /&gt;
&lt;br /&gt;
; Start Position :&lt;br /&gt;
The column position where the first character (ASCII) or byte&lt;br /&gt;
(binary) of a variable value is placed. The first position is 1, not&lt;br /&gt;
0. In the example, the variable latitude is defined to start at&lt;br /&gt;
position 1 and longitude at 12.&lt;br /&gt;
&lt;br /&gt;
; End Position :&lt;br /&gt;
The column position where the last character (ASCII) or byte&lt;br /&gt;
(binary) of a variable value is placed. In the example, the variable&lt;br /&gt;
latitude is defined to end at position 10 and longitude at 22.&lt;br /&gt;
&lt;br /&gt;
; Type :&lt;br /&gt;
The variable type can be a standard type such as char, float,&lt;br /&gt;
double, or a special FreeForm ND type. The type for both variables&lt;br /&gt;
in the example is double. See ([[Wiki_Testing/tblfmt|Section 3.1]]) for&lt;br /&gt;
descriptions of supported types.&lt;br /&gt;
&lt;br /&gt;
; Precision :&lt;br /&gt;
Precision defines the number of digits to the right of the decimal&lt;br /&gt;
point. For float or double variables, precision only controls the&lt;br /&gt;
number of digits printed or displayed to the right of the decimal&lt;br /&gt;
point in an ASCII representation. The precision for both variables&lt;br /&gt;
in the example is 6.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Wiki_Testing/dintro&amp;diff=4942</id>
		<title>Wiki Testing/dintro</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Wiki_Testing/dintro&amp;diff=4942"/>
		<updated>2009-10-06T23:37:21Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[FreeForm|return to FreeForm]]&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP FreeForm ND Data Handler is an OPeNDAP data handler&lt;br /&gt;
OPeNDAP FreeForm ND software to serve data from files in almost any format. The&lt;br /&gt;
FreeForm ND Data Access System is a flexible system for specifying&lt;br /&gt;
data formats to facilitate data access, management, and use. Since&lt;br /&gt;
DAP2 allows data to be translated over the internet and read by a&lt;br /&gt;
client regardless of the storage format of the data, the combination&lt;br /&gt;
allows several format restrictions to be overcome. &lt;br /&gt;
&lt;br /&gt;
The large variety of data formats is a primary obstacle in the way of&lt;br /&gt;
creating flexible data management and analysis software. FreeForm ND&lt;br /&gt;
was conceived, developed, and implemented at the National Geophysical&lt;br /&gt;
Data Center (NGDC) to alleviate the problems that occur when you need&lt;br /&gt;
to use data sets with varying native formats or to write&lt;br /&gt;
format-independent applications.&lt;br /&gt;
&lt;br /&gt;
DAP2 was originally conceived as a way to move large amounts of&lt;br /&gt;
scientific data over the internet.  As a consequence of establishing a&lt;br /&gt;
flexible data transmission format, DAP2 also allows substantial&lt;br /&gt;
independence from the storage format of the original data.  Up to now,&lt;br /&gt;
however, DAP2 servers have been limited to data in a few widely used&lt;br /&gt;
formats.  Using the OPeNDAP FreeForm ND Data Handler , many more datasets can be made available&lt;br /&gt;
through DAP2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The FreeForm ND Solution==&lt;br /&gt;
&lt;br /&gt;
OPeNDAP FreeForm ND uses a &#039;&#039;format descriptor&#039;&#039; file to describe the format&lt;br /&gt;
of one or more data files.  This descriptor file is a simple text file&lt;br /&gt;
that can be created with a text editor, describing the structure of&lt;br /&gt;
your data files.&lt;br /&gt;
&lt;br /&gt;
A traditional DAP2 server, illustrated [[:Image:regular.jpg|below]] &lt;br /&gt;
receives a request for data from a DAP2 client who may be at some&lt;br /&gt;
remote computer[[Wiki_Testing/footnotes|(2)]]. The data served by this server must be stored in one of the data formats supported by the OPeNDAP server (such as netCDF, HDF, or JGOFS), and the server uses specialized software to read this data&lt;br /&gt;
from disk.&lt;br /&gt;
&lt;br /&gt;
When it receives a request, the server reads the requested data from&lt;br /&gt;
its archive, reformats the data into the DAP2 transmission format and&lt;br /&gt;
sends the data back to the client.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:regular.jpg|actual size]]&lt;br /&gt;
&lt;br /&gt;
A Traditional DAP2 Server&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP FreeForm ND Data Handler works in a similar fashion to a traditional DAP2 server, but&lt;br /&gt;
before the server reads the data from the archive, it first reads the&lt;br /&gt;
data format descriptor to determine how it should read the data.  Only&lt;br /&gt;
after it has absorbed the details of the data storage format does it&lt;br /&gt;
attempt to read the data, pack it into the transmission format and&lt;br /&gt;
send it on its way back to the client.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:ff1.jpg|actual size]]&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP FreeForm ND Data Handler&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The FreeForm ND System==&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP FreeForm ND Data Handler comprises a format description mechanism, a set of programs&lt;br /&gt;
for manipulating data, and the server itself.  The software was built&lt;br /&gt;
using the FreeForm ND library and data objects.  These are documented&lt;br /&gt;
in The FreeForm ND User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP FreeForm ND Data Handler includes the following programs:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;dap_ff_handler&amp;lt;/font&amp;gt; : The OPeNDAP FreeForm ND Data Handler &#039;&#039;data handler&#039;&#039;. This program is run by the OPeNDAP server to handle the parts of any requests that require knowledge specifically about FreeForm. This program is run by the main server &#039;dispatch&#039; software. That software is described in the Server Installation Guide, available on the [http://www.opendap.org/&amp;lt;cite&amp;gt;OPeNDAP Home Page&amp;lt;/cite&amp;gt;] .&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
The OPeNDAP FreeForm ND Data Handler distribution also includes the following OPeNDAP FreeForm ND utilities. These are quite useful to write and debug format description files.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; : This program reformats data according to the input &#039;&#039;and output&#039;&#039;  specifications in a format description file.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;chkform&amp;lt;/font&amp;gt; : After writing a format description file, you can use this program to cross-check the description against a data file.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;readfile&amp;lt;/font&amp;gt; : This program is useful to decode the format used by a binary file.  It allows you to try different formats on pieces of a binary file, and see what works.&lt;br /&gt;
&lt;br /&gt;
==Installing the OPeNDAP FreeForm ND Data Handler==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have the OPeNDAP FreeForm ND Data Handler , and want it, follow these directions.  If you have a copy of the OPeNDAP FreeForm ND Data Handler , and want to know how to use it, see ([http://www &amp;lt;cite&amp;gt; ff,dquick&amp;lt;/cite&amp;gt;]) for quick instructions and examples of its use, and [[Wiki_Testing/ff-server | Chapter 6]] for further information.&lt;br /&gt;
&lt;br /&gt;
You can get the OPeNDAP FreeForm ND Data Handler from the [http://www.opendap.org/&amp;lt;cite&amp;gt;OPeNDAP&amp;lt;/cite&amp;gt;] . Follow the links to&lt;br /&gt;
&amp;quot;Download Software&amp;quot; and then to &amp;quot;Current Release.&amp;quot;  If your&lt;br /&gt;
computer is one of the platforms for which we provide a binary release,&lt;br /&gt;
get that, otherwise get the source code.&lt;br /&gt;
&lt;br /&gt;
To get a binary release, go to that page, click on the computer you&lt;br /&gt;
use, and click on the &amp;quot;FreeForm&amp;quot; button in the &amp;quot;Servers&amp;quot; box.&lt;br /&gt;
Click the Download button, and follow the directions.  The&lt;br /&gt;
server will make a custom binary file for you, which you then&lt;br /&gt;
download.&lt;br /&gt;
&lt;br /&gt;
Install the resulting shared library in a place where [[Hyrax]] can&lt;br /&gt;
find it, and then consult the Hyrax configuration instructions for the&lt;br /&gt;
remaining configuration steps.&lt;br /&gt;
&lt;br /&gt;
====Compiling the OPeNDAP FreeForm ND Data Handler====&lt;br /&gt;
&lt;br /&gt;
If the computer and operating system combination you use is not one of&lt;br /&gt;
the ones we own, you will have to compile the OPeNDAP FreeForm ND Data Handler from its source. Go to the OPeNDAP home page (www.opendap.org) and follow the menu item&lt;br /&gt;
to the downloads page. From there you will need the libdap, dap-server&lt;br /&gt;
and FreeForm handler software source distributions. Get each of these&lt;br /&gt;
and perform the following steps:&lt;br /&gt;
&lt;br /&gt;
#Expand the distribution (e.g., tar -xzf libdap-3.5.3.tar.gz)&lt;br /&gt;
#Change to the newly created directory (&amp;lt;font color=&#039;green&#039;&amp;gt;cd libdap-3.5.3&amp;lt;/font&amp;gt;)&lt;br /&gt;
#Run the configure script (&amp;lt;font color=&#039;green&#039;&amp;gt;./configure&amp;lt;/font&amp;gt;)&lt;br /&gt;
#Run make (&amp;lt;font color=&#039;green&#039;&amp;gt;make&amp;lt;/font&amp;gt;)&lt;br /&gt;
#Install the software (&amp;lt;font color=&#039;green&#039;&amp;gt;make install&amp;lt;/font&amp;gt; or sudo make install)&lt;br /&gt;
&lt;br /&gt;
Each source distribution contains more detailed build instructions;&lt;br /&gt;
see the &amp;lt;font color=&#039;green&#039;&amp;gt;README&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;INSTALL&amp;lt;/font&amp;gt; and &amp;lt;font color=&#039;green&#039;&amp;gt;NEWS&amp;lt;/font&amp;gt; files for the most&lt;br /&gt;
up-to-date information.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Wiki_Testing/dintro&amp;diff=4941</id>
		<title>Wiki Testing/dintro</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Wiki_Testing/dintro&amp;diff=4941"/>
		<updated>2009-10-06T23:36:49Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP FreeForm ND Data Handler is an OPeNDAP data handler&lt;br /&gt;
OPeNDAP FreeForm ND software to serve data from files in almost any format. The&lt;br /&gt;
FreeForm ND Data Access System is a flexible system for specifying&lt;br /&gt;
data formats to facilitate data access, management, and use. Since&lt;br /&gt;
DAP2 allows data to be translated over the internet and read by a&lt;br /&gt;
client regardless of the storage format of the data, the combination&lt;br /&gt;
allows several format restrictions to be overcome. &lt;br /&gt;
&lt;br /&gt;
The large variety of data formats is a primary obstacle in the way of&lt;br /&gt;
creating flexible data management and analysis software. FreeForm ND&lt;br /&gt;
was conceived, developed, and implemented at the National Geophysical&lt;br /&gt;
Data Center (NGDC) to alleviate the problems that occur when you need&lt;br /&gt;
to use data sets with varying native formats or to write&lt;br /&gt;
format-independent applications.&lt;br /&gt;
&lt;br /&gt;
DAP2 was originally conceived as a way to move large amounts of&lt;br /&gt;
scientific data over the internet.  As a consequence of establishing a&lt;br /&gt;
flexible data transmission format, DAP2 also allows substantial&lt;br /&gt;
independence from the storage format of the original data.  Up to now,&lt;br /&gt;
however, DAP2 servers have been limited to data in a few widely used&lt;br /&gt;
formats.  Using the OPeNDAP FreeForm ND Data Handler , many more datasets can be made available&lt;br /&gt;
through DAP2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The FreeForm ND Solution==&lt;br /&gt;
&lt;br /&gt;
OPeNDAP FreeForm ND uses a &#039;&#039;format descriptor&#039;&#039; file to describe the format&lt;br /&gt;
of one or more data files.  This descriptor file is a simple text file&lt;br /&gt;
that can be created with a text editor, describing the structure of&lt;br /&gt;
your data files.&lt;br /&gt;
&lt;br /&gt;
A traditional DAP2 server, illustrated [[:Image:regular.jpg|below]] &lt;br /&gt;
receives a request for data from a DAP2 client who may be at some&lt;br /&gt;
remote computer[[Wiki_Testing/footnotes|(2)]]. The data served by this server must be stored in one of the data formats supported by the OPeNDAP server (such as netCDF, HDF, or JGOFS), and the server uses specialized software to read this data&lt;br /&gt;
from disk.&lt;br /&gt;
&lt;br /&gt;
When it receives a request, the server reads the requested data from&lt;br /&gt;
its archive, reformats the data into the DAP2 transmission format and&lt;br /&gt;
sends the data back to the client.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:regular.jpg|actual size]]&lt;br /&gt;
&lt;br /&gt;
A Traditional DAP2 Server&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP FreeForm ND Data Handler works in a similar fashion to a traditional DAP2 server, but&lt;br /&gt;
before the server reads the data from the archive, it first reads the&lt;br /&gt;
data format descriptor to determine how it should read the data.  Only&lt;br /&gt;
after it has absorbed the details of the data storage format does it&lt;br /&gt;
attempt to read the data, pack it into the transmission format and&lt;br /&gt;
send it on its way back to the client.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:ff1.jpg|actual size]]&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP FreeForm ND Data Handler&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The FreeForm ND System==&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP FreeForm ND Data Handler comprises a format description mechanism, a set of programs&lt;br /&gt;
for manipulating data, and the server itself.  The software was built&lt;br /&gt;
using the FreeForm ND library and data objects.  These are documented&lt;br /&gt;
in The FreeForm ND User&#039;s Guide.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP FreeForm ND Data Handler includes the following programs:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;dap_ff_handler&amp;lt;/font&amp;gt; : The OPeNDAP FreeForm ND Data Handler &#039;&#039;data handler&#039;&#039;. This program is run by the OPeNDAP server to handle the parts of any requests that require knowledge specifically about FreeForm. This program is run by the main server &#039;dispatch&#039; software. That software is described in the Server Installation Guide, available on the [http://www.opendap.org/&amp;lt;cite&amp;gt;OPeNDAP Home Page&amp;lt;/cite&amp;gt;] .&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
The OPeNDAP FreeForm ND Data Handler distribution also includes the following OPeNDAP FreeForm ND utilities. These are quite useful to write and debug format description files.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; : This program reformats data according to the input &#039;&#039;and output&#039;&#039;  specifications in a format description file.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;chkform&amp;lt;/font&amp;gt; : After writing a format description file, you can use this program to cross-check the description against a data file.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;font color=&#039;green&#039;&amp;gt;readfile&amp;lt;/font&amp;gt; : This program is useful to decode the format used by a binary file.  It allows you to try different formats on pieces of a binary file, and see what works.&lt;br /&gt;
&lt;br /&gt;
==Installing the OPeNDAP FreeForm ND Data Handler==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t have the OPeNDAP FreeForm ND Data Handler , and want it, follow these directions.  If you have a copy of the OPeNDAP FreeForm ND Data Handler , and want to know how to use it, see ([http://www &amp;lt;cite&amp;gt; ff,dquick&amp;lt;/cite&amp;gt;]) for quick instructions and examples of its use, and [[Wiki_Testing/ff-server | Chapter 6]] for further information.&lt;br /&gt;
&lt;br /&gt;
You can get the OPeNDAP FreeForm ND Data Handler from the [http://www.opendap.org/&amp;lt;cite&amp;gt;OPeNDAP&amp;lt;/cite&amp;gt;] . Follow the links to&lt;br /&gt;
&amp;quot;Download Software&amp;quot; and then to &amp;quot;Current Release.&amp;quot;  If your&lt;br /&gt;
computer is one of the platforms for which we provide a binary release,&lt;br /&gt;
get that, otherwise get the source code.&lt;br /&gt;
&lt;br /&gt;
To get a binary release, go to that page, click on the computer you&lt;br /&gt;
use, and click on the &amp;quot;FreeForm&amp;quot; button in the &amp;quot;Servers&amp;quot; box.&lt;br /&gt;
Click the Download button, and follow the directions.  The&lt;br /&gt;
server will make a custom binary file for you, which you then&lt;br /&gt;
download.&lt;br /&gt;
&lt;br /&gt;
Install the resulting shared library in a place where [[Hyrax]] can&lt;br /&gt;
find it, and then consult the Hyrax configuration instructions for the&lt;br /&gt;
remaining configuration steps.&lt;br /&gt;
&lt;br /&gt;
====Compiling the OPeNDAP FreeForm ND Data Handler====&lt;br /&gt;
&lt;br /&gt;
If the computer and operating system combination you use is not one of&lt;br /&gt;
the ones we own, you will have to compile the OPeNDAP FreeForm ND Data Handler from its source. Go to the OPeNDAP home page (www.opendap.org) and follow the menu item&lt;br /&gt;
to the downloads page. From there you will need the libdap, dap-server&lt;br /&gt;
and FreeForm handler software source distributions. Get each of these&lt;br /&gt;
and perform the following steps:&lt;br /&gt;
&lt;br /&gt;
#Expand the distribution (e.g., tar -xzf libdap-3.5.3.tar.gz)&lt;br /&gt;
#Change to the newly created directory (&amp;lt;font color=&#039;green&#039;&amp;gt;cd libdap-3.5.3&amp;lt;/font&amp;gt;)&lt;br /&gt;
#Run the configure script (&amp;lt;font color=&#039;green&#039;&amp;gt;./configure&amp;lt;/font&amp;gt;)&lt;br /&gt;
#Run make (&amp;lt;font color=&#039;green&#039;&amp;gt;make&amp;lt;/font&amp;gt;)&lt;br /&gt;
#Install the software (&amp;lt;font color=&#039;green&#039;&amp;gt;make install&amp;lt;/font&amp;gt; or sudo make install)&lt;br /&gt;
&lt;br /&gt;
Each source distribution contains more detailed build instructions;&lt;br /&gt;
see the &amp;lt;font color=&#039;green&#039;&amp;gt;README&amp;lt;/font&amp;gt;, &amp;lt;font color=&#039;green&#039;&amp;gt;INSTALL&amp;lt;/font&amp;gt; and &amp;lt;font color=&#039;green&#039;&amp;gt;NEWS&amp;lt;/font&amp;gt; files for the most&lt;br /&gt;
up-to-date information.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=FreeForm&amp;diff=4940</id>
		<title>FreeForm</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=FreeForm&amp;diff=4940"/>
		<updated>2009-10-06T23:31:35Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: /* Organization of this Document */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Using FreeForm ND with OPeNDAP, a researcher can easily make his or her data&lt;br /&gt;
available to the wider community of OPeNDAP users without having to&lt;br /&gt;
convert that data into another data file format.  This document&lt;br /&gt;
presents the FreeForm ND software, and shows how to use it with the OPeNDAP server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Tasks Illustrated in this Guide==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For a quick start to getting, installing, and using the FreeForm ND&lt;br /&gt;
software, see the list below of tasks described in this document.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Quick start. ([http://docs.opendap.org/index.php/Wiki_Testing/dquick&amp;lt;cite&amp;gt;here&amp;lt;/cite&amp;gt;])&lt;br /&gt;
*Getting and installing the FreeForm ND software.  ([http://docs.opendap.org/index.php/Wiki_Testing/dintro#Installing_the_OPeNDAP_FreeForm_ND_Data_Handler&amp;lt;cite&amp;gt;here&amp;lt;/cite&amp;gt;])&lt;br /&gt;
*Serving tabular data. ([http://docs.opendap.org/index.php/Wiki_Testing/tblfmt&amp;lt;cite&amp;gt;here&amp;lt;/cite&amp;gt;])&lt;br /&gt;
*Array tabular data. ([http://docs.opendap.org/index.php/Wiki_Testing/arrayfmt&amp;lt;cite&amp;gt;here&amp;lt;/cite&amp;gt;])&lt;br /&gt;
*Dealing with data file headers ([http://docs.opendap.org/index.php/Wiki_Testing/hdrfmts&amp;lt;cite&amp;gt;here&amp;lt;/cite&amp;gt;])&lt;br /&gt;
*Setup of File servers ([http://docs.opendap.org/index.php/Wiki_Testing/fileserv&amp;lt;cite&amp;gt;here&amp;lt;/cite&amp;gt;])&lt;br /&gt;
&lt;br /&gt;
==Who is this Guide for?==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This guide is for people who wish to use FreeForm ND to serve scientific&lt;br /&gt;
datasets using the OPeNDAP software.  Scientists who wish to share their&lt;br /&gt;
data with colleagues may also find this a useful system, since it is a&lt;br /&gt;
relatively simple matter to set up a server that can allow remote&lt;br /&gt;
access to your data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This documentation assumes that the readers are familiar with&lt;br /&gt;
computers and the internet, but are not necessarily programmers. More&lt;br /&gt;
than a passing familiarity with different data file formats will be&lt;br /&gt;
useful, as will an understanding of elementary internet concepts, such&lt;br /&gt;
as URLs and http.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This manual also assumes some familiarity with the OPeNDAP software.  If&lt;br /&gt;
you are starting from scratch, knowing nothing at all about OPeNDAP, we&lt;br /&gt;
strongly encourage you to read the [http://docs.opendap.org/index.php/UserGuide&amp;lt;cite&amp;gt;The OPeNDAP User Guide&amp;lt;/cite&amp;gt;] before reading further&lt;br /&gt;
here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Organization of this Document==&lt;br /&gt;
&lt;br /&gt;
This book contains both introductory and reference material. There is&lt;br /&gt;
also a description of the installation procedure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/dintro | Introduction]] : contains an overview of the OPeNDAP FreeForm ND Data Handler software, including how to get it and install it.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/dquick | Quick Start]] : provides a brief introduction to writing format descriptions and using the OPeNDAP FreeForm ND Data Handler.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/tblfmt | Table Format]] :provides detailed information about writing format descriptions to facilitate access to data in tabular formats.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/arrayfmt | Array Format]] : provides detailed information about writing format descriptions to facilitate access to data in non-tabular (array) formats.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/hdrfmts | Header Formats]] : tells you how to work with header formats.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/ff-server | FreeForm Server]] : describes the operation of the OPeNDAP FreeForm ND Data Handler, with tips for writing format files.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/convs | FreeForm Conventions]] : presents FreeForm ND file name conventions, the search rules for locating format files, and standard command line arguments for FreeForm ND programs.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/fmtconv | Format Conversion]] : shows you how to use the FreeForm ND program &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; to convert data from one format to another and also how to read the data in a binary file.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/datachk | Data Check]] : discusses the FreeForm ND program &amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt;, which you can use to check data distribution and quality.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A position box is often used in this book to indicate column position&lt;br /&gt;
of field values in data files. It is shown at the beginning of a data&lt;br /&gt;
list in the documentation, but does not appear in the data file&lt;br /&gt;
itself.  It looks something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1         2         3         4         5         6&lt;br /&gt;
012345678901234567890123456789012345678901234567890&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Wiki_Testing/dquick&amp;diff=4939</id>
		<title>Wiki Testing/dquick</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Wiki_Testing/dquick&amp;diff=4939"/>
		<updated>2009-10-06T23:29:22Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: /* Getting Started Serving Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Quick Tour of the OPeNDAP FreeForm ND Data Handler=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This chapter provides you a quick introduction to the OPeNDAP FreeForm ND Data Handler , including&lt;br /&gt;
writing format descriptions and serving test datasets.&lt;br /&gt;
&lt;br /&gt;
==Getting Started Serving Data==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get going with the OPeNDAP FreeForm ND Data Handler , follow these steps:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#See [[Hyrax]] for instructions about installing the OPeNDAP data server&lt;br /&gt;
#Install the OPeNDAP FreeForm ND Data Handler.&lt;br /&gt;
#Examine the structure of the data file(s) you intend to serve, and construct a OPeNDAP FreeForm ND format definition file that describes the layout of data in the files.  (Refer to the ([[Wiki_Testing/tblfmt |Table Format]]) for instructions about sequence data and ([[Wiki_Testing/arrayfmt|Array Format]]) for array data.  Consult [http://docs.opendap.org/index.php/UserGuide&amp;lt;cite&amp;gt;The OPeNDAP User Guide&amp;lt;/cite&amp;gt;] if you do not know the difference between the two data types.)&lt;br /&gt;
#If you wish, you may include an output definition format within this file, to allow you to test that your input description is accurate.  You can use the OPeNDAP FreeForm ND utilities, such as &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt;, to validate the conversion.  The ([[Wiki_Testing/fmtconv|Format Conversion]]) contains a detailed description of &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt;.  This step is optional, since the OPeNDAP FreeForm ND Data Handler ignores the output definition section of the format definition file.&lt;br /&gt;
#Although the OPeNDAP FreeForm ND Data Handler can generate default DDS and DAS files, you  may want to write these files yourself, to override the default data descriptions, or to add attribute data.  The default descriptions are based on the format of the data the the OPeNDAP FreeForm ND Data Handler receives from the OPeNDAP FreeForm ND engine.&lt;br /&gt;
#Place the data files, and a corresponding format file for each data file, in a place where [[Hyrax]] can find them.  See the Hyrax configuration instructions for information about where Hyrax looks for its files.&lt;br /&gt;
&lt;br /&gt;
Your data is now available to anyone who knows about your server.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can easily create FreeForm ND format description files that&lt;br /&gt;
describe the formats of input and output data and headers. The OPeNDAP FreeForm ND Data Handler&lt;br /&gt;
and other OPeNDAP FreeForm ND -based programs then use these files to correctly&lt;br /&gt;
access and manipulate data in various formats. An example format&lt;br /&gt;
description file is shown and described below.&lt;br /&gt;
&lt;br /&gt;
For complete information about writing format descriptions, see&lt;br /&gt;
[[Wiki_Testing/tblfmt |Chapter 3]] and [[Wiki_Testing/arrayfmt |Chapter4]].&lt;br /&gt;
&lt;br /&gt;
===Sequence Data===&lt;br /&gt;
&lt;br /&gt;
Here is a data file, containing a sequence of four data types.  (This&lt;br /&gt;
data file and several of the other examples in this chapter are&lt;br /&gt;
available.&lt;br /&gt;
&lt;br /&gt;
Here is the data file, called&lt;br /&gt;
[http://www.opendap.org/examples/ffsimple.dat &amp;lt;cite&amp;gt;ffsimple.dat&amp;lt;/cite&amp;gt;]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Latitude and Longitude:   -63.223548 54.118314  -176.161101 149.408117&lt;br /&gt;
-47.303545 -176.161101 11.7125 34.4634&lt;br /&gt;
-25.928001   -0.777265 20.7288 35.8953&lt;br /&gt;
-28.286662   35.591879 23.6377 35.3314&lt;br /&gt;
12.588231  149.408117 28.6583 34.5260&lt;br /&gt;
-63.223548   55.319598  0.4503 33.8830&lt;br /&gt;
54.118314 -136.940570 10.4085 32.0661&lt;br /&gt;
-38.818812   91.411330 13.9978 35.0173&lt;br /&gt;
-34.577065   30.172129 20.9096 35.4705&lt;br /&gt;
27.331551 -155.233735 23.0917 35.2694&lt;br /&gt;
11.624981 -113.660611 27.5036 33.7004&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file consists of a single header line, followed by a sequence of records, each of which contains a latitude, longitude, temperature, and salinity.&lt;br /&gt;
&lt;br /&gt;
Here is a format file you can use to read &amp;lt;font color=&#039;green&#039;&amp;gt;ffsimple.dat&amp;lt;/font&amp;gt;.  It is called [http://www.opendap.org/examples/ffsimple.fmt &amp;lt;cite&amp;gt;ffsimple.fmt&amp;lt;/cite&amp;gt;]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ASCII_file_header &amp;quot;Latitude/Longitude Limits&amp;quot;&lt;br /&gt;
minmax_title 1 24 char 0&lt;br /&gt;
latitude_min 25 36 double 6&lt;br /&gt;
latitude_max 37 46 double 6&lt;br /&gt;
longitude_min 47 59 double 6&lt;br /&gt;
longitude_max 60 70 double 6&lt;br /&gt;
&lt;br /&gt;
ASCII_data &amp;quot;lat/lon&amp;quot;&lt;br /&gt;
latitude 1 10 double 6&lt;br /&gt;
longitude 12 22 double 6&lt;br /&gt;
temp 24 30 double 4&lt;br /&gt;
salt 32 38 double 4&lt;br /&gt;
&lt;br /&gt;
ASCII_output_data &amp;quot;output&amp;quot;&lt;br /&gt;
latitude 1 10 double 3&lt;br /&gt;
longitude_deg 11 15 short 0&lt;br /&gt;
longitude_min 16 19 short 0&lt;br /&gt;
longitude_sec 20 23 short 0&lt;br /&gt;
salt 31 40 double 2&lt;br /&gt;
temp 41 50 double 2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format file consists of three sections.  The first shows OPeNDAP FreeForm ND\&lt;br /&gt;
how to parse the file header.  The second section describes the&lt;br /&gt;
contents of the data file.  The third part describes how to write the&lt;br /&gt;
data to another file.  This part is not important for the OPeNDAP FreeForm ND Data Handler , but&lt;br /&gt;
is useful for debugging the input descriptions.&lt;br /&gt;
&lt;br /&gt;
Download the &amp;lt;font color=&#039;green&#039;&amp;gt;ffsimple&amp;lt;/font&amp;gt; files described above, and type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; newform ffsimple.dat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see results like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Welcome to Newform release 4.2.3 -- an NGDC FreeForm ND application&lt;br /&gt;
&lt;br /&gt;
(ffsimple.fmt) ASCII_input_file_header  &amp;quot;Latitude/Longitude Limits&amp;quot;&lt;br /&gt;
File ffsimple.dat contains 1 header record (71 bytes)&lt;br /&gt;
Each record contains 6 fields and is 71 characters long.&lt;br /&gt;
&lt;br /&gt;
(ffsimple.fmt) ASCII_input_data &amp;quot;lat/lon&amp;quot;&lt;br /&gt;
File ffsimple.dat contains 10 data records (390 bytes)&lt;br /&gt;
Each record contains 5 fields and is 39 characters long.&lt;br /&gt;
&lt;br /&gt;
(ffsimple.fmt) ASCII_output_data        &amp;quot;output&amp;quot;&lt;br /&gt;
Program memory contains 10 data records (510 bytes)&lt;br /&gt;
Each record contains 7 fields and is 51 characters long.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-47.304 -176   9  40            34.46     11.71&lt;br /&gt;
-25.928    0 -46  38            35.90     20.73&lt;br /&gt;
-28.287   35  35  31            35.33     23.64&lt;br /&gt;
12.588  149  24  29            34.53     28.66&lt;br /&gt;
-63.224   55  19  11            33.88      0.45&lt;br /&gt;
54.118 -136  56  26            32.07     10.41&lt;br /&gt;
-38.819   91  24  41            35.02     14.00&lt;br /&gt;
-34.577   30  10  20            35.47     20.91&lt;br /&gt;
27.332 -155  14   1            35.27     23.09&lt;br /&gt;
11.625 -113  39  38            33.70     27.50&lt;br /&gt;
100\&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now take both the &amp;lt;font color=&#039;green&#039;&amp;gt;ffsimple&amp;lt;/font&amp;gt; files and put them into a directory&lt;br /&gt;
in your web server&#039;s document root directory.  (Refer to the&lt;br /&gt;
[http://docs.opendap.org/index.php/Wiki_Testing/OpeNDAP_User%27s_Guide&amp;lt;cite&amp;gt;The OPeNDAP User Guide&amp;lt;/cite&amp;gt;] for some tips on figuring out where that is.)&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example, on a computer on which the web server document root&lt;br /&gt;
is &amp;lt;font color=&#039;green&#039;&amp;gt;/export/home/http/htdocs&amp;lt;/font&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; mkdir /export/home/http/htdocs/data&lt;br /&gt;
&amp;gt; cp ffsimple.* /export/home/http/htdocs/data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, using a common web browser such as Netscape Navigator, enter the&lt;br /&gt;
following URL (substitute your machine name and CGI directory for the&lt;br /&gt;
ones in the example):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://test.opendap.org/opendap/nph-dods/data/ff/ffsimple.dat.asc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should get something like the following in your web browser&#039;s&lt;br /&gt;
window:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
latitude, longitude, temp, salt&lt;br /&gt;
-47.3035, -176.161, 11.7125, 34.4634&lt;br /&gt;
-25.928, -0.777265, 20.7288, 35.8953&lt;br /&gt;
-28.2867, 35.5919, 23.6377, 35.3314&lt;br /&gt;
12.5882, 149.408, 28.6583, 34.526&lt;br /&gt;
-63.2235, 55.3196, 0.4503, 33.883&lt;br /&gt;
54.1183, -136.941, 10.4085, 32.0661&lt;br /&gt;
-38.8188, 91.4113, 13.9978, 35.0173&lt;br /&gt;
-34.5771, 30.1721, 20.9096, 35.4705&lt;br /&gt;
27.3316, -155.234, 23.0917, 35.2694&lt;br /&gt;
11.625, -113.661, 27.5036, 33.7004&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Try this URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://test.opendap.org/opendap/nph-dods/data/ffsimple.dat.dds&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will show a description of the dataset structure (See [http://docs.opendap.org/index.php/Wiki_Testing/OpeNDAP_User%27s_Guide&amp;lt;cite&amp;gt;The OPeNDAP User Guide&amp;lt;/cite&amp;gt;] for a detailed description of the DAP2 &amp;quot;Dataset Description&lt;br /&gt;
Structure,&amp;quot; or DDS.):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Dataset {&lt;br /&gt;
    Sequence {&lt;br /&gt;
        Float64 latitude;&lt;br /&gt;
        Float64 longitude;&lt;br /&gt;
        Float64 temp;&lt;br /&gt;
        Float64 salt;&lt;br /&gt;
    } lat/lon;&lt;br /&gt;
} ffsimple;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Array Data===&lt;br /&gt;
&lt;br /&gt;
If your data more naturally comes in arrays, you can still use the&lt;br /&gt;
OPeNDAP FreeForm ND Data Handler to serve your data.  The OPeNDAP FreeForm ND format for sequence data is&lt;br /&gt;
somewhat simpler than the format for array data, so you may find it&lt;br /&gt;
easier to begin with the example in the previous section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====One-dimensional Arrays====&lt;br /&gt;
&lt;br /&gt;
Here is a data file, called&lt;br /&gt;
[http://www.opendap.org/examples/ffarr1.dat &amp;lt;cite&amp;gt;ffarr1.dat&amp;lt;/cite&amp;gt;], containingfour ten-element vectors:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 123456789012345678901234567&lt;br /&gt;
 1.00  50.00 0.1000  1.1000&lt;br /&gt;
 2.00  61.00 0.3162  0.0953&lt;br /&gt;
 3.00  72.00 0.5623 -2.3506&lt;br /&gt;
 4.00  83.00 0.7499  0.8547&lt;br /&gt;
 5.00  94.00 0.8660 -0.1570&lt;br /&gt;
 6.00 105.00 0.9306 -1.8513&lt;br /&gt;
 7.00 116.00 0.9647  0.6159&lt;br /&gt;
 8.00 127.00 0.9822 -0.4847&lt;br /&gt;
 9.00 138.00 0.9910 -0.7243&lt;br /&gt;
10.00 149.00 0.9955 -0.3226&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a format file to read this data&lt;br /&gt;
([http://www.opendap.org/examples/ffarr1.fmt &amp;lt;cite&amp;gt;ffarr1.fmt&amp;lt;/cite&amp;gt;]):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ASCII_input_data &amp;quot;simple array format&amp;quot;&lt;br /&gt;
index 1 5 ARRAY[&amp;quot;line&amp;quot; 1 to 10 sb 23] OF float 1&lt;br /&gt;
data1 6 12 ARRAY[&amp;quot;line&amp;quot; 1 to 10 sb 21] OF float 1&lt;br /&gt;
data2 13 19 ARRAY[&amp;quot;line&amp;quot; 1 to 10 sb 21] OF float 1&lt;br /&gt;
data3 20 27 ARRAY[&amp;quot;line&amp;quot; 1 to 10 sb 20] OF float 1&lt;br /&gt;
&lt;br /&gt;
ASCII_output_data &amp;quot;simple array output&amp;quot;&lt;br /&gt;
index 1 7 ARRAY[&amp;quot;line&amp;quot; 1 to 10] OF float 0&lt;br /&gt;
/data1 6 12 ARRAY[&amp;quot;line&amp;quot; 1 to 10 sb 21] OF float 1&lt;br /&gt;
/data2 13 19 ARRAY[&amp;quot;line&amp;quot; 1 to 10 sb 21] OF float 4&lt;br /&gt;
/data3 20 27 ARRAY[&amp;quot;line&amp;quot; 1 to 10 sb 20] OF float 4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output section is not essential for the OPeNDAP FreeForm ND Data Handler , but is included so&lt;br /&gt;
you can check out the data with the &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Download the files from the OPeNDAP web site, and try typing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; newform ffarr1.dat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see the &amp;lt;font color=&#039;green&#039;&amp;gt;index&amp;lt;/font&amp;gt; array printed out.  Uncomment different lines in the output section of the example file to see different data&lt;br /&gt;
vectors.&lt;br /&gt;
&lt;br /&gt;
Now look a little closer at the input section of the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
index 1 5 ARRAY[&amp;quot;line&amp;quot; 1 to 10 sb 23] OF float 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This line says that the array in question---called &amp;quot;index&amp;quot;---starts&lt;br /&gt;
in column one of the first line, and each element takes up five bytes.&lt;br /&gt;
The first element starts in column one and goes into column five.  The&lt;br /&gt;
array has one dimension, &amp;quot;line&amp;quot;, and is composed of floating point&lt;br /&gt;
data.  The remaining elements of this array are found by skipping the&lt;br /&gt;
next 23 bytes (the newline counts as a character), reading the&lt;br /&gt;
following five bytes, skipping the next 23 bytes, and so on.&lt;br /&gt;
&lt;br /&gt;
Of course, the 23 bytes skipped in between the &amp;lt;font color=&#039;green&#039;&amp;gt;index&amp;lt;/font&amp;gt; array&lt;br /&gt;
elements also contain data from other arrays.  The second array,&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;data1&amp;lt;/font&amp;gt;, starts in column 6 of line one, and has 21 bytes between&lt;br /&gt;
values.  The third array starts in column 13 of the first line, and&lt;br /&gt;
the fourth starts in column 20.&lt;br /&gt;
&lt;br /&gt;
Move the &amp;lt;font color=&#039;green&#039;&amp;gt;ffarr1.*&amp;lt;/font&amp;gt; files into your data directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; cp ffarr1.* /export/home/http/htdocs/data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can look at this data the same way you looked at the sequence&lt;br /&gt;
data.  Request the DDS for the dataset with a URL like this one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://test.opendap.org/opendap/nph-dods/data/ffarr1.dat.dds&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that the dataset is a collection of one-dimensional&lt;br /&gt;
vectors.  You can see the individual vectors with a URL like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://test.opendap.org/opendap/nph-dods/data/ffarr1.dat.asc?index&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Multi-dimensional Arrays====&lt;br /&gt;
&lt;br /&gt;
Here&#039;s another example, with a two-dimensional array.&lt;br /&gt;
([http://www.opendap.org/examples/ffarr2.dat &amp;lt;cite&amp;gt;ffarr2.dat&amp;lt;/cite&amp;gt;]):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          1         2         3         4&lt;br /&gt;
1234567890123456789012345678901234567890&lt;br /&gt;
  1.00  2.00  3.00  4.00  5.00  6.00&lt;br /&gt;
  7.00  8.00  9.00 10.00 11.00 12.00&lt;br /&gt;
 13.00 14.00 15.00 16.00 17.00 18.00&lt;br /&gt;
 19.00 20.00 21.00 22.00 23.00 24.00&lt;br /&gt;
 25.00 26.00 27.00 28.00 29.00 30.00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are no spaces between the data columns within an array row, but in&lt;br /&gt;
order to skip reading the newline character, we have to skip one&lt;br /&gt;
character at the end of each row.  Here is a format file to read this&lt;br /&gt;
data ([http://www.opendap.org/examples/ffarr2.fmt &amp;lt;cite&amp;gt;ffarr2.fmt&amp;lt;/cite&amp;gt;]):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ASCII_input_data &amp;quot;one&amp;quot;&lt;br /&gt;
data 1 6 ARRAY[&amp;quot;y&amp;quot; 1 to 5 sb 1][&amp;quot;x&amp;quot; 1 to 6] OF float 1&lt;br /&gt;
&lt;br /&gt;
ASCII_output_data &amp;quot;two&amp;quot;&lt;br /&gt;
data 1 4 ARRAY[&amp;quot;x&amp;quot; 1 to 6 sb 2][&amp;quot;y&amp;quot; 1 to 5] OF float 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Again, the output section is only for using with the &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt;&lt;br /&gt;
tool.  Put these data files into your &amp;lt;font color=&#039;green&#039;&amp;gt;htdocs&amp;lt;/font&amp;gt; directory, and look&lt;br /&gt;
at the DDS as you did with the previous example.&lt;br /&gt;
&lt;br /&gt;
====A Little More Complicated====&lt;br /&gt;
&lt;br /&gt;
You can use the OPeNDAP FreeForm ND Data Handler to serve data with multi-dimensional arrays and one-dimensional vectors interspersed among one another.  Here&#039;s a file&lt;br /&gt;
containing this kind of data&lt;br /&gt;
([http://www.opendap.org/examples/ffarr3.dat &amp;lt;cite&amp;gt;ffarr3.dat&amp;lt;/cite&amp;gt;]):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1         2         3         4&lt;br /&gt;
1234567890123456789012345678901234567890123&lt;br /&gt;
XXXX  1.00  2.00  3.00  4.00  5.00  6.00YY&lt;br /&gt;
XXXX  7.00  8.00  9.00 10.00 11.00 12.00YY&lt;br /&gt;
XXXX 13.00 14.00 15.00 16.00 17.00 18.00YY&lt;br /&gt;
XXXX 19.00 20.00 21.00 22.00 23.00 24.00YY&lt;br /&gt;
XXXX 25.00 26.00 27.00 28.00 29.00 30.00YY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
In order to read this file successfully, we define three vectors to&lt;br /&gt;
read the &amp;quot;XXXX&amp;quot;, the &amp;quot;YY&amp;quot;, and the newline.  Here is a format file&lt;br /&gt;
that does this&lt;br /&gt;
([http://www.opendap.org/examples/ffarr3.fmt &amp;lt;cite&amp;gt;ffarr3.fmt&amp;lt;/cite&amp;gt;]):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dBASE_input_data &amp;quot;one&amp;quot;&lt;br /&gt;
headers 1 4 ARRAY[&amp;quot;line&amp;quot; 1 to 5 sb 39] OF text 0&lt;br /&gt;
data 5 10 ARRAY[&amp;quot;y&amp;quot; 1 to 5 sb 7][&amp;quot;x&amp;quot; 1 to 6] OF float 1&lt;br /&gt;
trailers 41 42 ARRAY[&amp;quot;line&amp;quot; 1 to 5 sb 41] OF text 0&lt;br /&gt;
newline 43 43 ARRAY[&amp;quot;line&amp;quot; 1 to 5 sb 42] OF text 0&lt;br /&gt;
&lt;br /&gt;
ASCII_output_data &amp;quot;two&amp;quot;&lt;br /&gt;
data 1 4 ARRAY[&amp;quot;x&amp;quot; 1 to 6 sb 2][&amp;quot;y&amp;quot; 1 to 5] OF float 0&lt;br /&gt;
/headers 1 6 ARRAY[&amp;quot;line&amp;quot; 1 to 5] OF text 0&lt;br /&gt;
/trailers 1 4 ARRAY[&amp;quot;line&amp;quot; 1 to 5] OF text 0&lt;br /&gt;
/newline 1 4 ARRAY[&amp;quot;line&amp;quot; 1 to 5] OF text 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following chapters offer more detailed information about how&lt;br /&gt;
exactly to create a format description file.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Wiki_Testing/dquick&amp;diff=4938</id>
		<title>Wiki Testing/dquick</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Wiki_Testing/dquick&amp;diff=4938"/>
		<updated>2009-10-06T23:27:36Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: /* Getting Started Serving Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Quick Tour of the OPeNDAP FreeForm ND Data Handler=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This chapter provides you a quick introduction to the OPeNDAP FreeForm ND Data Handler , including&lt;br /&gt;
writing format descriptions and serving test datasets.&lt;br /&gt;
&lt;br /&gt;
==Getting Started Serving Data==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get going with the OPeNDAP FreeForm ND Data Handler , follow these steps:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#See [[Hyrax]] for instructions about installing the OPeNDAP data server&lt;br /&gt;
#Install the OPeNDAP FreeForm ND Data Handler.&lt;br /&gt;
#Examine the structure of the data file(s) you intend to serve, and construct a OPeNDAP FreeForm ND format definition file that describes the layout of data in the files.  (Refer to the ([[Wiki_Testing/tblfmt |Table Format]]) for instructions about sequence data and ([[Wiki_Testing/arrayfmt|Array Format]]) for array data.  Consult [http://docs.opendap.org/index.php/UserGuide&amp;lt;cite&amp;gt;The OPeNDAP User Guide&amp;lt;/cite&amp;gt;] if you do not know the difference between the two data types.)&lt;br /&gt;
#If you wish, you may include an output definition format within this file, to allow you to test that your input description is accurate.  You can use the OPeNDAP FreeForm ND utilities, such as &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt;, to validate the conversion.  The ([[Wiki_Testing/fmtcovn|Format Conversion]]) contains a detailed description of &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt;.  This step is optional, since the OPeNDAP FreeForm ND Data Handler ignores the output definition section of the format definition file.&lt;br /&gt;
#Although the OPeNDAP FreeForm ND Data Handler can generate default DDS and DAS files, you  may want to write these files yourself, to override the default data descriptions, or to add attribute data.  The default descriptions are based on the format of the data the the OPeNDAP FreeForm ND Data Handler receives from the OPeNDAP FreeForm ND engine.&lt;br /&gt;
#Place the data files, and a corresponding format file for each data file, in a place where [[Hyrax]] can find them.  See the Hyrax configuration instructions for information about where Hyrax looks for its files.&lt;br /&gt;
&lt;br /&gt;
Your data is now available to anyone who knows about your server.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can easily create FreeForm ND format description files that&lt;br /&gt;
describe the formats of input and output data and headers. The OPeNDAP FreeForm ND Data Handler&lt;br /&gt;
and other OPeNDAP FreeForm ND -based programs then use these files to correctly&lt;br /&gt;
access and manipulate data in various formats. An example format&lt;br /&gt;
description file is shown and described below.&lt;br /&gt;
&lt;br /&gt;
For complete information about writing format descriptions, see&lt;br /&gt;
[[Wiki_Testing/tblfmt |Chapter 3]] and [[Wiki_Testing/arrayfmt |Chapter4]].&lt;br /&gt;
&lt;br /&gt;
===Sequence Data===&lt;br /&gt;
&lt;br /&gt;
Here is a data file, containing a sequence of four data types.  (This&lt;br /&gt;
data file and several of the other examples in this chapter are&lt;br /&gt;
available.&lt;br /&gt;
&lt;br /&gt;
Here is the data file, called&lt;br /&gt;
[http://www.opendap.org/examples/ffsimple.dat &amp;lt;cite&amp;gt;ffsimple.dat&amp;lt;/cite&amp;gt;]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Latitude and Longitude:   -63.223548 54.118314  -176.161101 149.408117&lt;br /&gt;
-47.303545 -176.161101 11.7125 34.4634&lt;br /&gt;
-25.928001   -0.777265 20.7288 35.8953&lt;br /&gt;
-28.286662   35.591879 23.6377 35.3314&lt;br /&gt;
12.588231  149.408117 28.6583 34.5260&lt;br /&gt;
-63.223548   55.319598  0.4503 33.8830&lt;br /&gt;
54.118314 -136.940570 10.4085 32.0661&lt;br /&gt;
-38.818812   91.411330 13.9978 35.0173&lt;br /&gt;
-34.577065   30.172129 20.9096 35.4705&lt;br /&gt;
27.331551 -155.233735 23.0917 35.2694&lt;br /&gt;
11.624981 -113.660611 27.5036 33.7004&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file consists of a single header line, followed by a sequence of records, each of which contains a latitude, longitude, temperature, and salinity.&lt;br /&gt;
&lt;br /&gt;
Here is a format file you can use to read &amp;lt;font color=&#039;green&#039;&amp;gt;ffsimple.dat&amp;lt;/font&amp;gt;.  It is called [http://www.opendap.org/examples/ffsimple.fmt &amp;lt;cite&amp;gt;ffsimple.fmt&amp;lt;/cite&amp;gt;]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ASCII_file_header &amp;quot;Latitude/Longitude Limits&amp;quot;&lt;br /&gt;
minmax_title 1 24 char 0&lt;br /&gt;
latitude_min 25 36 double 6&lt;br /&gt;
latitude_max 37 46 double 6&lt;br /&gt;
longitude_min 47 59 double 6&lt;br /&gt;
longitude_max 60 70 double 6&lt;br /&gt;
&lt;br /&gt;
ASCII_data &amp;quot;lat/lon&amp;quot;&lt;br /&gt;
latitude 1 10 double 6&lt;br /&gt;
longitude 12 22 double 6&lt;br /&gt;
temp 24 30 double 4&lt;br /&gt;
salt 32 38 double 4&lt;br /&gt;
&lt;br /&gt;
ASCII_output_data &amp;quot;output&amp;quot;&lt;br /&gt;
latitude 1 10 double 3&lt;br /&gt;
longitude_deg 11 15 short 0&lt;br /&gt;
longitude_min 16 19 short 0&lt;br /&gt;
longitude_sec 20 23 short 0&lt;br /&gt;
salt 31 40 double 2&lt;br /&gt;
temp 41 50 double 2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The format file consists of three sections.  The first shows OPeNDAP FreeForm ND\&lt;br /&gt;
how to parse the file header.  The second section describes the&lt;br /&gt;
contents of the data file.  The third part describes how to write the&lt;br /&gt;
data to another file.  This part is not important for the OPeNDAP FreeForm ND Data Handler , but&lt;br /&gt;
is useful for debugging the input descriptions.&lt;br /&gt;
&lt;br /&gt;
Download the &amp;lt;font color=&#039;green&#039;&amp;gt;ffsimple&amp;lt;/font&amp;gt; files described above, and type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; newform ffsimple.dat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see results like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Welcome to Newform release 4.2.3 -- an NGDC FreeForm ND application&lt;br /&gt;
&lt;br /&gt;
(ffsimple.fmt) ASCII_input_file_header  &amp;quot;Latitude/Longitude Limits&amp;quot;&lt;br /&gt;
File ffsimple.dat contains 1 header record (71 bytes)&lt;br /&gt;
Each record contains 6 fields and is 71 characters long.&lt;br /&gt;
&lt;br /&gt;
(ffsimple.fmt) ASCII_input_data &amp;quot;lat/lon&amp;quot;&lt;br /&gt;
File ffsimple.dat contains 10 data records (390 bytes)&lt;br /&gt;
Each record contains 5 fields and is 39 characters long.&lt;br /&gt;
&lt;br /&gt;
(ffsimple.fmt) ASCII_output_data        &amp;quot;output&amp;quot;&lt;br /&gt;
Program memory contains 10 data records (510 bytes)&lt;br /&gt;
Each record contains 7 fields and is 51 characters long.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-47.304 -176   9  40            34.46     11.71&lt;br /&gt;
-25.928    0 -46  38            35.90     20.73&lt;br /&gt;
-28.287   35  35  31            35.33     23.64&lt;br /&gt;
12.588  149  24  29            34.53     28.66&lt;br /&gt;
-63.224   55  19  11            33.88      0.45&lt;br /&gt;
54.118 -136  56  26            32.07     10.41&lt;br /&gt;
-38.819   91  24  41            35.02     14.00&lt;br /&gt;
-34.577   30  10  20            35.47     20.91&lt;br /&gt;
27.332 -155  14   1            35.27     23.09&lt;br /&gt;
11.625 -113  39  38            33.70     27.50&lt;br /&gt;
100\&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now take both the &amp;lt;font color=&#039;green&#039;&amp;gt;ffsimple&amp;lt;/font&amp;gt; files and put them into a directory&lt;br /&gt;
in your web server&#039;s document root directory.  (Refer to the&lt;br /&gt;
[http://docs.opendap.org/index.php/Wiki_Testing/OpeNDAP_User%27s_Guide&amp;lt;cite&amp;gt;The OPeNDAP User Guide&amp;lt;/cite&amp;gt;] for some tips on figuring out where that is.)&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example, on a computer on which the web server document root&lt;br /&gt;
is &amp;lt;font color=&#039;green&#039;&amp;gt;/export/home/http/htdocs&amp;lt;/font&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; mkdir /export/home/http/htdocs/data&lt;br /&gt;
&amp;gt; cp ffsimple.* /export/home/http/htdocs/data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, using a common web browser such as Netscape Navigator, enter the&lt;br /&gt;
following URL (substitute your machine name and CGI directory for the&lt;br /&gt;
ones in the example):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://test.opendap.org/opendap/nph-dods/data/ff/ffsimple.dat.asc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should get something like the following in your web browser&#039;s&lt;br /&gt;
window:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
latitude, longitude, temp, salt&lt;br /&gt;
-47.3035, -176.161, 11.7125, 34.4634&lt;br /&gt;
-25.928, -0.777265, 20.7288, 35.8953&lt;br /&gt;
-28.2867, 35.5919, 23.6377, 35.3314&lt;br /&gt;
12.5882, 149.408, 28.6583, 34.526&lt;br /&gt;
-63.2235, 55.3196, 0.4503, 33.883&lt;br /&gt;
54.1183, -136.941, 10.4085, 32.0661&lt;br /&gt;
-38.8188, 91.4113, 13.9978, 35.0173&lt;br /&gt;
-34.5771, 30.1721, 20.9096, 35.4705&lt;br /&gt;
27.3316, -155.234, 23.0917, 35.2694&lt;br /&gt;
11.625, -113.661, 27.5036, 33.7004&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Try this URL:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://test.opendap.org/opendap/nph-dods/data/ffsimple.dat.dds&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will show a description of the dataset structure (See [http://docs.opendap.org/index.php/Wiki_Testing/OpeNDAP_User%27s_Guide&amp;lt;cite&amp;gt;The OPeNDAP User Guide&amp;lt;/cite&amp;gt;] for a detailed description of the DAP2 &amp;quot;Dataset Description&lt;br /&gt;
Structure,&amp;quot; or DDS.):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Dataset {&lt;br /&gt;
    Sequence {&lt;br /&gt;
        Float64 latitude;&lt;br /&gt;
        Float64 longitude;&lt;br /&gt;
        Float64 temp;&lt;br /&gt;
        Float64 salt;&lt;br /&gt;
    } lat/lon;&lt;br /&gt;
} ffsimple;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Array Data===&lt;br /&gt;
&lt;br /&gt;
If your data more naturally comes in arrays, you can still use the&lt;br /&gt;
OPeNDAP FreeForm ND Data Handler to serve your data.  The OPeNDAP FreeForm ND format for sequence data is&lt;br /&gt;
somewhat simpler than the format for array data, so you may find it&lt;br /&gt;
easier to begin with the example in the previous section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====One-dimensional Arrays====&lt;br /&gt;
&lt;br /&gt;
Here is a data file, called&lt;br /&gt;
[http://www.opendap.org/examples/ffarr1.dat &amp;lt;cite&amp;gt;ffarr1.dat&amp;lt;/cite&amp;gt;], containingfour ten-element vectors:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 123456789012345678901234567&lt;br /&gt;
 1.00  50.00 0.1000  1.1000&lt;br /&gt;
 2.00  61.00 0.3162  0.0953&lt;br /&gt;
 3.00  72.00 0.5623 -2.3506&lt;br /&gt;
 4.00  83.00 0.7499  0.8547&lt;br /&gt;
 5.00  94.00 0.8660 -0.1570&lt;br /&gt;
 6.00 105.00 0.9306 -1.8513&lt;br /&gt;
 7.00 116.00 0.9647  0.6159&lt;br /&gt;
 8.00 127.00 0.9822 -0.4847&lt;br /&gt;
 9.00 138.00 0.9910 -0.7243&lt;br /&gt;
10.00 149.00 0.9955 -0.3226&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a format file to read this data&lt;br /&gt;
([http://www.opendap.org/examples/ffarr1.fmt &amp;lt;cite&amp;gt;ffarr1.fmt&amp;lt;/cite&amp;gt;]):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ASCII_input_data &amp;quot;simple array format&amp;quot;&lt;br /&gt;
index 1 5 ARRAY[&amp;quot;line&amp;quot; 1 to 10 sb 23] OF float 1&lt;br /&gt;
data1 6 12 ARRAY[&amp;quot;line&amp;quot; 1 to 10 sb 21] OF float 1&lt;br /&gt;
data2 13 19 ARRAY[&amp;quot;line&amp;quot; 1 to 10 sb 21] OF float 1&lt;br /&gt;
data3 20 27 ARRAY[&amp;quot;line&amp;quot; 1 to 10 sb 20] OF float 1&lt;br /&gt;
&lt;br /&gt;
ASCII_output_data &amp;quot;simple array output&amp;quot;&lt;br /&gt;
index 1 7 ARRAY[&amp;quot;line&amp;quot; 1 to 10] OF float 0&lt;br /&gt;
/data1 6 12 ARRAY[&amp;quot;line&amp;quot; 1 to 10 sb 21] OF float 1&lt;br /&gt;
/data2 13 19 ARRAY[&amp;quot;line&amp;quot; 1 to 10 sb 21] OF float 4&lt;br /&gt;
/data3 20 27 ARRAY[&amp;quot;line&amp;quot; 1 to 10 sb 20] OF float 4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output section is not essential for the OPeNDAP FreeForm ND Data Handler , but is included so&lt;br /&gt;
you can check out the data with the &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Download the files from the OPeNDAP web site, and try typing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; newform ffarr1.dat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see the &amp;lt;font color=&#039;green&#039;&amp;gt;index&amp;lt;/font&amp;gt; array printed out.  Uncomment different lines in the output section of the example file to see different data&lt;br /&gt;
vectors.&lt;br /&gt;
&lt;br /&gt;
Now look a little closer at the input section of the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
index 1 5 ARRAY[&amp;quot;line&amp;quot; 1 to 10 sb 23] OF float 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This line says that the array in question---called &amp;quot;index&amp;quot;---starts&lt;br /&gt;
in column one of the first line, and each element takes up five bytes.&lt;br /&gt;
The first element starts in column one and goes into column five.  The&lt;br /&gt;
array has one dimension, &amp;quot;line&amp;quot;, and is composed of floating point&lt;br /&gt;
data.  The remaining elements of this array are found by skipping the&lt;br /&gt;
next 23 bytes (the newline counts as a character), reading the&lt;br /&gt;
following five bytes, skipping the next 23 bytes, and so on.&lt;br /&gt;
&lt;br /&gt;
Of course, the 23 bytes skipped in between the &amp;lt;font color=&#039;green&#039;&amp;gt;index&amp;lt;/font&amp;gt; array&lt;br /&gt;
elements also contain data from other arrays.  The second array,&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;data1&amp;lt;/font&amp;gt;, starts in column 6 of line one, and has 21 bytes between&lt;br /&gt;
values.  The third array starts in column 13 of the first line, and&lt;br /&gt;
the fourth starts in column 20.&lt;br /&gt;
&lt;br /&gt;
Move the &amp;lt;font color=&#039;green&#039;&amp;gt;ffarr1.*&amp;lt;/font&amp;gt; files into your data directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; cp ffarr1.* /export/home/http/htdocs/data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can look at this data the same way you looked at the sequence&lt;br /&gt;
data.  Request the DDS for the dataset with a URL like this one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://test.opendap.org/opendap/nph-dods/data/ffarr1.dat.dds&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that the dataset is a collection of one-dimensional&lt;br /&gt;
vectors.  You can see the individual vectors with a URL like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://test.opendap.org/opendap/nph-dods/data/ffarr1.dat.asc?index&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Multi-dimensional Arrays====&lt;br /&gt;
&lt;br /&gt;
Here&#039;s another example, with a two-dimensional array.&lt;br /&gt;
([http://www.opendap.org/examples/ffarr2.dat &amp;lt;cite&amp;gt;ffarr2.dat&amp;lt;/cite&amp;gt;]):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
          1         2         3         4&lt;br /&gt;
1234567890123456789012345678901234567890&lt;br /&gt;
  1.00  2.00  3.00  4.00  5.00  6.00&lt;br /&gt;
  7.00  8.00  9.00 10.00 11.00 12.00&lt;br /&gt;
 13.00 14.00 15.00 16.00 17.00 18.00&lt;br /&gt;
 19.00 20.00 21.00 22.00 23.00 24.00&lt;br /&gt;
 25.00 26.00 27.00 28.00 29.00 30.00&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are no spaces between the data columns within an array row, but in&lt;br /&gt;
order to skip reading the newline character, we have to skip one&lt;br /&gt;
character at the end of each row.  Here is a format file to read this&lt;br /&gt;
data ([http://www.opendap.org/examples/ffarr2.fmt &amp;lt;cite&amp;gt;ffarr2.fmt&amp;lt;/cite&amp;gt;]):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ASCII_input_data &amp;quot;one&amp;quot;&lt;br /&gt;
data 1 6 ARRAY[&amp;quot;y&amp;quot; 1 to 5 sb 1][&amp;quot;x&amp;quot; 1 to 6] OF float 1&lt;br /&gt;
&lt;br /&gt;
ASCII_output_data &amp;quot;two&amp;quot;&lt;br /&gt;
data 1 4 ARRAY[&amp;quot;x&amp;quot; 1 to 6 sb 2][&amp;quot;y&amp;quot; 1 to 5] OF float 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Again, the output section is only for using with the &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt;&lt;br /&gt;
tool.  Put these data files into your &amp;lt;font color=&#039;green&#039;&amp;gt;htdocs&amp;lt;/font&amp;gt; directory, and look&lt;br /&gt;
at the DDS as you did with the previous example.&lt;br /&gt;
&lt;br /&gt;
====A Little More Complicated====&lt;br /&gt;
&lt;br /&gt;
You can use the OPeNDAP FreeForm ND Data Handler to serve data with multi-dimensional arrays and one-dimensional vectors interspersed among one another.  Here&#039;s a file&lt;br /&gt;
containing this kind of data&lt;br /&gt;
([http://www.opendap.org/examples/ffarr3.dat &amp;lt;cite&amp;gt;ffarr3.dat&amp;lt;/cite&amp;gt;]):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1         2         3         4&lt;br /&gt;
1234567890123456789012345678901234567890123&lt;br /&gt;
XXXX  1.00  2.00  3.00  4.00  5.00  6.00YY&lt;br /&gt;
XXXX  7.00  8.00  9.00 10.00 11.00 12.00YY&lt;br /&gt;
XXXX 13.00 14.00 15.00 16.00 17.00 18.00YY&lt;br /&gt;
XXXX 19.00 20.00 21.00 22.00 23.00 24.00YY&lt;br /&gt;
XXXX 25.00 26.00 27.00 28.00 29.00 30.00YY&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
In order to read this file successfully, we define three vectors to&lt;br /&gt;
read the &amp;quot;XXXX&amp;quot;, the &amp;quot;YY&amp;quot;, and the newline.  Here is a format file&lt;br /&gt;
that does this&lt;br /&gt;
([http://www.opendap.org/examples/ffarr3.fmt &amp;lt;cite&amp;gt;ffarr3.fmt&amp;lt;/cite&amp;gt;]):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dBASE_input_data &amp;quot;one&amp;quot;&lt;br /&gt;
headers 1 4 ARRAY[&amp;quot;line&amp;quot; 1 to 5 sb 39] OF text 0&lt;br /&gt;
data 5 10 ARRAY[&amp;quot;y&amp;quot; 1 to 5 sb 7][&amp;quot;x&amp;quot; 1 to 6] OF float 1&lt;br /&gt;
trailers 41 42 ARRAY[&amp;quot;line&amp;quot; 1 to 5 sb 41] OF text 0&lt;br /&gt;
newline 43 43 ARRAY[&amp;quot;line&amp;quot; 1 to 5 sb 42] OF text 0&lt;br /&gt;
&lt;br /&gt;
ASCII_output_data &amp;quot;two&amp;quot;&lt;br /&gt;
data 1 4 ARRAY[&amp;quot;x&amp;quot; 1 to 6 sb 2][&amp;quot;y&amp;quot; 1 to 5] OF float 0&lt;br /&gt;
/headers 1 6 ARRAY[&amp;quot;line&amp;quot; 1 to 5] OF text 0&lt;br /&gt;
/trailers 1 4 ARRAY[&amp;quot;line&amp;quot; 1 to 5] OF text 0&lt;br /&gt;
/newline 1 4 ARRAY[&amp;quot;line&amp;quot; 1 to 5] OF text 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following chapters offer more detailed information about how&lt;br /&gt;
exactly to create a format description file.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=FreeForm&amp;diff=4937</id>
		<title>FreeForm</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=FreeForm&amp;diff=4937"/>
		<updated>2009-10-06T23:24:08Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: New page: Using FreeForm ND with OPeNDAP, a researcher can easily make his or her data available to the wider community of OPeNDAP users without having to convert that data into another data file fo...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Using FreeForm ND with OPeNDAP, a researcher can easily make his or her data&lt;br /&gt;
available to the wider community of OPeNDAP users without having to&lt;br /&gt;
convert that data into another data file format.  This document&lt;br /&gt;
presents the FreeForm ND software, and shows how to use it with the OPeNDAP server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Tasks Illustrated in this Guide==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For a quick start to getting, installing, and using the FreeForm ND&lt;br /&gt;
software, see the list below of tasks described in this document.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Quick start. ([http://docs.opendap.org/index.php/Wiki_Testing/dquick&amp;lt;cite&amp;gt;here&amp;lt;/cite&amp;gt;])&lt;br /&gt;
*Getting and installing the FreeForm ND software.  ([http://docs.opendap.org/index.php/Wiki_Testing/dintro#Installing_the_OPeNDAP_FreeForm_ND_Data_Handler&amp;lt;cite&amp;gt;here&amp;lt;/cite&amp;gt;])&lt;br /&gt;
*Serving tabular data. ([http://docs.opendap.org/index.php/Wiki_Testing/tblfmt&amp;lt;cite&amp;gt;here&amp;lt;/cite&amp;gt;])&lt;br /&gt;
*Array tabular data. ([http://docs.opendap.org/index.php/Wiki_Testing/arrayfmt&amp;lt;cite&amp;gt;here&amp;lt;/cite&amp;gt;])&lt;br /&gt;
*Dealing with data file headers ([http://docs.opendap.org/index.php/Wiki_Testing/hdrfmts&amp;lt;cite&amp;gt;here&amp;lt;/cite&amp;gt;])&lt;br /&gt;
*Setup of File servers ([http://docs.opendap.org/index.php/Wiki_Testing/fileserv&amp;lt;cite&amp;gt;here&amp;lt;/cite&amp;gt;])&lt;br /&gt;
&lt;br /&gt;
==Who is this Guide for?==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This guide is for people who wish to use FreeForm ND to serve scientific&lt;br /&gt;
datasets using the OPeNDAP software.  Scientists who wish to share their&lt;br /&gt;
data with colleagues may also find this a useful system, since it is a&lt;br /&gt;
relatively simple matter to set up a server that can allow remote&lt;br /&gt;
access to your data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This documentation assumes that the readers are familiar with&lt;br /&gt;
computers and the internet, but are not necessarily programmers. More&lt;br /&gt;
than a passing familiarity with different data file formats will be&lt;br /&gt;
useful, as will an understanding of elementary internet concepts, such&lt;br /&gt;
as URLs and http.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This manual also assumes some familiarity with the OPeNDAP software.  If&lt;br /&gt;
you are starting from scratch, knowing nothing at all about OPeNDAP, we&lt;br /&gt;
strongly encourage you to read the [http://docs.opendap.org/index.php/UserGuide&amp;lt;cite&amp;gt;The OPeNDAP User Guide&amp;lt;/cite&amp;gt;] before reading further&lt;br /&gt;
here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Organization of this Document==&lt;br /&gt;
&lt;br /&gt;
This book contains both introductory and reference material. There is&lt;br /&gt;
also a description of the installation procedure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/dintro | Chapter 1]] : contains an overview of the OPeNDAP FreeForm ND Data Handler software, including how to get it and install it.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/dquick | Chapter 2]] : provides a brief introduction to writing format descriptions and using the OPeNDAP FreeForm ND Data Handler.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/tblfmt | Chapter 3]] :provides detailed information about writing format descriptions to facilitate access to data in tabular formats.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/arrayfmt | Chapter 4]] : provides detailed information about writing format descriptions to facilitate access to data in non-tabular (array) formats.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/hdrfmts | Chapter 5]] : tells you how to work with header formats.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/ff-server | Chapter 6]] : describes the operation of the OPeNDAP FreeForm ND Data Handler, with tips for writing format files.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/convs | Chapter 7]] : presents FreeForm ND file name conventions, the search rules for locating format files, and standard command line arguments for FreeForm ND programs.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/fmtconv | Chapter 8]] : shows you how to use the FreeForm ND program &amp;lt;font color=&#039;green&#039;&amp;gt;newform&amp;lt;/font&amp;gt; to convert data from one format to another and also how to read the data in a binary file.&lt;br /&gt;
&lt;br /&gt;
; [[Wiki_Testing/datachk | Chapter 9]] : discusses the FreeForm ND program &amp;lt;font color=&#039;green&#039;&amp;gt;checkvar&amp;lt;/font&amp;gt;, which you can use to check data distribution and quality.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A position box is often used in this book to indicate column position&lt;br /&gt;
of field values in data files. It is shown at the beginning of a data&lt;br /&gt;
list in the documentation, but does not appear in the data file&lt;br /&gt;
itself.  It looks something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1         2         3         4         5         6&lt;br /&gt;
012345678901234567890123456789012345678901234567890&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideServer&amp;diff=4936</id>
		<title>UserGuideServer</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideServer&amp;diff=4936"/>
		<updated>2009-10-06T23:18:59Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: /* Installing BES */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[UserGuide|Back to User Guide Contents]]&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Server=&lt;br /&gt;
&lt;br /&gt;
Any server that responds to the messages described in &lt;br /&gt;
[[UserGuideOPeNDAPMessages|OPeNDAP Messages]] using the &lt;br /&gt;
[[UserGuideDataModel|OPeNDAP Data Model]] is an OPeNDAP server.  The&lt;br /&gt;
messages and the data model are published standards, available to&lt;br /&gt;
anyone to use.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group, in addition to publishing and maintaining the&lt;br /&gt;
standards described here, maintains a server that complies with the&lt;br /&gt;
standard.  This is [[Hyrax]].&lt;br /&gt;
&lt;br /&gt;
==Hyrax==&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group produces and supports [[Hyrax]], a modular data server&lt;br /&gt;
that can be used in a variety of ways to serve a wide variety of data&lt;br /&gt;
with OPeNDAP.&lt;br /&gt;
&lt;br /&gt;
Hyrax is flexible enough that it can serve data that currently exist&lt;br /&gt;
in a wide variety of data storage formats, ranging from HDF4 data&lt;br /&gt;
files to netCDF data to data in some arbitrary non-standard format&lt;br /&gt;
using the FreeForm module.&lt;br /&gt;
&lt;br /&gt;
Hyrax is modular, too, which means it can be outfitted to serve the&lt;br /&gt;
particular needs of your data without weighing down its performance&lt;br /&gt;
with features you don&#039;t need.&lt;br /&gt;
&lt;br /&gt;
===How Hyrax Works===&lt;br /&gt;
&lt;br /&gt;
The [[Hyrax]] server is actually a combination of two distinct&lt;br /&gt;
servers, running on the same machine, or on two machines connected&lt;br /&gt;
with a very fast link.  One server serves as the &lt;br /&gt;
user-facing &amp;quot;front end&amp;quot; to the system, while the other provides the&lt;br /&gt;
&amp;quot;engine room&amp;quot;, optimized to turn requests around quickly.&lt;br /&gt;
&lt;br /&gt;
The front end server is called the &#039;&#039;&#039;O&#039;&#039;&#039;PeNDAP &#039;&#039;&#039;L&#039;&#039;&#039;ightweight&lt;br /&gt;
&#039;&#039;&#039;F&#039;&#039;&#039;ront end &#039;&#039;&#039;S&#039;&#039;&#039;erver (OLFS).  It receives requests for data&lt;br /&gt;
and services in multiple formats and forms, and is meant to be as&lt;br /&gt;
&amp;quot;user friendly&amp;quot; as a server can be.  It also handles such chores as&lt;br /&gt;
authentication and authorization-checking, and responding to catalog&lt;br /&gt;
and bot requests.  It can also construct complex data requests from&lt;br /&gt;
multiple requests from its parner server.&lt;br /&gt;
&lt;br /&gt;
[[Image:HyraxArchitecture.jpg|left|300px]]&lt;br /&gt;
&lt;br /&gt;
This other server, called the &#039;&#039;&#039;B&#039;&#039;&#039;ack &#039;&#039;&#039;E&#039;&#039;&#039;nd &#039;&#039;&#039;S&#039;&#039;&#039;erver (BES),&lt;br /&gt;
does only one thing&amp;amp;mdash;provide data&amp;amp;mdash;and is designed to do it&lt;br /&gt;
fast.  It handles the compute-intensive parts of processing an OPeNDAP&lt;br /&gt;
client request for data.  This results in higher performance for small&lt;br /&gt;
requests while not penalizing the larger requests.&lt;br /&gt;
&lt;br /&gt;
Separating the two roles allows several paths to optimizing a server,&lt;br /&gt;
while still resulting in higher performance for small requests.  An OLFS&lt;br /&gt;
controlling multiple BES processes on a machine can process multiple&lt;br /&gt;
requests quicker because while one BES is occupied with retrieving its&lt;br /&gt;
data, another can be processing its data.  An OLFS controlling BES&lt;br /&gt;
processes on multiple machines can implement a rudimentary&lt;br /&gt;
load-balancing scheme to protect servers from overload.  What&#039;s more,&lt;br /&gt;
compute-intensive clients can optimize their processes further by&lt;br /&gt;
sending requests directly to the BES.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Installing Hyrax===&lt;br /&gt;
&lt;br /&gt;
The two parts of [[Hyrax]] are both installed by the same script, but&lt;br /&gt;
they are two different animals, which may require different kinds of&lt;br /&gt;
attention from an administrator.  Testing OLFS requires a working BES,&lt;br /&gt;
so it&#039;s typical to start the post-unpacking process with the BES.&lt;br /&gt;
&lt;br /&gt;
====Installing BES====&lt;br /&gt;
&lt;br /&gt;
The BES is a standalone server.  Its installation involves parking its&lt;br /&gt;
code somewhere to be run as a daemon and configuring your system to&lt;br /&gt;
execute it.&lt;br /&gt;
&lt;br /&gt;
After that, though, there are several configuration options you&#039;ll&lt;br /&gt;
need to address by installing software on your machine, and by editing&lt;br /&gt;
the [[Hyrax_-_BES_Configuration|Hyrax configuration file]], called bes.xml.  Details of these&lt;br /&gt;
options are in the [[Hyrax]] documentation, but these are the&lt;br /&gt;
decisions you&#039;ll have to make:&lt;br /&gt;
&lt;br /&gt;
;What kind of data&lt;br /&gt;
:Hyrax is equipped to serve data stored in any of several different file formats, HDF, netCDF and others.  Each different format requires its own handler, and your machine must have shared libraries containing these handlers installed.  For example, in order to serve netCDF data, the netCDF handler library must be available to Hyrax, and identified in its [[Hyrax_-_BES_Configuration|configuration file]].  The handlers are shared libraries and are installed separately.  Find instructions under [[Hyrax_-_BES_Configuration#Loading_Handlers|Loading Handlers]].&lt;br /&gt;
&lt;br /&gt;
;Where the data lives&lt;br /&gt;
:A server equipped to serve data must be able to find that data.  Lines in the bes.xml file identify the disk location of your data files.  Hyrax can provide a limited amount of browsing capacity to users, through its [[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]].  Access is specified by identifying directories where data resides.  See [[Hyrax_-_BES_Configuration|Pointing_to_data]].&lt;br /&gt;
&lt;br /&gt;
;What kinds of services&lt;br /&gt;
:Along with simply supplying data, Hyrax can supply several different services, including [[UserGuideOPeNDAPMessages#ASCII_Service|serving the data as ASCII values]], and the form-driven [[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]].  The bes.xml file is used to specify the list of services.  The drivers for these services are installed as part of the default installation of Hyrax, but they need to be chosen and identified in bes.xml.  See instructions at [[Hyrax_-_BES_Configuration#Loading_Handlers|Loading Handlers]].&lt;br /&gt;
&lt;br /&gt;
Once these three tasks are accomplished, and once data is moved into&lt;br /&gt;
the appropriate directories, your server should be ready to provide&lt;br /&gt;
data to all comers, but most specifically to its OLFS.&lt;br /&gt;
&lt;br /&gt;
=====The FreeForm Module=====&lt;br /&gt;
&lt;br /&gt;
One of the shared libraries to use for serving data is called the FreeForm module.  This module allows you to serve data in fairly arbitrary formats by writing a format description file to sit alongside your data file.  If you have data that isn&#039;t in one of the supported file formats, consider writing format descriptions using FreeForm, and serving the data that way.&lt;br /&gt;
&lt;br /&gt;
See the [[FreeForm|FreeForm documentation]] for more information.&lt;br /&gt;
&lt;br /&gt;
====Installing OLFS====&lt;br /&gt;
&lt;br /&gt;
The OLFS is a Java servlet, so its installation involves&lt;br /&gt;
installing the Tomcat servlet infrastructure, and then configuring&lt;br /&gt;
that with the OLFS.  There are four configuration files, but unless&lt;br /&gt;
yours is an unusual case, you&#039;ll likely only have to look at two of&lt;br /&gt;
them.  See [[Hyrax_-_OLFS_Configuration]] for more information.&lt;br /&gt;
&lt;br /&gt;
Use the&lt;br /&gt;
[[Hyrax_-_OLFS_Configuration#olfs.xml_Configuration_File|olfs.xml]]&lt;br /&gt;
file to specify these important features of the OLFS operation:&lt;br /&gt;
&lt;br /&gt;
;Address of BES&lt;br /&gt;
:The OLFS is the front door to data from the BES.  Use the olfs.xml file to identify where to find this server.  See the instructions for the [[Hyrax_-_OLFS_Configuration#BESManager|BESManager]].&lt;br /&gt;
&lt;br /&gt;
;Dispatch handlers&lt;br /&gt;
:The OLFS &amp;quot;offers&amp;quot; the incoming URL to a series of &amp;quot;dispatch handlers&amp;quot; until one accepts it and executes.  This allows the OLFS to offer directory and catalog services, as well as data services and more.  Use the olfs.xml file to nominate the dispatch handlers (they come with the OLFS, and do not need to be separately installed).  See [[Hyrax_-_OLFS_Configuration#HTTP_GET_Handlers|handler instructions]] for more.&lt;br /&gt;
&lt;br /&gt;
;Catalog requests&lt;br /&gt;
:The OLFS can handle [[Hyrax_-_THREDDS_Configuration|THREDDS]] catalog requests, as well as directory requests, an older part of the DAP standard that also involves data about a collection of data files.  The THREDDS information can be static (provided from a file) or dynamic (generated by a review of the available data).&lt;br /&gt;
&lt;br /&gt;
;File access&lt;br /&gt;
:You may have individual files you want served intact via this server.  These might include documentation of the data files, or of the server.  See [[Hyrax_-_OLFS_Configuration#File_Dispatch_Handler|File Dispatch Handler]] instructions.&lt;br /&gt;
&lt;br /&gt;
There are some other features, too, like a bot blocker and a version&lt;br /&gt;
message, as well as the experimental SOAP message handler.  These are&lt;br /&gt;
also configured with&lt;br /&gt;
[[Hyrax_-_OLFS_Configuration#olfs.xml_Configuration_File|olfs.xml]],&lt;br /&gt;
and you&#039;ll find more information about them at the link.&lt;br /&gt;
&lt;br /&gt;
The other configuration file you might need to edit is &lt;br /&gt;
[http://www.unidata.ucar.edu/projects/THREDDS/tech/TDS.html catalog.xml],&lt;br /&gt;
briefly reviewed under [[#THREDDS|THREDDS]], below.&lt;br /&gt;
&lt;br /&gt;
====THREDDS====&lt;br /&gt;
&lt;br /&gt;
[http://www.unidata.ucar.edu/projects/THREDDS/tech/TDS.html THREDDS]&lt;br /&gt;
is a catalog standard for scientific data promoted by scientists at&lt;br /&gt;
[http://www.unidata.ucar.edu UCAR].  It allows &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The default file will allow dynamic catalogs to be created and should&lt;br /&gt;
allow your server to respond to THREDDS requests properly.  It&#039;s&lt;br /&gt;
possible you may want to serve a static THREDDS catalog, too.  This&lt;br /&gt;
can be done by editing the catalog.xml file, and you&#039;ll find&lt;br /&gt;
links to instructions for that at [[Hyrax - THREDDS Configuration]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Multiple BES Configuration====&lt;br /&gt;
&lt;br /&gt;
You can configure a single OLFS to work with multiple BES instances.&lt;br /&gt;
This offers an opportunity to do rudimentary load balancing, or to&lt;br /&gt;
isolate data on one server or another.  See the &lt;br /&gt;
[[Hyrax_-_Configuring_The_OLFS_To_Work_With_Multiple_BES&#039;s|Hyrax configuration chapter]]&lt;br /&gt;
for more information on the subject.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideClient&amp;diff=4935</id>
		<title>UserGuideClient</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideClient&amp;diff=4935"/>
		<updated>2009-10-06T23:14:52Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[UserGuide|return to User Guide]]&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Client=&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP client is the program that sends a message to an OPeNDAP&lt;br /&gt;
server in order to get some data, or other information.  &lt;br /&gt;
&lt;br /&gt;
An OPeNDAP client is usually just a data analysis application program&lt;br /&gt;
modified to become a web browser, somewhat like any other web browser&lt;br /&gt;
with which you may be familiar. A web browser can only display the&lt;br /&gt;
data it receives, however. What makes an OPeNDAP client different from&lt;br /&gt;
another web browser is that once the data has been received from an&lt;br /&gt;
OPeNDAP server, the OPeNDAP client application can compute with it.&lt;br /&gt;
&lt;br /&gt;
Like a web browser, an OPeNDAP client accepts a URL from a user, and&lt;br /&gt;
sends a message to that address, asking for the information specified&lt;br /&gt;
in the the URL. Unlike a typical web browser, an OPeNDAP client will&lt;br /&gt;
not know what to do with data returned for a web page containing text&lt;br /&gt;
and pictures, but an OPeNDAP server will return scientific data that&lt;br /&gt;
an OPeNDAP client can understand and process.&lt;br /&gt;
&lt;br /&gt;
There is a wide range of OPeNDAP clients available, and it should not&lt;br /&gt;
be hard to find one you can use.&lt;br /&gt;
&lt;br /&gt;
In fact, though it can become clumsy for advanced applications, you&lt;br /&gt;
can use an ordinary web browser as a client to most OPeNDAP servers,&lt;br /&gt;
making use of the server&#039;s&lt;br /&gt;
[[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]].  The&lt;br /&gt;
[[QuickStart|Quick Start Guide]] contains many examples of exactly&lt;br /&gt;
this.&lt;br /&gt;
&lt;br /&gt;
After a basic web browser, the simplest clients to use are likely to&lt;br /&gt;
be the programs you&#039;re already using.  If you use one of the popular&lt;br /&gt;
data analysis environments like Matlab or IDL, you can find a client&lt;br /&gt;
command you can incorporate into your environment to let you call&lt;br /&gt;
OPeNDAP data directly into your working data.  If you use one of the&lt;br /&gt;
netCDF-based packages, like GrADS or Ferret, you can get a&lt;br /&gt;
network-enabled version of the program that will work with OPeNDAP&lt;br /&gt;
URLs just as well as file names.&lt;br /&gt;
&lt;br /&gt;
If none of those options work for you, there is a whole range of&lt;br /&gt;
client libraries you can use to develop a client of your own.  Several&lt;br /&gt;
of these are supported by the OPeNDAP project, and there are others&lt;br /&gt;
out there in the world supported by other groups.&lt;br /&gt;
&lt;br /&gt;
This page provides a list and very brief overview of the various&lt;br /&gt;
options, along with pointers to places you can find more information&lt;br /&gt;
about each one.&lt;br /&gt;
&lt;br /&gt;
==Clients==&lt;br /&gt;
&lt;br /&gt;
OPeNDAP clients come in a variety of forms.  The simplest are web&lt;br /&gt;
browsers, who use the OPeNDAP&lt;br /&gt;
[[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]] and&lt;br /&gt;
the [[[[UserGuideOPeNDAPMessages#ASCII_Service|ASCII response]] to&lt;br /&gt;
check out data sets and download data.&lt;br /&gt;
&lt;br /&gt;
Beyond these, there are three categories of client.  The first contains&lt;br /&gt;
clients you can use in conjunction with one of the popular data&lt;br /&gt;
analysis environments, the second is a collection of command-line&lt;br /&gt;
clients useful for scripting as well as testing, and the third&lt;br /&gt;
contains a set of API libraries you can use for developing your own&lt;br /&gt;
client, or for converting an existing body of code into an OPeNDAP&lt;br /&gt;
client.  These are reviewed in that order below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Matlab, IDL, Ferret, GrADS===&lt;br /&gt;
&lt;br /&gt;
To use OPeNDAP with Matlab or IDL, you&#039;ll need the client for each.&lt;br /&gt;
This is a special program that issues a request for data from an&lt;br /&gt;
OPeNDAP server, and imports it into the environment.  Links to &lt;br /&gt;
[http://opendap.org/download/ml-structs.html the Matlab client] and&lt;br /&gt;
[http://opendap.org/download/idl-client.html the IDL client] can be&lt;br /&gt;
found on the [http;//opendap.org/download/index.html OPeNDAP software&lt;br /&gt;
download page].&lt;br /&gt;
&lt;br /&gt;
Using OPeNDAP data with the &lt;br /&gt;
[http://www.iges.org/grads GrADS] or&lt;br /&gt;
[http://ferret.wrc.noaa.gov/Ferret Ferret] packages is even easier.&lt;br /&gt;
Because these packages are based on the netCDF library, and because&lt;br /&gt;
that library now supports reading OPeNDAP data sets, these packages&lt;br /&gt;
can read OPeNDAP URLs as easily as they read local files.&lt;br /&gt;
&lt;br /&gt;
Special note.  If you&#039;re using the Matlab client, and using it for&lt;br /&gt;
oceanographic data, you may be interested in the graphical user&lt;br /&gt;
interface available for it.  See [http://oceanographicdata.org/toolbox&lt;br /&gt;
Matlab OPeNDAP Ocean Toolbox].&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
There are a couple of command-line clients out there you can use,&lt;br /&gt;
though most people only use them for testing.  Part of the libdap&lt;br /&gt;
distribution (the C++ interface) is a program called getdap, which&lt;br /&gt;
takes an OPeNDAP URL as a command-line argument and returns the reply&lt;br /&gt;
to standard output.  This is typically used to check that the libdap&lt;br /&gt;
C++ library is properly compiled, but you can also use it to retrieve&lt;br /&gt;
data. &lt;br /&gt;
&lt;br /&gt;
Part of the OPeNDAP C library is a command-line client called octest.&lt;br /&gt;
This allows you to type commands to manipulate responses to an OPeNDAP&lt;br /&gt;
URL.  Like the C++ test program, this can be construed as a test of&lt;br /&gt;
the library or a test of the servers, but it can also be used as a&lt;br /&gt;
command-line client, perhaps as an aid to automation.&lt;br /&gt;
&lt;br /&gt;
Similar programs are part of the netCDF distribution.  The ncdump&lt;br /&gt;
program outputs a &amp;quot;dump&amp;quot; of a netCDF file, and ncview provides a&lt;br /&gt;
better-formatted look at such a file.  Since the standard netCDF&lt;br /&gt;
library can be linked to the OPeNDAP libraries, both these programs&lt;br /&gt;
can be readily aquired in their OPeNDAP-enabled form.&lt;br /&gt;
&lt;br /&gt;
Here is a simple example, using the ncview program. This program&lt;br /&gt;
simply prints out the contents of a netCDF formatted data file,&lt;br /&gt;
specified on the command line, like this:  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; ncdump fnocl.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using OPeNDAP, this same function may be executed from any computer&lt;br /&gt;
connected to the Internet by substituting a URL for the filename&lt;br /&gt;
above: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; ncdump http://dods.gso.uri.edu/cgi-bin/nc/data/fnocl.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Aside from the fact that the data is remote, and must be specified&lt;br /&gt;
with a URL, the program will seem to function in the same way it had&lt;br /&gt;
with the simple netCDF library (albeit somewhat more slowly due to&lt;br /&gt;
having to make network connections instead of local file&lt;br /&gt;
operations).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
netcdf fnocl {&lt;br /&gt;
dimensions:&lt;br /&gt;
    time_a = 16&lt;br /&gt;
    lat = 17 ;&lt;br /&gt;
    lon = 21 ;&lt;br /&gt;
    time = 16 ;&lt;br /&gt;
&lt;br /&gt;
variables:&lt;br /&gt;
    long u(time_a, lat, ion) ; &lt;br /&gt;
        u:units = ``meter per second&#039;&#039; ; &lt;br /&gt;
        u:long_name = ``Vector wind eastward component&#039;&#039; ; &lt;br /&gt;
        u:missing_value = ``-32767&#039;&#039; ; &lt;br /&gt;
        u:scale_factor = ``0.005&#039;&#039; ; &lt;br /&gt;
    long v(time_a, lat, ion) ; &lt;br /&gt;
        v:units = ``meter per second&#039;&#039; ;&lt;br /&gt;
        v:long_name = ``Vector wind northward component&#039;&#039; ;&lt;br /&gt;
        v:missing_value = ``-32767&#039;&#039; ;&lt;br /&gt;
        v:scale_factor = ``0.005&#039;&#039; ; &lt;br /&gt;
    double lat(lat) ;&lt;br /&gt;
        lat:units = ``degree North&#039;&#039; ;&lt;br /&gt;
    double lon(lon) ;&lt;br /&gt;
        lon:units = ``degree East&#039;&#039; ; &lt;br /&gt;
    double time(time) ;&lt;br /&gt;
        time:units = ``hours from base_time&#039;&#039; ;&lt;br /&gt;
&lt;br /&gt;
// global attributes: &lt;br /&gt;
        :base_time = ``88- 10-00:00:00&#039;&#039; ; &lt;br /&gt;
        :title = ``FNOC UV wind components &lt;br /&gt;
                           from 1988- 10 to 1988- 13.&#039;&#039; ;&lt;br /&gt;
data:&lt;br /&gt;
 u =&lt;br /&gt;
  -1728, -2449, -3099, -3585, -3254, -2406, -1252,&lt;br /&gt;
    662, 2483, 2910, 2819, 2946, 2745, 2734,&lt;br /&gt;
  2931, 2601, 2139, 1845, 1754, 1897, 1854, -1686,&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Client Libraries===&lt;br /&gt;
&lt;br /&gt;
Several libraries exist that you can link with other software to&lt;br /&gt;
create an OPeNDAP client.  Some of these are provided by the OPeNDAP&lt;br /&gt;
project itself, and some are projects of other groups.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP libraries are functional equivalents of each other.  They&lt;br /&gt;
are derived from separate code bases, but they do the same thing.&lt;br /&gt;
They are provided in different languages for the convenience of the&lt;br /&gt;
implementer. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====C++ Client Library====&lt;br /&gt;
&lt;br /&gt;
The [http://opendap.org/download/libdap++.html C++ library], also&lt;br /&gt;
called libdap, was the original client implementation of the OPeNDAP&lt;br /&gt;
protocol.  It provides classes to manage the connection between a&lt;br /&gt;
client and a data source, as well as classes for each of the data&lt;br /&gt;
types, and the other information (such as DAS and DDS) a client will&lt;br /&gt;
encounter. &lt;br /&gt;
&lt;br /&gt;
To use the library, you will need to provide implementations for some abstract classes.&lt;br /&gt;
Consult the [[libdap Overview]] for an introduction to the basic&lt;br /&gt;
concepts behind the use of this library.  You will also find the &lt;br /&gt;
[http://www.opendap.org/api/pref/html/index.html C++ library Reference] useful.&lt;br /&gt;
&lt;br /&gt;
====C Client Library====&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group supports a [http://opendap.org/download/oc.html C library].  The C library is in many ways a simpler library to use than the C++ libdap, but it is not as flexible in other ways.  Using the library is straightforward, and you&#039;ll find a file called octutorial.html in the software release that provides a detailed example of its use.&lt;br /&gt;
&lt;br /&gt;
====Java Client Library====&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group supports a [http://opendap.org/download/java-dap.html Java implementation] of the DAP.  On the Java page, there are links to download the Java class documentation.&lt;br /&gt;
&lt;br /&gt;
====netCDF API Library====&lt;br /&gt;
&lt;br /&gt;
The [http://www.unidata.ucar.edu/software/netcdf netCDF library]&lt;br /&gt;
deserves special note.  This is a drop-in replacement for the standard&lt;br /&gt;
netCDF library.  (In fact, as of release 4.0, it &#039;&#039;is&#039;&#039; the standard&lt;br /&gt;
netCDF library.)  This means that converting a program that depends on&lt;br /&gt;
the netCDF API to use OPeNDAP is as simple as re-linking with an&lt;br /&gt;
updated version of the netCDF library.&lt;br /&gt;
&lt;br /&gt;
See the [http://www.unidata.ucar.edu/software/netcdf netCDF home page]&lt;br /&gt;
for information about how to use that library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Python library====&lt;br /&gt;
&lt;br /&gt;
[http://pydap.org Pydap] is an implementation of the OPeNDAP client in&lt;br /&gt;
pure Python.  This is tremendously useful for scripting complicated&lt;br /&gt;
applications with lots of download steps.  This is not supported by&lt;br /&gt;
the OPeNDAP group, so please refer to the [http://pydap.org Pydap site] for more information about it.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideClient&amp;diff=4934</id>
		<title>UserGuideClient</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideClient&amp;diff=4934"/>
		<updated>2009-10-06T23:14:08Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: /* Java Client Library */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=The OPeNDAP Client=&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP client is the program that sends a message to an OPeNDAP&lt;br /&gt;
server in order to get some data, or other information.  &lt;br /&gt;
&lt;br /&gt;
An OPeNDAP client is usually just a data analysis application program&lt;br /&gt;
modified to become a web browser, somewhat like any other web browser&lt;br /&gt;
with which you may be familiar. A web browser can only display the&lt;br /&gt;
data it receives, however. What makes an OPeNDAP client different from&lt;br /&gt;
another web browser is that once the data has been received from an&lt;br /&gt;
OPeNDAP server, the OPeNDAP client application can compute with it.&lt;br /&gt;
&lt;br /&gt;
Like a web browser, an OPeNDAP client accepts a URL from a user, and&lt;br /&gt;
sends a message to that address, asking for the information specified&lt;br /&gt;
in the the URL. Unlike a typical web browser, an OPeNDAP client will&lt;br /&gt;
not know what to do with data returned for a web page containing text&lt;br /&gt;
and pictures, but an OPeNDAP server will return scientific data that&lt;br /&gt;
an OPeNDAP client can understand and process.&lt;br /&gt;
&lt;br /&gt;
There is a wide range of OPeNDAP clients available, and it should not&lt;br /&gt;
be hard to find one you can use.&lt;br /&gt;
&lt;br /&gt;
In fact, though it can become clumsy for advanced applications, you&lt;br /&gt;
can use an ordinary web browser as a client to most OPeNDAP servers,&lt;br /&gt;
making use of the server&#039;s&lt;br /&gt;
[[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]].  The&lt;br /&gt;
[[QuickStart|Quick Start Guide]] contains many examples of exactly&lt;br /&gt;
this.&lt;br /&gt;
&lt;br /&gt;
After a basic web browser, the simplest clients to use are likely to&lt;br /&gt;
be the programs you&#039;re already using.  If you use one of the popular&lt;br /&gt;
data analysis environments like Matlab or IDL, you can find a client&lt;br /&gt;
command you can incorporate into your environment to let you call&lt;br /&gt;
OPeNDAP data directly into your working data.  If you use one of the&lt;br /&gt;
netCDF-based packages, like GrADS or Ferret, you can get a&lt;br /&gt;
network-enabled version of the program that will work with OPeNDAP&lt;br /&gt;
URLs just as well as file names.&lt;br /&gt;
&lt;br /&gt;
If none of those options work for you, there is a whole range of&lt;br /&gt;
client libraries you can use to develop a client of your own.  Several&lt;br /&gt;
of these are supported by the OPeNDAP project, and there are others&lt;br /&gt;
out there in the world supported by other groups.&lt;br /&gt;
&lt;br /&gt;
This page provides a list and very brief overview of the various&lt;br /&gt;
options, along with pointers to places you can find more information&lt;br /&gt;
about each one.&lt;br /&gt;
&lt;br /&gt;
==Clients==&lt;br /&gt;
&lt;br /&gt;
OPeNDAP clients come in a variety of forms.  The simplest are web&lt;br /&gt;
browsers, who use the OPeNDAP&lt;br /&gt;
[[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]] and&lt;br /&gt;
the [[[[UserGuideOPeNDAPMessages#ASCII_Service|ASCII response]] to&lt;br /&gt;
check out data sets and download data.&lt;br /&gt;
&lt;br /&gt;
Beyond these, there are three categories of client.  The first contains&lt;br /&gt;
clients you can use in conjunction with one of the popular data&lt;br /&gt;
analysis environments, the second is a collection of command-line&lt;br /&gt;
clients useful for scripting as well as testing, and the third&lt;br /&gt;
contains a set of API libraries you can use for developing your own&lt;br /&gt;
client, or for converting an existing body of code into an OPeNDAP&lt;br /&gt;
client.  These are reviewed in that order below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Matlab, IDL, Ferret, GrADS===&lt;br /&gt;
&lt;br /&gt;
To use OPeNDAP with Matlab or IDL, you&#039;ll need the client for each.&lt;br /&gt;
This is a special program that issues a request for data from an&lt;br /&gt;
OPeNDAP server, and imports it into the environment.  Links to &lt;br /&gt;
[http://opendap.org/download/ml-structs.html the Matlab client] and&lt;br /&gt;
[http://opendap.org/download/idl-client.html the IDL client] can be&lt;br /&gt;
found on the [http;//opendap.org/download/index.html OPeNDAP software&lt;br /&gt;
download page].&lt;br /&gt;
&lt;br /&gt;
Using OPeNDAP data with the &lt;br /&gt;
[http://www.iges.org/grads GrADS] or&lt;br /&gt;
[http://ferret.wrc.noaa.gov/Ferret Ferret] packages is even easier.&lt;br /&gt;
Because these packages are based on the netCDF library, and because&lt;br /&gt;
that library now supports reading OPeNDAP data sets, these packages&lt;br /&gt;
can read OPeNDAP URLs as easily as they read local files.&lt;br /&gt;
&lt;br /&gt;
Special note.  If you&#039;re using the Matlab client, and using it for&lt;br /&gt;
oceanographic data, you may be interested in the graphical user&lt;br /&gt;
interface available for it.  See [http://oceanographicdata.org/toolbox&lt;br /&gt;
Matlab OPeNDAP Ocean Toolbox].&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
There are a couple of command-line clients out there you can use,&lt;br /&gt;
though most people only use them for testing.  Part of the libdap&lt;br /&gt;
distribution (the C++ interface) is a program called getdap, which&lt;br /&gt;
takes an OPeNDAP URL as a command-line argument and returns the reply&lt;br /&gt;
to standard output.  This is typically used to check that the libdap&lt;br /&gt;
C++ library is properly compiled, but you can also use it to retrieve&lt;br /&gt;
data. &lt;br /&gt;
&lt;br /&gt;
Part of the OPeNDAP C library is a command-line client called octest.&lt;br /&gt;
This allows you to type commands to manipulate responses to an OPeNDAP&lt;br /&gt;
URL.  Like the C++ test program, this can be construed as a test of&lt;br /&gt;
the library or a test of the servers, but it can also be used as a&lt;br /&gt;
command-line client, perhaps as an aid to automation.&lt;br /&gt;
&lt;br /&gt;
Similar programs are part of the netCDF distribution.  The ncdump&lt;br /&gt;
program outputs a &amp;quot;dump&amp;quot; of a netCDF file, and ncview provides a&lt;br /&gt;
better-formatted look at such a file.  Since the standard netCDF&lt;br /&gt;
library can be linked to the OPeNDAP libraries, both these programs&lt;br /&gt;
can be readily aquired in their OPeNDAP-enabled form.&lt;br /&gt;
&lt;br /&gt;
Here is a simple example, using the ncview program. This program&lt;br /&gt;
simply prints out the contents of a netCDF formatted data file,&lt;br /&gt;
specified on the command line, like this:  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; ncdump fnocl.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using OPeNDAP, this same function may be executed from any computer&lt;br /&gt;
connected to the Internet by substituting a URL for the filename&lt;br /&gt;
above: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; ncdump http://dods.gso.uri.edu/cgi-bin/nc/data/fnocl.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Aside from the fact that the data is remote, and must be specified&lt;br /&gt;
with a URL, the program will seem to function in the same way it had&lt;br /&gt;
with the simple netCDF library (albeit somewhat more slowly due to&lt;br /&gt;
having to make network connections instead of local file&lt;br /&gt;
operations).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
netcdf fnocl {&lt;br /&gt;
dimensions:&lt;br /&gt;
    time_a = 16&lt;br /&gt;
    lat = 17 ;&lt;br /&gt;
    lon = 21 ;&lt;br /&gt;
    time = 16 ;&lt;br /&gt;
&lt;br /&gt;
variables:&lt;br /&gt;
    long u(time_a, lat, ion) ; &lt;br /&gt;
        u:units = ``meter per second&#039;&#039; ; &lt;br /&gt;
        u:long_name = ``Vector wind eastward component&#039;&#039; ; &lt;br /&gt;
        u:missing_value = ``-32767&#039;&#039; ; &lt;br /&gt;
        u:scale_factor = ``0.005&#039;&#039; ; &lt;br /&gt;
    long v(time_a, lat, ion) ; &lt;br /&gt;
        v:units = ``meter per second&#039;&#039; ;&lt;br /&gt;
        v:long_name = ``Vector wind northward component&#039;&#039; ;&lt;br /&gt;
        v:missing_value = ``-32767&#039;&#039; ;&lt;br /&gt;
        v:scale_factor = ``0.005&#039;&#039; ; &lt;br /&gt;
    double lat(lat) ;&lt;br /&gt;
        lat:units = ``degree North&#039;&#039; ;&lt;br /&gt;
    double lon(lon) ;&lt;br /&gt;
        lon:units = ``degree East&#039;&#039; ; &lt;br /&gt;
    double time(time) ;&lt;br /&gt;
        time:units = ``hours from base_time&#039;&#039; ;&lt;br /&gt;
&lt;br /&gt;
// global attributes: &lt;br /&gt;
        :base_time = ``88- 10-00:00:00&#039;&#039; ; &lt;br /&gt;
        :title = ``FNOC UV wind components &lt;br /&gt;
                           from 1988- 10 to 1988- 13.&#039;&#039; ;&lt;br /&gt;
data:&lt;br /&gt;
 u =&lt;br /&gt;
  -1728, -2449, -3099, -3585, -3254, -2406, -1252,&lt;br /&gt;
    662, 2483, 2910, 2819, 2946, 2745, 2734,&lt;br /&gt;
  2931, 2601, 2139, 1845, 1754, 1897, 1854, -1686,&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Client Libraries===&lt;br /&gt;
&lt;br /&gt;
Several libraries exist that you can link with other software to&lt;br /&gt;
create an OPeNDAP client.  Some of these are provided by the OPeNDAP&lt;br /&gt;
project itself, and some are projects of other groups.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP libraries are functional equivalents of each other.  They&lt;br /&gt;
are derived from separate code bases, but they do the same thing.&lt;br /&gt;
They are provided in different languages for the convenience of the&lt;br /&gt;
implementer. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====C++ Client Library====&lt;br /&gt;
&lt;br /&gt;
The [http://opendap.org/download/libdap++.html C++ library], also&lt;br /&gt;
called libdap, was the original client implementation of the OPeNDAP&lt;br /&gt;
protocol.  It provides classes to manage the connection between a&lt;br /&gt;
client and a data source, as well as classes for each of the data&lt;br /&gt;
types, and the other information (such as DAS and DDS) a client will&lt;br /&gt;
encounter. &lt;br /&gt;
&lt;br /&gt;
To use the library, you will need to provide implementations for some abstract classes.&lt;br /&gt;
Consult the [[libdap Overview]] for an introduction to the basic&lt;br /&gt;
concepts behind the use of this library.  You will also find the &lt;br /&gt;
[http://www.opendap.org/api/pref/html/index.html C++ library Reference] useful.&lt;br /&gt;
&lt;br /&gt;
====C Client Library====&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group supports a [http://opendap.org/download/oc.html C library].  The C library is in many ways a simpler library to use than the C++ libdap, but it is not as flexible in other ways.  Using the library is straightforward, and you&#039;ll find a file called octutorial.html in the software release that provides a detailed example of its use.&lt;br /&gt;
&lt;br /&gt;
====Java Client Library====&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group supports a [http://opendap.org/download/java-dap.html Java implementation] of the DAP.  On the Java page, there are links to download the Java class documentation.&lt;br /&gt;
&lt;br /&gt;
====netCDF API Library====&lt;br /&gt;
&lt;br /&gt;
The [http://www.unidata.ucar.edu/software/netcdf netCDF library]&lt;br /&gt;
deserves special note.  This is a drop-in replacement for the standard&lt;br /&gt;
netCDF library.  (In fact, as of release 4.0, it &#039;&#039;is&#039;&#039; the standard&lt;br /&gt;
netCDF library.)  This means that converting a program that depends on&lt;br /&gt;
the netCDF API to use OPeNDAP is as simple as re-linking with an&lt;br /&gt;
updated version of the netCDF library.&lt;br /&gt;
&lt;br /&gt;
See the [http://www.unidata.ucar.edu/software/netcdf netCDF home page]&lt;br /&gt;
for information about how to use that library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Python library====&lt;br /&gt;
&lt;br /&gt;
[http://pydap.org Pydap] is an implementation of the OPeNDAP client in&lt;br /&gt;
pure Python.  This is tremendously useful for scripting complicated&lt;br /&gt;
applications with lots of download steps.  This is not supported by&lt;br /&gt;
the OPeNDAP group, so please refer to the [http://pydap.org Pydap site] for more information about it.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Linking&amp;diff=4933</id>
		<title>Linking</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Linking&amp;diff=4933"/>
		<updated>2009-10-06T22:00:06Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: /* Linking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Libdap_Overview|return to Libdap Overview]]&lt;br /&gt;
&lt;br /&gt;
=Linking=&lt;br /&gt;
&lt;br /&gt;
Programs using libdap++ will require libcurl and libmxml2.  You can find links to these at [http://opendap.org/download/thirdPartySource.html the third party page].&lt;br /&gt;
&lt;br /&gt;
There are no special instructions for linking the libdap code to your&lt;br /&gt;
own.  The library that results from a build of the libdap code is&lt;br /&gt;
called libdap++.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideClient&amp;diff=4932</id>
		<title>UserGuideClient</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideClient&amp;diff=4932"/>
		<updated>2009-10-06T21:57:11Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: /* Java Client Library */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=The OPeNDAP Client=&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP client is the program that sends a message to an OPeNDAP&lt;br /&gt;
server in order to get some data, or other information.  &lt;br /&gt;
&lt;br /&gt;
An OPeNDAP client is usually just a data analysis application program&lt;br /&gt;
modified to become a web browser, somewhat like any other web browser&lt;br /&gt;
with which you may be familiar. A web browser can only display the&lt;br /&gt;
data it receives, however. What makes an OPeNDAP client different from&lt;br /&gt;
another web browser is that once the data has been received from an&lt;br /&gt;
OPeNDAP server, the OPeNDAP client application can compute with it.&lt;br /&gt;
&lt;br /&gt;
Like a web browser, an OPeNDAP client accepts a URL from a user, and&lt;br /&gt;
sends a message to that address, asking for the information specified&lt;br /&gt;
in the the URL. Unlike a typical web browser, an OPeNDAP client will&lt;br /&gt;
not know what to do with data returned for a web page containing text&lt;br /&gt;
and pictures, but an OPeNDAP server will return scientific data that&lt;br /&gt;
an OPeNDAP client can understand and process.&lt;br /&gt;
&lt;br /&gt;
There is a wide range of OPeNDAP clients available, and it should not&lt;br /&gt;
be hard to find one you can use.&lt;br /&gt;
&lt;br /&gt;
In fact, though it can become clumsy for advanced applications, you&lt;br /&gt;
can use an ordinary web browser as a client to most OPeNDAP servers,&lt;br /&gt;
making use of the server&#039;s&lt;br /&gt;
[[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]].  The&lt;br /&gt;
[[QuickStart|Quick Start Guide]] contains many examples of exactly&lt;br /&gt;
this.&lt;br /&gt;
&lt;br /&gt;
After a basic web browser, the simplest clients to use are likely to&lt;br /&gt;
be the programs you&#039;re already using.  If you use one of the popular&lt;br /&gt;
data analysis environments like Matlab or IDL, you can find a client&lt;br /&gt;
command you can incorporate into your environment to let you call&lt;br /&gt;
OPeNDAP data directly into your working data.  If you use one of the&lt;br /&gt;
netCDF-based packages, like GrADS or Ferret, you can get a&lt;br /&gt;
network-enabled version of the program that will work with OPeNDAP&lt;br /&gt;
URLs just as well as file names.&lt;br /&gt;
&lt;br /&gt;
If none of those options work for you, there is a whole range of&lt;br /&gt;
client libraries you can use to develop a client of your own.  Several&lt;br /&gt;
of these are supported by the OPeNDAP project, and there are others&lt;br /&gt;
out there in the world supported by other groups.&lt;br /&gt;
&lt;br /&gt;
This page provides a list and very brief overview of the various&lt;br /&gt;
options, along with pointers to places you can find more information&lt;br /&gt;
about each one.&lt;br /&gt;
&lt;br /&gt;
==Clients==&lt;br /&gt;
&lt;br /&gt;
OPeNDAP clients come in a variety of forms.  The simplest are web&lt;br /&gt;
browsers, who use the OPeNDAP&lt;br /&gt;
[[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]] and&lt;br /&gt;
the [[[[UserGuideOPeNDAPMessages#ASCII_Service|ASCII response]] to&lt;br /&gt;
check out data sets and download data.&lt;br /&gt;
&lt;br /&gt;
Beyond these, there are three categories of client.  The first contains&lt;br /&gt;
clients you can use in conjunction with one of the popular data&lt;br /&gt;
analysis environments, the second is a collection of command-line&lt;br /&gt;
clients useful for scripting as well as testing, and the third&lt;br /&gt;
contains a set of API libraries you can use for developing your own&lt;br /&gt;
client, or for converting an existing body of code into an OPeNDAP&lt;br /&gt;
client.  These are reviewed in that order below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Matlab, IDL, Ferret, GrADS===&lt;br /&gt;
&lt;br /&gt;
To use OPeNDAP with Matlab or IDL, you&#039;ll need the client for each.&lt;br /&gt;
This is a special program that issues a request for data from an&lt;br /&gt;
OPeNDAP server, and imports it into the environment.  Links to &lt;br /&gt;
[http://opendap.org/download/ml-structs.html the Matlab client] and&lt;br /&gt;
[http://opendap.org/download/idl-client.html the IDL client] can be&lt;br /&gt;
found on the [http;//opendap.org/download/index.html OPeNDAP software&lt;br /&gt;
download page].&lt;br /&gt;
&lt;br /&gt;
Using OPeNDAP data with the &lt;br /&gt;
[http://www.iges.org/grads GrADS] or&lt;br /&gt;
[http://ferret.wrc.noaa.gov/Ferret Ferret] packages is even easier.&lt;br /&gt;
Because these packages are based on the netCDF library, and because&lt;br /&gt;
that library now supports reading OPeNDAP data sets, these packages&lt;br /&gt;
can read OPeNDAP URLs as easily as they read local files.&lt;br /&gt;
&lt;br /&gt;
Special note.  If you&#039;re using the Matlab client, and using it for&lt;br /&gt;
oceanographic data, you may be interested in the graphical user&lt;br /&gt;
interface available for it.  See [http://oceanographicdata.org/toolbox&lt;br /&gt;
Matlab OPeNDAP Ocean Toolbox].&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
There are a couple of command-line clients out there you can use,&lt;br /&gt;
though most people only use them for testing.  Part of the libdap&lt;br /&gt;
distribution (the C++ interface) is a program called getdap, which&lt;br /&gt;
takes an OPeNDAP URL as a command-line argument and returns the reply&lt;br /&gt;
to standard output.  This is typically used to check that the libdap&lt;br /&gt;
C++ library is properly compiled, but you can also use it to retrieve&lt;br /&gt;
data. &lt;br /&gt;
&lt;br /&gt;
Part of the OPeNDAP C library is a command-line client called octest.&lt;br /&gt;
This allows you to type commands to manipulate responses to an OPeNDAP&lt;br /&gt;
URL.  Like the C++ test program, this can be construed as a test of&lt;br /&gt;
the library or a test of the servers, but it can also be used as a&lt;br /&gt;
command-line client, perhaps as an aid to automation.&lt;br /&gt;
&lt;br /&gt;
Similar programs are part of the netCDF distribution.  The ncdump&lt;br /&gt;
program outputs a &amp;quot;dump&amp;quot; of a netCDF file, and ncview provides a&lt;br /&gt;
better-formatted look at such a file.  Since the standard netCDF&lt;br /&gt;
library can be linked to the OPeNDAP libraries, both these programs&lt;br /&gt;
can be readily aquired in their OPeNDAP-enabled form.&lt;br /&gt;
&lt;br /&gt;
Here is a simple example, using the ncview program. This program&lt;br /&gt;
simply prints out the contents of a netCDF formatted data file,&lt;br /&gt;
specified on the command line, like this:  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; ncdump fnocl.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using OPeNDAP, this same function may be executed from any computer&lt;br /&gt;
connected to the Internet by substituting a URL for the filename&lt;br /&gt;
above: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; ncdump http://dods.gso.uri.edu/cgi-bin/nc/data/fnocl.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Aside from the fact that the data is remote, and must be specified&lt;br /&gt;
with a URL, the program will seem to function in the same way it had&lt;br /&gt;
with the simple netCDF library (albeit somewhat more slowly due to&lt;br /&gt;
having to make network connections instead of local file&lt;br /&gt;
operations).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
netcdf fnocl {&lt;br /&gt;
dimensions:&lt;br /&gt;
    time_a = 16&lt;br /&gt;
    lat = 17 ;&lt;br /&gt;
    lon = 21 ;&lt;br /&gt;
    time = 16 ;&lt;br /&gt;
&lt;br /&gt;
variables:&lt;br /&gt;
    long u(time_a, lat, ion) ; &lt;br /&gt;
        u:units = ``meter per second&#039;&#039; ; &lt;br /&gt;
        u:long_name = ``Vector wind eastward component&#039;&#039; ; &lt;br /&gt;
        u:missing_value = ``-32767&#039;&#039; ; &lt;br /&gt;
        u:scale_factor = ``0.005&#039;&#039; ; &lt;br /&gt;
    long v(time_a, lat, ion) ; &lt;br /&gt;
        v:units = ``meter per second&#039;&#039; ;&lt;br /&gt;
        v:long_name = ``Vector wind northward component&#039;&#039; ;&lt;br /&gt;
        v:missing_value = ``-32767&#039;&#039; ;&lt;br /&gt;
        v:scale_factor = ``0.005&#039;&#039; ; &lt;br /&gt;
    double lat(lat) ;&lt;br /&gt;
        lat:units = ``degree North&#039;&#039; ;&lt;br /&gt;
    double lon(lon) ;&lt;br /&gt;
        lon:units = ``degree East&#039;&#039; ; &lt;br /&gt;
    double time(time) ;&lt;br /&gt;
        time:units = ``hours from base_time&#039;&#039; ;&lt;br /&gt;
&lt;br /&gt;
// global attributes: &lt;br /&gt;
        :base_time = ``88- 10-00:00:00&#039;&#039; ; &lt;br /&gt;
        :title = ``FNOC UV wind components &lt;br /&gt;
                           from 1988- 10 to 1988- 13.&#039;&#039; ;&lt;br /&gt;
data:&lt;br /&gt;
 u =&lt;br /&gt;
  -1728, -2449, -3099, -3585, -3254, -2406, -1252,&lt;br /&gt;
    662, 2483, 2910, 2819, 2946, 2745, 2734,&lt;br /&gt;
  2931, 2601, 2139, 1845, 1754, 1897, 1854, -1686,&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Client Libraries===&lt;br /&gt;
&lt;br /&gt;
Several libraries exist that you can link with other software to&lt;br /&gt;
create an OPeNDAP client.  Some of these are provided by the OPeNDAP&lt;br /&gt;
project itself, and some are projects of other groups.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP libraries are functional equivalents of each other.  They&lt;br /&gt;
are derived from separate code bases, but they do the same thing.&lt;br /&gt;
They are provided in different languages for the convenience of the&lt;br /&gt;
implementer. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====C++ Client Library====&lt;br /&gt;
&lt;br /&gt;
The [http://opendap.org/download/libdap++.html C++ library], also&lt;br /&gt;
called libdap, was the original client implementation of the OPeNDAP&lt;br /&gt;
protocol.  It provides classes to manage the connection between a&lt;br /&gt;
client and a data source, as well as classes for each of the data&lt;br /&gt;
types, and the other information (such as DAS and DDS) a client will&lt;br /&gt;
encounter. &lt;br /&gt;
&lt;br /&gt;
To use the library, you will need to provide implementations for some abstract classes.&lt;br /&gt;
Consult the [[libdap Overview]] for an introduction to the basic&lt;br /&gt;
concepts behind the use of this library.  You will also find the &lt;br /&gt;
[http://www.opendap.org/api/pref/html/index.html C++ library Reference] useful.&lt;br /&gt;
&lt;br /&gt;
====C Client Library====&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group supports a [http://opendap.org/download/oc.html C library].  The C library is in many ways a simpler library to use than the C++ libdap, but it is not as flexible in other ways.  Using the library is straightforward, and you&#039;ll find a file called octutorial.html in the software release that provides a detailed example of its use.&lt;br /&gt;
&lt;br /&gt;
====Java Client Library====&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group supports a [http://opendap.org/download/java-dap.html Java implementation] of the DAP.&lt;br /&gt;
&lt;br /&gt;
====netCDF API Library====&lt;br /&gt;
&lt;br /&gt;
The [http://www.unidata.ucar.edu/software/netcdf netCDF library]&lt;br /&gt;
deserves special note.  This is a drop-in replacement for the standard&lt;br /&gt;
netCDF library.  (In fact, as of release 4.0, it &#039;&#039;is&#039;&#039; the standard&lt;br /&gt;
netCDF library.)  This means that converting a program that depends on&lt;br /&gt;
the netCDF API to use OPeNDAP is as simple as re-linking with an&lt;br /&gt;
updated version of the netCDF library.&lt;br /&gt;
&lt;br /&gt;
See the [http://www.unidata.ucar.edu/software/netcdf netCDF home page]&lt;br /&gt;
for information about how to use that library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Python library====&lt;br /&gt;
&lt;br /&gt;
[http://pydap.org Pydap] is an implementation of the OPeNDAP client in&lt;br /&gt;
pure Python.  This is tremendously useful for scripting complicated&lt;br /&gt;
applications with lots of download steps.  This is not supported by&lt;br /&gt;
the OPeNDAP group, so please refer to the [http://pydap.org Pydap site] for more information about it.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideClient&amp;diff=4931</id>
		<title>UserGuideClient</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideClient&amp;diff=4931"/>
		<updated>2009-10-06T21:53:49Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: /* C Client Library */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=The OPeNDAP Client=&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP client is the program that sends a message to an OPeNDAP&lt;br /&gt;
server in order to get some data, or other information.  &lt;br /&gt;
&lt;br /&gt;
An OPeNDAP client is usually just a data analysis application program&lt;br /&gt;
modified to become a web browser, somewhat like any other web browser&lt;br /&gt;
with which you may be familiar. A web browser can only display the&lt;br /&gt;
data it receives, however. What makes an OPeNDAP client different from&lt;br /&gt;
another web browser is that once the data has been received from an&lt;br /&gt;
OPeNDAP server, the OPeNDAP client application can compute with it.&lt;br /&gt;
&lt;br /&gt;
Like a web browser, an OPeNDAP client accepts a URL from a user, and&lt;br /&gt;
sends a message to that address, asking for the information specified&lt;br /&gt;
in the the URL. Unlike a typical web browser, an OPeNDAP client will&lt;br /&gt;
not know what to do with data returned for a web page containing text&lt;br /&gt;
and pictures, but an OPeNDAP server will return scientific data that&lt;br /&gt;
an OPeNDAP client can understand and process.&lt;br /&gt;
&lt;br /&gt;
There is a wide range of OPeNDAP clients available, and it should not&lt;br /&gt;
be hard to find one you can use.&lt;br /&gt;
&lt;br /&gt;
In fact, though it can become clumsy for advanced applications, you&lt;br /&gt;
can use an ordinary web browser as a client to most OPeNDAP servers,&lt;br /&gt;
making use of the server&#039;s&lt;br /&gt;
[[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]].  The&lt;br /&gt;
[[QuickStart|Quick Start Guide]] contains many examples of exactly&lt;br /&gt;
this.&lt;br /&gt;
&lt;br /&gt;
After a basic web browser, the simplest clients to use are likely to&lt;br /&gt;
be the programs you&#039;re already using.  If you use one of the popular&lt;br /&gt;
data analysis environments like Matlab or IDL, you can find a client&lt;br /&gt;
command you can incorporate into your environment to let you call&lt;br /&gt;
OPeNDAP data directly into your working data.  If you use one of the&lt;br /&gt;
netCDF-based packages, like GrADS or Ferret, you can get a&lt;br /&gt;
network-enabled version of the program that will work with OPeNDAP&lt;br /&gt;
URLs just as well as file names.&lt;br /&gt;
&lt;br /&gt;
If none of those options work for you, there is a whole range of&lt;br /&gt;
client libraries you can use to develop a client of your own.  Several&lt;br /&gt;
of these are supported by the OPeNDAP project, and there are others&lt;br /&gt;
out there in the world supported by other groups.&lt;br /&gt;
&lt;br /&gt;
This page provides a list and very brief overview of the various&lt;br /&gt;
options, along with pointers to places you can find more information&lt;br /&gt;
about each one.&lt;br /&gt;
&lt;br /&gt;
==Clients==&lt;br /&gt;
&lt;br /&gt;
OPeNDAP clients come in a variety of forms.  The simplest are web&lt;br /&gt;
browsers, who use the OPeNDAP&lt;br /&gt;
[[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]] and&lt;br /&gt;
the [[[[UserGuideOPeNDAPMessages#ASCII_Service|ASCII response]] to&lt;br /&gt;
check out data sets and download data.&lt;br /&gt;
&lt;br /&gt;
Beyond these, there are three categories of client.  The first contains&lt;br /&gt;
clients you can use in conjunction with one of the popular data&lt;br /&gt;
analysis environments, the second is a collection of command-line&lt;br /&gt;
clients useful for scripting as well as testing, and the third&lt;br /&gt;
contains a set of API libraries you can use for developing your own&lt;br /&gt;
client, or for converting an existing body of code into an OPeNDAP&lt;br /&gt;
client.  These are reviewed in that order below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Matlab, IDL, Ferret, GrADS===&lt;br /&gt;
&lt;br /&gt;
To use OPeNDAP with Matlab or IDL, you&#039;ll need the client for each.&lt;br /&gt;
This is a special program that issues a request for data from an&lt;br /&gt;
OPeNDAP server, and imports it into the environment.  Links to &lt;br /&gt;
[http://opendap.org/download/ml-structs.html the Matlab client] and&lt;br /&gt;
[http://opendap.org/download/idl-client.html the IDL client] can be&lt;br /&gt;
found on the [http;//opendap.org/download/index.html OPeNDAP software&lt;br /&gt;
download page].&lt;br /&gt;
&lt;br /&gt;
Using OPeNDAP data with the &lt;br /&gt;
[http://www.iges.org/grads GrADS] or&lt;br /&gt;
[http://ferret.wrc.noaa.gov/Ferret Ferret] packages is even easier.&lt;br /&gt;
Because these packages are based on the netCDF library, and because&lt;br /&gt;
that library now supports reading OPeNDAP data sets, these packages&lt;br /&gt;
can read OPeNDAP URLs as easily as they read local files.&lt;br /&gt;
&lt;br /&gt;
Special note.  If you&#039;re using the Matlab client, and using it for&lt;br /&gt;
oceanographic data, you may be interested in the graphical user&lt;br /&gt;
interface available for it.  See [http://oceanographicdata.org/toolbox&lt;br /&gt;
Matlab OPeNDAP Ocean Toolbox].&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
There are a couple of command-line clients out there you can use,&lt;br /&gt;
though most people only use them for testing.  Part of the libdap&lt;br /&gt;
distribution (the C++ interface) is a program called getdap, which&lt;br /&gt;
takes an OPeNDAP URL as a command-line argument and returns the reply&lt;br /&gt;
to standard output.  This is typically used to check that the libdap&lt;br /&gt;
C++ library is properly compiled, but you can also use it to retrieve&lt;br /&gt;
data. &lt;br /&gt;
&lt;br /&gt;
Part of the OPeNDAP C library is a command-line client called octest.&lt;br /&gt;
This allows you to type commands to manipulate responses to an OPeNDAP&lt;br /&gt;
URL.  Like the C++ test program, this can be construed as a test of&lt;br /&gt;
the library or a test of the servers, but it can also be used as a&lt;br /&gt;
command-line client, perhaps as an aid to automation.&lt;br /&gt;
&lt;br /&gt;
Similar programs are part of the netCDF distribution.  The ncdump&lt;br /&gt;
program outputs a &amp;quot;dump&amp;quot; of a netCDF file, and ncview provides a&lt;br /&gt;
better-formatted look at such a file.  Since the standard netCDF&lt;br /&gt;
library can be linked to the OPeNDAP libraries, both these programs&lt;br /&gt;
can be readily aquired in their OPeNDAP-enabled form.&lt;br /&gt;
&lt;br /&gt;
Here is a simple example, using the ncview program. This program&lt;br /&gt;
simply prints out the contents of a netCDF formatted data file,&lt;br /&gt;
specified on the command line, like this:  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; ncdump fnocl.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using OPeNDAP, this same function may be executed from any computer&lt;br /&gt;
connected to the Internet by substituting a URL for the filename&lt;br /&gt;
above: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; ncdump http://dods.gso.uri.edu/cgi-bin/nc/data/fnocl.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Aside from the fact that the data is remote, and must be specified&lt;br /&gt;
with a URL, the program will seem to function in the same way it had&lt;br /&gt;
with the simple netCDF library (albeit somewhat more slowly due to&lt;br /&gt;
having to make network connections instead of local file&lt;br /&gt;
operations).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
netcdf fnocl {&lt;br /&gt;
dimensions:&lt;br /&gt;
    time_a = 16&lt;br /&gt;
    lat = 17 ;&lt;br /&gt;
    lon = 21 ;&lt;br /&gt;
    time = 16 ;&lt;br /&gt;
&lt;br /&gt;
variables:&lt;br /&gt;
    long u(time_a, lat, ion) ; &lt;br /&gt;
        u:units = ``meter per second&#039;&#039; ; &lt;br /&gt;
        u:long_name = ``Vector wind eastward component&#039;&#039; ; &lt;br /&gt;
        u:missing_value = ``-32767&#039;&#039; ; &lt;br /&gt;
        u:scale_factor = ``0.005&#039;&#039; ; &lt;br /&gt;
    long v(time_a, lat, ion) ; &lt;br /&gt;
        v:units = ``meter per second&#039;&#039; ;&lt;br /&gt;
        v:long_name = ``Vector wind northward component&#039;&#039; ;&lt;br /&gt;
        v:missing_value = ``-32767&#039;&#039; ;&lt;br /&gt;
        v:scale_factor = ``0.005&#039;&#039; ; &lt;br /&gt;
    double lat(lat) ;&lt;br /&gt;
        lat:units = ``degree North&#039;&#039; ;&lt;br /&gt;
    double lon(lon) ;&lt;br /&gt;
        lon:units = ``degree East&#039;&#039; ; &lt;br /&gt;
    double time(time) ;&lt;br /&gt;
        time:units = ``hours from base_time&#039;&#039; ;&lt;br /&gt;
&lt;br /&gt;
// global attributes: &lt;br /&gt;
        :base_time = ``88- 10-00:00:00&#039;&#039; ; &lt;br /&gt;
        :title = ``FNOC UV wind components &lt;br /&gt;
                           from 1988- 10 to 1988- 13.&#039;&#039; ;&lt;br /&gt;
data:&lt;br /&gt;
 u =&lt;br /&gt;
  -1728, -2449, -3099, -3585, -3254, -2406, -1252,&lt;br /&gt;
    662, 2483, 2910, 2819, 2946, 2745, 2734,&lt;br /&gt;
  2931, 2601, 2139, 1845, 1754, 1897, 1854, -1686,&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Client Libraries===&lt;br /&gt;
&lt;br /&gt;
Several libraries exist that you can link with other software to&lt;br /&gt;
create an OPeNDAP client.  Some of these are provided by the OPeNDAP&lt;br /&gt;
project itself, and some are projects of other groups.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP libraries are functional equivalents of each other.  They&lt;br /&gt;
are derived from separate code bases, but they do the same thing.&lt;br /&gt;
They are provided in different languages for the convenience of the&lt;br /&gt;
implementer. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====C++ Client Library====&lt;br /&gt;
&lt;br /&gt;
The [http://opendap.org/download/libdap++.html C++ library], also&lt;br /&gt;
called libdap, was the original client implementation of the OPeNDAP&lt;br /&gt;
protocol.  It provides classes to manage the connection between a&lt;br /&gt;
client and a data source, as well as classes for each of the data&lt;br /&gt;
types, and the other information (such as DAS and DDS) a client will&lt;br /&gt;
encounter. &lt;br /&gt;
&lt;br /&gt;
To use the library, you will need to provide implementations for some abstract classes.&lt;br /&gt;
Consult the [[libdap Overview]] for an introduction to the basic&lt;br /&gt;
concepts behind the use of this library.  You will also find the &lt;br /&gt;
[http://www.opendap.org/api/pref/html/index.html C++ library Reference] useful.&lt;br /&gt;
&lt;br /&gt;
====C Client Library====&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group supports a [http://opendap.org/download/oc.html C library].  The C library is in many ways a simpler library to use than the C++ libdap, but it is not as flexible in other ways.  Using the library is straightforward, and you&#039;ll find a file called octutorial.html in the software release that provides a detailed example of its use.&lt;br /&gt;
&lt;br /&gt;
====Java Client Library====&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group supports a Java library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====netCDF API Library====&lt;br /&gt;
&lt;br /&gt;
The [http://www.unidata.ucar.edu/software/netcdf netCDF library]&lt;br /&gt;
deserves special note.  This is a drop-in replacement for the standard&lt;br /&gt;
netCDF library.  (In fact, as of release 4.0, it &#039;&#039;is&#039;&#039; the standard&lt;br /&gt;
netCDF library.)  This means that converting a program that depends on&lt;br /&gt;
the netCDF API to use OPeNDAP is as simple as re-linking with an&lt;br /&gt;
updated version of the netCDF library.&lt;br /&gt;
&lt;br /&gt;
See the [http://www.unidata.ucar.edu/software/netcdf netCDF home page]&lt;br /&gt;
for information about how to use that library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Python library====&lt;br /&gt;
&lt;br /&gt;
[http://pydap.org Pydap] is an implementation of the OPeNDAP client in&lt;br /&gt;
pure Python.  This is tremendously useful for scripting complicated&lt;br /&gt;
applications with lots of download steps.  This is not supported by&lt;br /&gt;
the OPeNDAP group, so please refer to the [http://pydap.org Pydap site] for more information about it.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideClient&amp;diff=4930</id>
		<title>UserGuideClient</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideClient&amp;diff=4930"/>
		<updated>2009-10-06T21:49:44Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: /* C++ Client Library */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=The OPeNDAP Client=&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP client is the program that sends a message to an OPeNDAP&lt;br /&gt;
server in order to get some data, or other information.  &lt;br /&gt;
&lt;br /&gt;
An OPeNDAP client is usually just a data analysis application program&lt;br /&gt;
modified to become a web browser, somewhat like any other web browser&lt;br /&gt;
with which you may be familiar. A web browser can only display the&lt;br /&gt;
data it receives, however. What makes an OPeNDAP client different from&lt;br /&gt;
another web browser is that once the data has been received from an&lt;br /&gt;
OPeNDAP server, the OPeNDAP client application can compute with it.&lt;br /&gt;
&lt;br /&gt;
Like a web browser, an OPeNDAP client accepts a URL from a user, and&lt;br /&gt;
sends a message to that address, asking for the information specified&lt;br /&gt;
in the the URL. Unlike a typical web browser, an OPeNDAP client will&lt;br /&gt;
not know what to do with data returned for a web page containing text&lt;br /&gt;
and pictures, but an OPeNDAP server will return scientific data that&lt;br /&gt;
an OPeNDAP client can understand and process.&lt;br /&gt;
&lt;br /&gt;
There is a wide range of OPeNDAP clients available, and it should not&lt;br /&gt;
be hard to find one you can use.&lt;br /&gt;
&lt;br /&gt;
In fact, though it can become clumsy for advanced applications, you&lt;br /&gt;
can use an ordinary web browser as a client to most OPeNDAP servers,&lt;br /&gt;
making use of the server&#039;s&lt;br /&gt;
[[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]].  The&lt;br /&gt;
[[QuickStart|Quick Start Guide]] contains many examples of exactly&lt;br /&gt;
this.&lt;br /&gt;
&lt;br /&gt;
After a basic web browser, the simplest clients to use are likely to&lt;br /&gt;
be the programs you&#039;re already using.  If you use one of the popular&lt;br /&gt;
data analysis environments like Matlab or IDL, you can find a client&lt;br /&gt;
command you can incorporate into your environment to let you call&lt;br /&gt;
OPeNDAP data directly into your working data.  If you use one of the&lt;br /&gt;
netCDF-based packages, like GrADS or Ferret, you can get a&lt;br /&gt;
network-enabled version of the program that will work with OPeNDAP&lt;br /&gt;
URLs just as well as file names.&lt;br /&gt;
&lt;br /&gt;
If none of those options work for you, there is a whole range of&lt;br /&gt;
client libraries you can use to develop a client of your own.  Several&lt;br /&gt;
of these are supported by the OPeNDAP project, and there are others&lt;br /&gt;
out there in the world supported by other groups.&lt;br /&gt;
&lt;br /&gt;
This page provides a list and very brief overview of the various&lt;br /&gt;
options, along with pointers to places you can find more information&lt;br /&gt;
about each one.&lt;br /&gt;
&lt;br /&gt;
==Clients==&lt;br /&gt;
&lt;br /&gt;
OPeNDAP clients come in a variety of forms.  The simplest are web&lt;br /&gt;
browsers, who use the OPeNDAP&lt;br /&gt;
[[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]] and&lt;br /&gt;
the [[[[UserGuideOPeNDAPMessages#ASCII_Service|ASCII response]] to&lt;br /&gt;
check out data sets and download data.&lt;br /&gt;
&lt;br /&gt;
Beyond these, there are three categories of client.  The first contains&lt;br /&gt;
clients you can use in conjunction with one of the popular data&lt;br /&gt;
analysis environments, the second is a collection of command-line&lt;br /&gt;
clients useful for scripting as well as testing, and the third&lt;br /&gt;
contains a set of API libraries you can use for developing your own&lt;br /&gt;
client, or for converting an existing body of code into an OPeNDAP&lt;br /&gt;
client.  These are reviewed in that order below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Matlab, IDL, Ferret, GrADS===&lt;br /&gt;
&lt;br /&gt;
To use OPeNDAP with Matlab or IDL, you&#039;ll need the client for each.&lt;br /&gt;
This is a special program that issues a request for data from an&lt;br /&gt;
OPeNDAP server, and imports it into the environment.  Links to &lt;br /&gt;
[http://opendap.org/download/ml-structs.html the Matlab client] and&lt;br /&gt;
[http://opendap.org/download/idl-client.html the IDL client] can be&lt;br /&gt;
found on the [http;//opendap.org/download/index.html OPeNDAP software&lt;br /&gt;
download page].&lt;br /&gt;
&lt;br /&gt;
Using OPeNDAP data with the &lt;br /&gt;
[http://www.iges.org/grads GrADS] or&lt;br /&gt;
[http://ferret.wrc.noaa.gov/Ferret Ferret] packages is even easier.&lt;br /&gt;
Because these packages are based on the netCDF library, and because&lt;br /&gt;
that library now supports reading OPeNDAP data sets, these packages&lt;br /&gt;
can read OPeNDAP URLs as easily as they read local files.&lt;br /&gt;
&lt;br /&gt;
Special note.  If you&#039;re using the Matlab client, and using it for&lt;br /&gt;
oceanographic data, you may be interested in the graphical user&lt;br /&gt;
interface available for it.  See [http://oceanographicdata.org/toolbox&lt;br /&gt;
Matlab OPeNDAP Ocean Toolbox].&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
There are a couple of command-line clients out there you can use,&lt;br /&gt;
though most people only use them for testing.  Part of the libdap&lt;br /&gt;
distribution (the C++ interface) is a program called getdap, which&lt;br /&gt;
takes an OPeNDAP URL as a command-line argument and returns the reply&lt;br /&gt;
to standard output.  This is typically used to check that the libdap&lt;br /&gt;
C++ library is properly compiled, but you can also use it to retrieve&lt;br /&gt;
data. &lt;br /&gt;
&lt;br /&gt;
Part of the OPeNDAP C library is a command-line client called octest.&lt;br /&gt;
This allows you to type commands to manipulate responses to an OPeNDAP&lt;br /&gt;
URL.  Like the C++ test program, this can be construed as a test of&lt;br /&gt;
the library or a test of the servers, but it can also be used as a&lt;br /&gt;
command-line client, perhaps as an aid to automation.&lt;br /&gt;
&lt;br /&gt;
Similar programs are part of the netCDF distribution.  The ncdump&lt;br /&gt;
program outputs a &amp;quot;dump&amp;quot; of a netCDF file, and ncview provides a&lt;br /&gt;
better-formatted look at such a file.  Since the standard netCDF&lt;br /&gt;
library can be linked to the OPeNDAP libraries, both these programs&lt;br /&gt;
can be readily aquired in their OPeNDAP-enabled form.&lt;br /&gt;
&lt;br /&gt;
Here is a simple example, using the ncview program. This program&lt;br /&gt;
simply prints out the contents of a netCDF formatted data file,&lt;br /&gt;
specified on the command line, like this:  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; ncdump fnocl.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using OPeNDAP, this same function may be executed from any computer&lt;br /&gt;
connected to the Internet by substituting a URL for the filename&lt;br /&gt;
above: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; ncdump http://dods.gso.uri.edu/cgi-bin/nc/data/fnocl.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Aside from the fact that the data is remote, and must be specified&lt;br /&gt;
with a URL, the program will seem to function in the same way it had&lt;br /&gt;
with the simple netCDF library (albeit somewhat more slowly due to&lt;br /&gt;
having to make network connections instead of local file&lt;br /&gt;
operations).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
netcdf fnocl {&lt;br /&gt;
dimensions:&lt;br /&gt;
    time_a = 16&lt;br /&gt;
    lat = 17 ;&lt;br /&gt;
    lon = 21 ;&lt;br /&gt;
    time = 16 ;&lt;br /&gt;
&lt;br /&gt;
variables:&lt;br /&gt;
    long u(time_a, lat, ion) ; &lt;br /&gt;
        u:units = ``meter per second&#039;&#039; ; &lt;br /&gt;
        u:long_name = ``Vector wind eastward component&#039;&#039; ; &lt;br /&gt;
        u:missing_value = ``-32767&#039;&#039; ; &lt;br /&gt;
        u:scale_factor = ``0.005&#039;&#039; ; &lt;br /&gt;
    long v(time_a, lat, ion) ; &lt;br /&gt;
        v:units = ``meter per second&#039;&#039; ;&lt;br /&gt;
        v:long_name = ``Vector wind northward component&#039;&#039; ;&lt;br /&gt;
        v:missing_value = ``-32767&#039;&#039; ;&lt;br /&gt;
        v:scale_factor = ``0.005&#039;&#039; ; &lt;br /&gt;
    double lat(lat) ;&lt;br /&gt;
        lat:units = ``degree North&#039;&#039; ;&lt;br /&gt;
    double lon(lon) ;&lt;br /&gt;
        lon:units = ``degree East&#039;&#039; ; &lt;br /&gt;
    double time(time) ;&lt;br /&gt;
        time:units = ``hours from base_time&#039;&#039; ;&lt;br /&gt;
&lt;br /&gt;
// global attributes: &lt;br /&gt;
        :base_time = ``88- 10-00:00:00&#039;&#039; ; &lt;br /&gt;
        :title = ``FNOC UV wind components &lt;br /&gt;
                           from 1988- 10 to 1988- 13.&#039;&#039; ;&lt;br /&gt;
data:&lt;br /&gt;
 u =&lt;br /&gt;
  -1728, -2449, -3099, -3585, -3254, -2406, -1252,&lt;br /&gt;
    662, 2483, 2910, 2819, 2946, 2745, 2734,&lt;br /&gt;
  2931, 2601, 2139, 1845, 1754, 1897, 1854, -1686,&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Client Libraries===&lt;br /&gt;
&lt;br /&gt;
Several libraries exist that you can link with other software to&lt;br /&gt;
create an OPeNDAP client.  Some of these are provided by the OPeNDAP&lt;br /&gt;
project itself, and some are projects of other groups.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP libraries are functional equivalents of each other.  They&lt;br /&gt;
are derived from separate code bases, but they do the same thing.&lt;br /&gt;
They are provided in different languages for the convenience of the&lt;br /&gt;
implementer. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====C++ Client Library====&lt;br /&gt;
&lt;br /&gt;
The [http://opendap.org/download/libdap++.html C++ library], also&lt;br /&gt;
called libdap, was the original client implementation of the OPeNDAP&lt;br /&gt;
protocol.  It provides classes to manage the connection between a&lt;br /&gt;
client and a data source, as well as classes for each of the data&lt;br /&gt;
types, and the other information (such as DAS and DDS) a client will&lt;br /&gt;
encounter. &lt;br /&gt;
&lt;br /&gt;
To use the library, you will need to provide implementations for some abstract classes.&lt;br /&gt;
Consult the [[libdap Overview]] for an introduction to the basic&lt;br /&gt;
concepts behind the use of this library.  You will also find the &lt;br /&gt;
[http://www.opendap.org/api/pref/html/index.html C++ library Reference] useful.&lt;br /&gt;
&lt;br /&gt;
====C Client Library====&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group supports a C library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Java Client Library====&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group supports a Java library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====netCDF API Library====&lt;br /&gt;
&lt;br /&gt;
The [http://www.unidata.ucar.edu/software/netcdf netCDF library]&lt;br /&gt;
deserves special note.  This is a drop-in replacement for the standard&lt;br /&gt;
netCDF library.  (In fact, as of release 4.0, it &#039;&#039;is&#039;&#039; the standard&lt;br /&gt;
netCDF library.)  This means that converting a program that depends on&lt;br /&gt;
the netCDF API to use OPeNDAP is as simple as re-linking with an&lt;br /&gt;
updated version of the netCDF library.&lt;br /&gt;
&lt;br /&gt;
See the [http://www.unidata.ucar.edu/software/netcdf netCDF home page]&lt;br /&gt;
for information about how to use that library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Python library====&lt;br /&gt;
&lt;br /&gt;
[http://pydap.org Pydap] is an implementation of the OPeNDAP client in&lt;br /&gt;
pure Python.  This is tremendously useful for scripting complicated&lt;br /&gt;
applications with lots of download steps.  This is not supported by&lt;br /&gt;
the OPeNDAP group, so please refer to the [http://pydap.org Pydap site] for more information about it.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Linking&amp;diff=4929</id>
		<title>Linking</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Linking&amp;diff=4929"/>
		<updated>2009-10-06T21:46:28Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: New page: return to Libdap Overview  =Linking=  There are no special instructions for linking the libdap code to your own.  The library that results from a build of the libdap co...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Libdap_Overview|return to Libdap Overview]]&lt;br /&gt;
&lt;br /&gt;
=Linking=&lt;br /&gt;
&lt;br /&gt;
There are no special instructions for linking the libdap code to your&lt;br /&gt;
own.  The library that results from a build of the libdap code is&lt;br /&gt;
called libdap++.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Libdap_Overview&amp;diff=4928</id>
		<title>Libdap Overview</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Libdap_Overview&amp;diff=4928"/>
		<updated>2009-10-06T21:43:51Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can use the libdap C++ implementation of the OPeNDAP client protocol to create your own OPeNDAP client.  Refer to the [http://www.opendap.org/api/pref/html/index.html C++ library reference] for details about each of the classes in the library.  The sections below provide short overviews of how to use the library classes.&lt;br /&gt;
&lt;br /&gt;
;[[LibdapConnectClasses|Connect Classes]]&lt;br /&gt;
:For managing the connection between the client and the server.&lt;br /&gt;
&lt;br /&gt;
;[[LibdapDataClasses|Data Classes]]&lt;br /&gt;
:For managing the returned data.&lt;br /&gt;
&lt;br /&gt;
;[[Linking]]&lt;br /&gt;
:Some advice about linking.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=LibdapDataClasses&amp;diff=4927</id>
		<title>LibdapDataClasses</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=LibdapDataClasses&amp;diff=4927"/>
		<updated>2009-10-06T21:41:42Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Libdap_Overview|return to Libdap Overview]]&lt;br /&gt;
&lt;br /&gt;
=Using the Libdap Classes=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to be used by real client-libraries and data servers, many of&lt;br /&gt;
the classes in the libdap toolkit must be subclassed. For example, the&lt;br /&gt;
type hierarchy classes, which represent the data types in the OPeNDAP&lt;br /&gt;
data model, are all abstract classes. In order to use them in a&lt;br /&gt;
program they must be subclassed. The Connect class also must&lt;br /&gt;
be subclassed if it to hold additional information about the&lt;br /&gt;
connection.&lt;br /&gt;
&lt;br /&gt;
==Sub-classing the Type Hierarchy==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to link a program with libdap, the DAP&#039;s abstract classes&lt;br /&gt;
must be subclassed and those subclasses must ensure that all of the&lt;br /&gt;
member functions of those classes have valid definitions. The next&lt;br /&gt;
three sections cover sub-classing the simple, vector and compound&lt;br /&gt;
classes, respectively. In addition, a sample set of classes (called&lt;br /&gt;
the &amp;lt;font color=&#039;green&#039;&amp;gt;Test&amp;lt;/font&amp;gt; classes because they are used by&lt;br /&gt;
the DAP tests) is included with the DAP distribution. You can read the&lt;br /&gt;
source code for those classes to find out how they were created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each of the sub-classed types must supply: &lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*A constructor that takes a String argument and returns an object with that name.   &lt;br /&gt;
*A virtual destructor.&lt;br /&gt;
*A copy function called &amp;lt;font color=&#039;green&#039;&amp;gt;ptr_duplicate&amp;lt;/font&amp;gt;.&lt;br /&gt;
*The &amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; function, to read data from a disk and load it into the type class object.  &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;font color=&#039;green&#039;&amp;gt;ptr_duplicate&amp;lt;/font&amp;gt; member function returns a pointer to a new instance of the type of object from which it was invoked. This member&lt;br /&gt;
function exists so that objects that are referenced through pointers&lt;br /&gt;
to BaseType can correctly copy themselves. (If you were to use&lt;br /&gt;
the operator &amp;lt;font color=&#039;green&#039;&amp;gt;new&amp;lt;/font&amp;gt; to copy an object referenced through&lt;br /&gt;
BaseType , you would get a  BaseType, not a new instance of the type of the referenced object.) Note that &amp;lt;font color=&#039;green&#039;&amp;gt;ptr_duplicate&amp;lt;/font&amp;gt;&lt;br /&gt;
is a virtual function so an object which is a descendent of BaseType will get the most specific definition of that function.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; function is much more complicated to write than&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;ptr_duplicate&amp;lt;/font&amp;gt;, and the difficulty varies depending on the data type to be read. However, this function is only used on the server&lt;br /&gt;
side of the system and not by the client.  That is, it can be&lt;br /&gt;
implemented with a null function body if all you are building is a&lt;br /&gt;
client library. The &amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; function takes two arguments, the&lt;br /&gt;
dataset name, and an error flag.  It must read from that dataset the&lt;br /&gt;
values specified by the current constraint expression. The error flag&lt;br /&gt;
is passed by reference so that read can set its value and callers can&lt;br /&gt;
test it.  The class BaseType contains a number of member&lt;br /&gt;
functions to facilitate writing a read function.  The return value of&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; is TRUE is there is more data to be read (by additional calls to &amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt;) or FALSE otherwise.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sub-classing the Simple Types===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Creating a &amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; function for the simple type classes is a fairly straightforward operation.  Simply read the function using the data&lt;br /&gt;
access API&#039;s standard protocol, and use the type class&#039;s &amp;lt;font color=&#039;green&#039;&amp;gt;val2buf&amp;lt;/font&amp;gt; function to load the data into the type object.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example, from the OPeNDAP implementation of the netCDF&lt;br /&gt;
client library. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NCByte::read(const String &amp;amp;dataset, int &amp;amp;error) &lt;br /&gt;
{&lt;br /&gt;
   int varid;                  /* variable Id */&lt;br /&gt;
   nc_type datatype;           /* variable data type */&lt;br /&gt;
   long cor[MAX_NC_DIMS];      /* corner coordinates */&lt;br /&gt;
   int num_dim;                /* number of dim. in variable */&lt;br /&gt;
   long nels = -1;             /* number of elements in buffer */&lt;br /&gt;
   int id;&lt;br /&gt;
&lt;br /&gt;
   if (read_p()) // already done&lt;br /&gt;
     return true;&lt;br /&gt;
&lt;br /&gt;
   int ncid = lncopen(dataset, NC_NOWRITE); /* netCDF id */&lt;br /&gt;
&lt;br /&gt;
   if (ncid == -1) { &lt;br /&gt;
     cerr &amp;lt;&amp;lt; &amp;quot;ncopen failed on &amp;quot; &amp;lt;&amp;lt; dataset&amp;lt;&amp;lt; endl;&lt;br /&gt;
     return false;&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   varid = lncvarid( ncid, name());&lt;br /&gt;
   (void)lncvarinq( ncid, varid, (char *)0, &amp;amp;datatype, &lt;br /&gt;
                    &amp;amp;num_dim, (int *)0, (int *)0);&lt;br /&gt;
&lt;br /&gt;
   if(nels == -1){  &lt;br /&gt;
     for (id = 0; id &amp;lt; num_dim; id++) &lt;br /&gt;
       cor[id] = 0;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   if (datatype == NC_BYTE){&lt;br /&gt;
     dods_byte Dbyte;&lt;br /&gt;
&lt;br /&gt;
     (void) lncvarget1 (ncid, varid, cor, &amp;amp;Dbyte);&lt;br /&gt;
     set_read_p(true);&lt;br /&gt;
          &lt;br /&gt;
     val2buf( &amp;amp;Dbyte );&lt;br /&gt;
&lt;br /&gt;
     (void) lncclose(ncid);  &lt;br /&gt;
     return true;&lt;br /&gt;
   }&lt;br /&gt;
   return false;&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following points are worth consideration about the above example.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
; line 10 : Check to see if this variable has already been read.&lt;br /&gt;
&lt;br /&gt;
; line 13 : The &amp;lt;font color=&#039;green&#039;&amp;gt;lncopen()&amp;lt;/font&amp;gt; function call is simply the &amp;lt;font color=&#039;green&#039;&amp;gt;ncopen()&amp;lt;/font&amp;gt; function from the [http://www.unidata.ucar.edu/software/netcdf/guide.txn_toc.html &amp;lt;cite&amp;gt;NetCDF&amp;lt;/cite&amp;gt;] library. Also, the &amp;lt;font color=&#039;green&#039;&amp;gt;lncvarid&amp;lt;/font&amp;gt; function is renamed &amp;lt;font color=&#039;green&#039;&amp;gt;ncvarid&amp;lt;/font&amp;gt; and so on.  The names have been changed to avoid link-time problems.  (Remember that the whole point of this exercise is to create a new &amp;lt;font color=&#039;green&#039;&amp;gt;ncopen()&amp;lt;/font&amp;gt; function and its friends.&lt;br /&gt;
&lt;br /&gt;
; line 33 : This sets the flag tested with the &amp;lt;font color=&#039;green&#039;&amp;gt;read_p&amp;lt;/font&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
; line 35 : This command transfers values from the dataset&#039;s variable to the OPeNDAP instance.  This is the point where the read actually happens.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note the use of &amp;lt;font color=&#039;green&#039;&amp;gt;dods_byte&amp;lt;/font&amp;gt; in the code example.  The OPeNDAP&lt;br /&gt;
configuration process creates definitions for the simple data types&lt;br /&gt;
like this one. They are stored in &amp;lt;font color=&#039;green&#039;&amp;gt;config_dap.h&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; member function is used by the constraint expression&lt;br /&gt;
evaluator to extract data from a dataset during evaluation of the&lt;br /&gt;
constraint expression.  This is particularly important to remember&lt;br /&gt;
because the &amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; member function for a simple data type will be&lt;br /&gt;
called when reading an aggregate type such as Structure.&lt;br /&gt;
&lt;br /&gt;
===Sub-classing the Vector Types===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The vector data types require the same abstract member functions be&lt;br /&gt;
defined as the simple types. The definition for &amp;lt;font color=&#039;green&#039;&amp;gt;ptr_duplicate&amp;lt;/font&amp;gt;&lt;br /&gt;
is also the same for vector as for simple types.  However, the&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; member function for the vector types (classes Array&lt;br /&gt;
and List) is more complicated than for the simple types&lt;br /&gt;
because vectors of values are represented in two ways in OPeNDAP,&lt;br /&gt;
depending on the type of variable in the vector. Arrays are stored as&lt;br /&gt;
C would store them for the simple types such as Byte,&lt;br /&gt;
Int32  and  Float64.  However, compound types are stored&lt;br /&gt;
as arrays of the OPeNDAP  objects (with the exception of arrays&lt;br /&gt;
themselves, but more on that later).&lt;br /&gt;
&lt;br /&gt;
When reading an array of Byte values, the &amp;lt;font color=&#039;green&#039;&amp;gt;val2buf&amp;lt;/font&amp;gt; member function&lt;br /&gt;
should be passed a pointer to values stored in a contiguous piece of&lt;br /&gt;
memory. For example, when &amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; is called to read a variable&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;byte-array&amp;lt;/font&amp;gt;, it must determine how much memory to allocate to&lt;br /&gt;
hold that much information, use &amp;lt;font color=&#039;green&#039;&amp;gt;new&amp;lt;/font&amp;gt; to allocate an adequate&lt;br /&gt;
amount of memory, use the dataset&#039;s API calls to read&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;byte-array&amp;lt;/font&amp;gt; into the newly allocated memory and then pass that&lt;br /&gt;
memory to &amp;lt;font color=&#039;green&#039;&amp;gt;val2buf&amp;lt;/font&amp;gt;. This same procedure can be followed for all&lt;br /&gt;
the simple types.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
However, when reading an array of Structure, for example, the&lt;br /&gt;
values must be stored in the OPeNDAP Array object one at a time&lt;br /&gt;
using the Array member function &amp;lt;font color=&#039;green&#039;&amp;gt;set_vec&amp;lt;/font&amp;gt;. An&lt;br /&gt;
Array  object containing a 3x4 array of  Structure&lt;br /&gt;
objects will actually point to 12 different instances of that class.&lt;br /&gt;
An Array  object containing  Byte objects contains&lt;br /&gt;
only one instance of the Byte class, as a template for the&lt;br /&gt;
array elements.&lt;br /&gt;
&lt;br /&gt;
Arrays in OPeNDAP are unlike arrays in C in that an array object may have&lt;br /&gt;
more than one dimension. In terms of the way a value is stored,&lt;br /&gt;
however, an Array is a single dimensional object. When an Array is&lt;br /&gt;
declared as having two or more dimensions, those are mapped onto a&lt;br /&gt;
single vector. To access the element A_ij of array &#039;&#039;A&#039;&#039; , you&lt;br /&gt;
must know the size of the first dimension, &#039;&#039;I&#039;&#039; , and use the&lt;br /&gt;
expression i * I + j to compute the offset into the vector.&lt;br /&gt;
&lt;br /&gt;
Since the class List is a single dimension array without&lt;br /&gt;
&#039;&#039;declared&#039;&#039;  size (the size of each value of the List object is&lt;br /&gt;
stored in the object) the rules for Array&#039;s read member&lt;br /&gt;
function apply.&lt;br /&gt;
&lt;br /&gt;
===Sub-classing the Compound Types===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; member function of the compound data types simply&lt;br /&gt;
iterates over the contained variables calling their &amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; member functions. In the future, this definition will move into the supplied&lt;br /&gt;
classes (That is, &amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; will no longer be a abstract member&lt;br /&gt;
function for the compound types.).&lt;br /&gt;
&lt;br /&gt;
The two constructor types Sequence and Function are different from all&lt;br /&gt;
the other types in the DAP in that they have &#039;&#039;state&#039;&#039; . That is, the&lt;br /&gt;
value of a sequence depends on how many values have been read&lt;br /&gt;
previously.  This is very different from an array where the i^{th}&lt;br /&gt;
element has the same value regardless of what has happened&lt;br /&gt;
before. When you write implementations for &amp;lt;font&lt;br /&gt;
color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; in the Sequence and Function classes, you&lt;br /&gt;
must be sure to write those member functions so that they can be&lt;br /&gt;
called repeatedly and that each call to read returns the next value of&lt;br /&gt;
the corresponding data Sequence or Function.&lt;br /&gt;
&lt;br /&gt;
This is true because the constraint expression evaluator must be able&lt;br /&gt;
to apply certain constraints to values of individual sequence elements&lt;br /&gt;
and is actually implemented in the DDS class by first calling the read&lt;br /&gt;
member function, evaluating the constraint expression based on the&lt;br /&gt;
values and, if the constraint expression is satisfied, calling the&lt;br /&gt;
serialize member function.  See the member function &amp;lt;font&lt;br /&gt;
color=&#039;green&#039;&amp;gt;DDS::send&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If, for some reason, it is not possible to write &amp;lt;font&lt;br /&gt;
color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; so that it gets called once for each&lt;br /&gt;
sequence value, then you must&lt;br /&gt;
re-implement &amp;lt;font color=&#039;green&#039;&amp;gt;DDS::send&amp;lt;/font&amp;gt; so that its&lt;br /&gt;
functions are performed. For example, you could implement &amp;lt;font&lt;br /&gt;
color=&#039;green&#039;&amp;gt;Sequence::read&amp;lt;/font&amp;gt; so that the entire sequence is&lt;br /&gt;
read in and overload &amp;lt;font color=&#039;green&#039;&amp;gt;Sequence::serialize&amp;lt;/font&amp;gt;&lt;br /&gt;
and &amp;lt;font color=&#039;green&#039;&amp;gt;Sequence::deserialize&amp;lt;/font&amp;gt; so that the next&lt;br /&gt;
set of values are sent/received. You would then build a send that&lt;br /&gt;
called the &amp;lt;font color=&#039;green&#039;&amp;gt;Sequence::read&amp;lt;/font&amp;gt; member function&lt;br /&gt;
once and extracted each successive value, evaluated the constraint&lt;br /&gt;
expression using on that value and used the result of that evaluation&lt;br /&gt;
to determine whether to send the value or not.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=LibdapConnectClasses&amp;diff=4926</id>
		<title>LibdapConnectClasses</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=LibdapConnectClasses&amp;diff=4926"/>
		<updated>2009-10-06T21:41:09Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Libdap_Overview|return to Libdap Overview]]&lt;br /&gt;
&lt;br /&gt;
=Managing Connections=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Because OPeNDAP uses a communication protocol (http) that does not&lt;br /&gt;
maintain state information about the link between two processes, these&lt;br /&gt;
connections are virtual, and all the information about them is&lt;br /&gt;
maintained by the client.  Libdap contains two classes to help&lt;br /&gt;
clients manage connections to one or more OPeNDAP servers.  One class,&lt;br /&gt;
&#039;&#039;Connect&#039;&#039;, stores information used when a connection is&lt;br /&gt;
established. It also allows a program to provide local access to data&lt;br /&gt;
(without a OPeNDAP data server).&lt;br /&gt;
&lt;br /&gt;
The second class, &#039;&#039;Connections&#039;&#039;,&lt;br /&gt;
manages instances of the Connect class. It provides a&lt;br /&gt;
mechanism for the client libraries to pass back to user programs the&lt;br /&gt;
type of object (such as &amp;lt;font color=&#039;green&#039;&amp;gt;int&amp;lt;/font&amp;gt;, opaque pointer, dots) they expect and then to use one of those objects to access the correct instance of&lt;br /&gt;
Connect .  Connections is a template class. That is, a client library uses the Connections class to make an array of some sub-class of Connect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Connect==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Connect class manages a connection to either a remote&lt;br /&gt;
data set, via an OPeNDAP data server, or a local access. For each data set&lt;br /&gt;
or file that the user program opens, there must be exactly one&lt;br /&gt;
instance of Connect. Because information needed for local&lt;br /&gt;
access is stored in an instance of Connect, this class may&lt;br /&gt;
also be used (sub-classed) for each client API that needs to maintain&lt;br /&gt;
additional information about the connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Connect.gif|actual size]] &lt;br /&gt;
&lt;br /&gt;
The Connect Class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
The Connect class is illustrated in [[:Image:Connect.gif|above]].&lt;br /&gt;
These objects contain the following information: &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
; URL : The URL with which the client library opens the connection with the OPeNDAP server.&lt;br /&gt;
&lt;br /&gt;
; DDS  : The  DDS of the opened dataset.  This must be retrieved from the dataset.&lt;br /&gt;
&lt;br /&gt;
; DAS  : The  DAS of the opened dataset.  This must be retrieved from the dataset.&lt;br /&gt;
&lt;br /&gt;
; Gui  : The  Gui object indicates a graphical widget on the client platform that displays information about the data transfer in progress.&lt;br /&gt;
&lt;br /&gt;
; Error  : The  Error object contains information used to help the client process an error message from the server.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
The Connect class provides member functions to get the dataset&#039;s DAS ,&lt;br /&gt;
DDS and data. The instance of Connect  (or a subclass of  Connect)&lt;br /&gt;
stores the URL as the user provides it. &lt;br /&gt;
&lt;br /&gt;
When the client library receives a URL via its &amp;quot;open&amp;quot; call, it passes&lt;br /&gt;
that URL to the Connect member functions like &amp;lt;font&lt;br /&gt;
color=&#039;green&#039;&amp;gt;request_das&amp;lt;/font&amp;gt; and &amp;lt;font&lt;br /&gt;
color=&#039;green&#039;&amp;gt;request_dds&amp;lt;/font&amp;gt;. These member functions append an&lt;br /&gt;
appropriate extension (&amp;lt;font color=&#039;green&#039;&amp;gt;.das&amp;lt;/font&amp;gt; and &amp;lt;font&lt;br /&gt;
color=&#039;green&#039;&amp;gt;.dds&amp;lt;/font&amp;gt;, for example) onto the URL and retrieve the&lt;br /&gt;
resulting information from the server, the DAS or DDS for the dataset.&lt;br /&gt;
&lt;br /&gt;
If you are re-implementing an API and must support function calls that&lt;br /&gt;
modify how data is accessed (e.g., by creating array slices or by&lt;br /&gt;
choosing one of a set of variables), then you will need to translate&lt;br /&gt;
those requests into a OPeNDAP constraint expression. You would then pass&lt;br /&gt;
these synthesized constraint expressions to the&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;Connect::request_data&amp;lt;/font&amp;gt; member function.&lt;br /&gt;
&lt;br /&gt;
The specialized version of Connect is the place to put state&lt;br /&gt;
information needed by a recoded API or other client.  This can be&lt;br /&gt;
used, for example, to emulate an API that maintains a list of open&lt;br /&gt;
files.&lt;br /&gt;
&lt;br /&gt;
==Connections==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The class Connections is used to manage a set of instances of&lt;br /&gt;
the class Connect by providing a means to map an index or&lt;br /&gt;
opaque pointer to an instance of Connect.&lt;br /&gt;
&lt;br /&gt;
When a new instance of Connect (or a descendent) is created, it is added to&lt;br /&gt;
the Connections object using the &amp;lt;font&lt;br /&gt;
color=&#039;green&#039;&amp;gt;add_connect&amp;lt;/font&amp;gt; member function. &amp;lt;font&lt;br /&gt;
color=&#039;green&#039;&amp;gt;add_connect&amp;lt;/font&amp;gt; returns an integer that can be used&lt;br /&gt;
to access that instance of Connect at any time. Similarly, when an&lt;br /&gt;
instance of Connect is to be deleted, the object can be referred to&lt;br /&gt;
via the Connections object and this index.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=LibdapDataClasses&amp;diff=4925</id>
		<title>LibdapDataClasses</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=LibdapDataClasses&amp;diff=4925"/>
		<updated>2009-10-06T21:39:46Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: New page: =Using the Libdap Classes=   In order to be used by real client-libraries and data servers, many of the classes in the libdap toolkit must be subclassed. For example, the type hierarchy cl...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Using the Libdap Classes=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to be used by real client-libraries and data servers, many of&lt;br /&gt;
the classes in the libdap toolkit must be subclassed. For example, the&lt;br /&gt;
type hierarchy classes, which represent the data types in the OPeNDAP&lt;br /&gt;
data model, are all abstract classes. In order to use them in a&lt;br /&gt;
program they must be subclassed. The Connect class also must&lt;br /&gt;
be subclassed if it to hold additional information about the&lt;br /&gt;
connection.&lt;br /&gt;
&lt;br /&gt;
==Sub-classing the Type Hierarchy==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to link a program with libdap, the DAP&#039;s abstract classes&lt;br /&gt;
must be subclassed and those subclasses must ensure that all of the&lt;br /&gt;
member functions of those classes have valid definitions. The next&lt;br /&gt;
three sections cover sub-classing the simple, vector and compound&lt;br /&gt;
classes, respectively. In addition, a sample set of classes (called&lt;br /&gt;
the &amp;lt;font color=&#039;green&#039;&amp;gt;Test&amp;lt;/font&amp;gt; classes because they are used by&lt;br /&gt;
the DAP tests) is included with the DAP distribution. You can read the&lt;br /&gt;
source code for those classes to find out how they were created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each of the sub-classed types must supply: &lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*A constructor that takes a String argument and returns an object with that name.   &lt;br /&gt;
*A virtual destructor.&lt;br /&gt;
*A copy function called &amp;lt;font color=&#039;green&#039;&amp;gt;ptr_duplicate&amp;lt;/font&amp;gt;.&lt;br /&gt;
*The &amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; function, to read data from a disk and load it into the type class object.  &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;font color=&#039;green&#039;&amp;gt;ptr_duplicate&amp;lt;/font&amp;gt; member function returns a pointer to a new instance of the type of object from which it was invoked. This member&lt;br /&gt;
function exists so that objects that are referenced through pointers&lt;br /&gt;
to BaseType can correctly copy themselves. (If you were to use&lt;br /&gt;
the operator &amp;lt;font color=&#039;green&#039;&amp;gt;new&amp;lt;/font&amp;gt; to copy an object referenced through&lt;br /&gt;
BaseType , you would get a  BaseType, not a new instance of the type of the referenced object.) Note that &amp;lt;font color=&#039;green&#039;&amp;gt;ptr_duplicate&amp;lt;/font&amp;gt;&lt;br /&gt;
is a virtual function so an object which is a descendent of BaseType will get the most specific definition of that function.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; function is much more complicated to write than&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;ptr_duplicate&amp;lt;/font&amp;gt;, and the difficulty varies depending on the data type to be read. However, this function is only used on the server&lt;br /&gt;
side of the system and not by the client.  That is, it can be&lt;br /&gt;
implemented with a null function body if all you are building is a&lt;br /&gt;
client library. The &amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; function takes two arguments, the&lt;br /&gt;
dataset name, and an error flag.  It must read from that dataset the&lt;br /&gt;
values specified by the current constraint expression. The error flag&lt;br /&gt;
is passed by reference so that read can set its value and callers can&lt;br /&gt;
test it.  The class BaseType contains a number of member&lt;br /&gt;
functions to facilitate writing a read function.  The return value of&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; is TRUE is there is more data to be read (by additional calls to &amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt;) or FALSE otherwise.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Sub-classing the Simple Types===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Creating a &amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; function for the simple type classes is a fairly straightforward operation.  Simply read the function using the data&lt;br /&gt;
access API&#039;s standard protocol, and use the type class&#039;s &amp;lt;font color=&#039;green&#039;&amp;gt;val2buf&amp;lt;/font&amp;gt; function to load the data into the type object.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example, from the OPeNDAP implementation of the netCDF&lt;br /&gt;
client library. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NCByte::read(const String &amp;amp;dataset, int &amp;amp;error) &lt;br /&gt;
{&lt;br /&gt;
   int varid;                  /* variable Id */&lt;br /&gt;
   nc_type datatype;           /* variable data type */&lt;br /&gt;
   long cor[MAX_NC_DIMS];      /* corner coordinates */&lt;br /&gt;
   int num_dim;                /* number of dim. in variable */&lt;br /&gt;
   long nels = -1;             /* number of elements in buffer */&lt;br /&gt;
   int id;&lt;br /&gt;
&lt;br /&gt;
   if (read_p()) // already done&lt;br /&gt;
     return true;&lt;br /&gt;
&lt;br /&gt;
   int ncid = lncopen(dataset, NC_NOWRITE); /* netCDF id */&lt;br /&gt;
&lt;br /&gt;
   if (ncid == -1) { &lt;br /&gt;
     cerr &amp;lt;&amp;lt; &amp;quot;ncopen failed on &amp;quot; &amp;lt;&amp;lt; dataset&amp;lt;&amp;lt; endl;&lt;br /&gt;
     return false;&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   varid = lncvarid( ncid, name());&lt;br /&gt;
   (void)lncvarinq( ncid, varid, (char *)0, &amp;amp;datatype, &lt;br /&gt;
                    &amp;amp;num_dim, (int *)0, (int *)0);&lt;br /&gt;
&lt;br /&gt;
   if(nels == -1){  &lt;br /&gt;
     for (id = 0; id &amp;lt; num_dim; id++) &lt;br /&gt;
       cor[id] = 0;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   if (datatype == NC_BYTE){&lt;br /&gt;
     dods_byte Dbyte;&lt;br /&gt;
&lt;br /&gt;
     (void) lncvarget1 (ncid, varid, cor, &amp;amp;Dbyte);&lt;br /&gt;
     set_read_p(true);&lt;br /&gt;
          &lt;br /&gt;
     val2buf( &amp;amp;Dbyte );&lt;br /&gt;
&lt;br /&gt;
     (void) lncclose(ncid);  &lt;br /&gt;
     return true;&lt;br /&gt;
   }&lt;br /&gt;
   return false;&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following points are worth consideration about the above example.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
; line 10 : Check to see if this variable has already been read.&lt;br /&gt;
&lt;br /&gt;
; line 13 : The &amp;lt;font color=&#039;green&#039;&amp;gt;lncopen()&amp;lt;/font&amp;gt; function call is simply the &amp;lt;font color=&#039;green&#039;&amp;gt;ncopen()&amp;lt;/font&amp;gt; function from the [http://www.unidata.ucar.edu/software/netcdf/guide.txn_toc.html &amp;lt;cite&amp;gt;NetCDF&amp;lt;/cite&amp;gt;] library. Also, the &amp;lt;font color=&#039;green&#039;&amp;gt;lncvarid&amp;lt;/font&amp;gt; function is renamed &amp;lt;font color=&#039;green&#039;&amp;gt;ncvarid&amp;lt;/font&amp;gt; and so on.  The names have been changed to avoid link-time problems.  (Remember that the whole point of this exercise is to create a new &amp;lt;font color=&#039;green&#039;&amp;gt;ncopen()&amp;lt;/font&amp;gt; function and its friends.&lt;br /&gt;
&lt;br /&gt;
; line 33 : This sets the flag tested with the &amp;lt;font color=&#039;green&#039;&amp;gt;read_p&amp;lt;/font&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
; line 35 : This command transfers values from the dataset&#039;s variable to the OPeNDAP instance.  This is the point where the read actually happens.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Note the use of &amp;lt;font color=&#039;green&#039;&amp;gt;dods_byte&amp;lt;/font&amp;gt; in the code example.  The OPeNDAP&lt;br /&gt;
configuration process creates definitions for the simple data types&lt;br /&gt;
like this one. They are stored in &amp;lt;font color=&#039;green&#039;&amp;gt;config_dap.h&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; member function is used by the constraint expression&lt;br /&gt;
evaluator to extract data from a dataset during evaluation of the&lt;br /&gt;
constraint expression.  This is particularly important to remember&lt;br /&gt;
because the &amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; member function for a simple data type will be&lt;br /&gt;
called when reading an aggregate type such as Structure.&lt;br /&gt;
&lt;br /&gt;
===Sub-classing the Vector Types===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The vector data types require the same abstract member functions be&lt;br /&gt;
defined as the simple types. The definition for &amp;lt;font color=&#039;green&#039;&amp;gt;ptr_duplicate&amp;lt;/font&amp;gt;&lt;br /&gt;
is also the same for vector as for simple types.  However, the&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; member function for the vector types (classes Array&lt;br /&gt;
and List) is more complicated than for the simple types&lt;br /&gt;
because vectors of values are represented in two ways in OPeNDAP,&lt;br /&gt;
depending on the type of variable in the vector. Arrays are stored as&lt;br /&gt;
C would store them for the simple types such as Byte,&lt;br /&gt;
Int32  and  Float64.  However, compound types are stored&lt;br /&gt;
as arrays of the OPeNDAP  objects (with the exception of arrays&lt;br /&gt;
themselves, but more on that later).&lt;br /&gt;
&lt;br /&gt;
When reading an array of Byte values, the &amp;lt;font color=&#039;green&#039;&amp;gt;val2buf&amp;lt;/font&amp;gt; member function&lt;br /&gt;
should be passed a pointer to values stored in a contiguous piece of&lt;br /&gt;
memory. For example, when &amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; is called to read a variable&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;byte-array&amp;lt;/font&amp;gt;, it must determine how much memory to allocate to&lt;br /&gt;
hold that much information, use &amp;lt;font color=&#039;green&#039;&amp;gt;new&amp;lt;/font&amp;gt; to allocate an adequate&lt;br /&gt;
amount of memory, use the dataset&#039;s API calls to read&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;byte-array&amp;lt;/font&amp;gt; into the newly allocated memory and then pass that&lt;br /&gt;
memory to &amp;lt;font color=&#039;green&#039;&amp;gt;val2buf&amp;lt;/font&amp;gt;. This same procedure can be followed for all&lt;br /&gt;
the simple types.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
However, when reading an array of Structure, for example, the&lt;br /&gt;
values must be stored in the OPeNDAP Array object one at a time&lt;br /&gt;
using the Array member function &amp;lt;font color=&#039;green&#039;&amp;gt;set_vec&amp;lt;/font&amp;gt;. An&lt;br /&gt;
Array  object containing a 3x4 array of  Structure&lt;br /&gt;
objects will actually point to 12 different instances of that class.&lt;br /&gt;
An Array  object containing  Byte objects contains&lt;br /&gt;
only one instance of the Byte class, as a template for the&lt;br /&gt;
array elements.&lt;br /&gt;
&lt;br /&gt;
Arrays in OPeNDAP are unlike arrays in C in that an array object may have&lt;br /&gt;
more than one dimension. In terms of the way a value is stored,&lt;br /&gt;
however, an Array is a single dimensional object. When an Array is&lt;br /&gt;
declared as having two or more dimensions, those are mapped onto a&lt;br /&gt;
single vector. To access the element A_ij of array &#039;&#039;A&#039;&#039; , you&lt;br /&gt;
must know the size of the first dimension, &#039;&#039;I&#039;&#039; , and use the&lt;br /&gt;
expression i * I + j to compute the offset into the vector.&lt;br /&gt;
&lt;br /&gt;
Since the class List is a single dimension array without&lt;br /&gt;
&#039;&#039;declared&#039;&#039;  size (the size of each value of the List object is&lt;br /&gt;
stored in the object) the rules for Array&#039;s read member&lt;br /&gt;
function apply.&lt;br /&gt;
&lt;br /&gt;
===Sub-classing the Compound Types===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; member function of the compound data types simply&lt;br /&gt;
iterates over the contained variables calling their &amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; member functions. In the future, this definition will move into the supplied&lt;br /&gt;
classes (That is, &amp;lt;font color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; will no longer be a abstract member&lt;br /&gt;
function for the compound types.).&lt;br /&gt;
&lt;br /&gt;
The two constructor types Sequence and Function are different from all&lt;br /&gt;
the other types in the DAP in that they have &#039;&#039;state&#039;&#039; . That is, the&lt;br /&gt;
value of a sequence depends on how many values have been read&lt;br /&gt;
previously.  This is very different from an array where the i^{th}&lt;br /&gt;
element has the same value regardless of what has happened&lt;br /&gt;
before. When you write implementations for &amp;lt;font&lt;br /&gt;
color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; in the Sequence and Function classes, you&lt;br /&gt;
must be sure to write those member functions so that they can be&lt;br /&gt;
called repeatedly and that each call to read returns the next value of&lt;br /&gt;
the corresponding data Sequence or Function.&lt;br /&gt;
&lt;br /&gt;
This is true because the constraint expression evaluator must be able&lt;br /&gt;
to apply certain constraints to values of individual sequence elements&lt;br /&gt;
and is actually implemented in the DDS class by first calling the read&lt;br /&gt;
member function, evaluating the constraint expression based on the&lt;br /&gt;
values and, if the constraint expression is satisfied, calling the&lt;br /&gt;
serialize member function.  See the member function &amp;lt;font&lt;br /&gt;
color=&#039;green&#039;&amp;gt;DDS::send&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If, for some reason, it is not possible to write &amp;lt;font&lt;br /&gt;
color=&#039;green&#039;&amp;gt;read&amp;lt;/font&amp;gt; so that it gets called once for each&lt;br /&gt;
sequence value, then you must&lt;br /&gt;
re-implement &amp;lt;font color=&#039;green&#039;&amp;gt;DDS::send&amp;lt;/font&amp;gt; so that its&lt;br /&gt;
functions are performed. For example, you could implement &amp;lt;font&lt;br /&gt;
color=&#039;green&#039;&amp;gt;Sequence::read&amp;lt;/font&amp;gt; so that the entire sequence is&lt;br /&gt;
read in and overload &amp;lt;font color=&#039;green&#039;&amp;gt;Sequence::serialize&amp;lt;/font&amp;gt;&lt;br /&gt;
and &amp;lt;font color=&#039;green&#039;&amp;gt;Sequence::deserialize&amp;lt;/font&amp;gt; so that the next&lt;br /&gt;
set of values are sent/received. You would then build a send that&lt;br /&gt;
called the &amp;lt;font color=&#039;green&#039;&amp;gt;Sequence::read&amp;lt;/font&amp;gt; member function&lt;br /&gt;
once and extracted each successive value, evaluated the constraint&lt;br /&gt;
expression using on that value and used the result of that evaluation&lt;br /&gt;
to determine whether to send the value or not.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=LibdapConnectClasses&amp;diff=4924</id>
		<title>LibdapConnectClasses</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=LibdapConnectClasses&amp;diff=4924"/>
		<updated>2009-10-06T21:30:44Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: New page: =Managing Connections=   Because OPeNDAP uses a communication protocol (http) that does not maintain state information about the link between two processes, these connections are virtual, ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Managing Connections=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Because OPeNDAP uses a communication protocol (http) that does not&lt;br /&gt;
maintain state information about the link between two processes, these&lt;br /&gt;
connections are virtual, and all the information about them is&lt;br /&gt;
maintained by the client.  Libdap contains two classes to help&lt;br /&gt;
clients manage connections to one or more OPeNDAP servers.  One class,&lt;br /&gt;
&#039;&#039;Connect&#039;&#039;, stores information used when a connection is&lt;br /&gt;
established. It also allows a program to provide local access to data&lt;br /&gt;
(without a OPeNDAP data server).&lt;br /&gt;
&lt;br /&gt;
The second class, &#039;&#039;Connections&#039;&#039;,&lt;br /&gt;
manages instances of the Connect class. It provides a&lt;br /&gt;
mechanism for the client libraries to pass back to user programs the&lt;br /&gt;
type of object (such as &amp;lt;font color=&#039;green&#039;&amp;gt;int&amp;lt;/font&amp;gt;, opaque pointer, dots) they expect and then to use one of those objects to access the correct instance of&lt;br /&gt;
Connect .  Connections is a template class. That is, a client library uses the Connections class to make an array of some sub-class of Connect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Connect==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Connect class manages a connection to either a remote&lt;br /&gt;
data set, via an OPeNDAP data server, or a local access. For each data set&lt;br /&gt;
or file that the user program opens, there must be exactly one&lt;br /&gt;
instance of Connect. Because information needed for local&lt;br /&gt;
access is stored in an instance of Connect, this class may&lt;br /&gt;
also be used (sub-classed) for each client API that needs to maintain&lt;br /&gt;
additional information about the connection.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:Connect.gif|actual size]] &lt;br /&gt;
&lt;br /&gt;
The Connect Class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
The Connect class is illustrated in [[:Image:Connect.gif|above]].&lt;br /&gt;
These objects contain the following information: &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
; URL : The URL with which the client library opens the connection with the OPeNDAP server.&lt;br /&gt;
&lt;br /&gt;
; DDS  : The  DDS of the opened dataset.  This must be retrieved from the dataset.&lt;br /&gt;
&lt;br /&gt;
; DAS  : The  DAS of the opened dataset.  This must be retrieved from the dataset.&lt;br /&gt;
&lt;br /&gt;
; Gui  : The  Gui object indicates a graphical widget on the client platform that displays information about the data transfer in progress.&lt;br /&gt;
&lt;br /&gt;
; Error  : The  Error object contains information used to help the client process an error message from the server.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
The Connect class provides member functions to get the dataset&#039;s DAS ,&lt;br /&gt;
DDS and data. The instance of Connect  (or a subclass of  Connect)&lt;br /&gt;
stores the URL as the user provides it. &lt;br /&gt;
&lt;br /&gt;
When the client library receives a URL via its &amp;quot;open&amp;quot; call, it passes&lt;br /&gt;
that URL to the Connect member functions like &amp;lt;font&lt;br /&gt;
color=&#039;green&#039;&amp;gt;request_das&amp;lt;/font&amp;gt; and &amp;lt;font&lt;br /&gt;
color=&#039;green&#039;&amp;gt;request_dds&amp;lt;/font&amp;gt;. These member functions append an&lt;br /&gt;
appropriate extension (&amp;lt;font color=&#039;green&#039;&amp;gt;.das&amp;lt;/font&amp;gt; and &amp;lt;font&lt;br /&gt;
color=&#039;green&#039;&amp;gt;.dds&amp;lt;/font&amp;gt;, for example) onto the URL and retrieve the&lt;br /&gt;
resulting information from the server, the DAS or DDS for the dataset.&lt;br /&gt;
&lt;br /&gt;
If you are re-implementing an API and must support function calls that&lt;br /&gt;
modify how data is accessed (e.g., by creating array slices or by&lt;br /&gt;
choosing one of a set of variables), then you will need to translate&lt;br /&gt;
those requests into a OPeNDAP constraint expression. You would then pass&lt;br /&gt;
these synthesized constraint expressions to the&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;Connect::request_data&amp;lt;/font&amp;gt; member function.&lt;br /&gt;
&lt;br /&gt;
The specialized version of Connect is the place to put state&lt;br /&gt;
information needed by a recoded API or other client.  This can be&lt;br /&gt;
used, for example, to emulate an API that maintains a list of open&lt;br /&gt;
files.&lt;br /&gt;
&lt;br /&gt;
==Connections==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The class Connections is used to manage a set of instances of&lt;br /&gt;
the class Connect by providing a means to map an index or&lt;br /&gt;
opaque pointer to an instance of Connect.&lt;br /&gt;
&lt;br /&gt;
When a new instance of Connect (or a descendent) is created, it is added to&lt;br /&gt;
the Connections object using the &amp;lt;font&lt;br /&gt;
color=&#039;green&#039;&amp;gt;add_connect&amp;lt;/font&amp;gt; member function. &amp;lt;font&lt;br /&gt;
color=&#039;green&#039;&amp;gt;add_connect&amp;lt;/font&amp;gt; returns an integer that can be used&lt;br /&gt;
to access that instance of Connect at any time. Similarly, when an&lt;br /&gt;
instance of Connect is to be deleted, the object can be referred to&lt;br /&gt;
via the Connections object and this index.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Libdap_Overview&amp;diff=4923</id>
		<title>Libdap Overview</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Libdap_Overview&amp;diff=4923"/>
		<updated>2009-10-06T21:25:47Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can use the libdap C++ implementation of the OPeNDAP client protocol to create your own OPeNDAP client.  Refer to the [http://www.opendap.org/api/pref/html/index.html C++ library reference] for details about each of the classes in the library.  The sections below provide short overviews of how to use the library classes.&lt;br /&gt;
&lt;br /&gt;
;[[LibdapConnectClasses|Connect Classes]]&lt;br /&gt;
:For managing the connection between the client and the server.&lt;br /&gt;
&lt;br /&gt;
;[[LibdapDataClasses|Data Classes]]&lt;br /&gt;
:For managing the returned data.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Libdap_Overview&amp;diff=4922</id>
		<title>Libdap Overview</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Libdap_Overview&amp;diff=4922"/>
		<updated>2009-10-06T21:24:33Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: New page: You can use the libdap C++ implementation of the OPeNDAP client protocol to create your own OPeNDAP client.  Refer to the [http://www.opendap.org/api/pref/html/index.html C++ library refer...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can use the libdap C++ implementation of the OPeNDAP client protocol to create your own OPeNDAP client.  Refer to the [http://www.opendap.org/api/pref/html/index.html C++ library reference] for details about each of the classes in the library.  The sections below provide short overviews of how to use the library classes.&lt;br /&gt;
&lt;br /&gt;
[LibdapConnectClasses]&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideClient&amp;diff=4921</id>
		<title>UserGuideClient</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideClient&amp;diff=4921"/>
		<updated>2009-10-06T21:19:44Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: /* Python library */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=The OPeNDAP Client=&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP client is the program that sends a message to an OPeNDAP&lt;br /&gt;
server in order to get some data, or other information.  &lt;br /&gt;
&lt;br /&gt;
An OPeNDAP client is usually just a data analysis application program&lt;br /&gt;
modified to become a web browser, somewhat like any other web browser&lt;br /&gt;
with which you may be familiar. A web browser can only display the&lt;br /&gt;
data it receives, however. What makes an OPeNDAP client different from&lt;br /&gt;
another web browser is that once the data has been received from an&lt;br /&gt;
OPeNDAP server, the OPeNDAP client application can compute with it.&lt;br /&gt;
&lt;br /&gt;
Like a web browser, an OPeNDAP client accepts a URL from a user, and&lt;br /&gt;
sends a message to that address, asking for the information specified&lt;br /&gt;
in the the URL. Unlike a typical web browser, an OPeNDAP client will&lt;br /&gt;
not know what to do with data returned for a web page containing text&lt;br /&gt;
and pictures, but an OPeNDAP server will return scientific data that&lt;br /&gt;
an OPeNDAP client can understand and process.&lt;br /&gt;
&lt;br /&gt;
There is a wide range of OPeNDAP clients available, and it should not&lt;br /&gt;
be hard to find one you can use.&lt;br /&gt;
&lt;br /&gt;
In fact, though it can become clumsy for advanced applications, you&lt;br /&gt;
can use an ordinary web browser as a client to most OPeNDAP servers,&lt;br /&gt;
making use of the server&#039;s&lt;br /&gt;
[[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]].  The&lt;br /&gt;
[[QuickStart|Quick Start Guide]] contains many examples of exactly&lt;br /&gt;
this.&lt;br /&gt;
&lt;br /&gt;
After a basic web browser, the simplest clients to use are likely to&lt;br /&gt;
be the programs you&#039;re already using.  If you use one of the popular&lt;br /&gt;
data analysis environments like Matlab or IDL, you can find a client&lt;br /&gt;
command you can incorporate into your environment to let you call&lt;br /&gt;
OPeNDAP data directly into your working data.  If you use one of the&lt;br /&gt;
netCDF-based packages, like GrADS or Ferret, you can get a&lt;br /&gt;
network-enabled version of the program that will work with OPeNDAP&lt;br /&gt;
URLs just as well as file names.&lt;br /&gt;
&lt;br /&gt;
If none of those options work for you, there is a whole range of&lt;br /&gt;
client libraries you can use to develop a client of your own.  Several&lt;br /&gt;
of these are supported by the OPeNDAP project, and there are others&lt;br /&gt;
out there in the world supported by other groups.&lt;br /&gt;
&lt;br /&gt;
This page provides a list and very brief overview of the various&lt;br /&gt;
options, along with pointers to places you can find more information&lt;br /&gt;
about each one.&lt;br /&gt;
&lt;br /&gt;
==Clients==&lt;br /&gt;
&lt;br /&gt;
OPeNDAP clients come in a variety of forms.  The simplest are web&lt;br /&gt;
browsers, who use the OPeNDAP&lt;br /&gt;
[[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]] and&lt;br /&gt;
the [[[[UserGuideOPeNDAPMessages#ASCII_Service|ASCII response]] to&lt;br /&gt;
check out data sets and download data.&lt;br /&gt;
&lt;br /&gt;
Beyond these, there are three categories of client.  The first contains&lt;br /&gt;
clients you can use in conjunction with one of the popular data&lt;br /&gt;
analysis environments, the second is a collection of command-line&lt;br /&gt;
clients useful for scripting as well as testing, and the third&lt;br /&gt;
contains a set of API libraries you can use for developing your own&lt;br /&gt;
client, or for converting an existing body of code into an OPeNDAP&lt;br /&gt;
client.  These are reviewed in that order below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Matlab, IDL, Ferret, GrADS===&lt;br /&gt;
&lt;br /&gt;
To use OPeNDAP with Matlab or IDL, you&#039;ll need the client for each.&lt;br /&gt;
This is a special program that issues a request for data from an&lt;br /&gt;
OPeNDAP server, and imports it into the environment.  Links to &lt;br /&gt;
[http://opendap.org/download/ml-structs.html the Matlab client] and&lt;br /&gt;
[http://opendap.org/download/idl-client.html the IDL client] can be&lt;br /&gt;
found on the [http;//opendap.org/download/index.html OPeNDAP software&lt;br /&gt;
download page].&lt;br /&gt;
&lt;br /&gt;
Using OPeNDAP data with the &lt;br /&gt;
[http://www.iges.org/grads GrADS] or&lt;br /&gt;
[http://ferret.wrc.noaa.gov/Ferret Ferret] packages is even easier.&lt;br /&gt;
Because these packages are based on the netCDF library, and because&lt;br /&gt;
that library now supports reading OPeNDAP data sets, these packages&lt;br /&gt;
can read OPeNDAP URLs as easily as they read local files.&lt;br /&gt;
&lt;br /&gt;
Special note.  If you&#039;re using the Matlab client, and using it for&lt;br /&gt;
oceanographic data, you may be interested in the graphical user&lt;br /&gt;
interface available for it.  See [http://oceanographicdata.org/toolbox&lt;br /&gt;
Matlab OPeNDAP Ocean Toolbox].&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
There are a couple of command-line clients out there you can use,&lt;br /&gt;
though most people only use them for testing.  Part of the libdap&lt;br /&gt;
distribution (the C++ interface) is a program called getdap, which&lt;br /&gt;
takes an OPeNDAP URL as a command-line argument and returns the reply&lt;br /&gt;
to standard output.  This is typically used to check that the libdap&lt;br /&gt;
C++ library is properly compiled, but you can also use it to retrieve&lt;br /&gt;
data. &lt;br /&gt;
&lt;br /&gt;
Part of the OPeNDAP C library is a command-line client called octest.&lt;br /&gt;
This allows you to type commands to manipulate responses to an OPeNDAP&lt;br /&gt;
URL.  Like the C++ test program, this can be construed as a test of&lt;br /&gt;
the library or a test of the servers, but it can also be used as a&lt;br /&gt;
command-line client, perhaps as an aid to automation.&lt;br /&gt;
&lt;br /&gt;
Similar programs are part of the netCDF distribution.  The ncdump&lt;br /&gt;
program outputs a &amp;quot;dump&amp;quot; of a netCDF file, and ncview provides a&lt;br /&gt;
better-formatted look at such a file.  Since the standard netCDF&lt;br /&gt;
library can be linked to the OPeNDAP libraries, both these programs&lt;br /&gt;
can be readily aquired in their OPeNDAP-enabled form.&lt;br /&gt;
&lt;br /&gt;
Here is a simple example, using the ncview program. This program&lt;br /&gt;
simply prints out the contents of a netCDF formatted data file,&lt;br /&gt;
specified on the command line, like this:  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; ncdump fnocl.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using OPeNDAP, this same function may be executed from any computer&lt;br /&gt;
connected to the Internet by substituting a URL for the filename&lt;br /&gt;
above: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; ncdump http://dods.gso.uri.edu/cgi-bin/nc/data/fnocl.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Aside from the fact that the data is remote, and must be specified&lt;br /&gt;
with a URL, the program will seem to function in the same way it had&lt;br /&gt;
with the simple netCDF library (albeit somewhat more slowly due to&lt;br /&gt;
having to make network connections instead of local file&lt;br /&gt;
operations).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
netcdf fnocl {&lt;br /&gt;
dimensions:&lt;br /&gt;
    time_a = 16&lt;br /&gt;
    lat = 17 ;&lt;br /&gt;
    lon = 21 ;&lt;br /&gt;
    time = 16 ;&lt;br /&gt;
&lt;br /&gt;
variables:&lt;br /&gt;
    long u(time_a, lat, ion) ; &lt;br /&gt;
        u:units = ``meter per second&#039;&#039; ; &lt;br /&gt;
        u:long_name = ``Vector wind eastward component&#039;&#039; ; &lt;br /&gt;
        u:missing_value = ``-32767&#039;&#039; ; &lt;br /&gt;
        u:scale_factor = ``0.005&#039;&#039; ; &lt;br /&gt;
    long v(time_a, lat, ion) ; &lt;br /&gt;
        v:units = ``meter per second&#039;&#039; ;&lt;br /&gt;
        v:long_name = ``Vector wind northward component&#039;&#039; ;&lt;br /&gt;
        v:missing_value = ``-32767&#039;&#039; ;&lt;br /&gt;
        v:scale_factor = ``0.005&#039;&#039; ; &lt;br /&gt;
    double lat(lat) ;&lt;br /&gt;
        lat:units = ``degree North&#039;&#039; ;&lt;br /&gt;
    double lon(lon) ;&lt;br /&gt;
        lon:units = ``degree East&#039;&#039; ; &lt;br /&gt;
    double time(time) ;&lt;br /&gt;
        time:units = ``hours from base_time&#039;&#039; ;&lt;br /&gt;
&lt;br /&gt;
// global attributes: &lt;br /&gt;
        :base_time = ``88- 10-00:00:00&#039;&#039; ; &lt;br /&gt;
        :title = ``FNOC UV wind components &lt;br /&gt;
                           from 1988- 10 to 1988- 13.&#039;&#039; ;&lt;br /&gt;
data:&lt;br /&gt;
 u =&lt;br /&gt;
  -1728, -2449, -3099, -3585, -3254, -2406, -1252,&lt;br /&gt;
    662, 2483, 2910, 2819, 2946, 2745, 2734,&lt;br /&gt;
  2931, 2601, 2139, 1845, 1754, 1897, 1854, -1686,&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Client Libraries===&lt;br /&gt;
&lt;br /&gt;
Several libraries exist that you can link with other software to&lt;br /&gt;
create an OPeNDAP client.  Some of these are provided by the OPeNDAP&lt;br /&gt;
project itself, and some are projects of other groups.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP libraries are functional equivalents of each other.  They&lt;br /&gt;
are derived from separate code bases, but they do the same thing.&lt;br /&gt;
They are provided in different languages for the convenience of the&lt;br /&gt;
implementer. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====C++ Client Library====&lt;br /&gt;
&lt;br /&gt;
The [http://opendap.org/download/libdap++.html C++ library], also&lt;br /&gt;
called libdap, was the original client implementation of the OPeNDAP&lt;br /&gt;
protocol.  It provides classes to manage the connection between a&lt;br /&gt;
client and a data source, as well as classes for each of the data&lt;br /&gt;
types, and the other information (such as DAS and DDS) a client will&lt;br /&gt;
encounter. &lt;br /&gt;
&lt;br /&gt;
Consult the [[libdap Overview]] for an introduction to the basic&lt;br /&gt;
concepts behind the use of this library.  You will also find the &lt;br /&gt;
[http://www.opendap.org/api/pref/html/index.html C++ library Reference] useful.&lt;br /&gt;
&lt;br /&gt;
====C Client Library====&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group supports a C library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Java Client Library====&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group supports a Java library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====netCDF API Library====&lt;br /&gt;
&lt;br /&gt;
The [http://www.unidata.ucar.edu/software/netcdf netCDF library]&lt;br /&gt;
deserves special note.  This is a drop-in replacement for the standard&lt;br /&gt;
netCDF library.  (In fact, as of release 4.0, it &#039;&#039;is&#039;&#039; the standard&lt;br /&gt;
netCDF library.)  This means that converting a program that depends on&lt;br /&gt;
the netCDF API to use OPeNDAP is as simple as re-linking with an&lt;br /&gt;
updated version of the netCDF library.&lt;br /&gt;
&lt;br /&gt;
See the [http://www.unidata.ucar.edu/software/netcdf netCDF home page]&lt;br /&gt;
for information about how to use that library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Python library====&lt;br /&gt;
&lt;br /&gt;
[http://pydap.org Pydap] is an implementation of the OPeNDAP client in&lt;br /&gt;
pure Python.  This is tremendously useful for scripting complicated&lt;br /&gt;
applications with lots of download steps.  This is not supported by&lt;br /&gt;
the OPeNDAP group, so please refer to the [http://pydap.org Pydap site] for more information about it.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideClient&amp;diff=4920</id>
		<title>UserGuideClient</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideClient&amp;diff=4920"/>
		<updated>2009-10-06T21:19:24Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: /* C++ Client Library */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=The OPeNDAP Client=&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP client is the program that sends a message to an OPeNDAP&lt;br /&gt;
server in order to get some data, or other information.  &lt;br /&gt;
&lt;br /&gt;
An OPeNDAP client is usually just a data analysis application program&lt;br /&gt;
modified to become a web browser, somewhat like any other web browser&lt;br /&gt;
with which you may be familiar. A web browser can only display the&lt;br /&gt;
data it receives, however. What makes an OPeNDAP client different from&lt;br /&gt;
another web browser is that once the data has been received from an&lt;br /&gt;
OPeNDAP server, the OPeNDAP client application can compute with it.&lt;br /&gt;
&lt;br /&gt;
Like a web browser, an OPeNDAP client accepts a URL from a user, and&lt;br /&gt;
sends a message to that address, asking for the information specified&lt;br /&gt;
in the the URL. Unlike a typical web browser, an OPeNDAP client will&lt;br /&gt;
not know what to do with data returned for a web page containing text&lt;br /&gt;
and pictures, but an OPeNDAP server will return scientific data that&lt;br /&gt;
an OPeNDAP client can understand and process.&lt;br /&gt;
&lt;br /&gt;
There is a wide range of OPeNDAP clients available, and it should not&lt;br /&gt;
be hard to find one you can use.&lt;br /&gt;
&lt;br /&gt;
In fact, though it can become clumsy for advanced applications, you&lt;br /&gt;
can use an ordinary web browser as a client to most OPeNDAP servers,&lt;br /&gt;
making use of the server&#039;s&lt;br /&gt;
[[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]].  The&lt;br /&gt;
[[QuickStart|Quick Start Guide]] contains many examples of exactly&lt;br /&gt;
this.&lt;br /&gt;
&lt;br /&gt;
After a basic web browser, the simplest clients to use are likely to&lt;br /&gt;
be the programs you&#039;re already using.  If you use one of the popular&lt;br /&gt;
data analysis environments like Matlab or IDL, you can find a client&lt;br /&gt;
command you can incorporate into your environment to let you call&lt;br /&gt;
OPeNDAP data directly into your working data.  If you use one of the&lt;br /&gt;
netCDF-based packages, like GrADS or Ferret, you can get a&lt;br /&gt;
network-enabled version of the program that will work with OPeNDAP&lt;br /&gt;
URLs just as well as file names.&lt;br /&gt;
&lt;br /&gt;
If none of those options work for you, there is a whole range of&lt;br /&gt;
client libraries you can use to develop a client of your own.  Several&lt;br /&gt;
of these are supported by the OPeNDAP project, and there are others&lt;br /&gt;
out there in the world supported by other groups.&lt;br /&gt;
&lt;br /&gt;
This page provides a list and very brief overview of the various&lt;br /&gt;
options, along with pointers to places you can find more information&lt;br /&gt;
about each one.&lt;br /&gt;
&lt;br /&gt;
==Clients==&lt;br /&gt;
&lt;br /&gt;
OPeNDAP clients come in a variety of forms.  The simplest are web&lt;br /&gt;
browsers, who use the OPeNDAP&lt;br /&gt;
[[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]] and&lt;br /&gt;
the [[[[UserGuideOPeNDAPMessages#ASCII_Service|ASCII response]] to&lt;br /&gt;
check out data sets and download data.&lt;br /&gt;
&lt;br /&gt;
Beyond these, there are three categories of client.  The first contains&lt;br /&gt;
clients you can use in conjunction with one of the popular data&lt;br /&gt;
analysis environments, the second is a collection of command-line&lt;br /&gt;
clients useful for scripting as well as testing, and the third&lt;br /&gt;
contains a set of API libraries you can use for developing your own&lt;br /&gt;
client, or for converting an existing body of code into an OPeNDAP&lt;br /&gt;
client.  These are reviewed in that order below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Matlab, IDL, Ferret, GrADS===&lt;br /&gt;
&lt;br /&gt;
To use OPeNDAP with Matlab or IDL, you&#039;ll need the client for each.&lt;br /&gt;
This is a special program that issues a request for data from an&lt;br /&gt;
OPeNDAP server, and imports it into the environment.  Links to &lt;br /&gt;
[http://opendap.org/download/ml-structs.html the Matlab client] and&lt;br /&gt;
[http://opendap.org/download/idl-client.html the IDL client] can be&lt;br /&gt;
found on the [http;//opendap.org/download/index.html OPeNDAP software&lt;br /&gt;
download page].&lt;br /&gt;
&lt;br /&gt;
Using OPeNDAP data with the &lt;br /&gt;
[http://www.iges.org/grads GrADS] or&lt;br /&gt;
[http://ferret.wrc.noaa.gov/Ferret Ferret] packages is even easier.&lt;br /&gt;
Because these packages are based on the netCDF library, and because&lt;br /&gt;
that library now supports reading OPeNDAP data sets, these packages&lt;br /&gt;
can read OPeNDAP URLs as easily as they read local files.&lt;br /&gt;
&lt;br /&gt;
Special note.  If you&#039;re using the Matlab client, and using it for&lt;br /&gt;
oceanographic data, you may be interested in the graphical user&lt;br /&gt;
interface available for it.  See [http://oceanographicdata.org/toolbox&lt;br /&gt;
Matlab OPeNDAP Ocean Toolbox].&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
There are a couple of command-line clients out there you can use,&lt;br /&gt;
though most people only use them for testing.  Part of the libdap&lt;br /&gt;
distribution (the C++ interface) is a program called getdap, which&lt;br /&gt;
takes an OPeNDAP URL as a command-line argument and returns the reply&lt;br /&gt;
to standard output.  This is typically used to check that the libdap&lt;br /&gt;
C++ library is properly compiled, but you can also use it to retrieve&lt;br /&gt;
data. &lt;br /&gt;
&lt;br /&gt;
Part of the OPeNDAP C library is a command-line client called octest.&lt;br /&gt;
This allows you to type commands to manipulate responses to an OPeNDAP&lt;br /&gt;
URL.  Like the C++ test program, this can be construed as a test of&lt;br /&gt;
the library or a test of the servers, but it can also be used as a&lt;br /&gt;
command-line client, perhaps as an aid to automation.&lt;br /&gt;
&lt;br /&gt;
Similar programs are part of the netCDF distribution.  The ncdump&lt;br /&gt;
program outputs a &amp;quot;dump&amp;quot; of a netCDF file, and ncview provides a&lt;br /&gt;
better-formatted look at such a file.  Since the standard netCDF&lt;br /&gt;
library can be linked to the OPeNDAP libraries, both these programs&lt;br /&gt;
can be readily aquired in their OPeNDAP-enabled form.&lt;br /&gt;
&lt;br /&gt;
Here is a simple example, using the ncview program. This program&lt;br /&gt;
simply prints out the contents of a netCDF formatted data file,&lt;br /&gt;
specified on the command line, like this:  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; ncdump fnocl.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using OPeNDAP, this same function may be executed from any computer&lt;br /&gt;
connected to the Internet by substituting a URL for the filename&lt;br /&gt;
above: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; ncdump http://dods.gso.uri.edu/cgi-bin/nc/data/fnocl.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Aside from the fact that the data is remote, and must be specified&lt;br /&gt;
with a URL, the program will seem to function in the same way it had&lt;br /&gt;
with the simple netCDF library (albeit somewhat more slowly due to&lt;br /&gt;
having to make network connections instead of local file&lt;br /&gt;
operations).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
netcdf fnocl {&lt;br /&gt;
dimensions:&lt;br /&gt;
    time_a = 16&lt;br /&gt;
    lat = 17 ;&lt;br /&gt;
    lon = 21 ;&lt;br /&gt;
    time = 16 ;&lt;br /&gt;
&lt;br /&gt;
variables:&lt;br /&gt;
    long u(time_a, lat, ion) ; &lt;br /&gt;
        u:units = ``meter per second&#039;&#039; ; &lt;br /&gt;
        u:long_name = ``Vector wind eastward component&#039;&#039; ; &lt;br /&gt;
        u:missing_value = ``-32767&#039;&#039; ; &lt;br /&gt;
        u:scale_factor = ``0.005&#039;&#039; ; &lt;br /&gt;
    long v(time_a, lat, ion) ; &lt;br /&gt;
        v:units = ``meter per second&#039;&#039; ;&lt;br /&gt;
        v:long_name = ``Vector wind northward component&#039;&#039; ;&lt;br /&gt;
        v:missing_value = ``-32767&#039;&#039; ;&lt;br /&gt;
        v:scale_factor = ``0.005&#039;&#039; ; &lt;br /&gt;
    double lat(lat) ;&lt;br /&gt;
        lat:units = ``degree North&#039;&#039; ;&lt;br /&gt;
    double lon(lon) ;&lt;br /&gt;
        lon:units = ``degree East&#039;&#039; ; &lt;br /&gt;
    double time(time) ;&lt;br /&gt;
        time:units = ``hours from base_time&#039;&#039; ;&lt;br /&gt;
&lt;br /&gt;
// global attributes: &lt;br /&gt;
        :base_time = ``88- 10-00:00:00&#039;&#039; ; &lt;br /&gt;
        :title = ``FNOC UV wind components &lt;br /&gt;
                           from 1988- 10 to 1988- 13.&#039;&#039; ;&lt;br /&gt;
data:&lt;br /&gt;
 u =&lt;br /&gt;
  -1728, -2449, -3099, -3585, -3254, -2406, -1252,&lt;br /&gt;
    662, 2483, 2910, 2819, 2946, 2745, 2734,&lt;br /&gt;
  2931, 2601, 2139, 1845, 1754, 1897, 1854, -1686,&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Client Libraries===&lt;br /&gt;
&lt;br /&gt;
Several libraries exist that you can link with other software to&lt;br /&gt;
create an OPeNDAP client.  Some of these are provided by the OPeNDAP&lt;br /&gt;
project itself, and some are projects of other groups.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP libraries are functional equivalents of each other.  They&lt;br /&gt;
are derived from separate code bases, but they do the same thing.&lt;br /&gt;
They are provided in different languages for the convenience of the&lt;br /&gt;
implementer. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====C++ Client Library====&lt;br /&gt;
&lt;br /&gt;
The [http://opendap.org/download/libdap++.html C++ library], also&lt;br /&gt;
called libdap, was the original client implementation of the OPeNDAP&lt;br /&gt;
protocol.  It provides classes to manage the connection between a&lt;br /&gt;
client and a data source, as well as classes for each of the data&lt;br /&gt;
types, and the other information (such as DAS and DDS) a client will&lt;br /&gt;
encounter. &lt;br /&gt;
&lt;br /&gt;
Consult the [[libdap Overview]] for an introduction to the basic&lt;br /&gt;
concepts behind the use of this library.  You will also find the &lt;br /&gt;
[http://www.opendap.org/api/pref/html/index.html C++ library Reference] useful.&lt;br /&gt;
&lt;br /&gt;
====C Client Library====&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group supports a C library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Java Client Library====&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group supports a Java library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====netCDF API Library====&lt;br /&gt;
&lt;br /&gt;
The [http://www.unidata.ucar.edu/software/netcdf netCDF library]&lt;br /&gt;
deserves special note.  This is a drop-in replacement for the standard&lt;br /&gt;
netCDF library.  (In fact, as of release 4.0, it &#039;&#039;is&#039;&#039; the standard&lt;br /&gt;
netCDF library.)  This means that converting a program that depends on&lt;br /&gt;
the netCDF API to use OPeNDAP is as simple as re-linking with an&lt;br /&gt;
updated version of the netCDF library.&lt;br /&gt;
&lt;br /&gt;
See the [http://www.unidata.ucar.edu/software/netcdf netCDF home page]&lt;br /&gt;
for information about how to use that library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Python library====&lt;br /&gt;
&lt;br /&gt;
[http://pydap.org Pydap] is an implementation of the OPeNDAP client in&lt;br /&gt;
pure Python.  This is tremendously useful for scripting complicated&lt;br /&gt;
applications with lots of download steps.  This is not supported by&lt;br /&gt;
the OPeNDAP group, so please refer to the [http://pydap.org Pydap&lt;br /&gt;
site] for more information about it.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideClient&amp;diff=4919</id>
		<title>UserGuideClient</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideClient&amp;diff=4919"/>
		<updated>2009-10-06T21:18:11Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: New page: =The OPeNDAP Client=  The OPeNDAP client is the program that sends a message to an OPeNDAP server in order to get some data, or other information.    An OPeNDAP client is usually just a da...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=The OPeNDAP Client=&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP client is the program that sends a message to an OPeNDAP&lt;br /&gt;
server in order to get some data, or other information.  &lt;br /&gt;
&lt;br /&gt;
An OPeNDAP client is usually just a data analysis application program&lt;br /&gt;
modified to become a web browser, somewhat like any other web browser&lt;br /&gt;
with which you may be familiar. A web browser can only display the&lt;br /&gt;
data it receives, however. What makes an OPeNDAP client different from&lt;br /&gt;
another web browser is that once the data has been received from an&lt;br /&gt;
OPeNDAP server, the OPeNDAP client application can compute with it.&lt;br /&gt;
&lt;br /&gt;
Like a web browser, an OPeNDAP client accepts a URL from a user, and&lt;br /&gt;
sends a message to that address, asking for the information specified&lt;br /&gt;
in the the URL. Unlike a typical web browser, an OPeNDAP client will&lt;br /&gt;
not know what to do with data returned for a web page containing text&lt;br /&gt;
and pictures, but an OPeNDAP server will return scientific data that&lt;br /&gt;
an OPeNDAP client can understand and process.&lt;br /&gt;
&lt;br /&gt;
There is a wide range of OPeNDAP clients available, and it should not&lt;br /&gt;
be hard to find one you can use.&lt;br /&gt;
&lt;br /&gt;
In fact, though it can become clumsy for advanced applications, you&lt;br /&gt;
can use an ordinary web browser as a client to most OPeNDAP servers,&lt;br /&gt;
making use of the server&#039;s&lt;br /&gt;
[[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]].  The&lt;br /&gt;
[[QuickStart|Quick Start Guide]] contains many examples of exactly&lt;br /&gt;
this.&lt;br /&gt;
&lt;br /&gt;
After a basic web browser, the simplest clients to use are likely to&lt;br /&gt;
be the programs you&#039;re already using.  If you use one of the popular&lt;br /&gt;
data analysis environments like Matlab or IDL, you can find a client&lt;br /&gt;
command you can incorporate into your environment to let you call&lt;br /&gt;
OPeNDAP data directly into your working data.  If you use one of the&lt;br /&gt;
netCDF-based packages, like GrADS or Ferret, you can get a&lt;br /&gt;
network-enabled version of the program that will work with OPeNDAP&lt;br /&gt;
URLs just as well as file names.&lt;br /&gt;
&lt;br /&gt;
If none of those options work for you, there is a whole range of&lt;br /&gt;
client libraries you can use to develop a client of your own.  Several&lt;br /&gt;
of these are supported by the OPeNDAP project, and there are others&lt;br /&gt;
out there in the world supported by other groups.&lt;br /&gt;
&lt;br /&gt;
This page provides a list and very brief overview of the various&lt;br /&gt;
options, along with pointers to places you can find more information&lt;br /&gt;
about each one.&lt;br /&gt;
&lt;br /&gt;
==Clients==&lt;br /&gt;
&lt;br /&gt;
OPeNDAP clients come in a variety of forms.  The simplest are web&lt;br /&gt;
browsers, who use the OPeNDAP&lt;br /&gt;
[[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]] and&lt;br /&gt;
the [[[[UserGuideOPeNDAPMessages#ASCII_Service|ASCII response]] to&lt;br /&gt;
check out data sets and download data.&lt;br /&gt;
&lt;br /&gt;
Beyond these, there are three categories of client.  The first contains&lt;br /&gt;
clients you can use in conjunction with one of the popular data&lt;br /&gt;
analysis environments, the second is a collection of command-line&lt;br /&gt;
clients useful for scripting as well as testing, and the third&lt;br /&gt;
contains a set of API libraries you can use for developing your own&lt;br /&gt;
client, or for converting an existing body of code into an OPeNDAP&lt;br /&gt;
client.  These are reviewed in that order below:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Matlab, IDL, Ferret, GrADS===&lt;br /&gt;
&lt;br /&gt;
To use OPeNDAP with Matlab or IDL, you&#039;ll need the client for each.&lt;br /&gt;
This is a special program that issues a request for data from an&lt;br /&gt;
OPeNDAP server, and imports it into the environment.  Links to &lt;br /&gt;
[http://opendap.org/download/ml-structs.html the Matlab client] and&lt;br /&gt;
[http://opendap.org/download/idl-client.html the IDL client] can be&lt;br /&gt;
found on the [http;//opendap.org/download/index.html OPeNDAP software&lt;br /&gt;
download page].&lt;br /&gt;
&lt;br /&gt;
Using OPeNDAP data with the &lt;br /&gt;
[http://www.iges.org/grads GrADS] or&lt;br /&gt;
[http://ferret.wrc.noaa.gov/Ferret Ferret] packages is even easier.&lt;br /&gt;
Because these packages are based on the netCDF library, and because&lt;br /&gt;
that library now supports reading OPeNDAP data sets, these packages&lt;br /&gt;
can read OPeNDAP URLs as easily as they read local files.&lt;br /&gt;
&lt;br /&gt;
Special note.  If you&#039;re using the Matlab client, and using it for&lt;br /&gt;
oceanographic data, you may be interested in the graphical user&lt;br /&gt;
interface available for it.  See [http://oceanographicdata.org/toolbox&lt;br /&gt;
Matlab OPeNDAP Ocean Toolbox].&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
There are a couple of command-line clients out there you can use,&lt;br /&gt;
though most people only use them for testing.  Part of the libdap&lt;br /&gt;
distribution (the C++ interface) is a program called getdap, which&lt;br /&gt;
takes an OPeNDAP URL as a command-line argument and returns the reply&lt;br /&gt;
to standard output.  This is typically used to check that the libdap&lt;br /&gt;
C++ library is properly compiled, but you can also use it to retrieve&lt;br /&gt;
data. &lt;br /&gt;
&lt;br /&gt;
Part of the OPeNDAP C library is a command-line client called octest.&lt;br /&gt;
This allows you to type commands to manipulate responses to an OPeNDAP&lt;br /&gt;
URL.  Like the C++ test program, this can be construed as a test of&lt;br /&gt;
the library or a test of the servers, but it can also be used as a&lt;br /&gt;
command-line client, perhaps as an aid to automation.&lt;br /&gt;
&lt;br /&gt;
Similar programs are part of the netCDF distribution.  The ncdump&lt;br /&gt;
program outputs a &amp;quot;dump&amp;quot; of a netCDF file, and ncview provides a&lt;br /&gt;
better-formatted look at such a file.  Since the standard netCDF&lt;br /&gt;
library can be linked to the OPeNDAP libraries, both these programs&lt;br /&gt;
can be readily aquired in their OPeNDAP-enabled form.&lt;br /&gt;
&lt;br /&gt;
Here is a simple example, using the ncview program. This program&lt;br /&gt;
simply prints out the contents of a netCDF formatted data file,&lt;br /&gt;
specified on the command line, like this:  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; ncdump fnocl.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using OPeNDAP, this same function may be executed from any computer&lt;br /&gt;
connected to the Internet by substituting a URL for the filename&lt;br /&gt;
above: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; ncdump http://dods.gso.uri.edu/cgi-bin/nc/data/fnocl.nc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Aside from the fact that the data is remote, and must be specified&lt;br /&gt;
with a URL, the program will seem to function in the same way it had&lt;br /&gt;
with the simple netCDF library (albeit somewhat more slowly due to&lt;br /&gt;
having to make network connections instead of local file&lt;br /&gt;
operations).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
netcdf fnocl {&lt;br /&gt;
dimensions:&lt;br /&gt;
    time_a = 16&lt;br /&gt;
    lat = 17 ;&lt;br /&gt;
    lon = 21 ;&lt;br /&gt;
    time = 16 ;&lt;br /&gt;
&lt;br /&gt;
variables:&lt;br /&gt;
    long u(time_a, lat, ion) ; &lt;br /&gt;
        u:units = ``meter per second&#039;&#039; ; &lt;br /&gt;
        u:long_name = ``Vector wind eastward component&#039;&#039; ; &lt;br /&gt;
        u:missing_value = ``-32767&#039;&#039; ; &lt;br /&gt;
        u:scale_factor = ``0.005&#039;&#039; ; &lt;br /&gt;
    long v(time_a, lat, ion) ; &lt;br /&gt;
        v:units = ``meter per second&#039;&#039; ;&lt;br /&gt;
        v:long_name = ``Vector wind northward component&#039;&#039; ;&lt;br /&gt;
        v:missing_value = ``-32767&#039;&#039; ;&lt;br /&gt;
        v:scale_factor = ``0.005&#039;&#039; ; &lt;br /&gt;
    double lat(lat) ;&lt;br /&gt;
        lat:units = ``degree North&#039;&#039; ;&lt;br /&gt;
    double lon(lon) ;&lt;br /&gt;
        lon:units = ``degree East&#039;&#039; ; &lt;br /&gt;
    double time(time) ;&lt;br /&gt;
        time:units = ``hours from base_time&#039;&#039; ;&lt;br /&gt;
&lt;br /&gt;
// global attributes: &lt;br /&gt;
        :base_time = ``88- 10-00:00:00&#039;&#039; ; &lt;br /&gt;
        :title = ``FNOC UV wind components &lt;br /&gt;
                           from 1988- 10 to 1988- 13.&#039;&#039; ;&lt;br /&gt;
data:&lt;br /&gt;
 u =&lt;br /&gt;
  -1728, -2449, -3099, -3585, -3254, -2406, -1252,&lt;br /&gt;
    662, 2483, 2910, 2819, 2946, 2745, 2734,&lt;br /&gt;
  2931, 2601, 2139, 1845, 1754, 1897, 1854, -1686,&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Client Libraries===&lt;br /&gt;
&lt;br /&gt;
Several libraries exist that you can link with other software to&lt;br /&gt;
create an OPeNDAP client.  Some of these are provided by the OPeNDAP&lt;br /&gt;
project itself, and some are projects of other groups.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP libraries are functional equivalents of each other.  They&lt;br /&gt;
are derived from separate code bases, but they do the same thing.&lt;br /&gt;
They are provided in different languages for the convenience of the&lt;br /&gt;
implementer. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====C++ Client Library====&lt;br /&gt;
&lt;br /&gt;
The [http://opendap.org/download/libdap++.html C++ library], also&lt;br /&gt;
called libdap, was the original client implementation of the OPeNDAP&lt;br /&gt;
protocol.  It provides classes to manage the connection between a&lt;br /&gt;
client and a data source, as well as classes for each of the data&lt;br /&gt;
types, and the other information (such as DAS and DDS) a client will&lt;br /&gt;
encounter. &lt;br /&gt;
&lt;br /&gt;
Consult the [[libdap Overview]] for an introduction to the basic&lt;br /&gt;
concepts behind the use of this library.  You will also find the &lt;br /&gt;
[http://www.opendap.org/api/pref/html/index.html C++ library&lt;br /&gt;
Reference] useful.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====C Client Library====&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group supports a C library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Java Client Library====&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group supports a Java library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====netCDF API Library====&lt;br /&gt;
&lt;br /&gt;
The [http://www.unidata.ucar.edu/software/netcdf netCDF library]&lt;br /&gt;
deserves special note.  This is a drop-in replacement for the standard&lt;br /&gt;
netCDF library.  (In fact, as of release 4.0, it &#039;&#039;is&#039;&#039; the standard&lt;br /&gt;
netCDF library.)  This means that converting a program that depends on&lt;br /&gt;
the netCDF API to use OPeNDAP is as simple as re-linking with an&lt;br /&gt;
updated version of the netCDF library.&lt;br /&gt;
&lt;br /&gt;
See the [http://www.unidata.ucar.edu/software/netcdf netCDF home page]&lt;br /&gt;
for information about how to use that library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Python library====&lt;br /&gt;
&lt;br /&gt;
[http://pydap.org Pydap] is an implementation of the OPeNDAP client in&lt;br /&gt;
pure Python.  This is tremendously useful for scripting complicated&lt;br /&gt;
applications with lots of download steps.  This is not supported by&lt;br /&gt;
the OPeNDAP group, so please refer to the [http://pydap.org Pydap&lt;br /&gt;
site] for more information about it.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideServer&amp;diff=4915</id>
		<title>UserGuideServer</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideServer&amp;diff=4915"/>
		<updated>2009-10-06T17:11:51Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: /* Installing OLFS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[UserGuide|Back to User Guide Contents]]&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Server=&lt;br /&gt;
&lt;br /&gt;
Any server that responds to the messages described in &lt;br /&gt;
[[UserGuideOPeNDAPMessages|OPeNDAP Messages]] using the &lt;br /&gt;
[[UserGuideDataModel|OPeNDAP Data Model]] is an OPeNDAP server.  The&lt;br /&gt;
messages and the data model are published standards, available to&lt;br /&gt;
anyone to use.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group, in addition to publishing and maintaining the&lt;br /&gt;
standards described here, maintains a server that complies with the&lt;br /&gt;
standard.  This is [[Hyrax]].&lt;br /&gt;
&lt;br /&gt;
==Hyrax==&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group produces and supports [[Hyrax]], a modular data server&lt;br /&gt;
that can be used in a variety of ways to serve a wide variety of data&lt;br /&gt;
with OPeNDAP.&lt;br /&gt;
&lt;br /&gt;
Hyrax is flexible enough that it can serve data that currently exist&lt;br /&gt;
in a wide variety of data storage formats, ranging from HDF4 data&lt;br /&gt;
files to netCDF data to data in some arbitrary non-standard format&lt;br /&gt;
using the FreeForm module.&lt;br /&gt;
&lt;br /&gt;
Hyrax is modular, too, which means it can be outfitted to serve the&lt;br /&gt;
particular needs of your data without weighing down its performance&lt;br /&gt;
with features you don&#039;t need.&lt;br /&gt;
&lt;br /&gt;
===How Hyrax Works===&lt;br /&gt;
&lt;br /&gt;
The [[Hyrax]] server is actually a combination of two distinct&lt;br /&gt;
servers, running on the same machine, or on two machines connected&lt;br /&gt;
with a very fast link.  One server serves as the &lt;br /&gt;
user-facing &amp;quot;front end&amp;quot; to the system, while the other provides the&lt;br /&gt;
&amp;quot;engine room&amp;quot;, optimized to turn requests around quickly.&lt;br /&gt;
&lt;br /&gt;
The front end server is called the &#039;&#039;&#039;O&#039;&#039;&#039;PeNDAP &#039;&#039;&#039;L&#039;&#039;&#039;ightweight&lt;br /&gt;
&#039;&#039;&#039;F&#039;&#039;&#039;ront end &#039;&#039;&#039;S&#039;&#039;&#039;erver (OLFS).  It receives requests for data&lt;br /&gt;
and services in multiple formats and forms, and is meant to be as&lt;br /&gt;
&amp;quot;user friendly&amp;quot; as a server can be.  It also handles such chores as&lt;br /&gt;
authentication and authorization-checking, and responding to catalog&lt;br /&gt;
and bot requests.  It can also construct complex data requests from&lt;br /&gt;
multiple requests from its parner server.&lt;br /&gt;
&lt;br /&gt;
[[Image:HyraxArchitecture.jpg|left|300px]]&lt;br /&gt;
&lt;br /&gt;
This other server, called the &#039;&#039;&#039;B&#039;&#039;&#039;ack &#039;&#039;&#039;E&#039;&#039;&#039;nd &#039;&#039;&#039;S&#039;&#039;&#039;erver (BES),&lt;br /&gt;
does only one thing&amp;amp;mdash;provide data&amp;amp;mdash;and is designed to do it&lt;br /&gt;
fast.  It handles the compute-intensive parts of processing an OPeNDAP&lt;br /&gt;
client request for data.  This results in higher performance for small&lt;br /&gt;
requests while not penalizing the larger requests.&lt;br /&gt;
&lt;br /&gt;
Separating the two roles allows several paths to optimizing a server,&lt;br /&gt;
while still resulting in higher performance for small requests.  An OLFS&lt;br /&gt;
controlling multiple BES processes on a machine can process multiple&lt;br /&gt;
requests quicker because while one BES is occupied with retrieving its&lt;br /&gt;
data, another can be processing its data.  An OLFS controlling BES&lt;br /&gt;
processes on multiple machines can implement a rudimentary&lt;br /&gt;
load-balancing scheme to protect servers from overload.  What&#039;s more,&lt;br /&gt;
compute-intensive clients can optimize their processes further by&lt;br /&gt;
sending requests directly to the BES.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Installing Hyrax===&lt;br /&gt;
&lt;br /&gt;
The two parts of [[Hyrax]] are both installed by the same script, but&lt;br /&gt;
they are two different animals, which may require different kinds of&lt;br /&gt;
attention from an administrator.  Testing OLFS requires a working BES,&lt;br /&gt;
so it&#039;s typical to start the post-unpacking process with the BES.&lt;br /&gt;
&lt;br /&gt;
====Installing BES====&lt;br /&gt;
&lt;br /&gt;
The BES is a standalone server.  Its installation involves parking its&lt;br /&gt;
code somewhere to be run as a daemon and configuring your system to&lt;br /&gt;
execute it.&lt;br /&gt;
&lt;br /&gt;
After that, though, there are several configuration options you&#039;ll&lt;br /&gt;
need to address by installing software on your machine, and by editing&lt;br /&gt;
the [[Hyrax_-_BES_Configuration|Hyrax configuration file]], called bes.xml.  Details of these&lt;br /&gt;
options are in the [[Hyrax]] documentation, but these are the&lt;br /&gt;
decisions you&#039;ll have to make:&lt;br /&gt;
&lt;br /&gt;
;What kind of data&lt;br /&gt;
:Hyrax is equipped to serve data stored in any of several different file formats, HDF, netCDF and others.  Each different format requires its own handler, and your machine must have shared libraries containing these handlers installed.  For example, in order to serve netCDF data, the netCDF handler library must be available to Hyrax, and identified in its [[Hyrax_-_BES_Configuration|configuration file]].  The handlers are shared libraries and are installed separately.  Find instructions under [[Hyrax_-_BES_Configuration#Loading_Handlers|Loading Handlers]].&lt;br /&gt;
&lt;br /&gt;
;Where the data lives&lt;br /&gt;
:A server equipped to serve data must be able to find that data.  Lines in the bes.xml file identify the disk location of your data files.  Hyrax can provide a limited amount of browsing capacity to users, through its [[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]].  Access is specified by identifying directories where data resides.  See [[Hyrax_-_BES_Configuration|Pointing_to_data]].&lt;br /&gt;
&lt;br /&gt;
;What kinds of services&lt;br /&gt;
:Along with simply supplying data, Hyrax can supply several different services, including [[UserGuideOPeNDAPMessages#ASCII_Service|serving the data as ASCII values]], and the form-driven [[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]].  The bes.xml file is used to specify the list of services.  The drivers for these services are installed as part of the default installation of Hyrax, but they need to be chosen and identified in bes.xml.  See instructions at [[Hyrax_-_BES_Configuration#Loading_Handlers|Loading Handlers]].&lt;br /&gt;
&lt;br /&gt;
Once these three tasks are accomplished, and once data is moved into&lt;br /&gt;
the appropriate directories, your server should be ready to provide&lt;br /&gt;
data to all comers, but most specifically to its OLFS.&lt;br /&gt;
&lt;br /&gt;
====Installing OLFS====&lt;br /&gt;
&lt;br /&gt;
The OLFS is a Java servlet, so its installation involves&lt;br /&gt;
installing the Tomcat servlet infrastructure, and then configuring&lt;br /&gt;
that with the OLFS.  There are four configuration files, but unless&lt;br /&gt;
yours is an unusual case, you&#039;ll likely only have to look at two of&lt;br /&gt;
them.  See [[Hyrax_-_OLFS_Configuration]] for more information.&lt;br /&gt;
&lt;br /&gt;
Use the&lt;br /&gt;
[[Hyrax_-_OLFS_Configuration#olfs.xml_Configuration_File|olfs.xml]]&lt;br /&gt;
file to specify these important features of the OLFS operation:&lt;br /&gt;
&lt;br /&gt;
;Address of BES&lt;br /&gt;
:The OLFS is the front door to data from the BES.  Use the olfs.xml file to identify where to find this server.  See the instructions for the [[Hyrax_-_OLFS_Configuration#BESManager|BESManager]].&lt;br /&gt;
&lt;br /&gt;
;Dispatch handlers&lt;br /&gt;
:The OLFS &amp;quot;offers&amp;quot; the incoming URL to a series of &amp;quot;dispatch handlers&amp;quot; until one accepts it and executes.  This allows the OLFS to offer directory and catalog services, as well as data services and more.  Use the olfs.xml file to nominate the dispatch handlers (they come with the OLFS, and do not need to be separately installed).  See [[Hyrax_-_OLFS_Configuration#HTTP_GET_Handlers|handler instructions]] for more.&lt;br /&gt;
&lt;br /&gt;
;Catalog requests&lt;br /&gt;
:The OLFS can handle [[Hyrax_-_THREDDS_Configuration|THREDDS]] catalog requests, as well as directory requests, an older part of the DAP standard that also involves data about a collection of data files.  The THREDDS information can be static (provided from a file) or dynamic (generated by a review of the available data).&lt;br /&gt;
&lt;br /&gt;
;File access&lt;br /&gt;
:You may have individual files you want served intact via this server.  These might include documentation of the data files, or of the server.  See [[Hyrax_-_OLFS_Configuration#File_Dispatch_Handler|File Dispatch Handler]] instructions.&lt;br /&gt;
&lt;br /&gt;
There are some other features, too, like a bot blocker and a version&lt;br /&gt;
message, as well as the experimental SOAP message handler.  These are&lt;br /&gt;
also configured with&lt;br /&gt;
[[Hyrax_-_OLFS_Configuration#olfs.xml_Configuration_File|olfs.xml]],&lt;br /&gt;
and you&#039;ll find more information about them at the link.&lt;br /&gt;
&lt;br /&gt;
The other configuration file you might need to edit is &lt;br /&gt;
[http://www.unidata.ucar.edu/projects/THREDDS/tech/TDS.html catalog.xml],&lt;br /&gt;
briefly reviewed under [[#THREDDS|THREDDS]], below.&lt;br /&gt;
&lt;br /&gt;
====THREDDS====&lt;br /&gt;
&lt;br /&gt;
[http://www.unidata.ucar.edu/projects/THREDDS/tech/TDS.html THREDDS]&lt;br /&gt;
is a catalog standard for scientific data promoted by scientists at&lt;br /&gt;
[http://www.unidata.ucar.edu UCAR].  It allows &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The default file will allow dynamic catalogs to be created and should&lt;br /&gt;
allow your server to respond to THREDDS requests properly.  It&#039;s&lt;br /&gt;
possible you may want to serve a static THREDDS catalog, too.  This&lt;br /&gt;
can be done by editing the catalog.xml file, and you&#039;ll find&lt;br /&gt;
links to instructions for that at [[Hyrax - THREDDS Configuration]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Multiple BES Configuration====&lt;br /&gt;
&lt;br /&gt;
You can configure a single OLFS to work with multiple BES instances.&lt;br /&gt;
This offers an opportunity to do rudimentary load balancing, or to&lt;br /&gt;
isolate data on one server or another.  See the &lt;br /&gt;
[[Hyrax_-_Configuring_The_OLFS_To_Work_With_Multiple_BES&#039;s|Hyrax configuration chapter]]&lt;br /&gt;
for more information on the subject.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideServer&amp;diff=4914</id>
		<title>UserGuideServer</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideServer&amp;diff=4914"/>
		<updated>2009-10-06T17:08:20Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: /* Installing BES */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[UserGuide|Back to User Guide Contents]]&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Server=&lt;br /&gt;
&lt;br /&gt;
Any server that responds to the messages described in &lt;br /&gt;
[[UserGuideOPeNDAPMessages|OPeNDAP Messages]] using the &lt;br /&gt;
[[UserGuideDataModel|OPeNDAP Data Model]] is an OPeNDAP server.  The&lt;br /&gt;
messages and the data model are published standards, available to&lt;br /&gt;
anyone to use.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group, in addition to publishing and maintaining the&lt;br /&gt;
standards described here, maintains a server that complies with the&lt;br /&gt;
standard.  This is [[Hyrax]].&lt;br /&gt;
&lt;br /&gt;
==Hyrax==&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group produces and supports [[Hyrax]], a modular data server&lt;br /&gt;
that can be used in a variety of ways to serve a wide variety of data&lt;br /&gt;
with OPeNDAP.&lt;br /&gt;
&lt;br /&gt;
Hyrax is flexible enough that it can serve data that currently exist&lt;br /&gt;
in a wide variety of data storage formats, ranging from HDF4 data&lt;br /&gt;
files to netCDF data to data in some arbitrary non-standard format&lt;br /&gt;
using the FreeForm module.&lt;br /&gt;
&lt;br /&gt;
Hyrax is modular, too, which means it can be outfitted to serve the&lt;br /&gt;
particular needs of your data without weighing down its performance&lt;br /&gt;
with features you don&#039;t need.&lt;br /&gt;
&lt;br /&gt;
===How Hyrax Works===&lt;br /&gt;
&lt;br /&gt;
The [[Hyrax]] server is actually a combination of two distinct&lt;br /&gt;
servers, running on the same machine, or on two machines connected&lt;br /&gt;
with a very fast link.  One server serves as the &lt;br /&gt;
user-facing &amp;quot;front end&amp;quot; to the system, while the other provides the&lt;br /&gt;
&amp;quot;engine room&amp;quot;, optimized to turn requests around quickly.&lt;br /&gt;
&lt;br /&gt;
The front end server is called the &#039;&#039;&#039;O&#039;&#039;&#039;PeNDAP &#039;&#039;&#039;L&#039;&#039;&#039;ightweight&lt;br /&gt;
&#039;&#039;&#039;F&#039;&#039;&#039;ront end &#039;&#039;&#039;S&#039;&#039;&#039;erver (OLFS).  It receives requests for data&lt;br /&gt;
and services in multiple formats and forms, and is meant to be as&lt;br /&gt;
&amp;quot;user friendly&amp;quot; as a server can be.  It also handles such chores as&lt;br /&gt;
authentication and authorization-checking, and responding to catalog&lt;br /&gt;
and bot requests.  It can also construct complex data requests from&lt;br /&gt;
multiple requests from its parner server.&lt;br /&gt;
&lt;br /&gt;
[[Image:HyraxArchitecture.jpg|left|300px]]&lt;br /&gt;
&lt;br /&gt;
This other server, called the &#039;&#039;&#039;B&#039;&#039;&#039;ack &#039;&#039;&#039;E&#039;&#039;&#039;nd &#039;&#039;&#039;S&#039;&#039;&#039;erver (BES),&lt;br /&gt;
does only one thing&amp;amp;mdash;provide data&amp;amp;mdash;and is designed to do it&lt;br /&gt;
fast.  It handles the compute-intensive parts of processing an OPeNDAP&lt;br /&gt;
client request for data.  This results in higher performance for small&lt;br /&gt;
requests while not penalizing the larger requests.&lt;br /&gt;
&lt;br /&gt;
Separating the two roles allows several paths to optimizing a server,&lt;br /&gt;
while still resulting in higher performance for small requests.  An OLFS&lt;br /&gt;
controlling multiple BES processes on a machine can process multiple&lt;br /&gt;
requests quicker because while one BES is occupied with retrieving its&lt;br /&gt;
data, another can be processing its data.  An OLFS controlling BES&lt;br /&gt;
processes on multiple machines can implement a rudimentary&lt;br /&gt;
load-balancing scheme to protect servers from overload.  What&#039;s more,&lt;br /&gt;
compute-intensive clients can optimize their processes further by&lt;br /&gt;
sending requests directly to the BES.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Installing Hyrax===&lt;br /&gt;
&lt;br /&gt;
The two parts of [[Hyrax]] are both installed by the same script, but&lt;br /&gt;
they are two different animals, which may require different kinds of&lt;br /&gt;
attention from an administrator.  Testing OLFS requires a working BES,&lt;br /&gt;
so it&#039;s typical to start the post-unpacking process with the BES.&lt;br /&gt;
&lt;br /&gt;
====Installing BES====&lt;br /&gt;
&lt;br /&gt;
The BES is a standalone server.  Its installation involves parking its&lt;br /&gt;
code somewhere to be run as a daemon and configuring your system to&lt;br /&gt;
execute it.&lt;br /&gt;
&lt;br /&gt;
After that, though, there are several configuration options you&#039;ll&lt;br /&gt;
need to address by installing software on your machine, and by editing&lt;br /&gt;
the [[Hyrax_-_BES_Configuration|Hyrax configuration file]], called bes.xml.  Details of these&lt;br /&gt;
options are in the [[Hyrax]] documentation, but these are the&lt;br /&gt;
decisions you&#039;ll have to make:&lt;br /&gt;
&lt;br /&gt;
;What kind of data&lt;br /&gt;
:Hyrax is equipped to serve data stored in any of several different file formats, HDF, netCDF and others.  Each different format requires its own handler, and your machine must have shared libraries containing these handlers installed.  For example, in order to serve netCDF data, the netCDF handler library must be available to Hyrax, and identified in its [[Hyrax_-_BES_Configuration|configuration file]].  The handlers are shared libraries and are installed separately.  Find instructions under [[Hyrax_-_BES_Configuration#Loading_Handlers|Loading Handlers]].&lt;br /&gt;
&lt;br /&gt;
;Where the data lives&lt;br /&gt;
:A server equipped to serve data must be able to find that data.  Lines in the bes.xml file identify the disk location of your data files.  Hyrax can provide a limited amount of browsing capacity to users, through its [[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]].  Access is specified by identifying directories where data resides.  See [[Hyrax_-_BES_Configuration|Pointing_to_data]].&lt;br /&gt;
&lt;br /&gt;
;What kinds of services&lt;br /&gt;
:Along with simply supplying data, Hyrax can supply several different services, including [[UserGuideOPeNDAPMessages#ASCII_Service|serving the data as ASCII values]], and the form-driven [[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]].  The bes.xml file is used to specify the list of services.  The drivers for these services are installed as part of the default installation of Hyrax, but they need to be chosen and identified in bes.xml.  See instructions at [[Hyrax_-_BES_Configuration#Loading_Handlers|Loading Handlers]].&lt;br /&gt;
&lt;br /&gt;
Once these three tasks are accomplished, and once data is moved into&lt;br /&gt;
the appropriate directories, your server should be ready to provide&lt;br /&gt;
data to all comers, but most specifically to its OLFS.&lt;br /&gt;
&lt;br /&gt;
====Installing OLFS====&lt;br /&gt;
&lt;br /&gt;
The OLFS is a Java servlet, so its installation involves&lt;br /&gt;
installing the Tomcat servlet infrastructure, and then configuring&lt;br /&gt;
that with the OLFS.  There are four configuration files, but unless&lt;br /&gt;
yours is an unusual case, you&#039;ll likely only have to look at two of&lt;br /&gt;
them.  See [[Hyrax_-_OLFS_Configuration]] for more information.&lt;br /&gt;
&lt;br /&gt;
Use the&lt;br /&gt;
[[Hyrax_-_OLFS_Configuration#olfs.xml_Configuration_File|olfs.xml]]&lt;br /&gt;
file to specify these important features of the OLFS operation:&lt;br /&gt;
&lt;br /&gt;
;Address of BES&lt;br /&gt;
:The OLFS is the front door to data from the BES.  Use the olfs.xml file to identify where to find this server.&lt;br /&gt;
&lt;br /&gt;
;Dispatch handlers&lt;br /&gt;
:The OLFS &amp;quot;offers&amp;quot; the incoming URL to a series of &amp;quot;dispatch handlers&amp;quot; until one accepts it and executes.  This allows the OLFS to offer directory and catalog services, as well as data services and more.  Use the olfs.xml file to nominate the dispatch handlers (they come with the OLFS, and do not need to be separately installed).&lt;br /&gt;
&lt;br /&gt;
;Catalog requests&lt;br /&gt;
:The OLFS can handle [[Hyrax_-_THREDDS_Configuration|THREDDS]] catalog requests, as well as directory requests, an older part of the DAP standard that also involves data about a collection of data files.  The THREDDS information can be static (provided from a file) or dynamic (generated by a review of the available data).&lt;br /&gt;
&lt;br /&gt;
;File access&lt;br /&gt;
:You may have individual files you want served intact via this server.  These might include documentation of the data files, or of the server.&lt;br /&gt;
&lt;br /&gt;
There are some other features, too, like a bot blocker and a version&lt;br /&gt;
message, as well as the experimental SOAP message handler.  These are&lt;br /&gt;
also configured with&lt;br /&gt;
[[Hyrax_-_OLFS_Configuration#olfs.xml_Configuration_File|olfs.xml]],&lt;br /&gt;
and you&#039;ll find more information about them at the link.&lt;br /&gt;
&lt;br /&gt;
The other configuration file you might need to edit is &lt;br /&gt;
[http://www.unidata.ucar.edu/projects/THREDDS/tech/TDS.html catalog.xml],&lt;br /&gt;
briefly reviewed under [[#THREDDS|THREDDS]], below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====THREDDS====&lt;br /&gt;
&lt;br /&gt;
[http://www.unidata.ucar.edu/projects/THREDDS/tech/TDS.html THREDDS]&lt;br /&gt;
is a catalog standard for scientific data promoted by scientists at&lt;br /&gt;
[http://www.unidata.ucar.edu UCAR].  It allows &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The default file will allow dynamic catalogs to be created and should&lt;br /&gt;
allow your server to respond to THREDDS requests properly.  It&#039;s&lt;br /&gt;
possible you may want to serve a static THREDDS catalog, too.  This&lt;br /&gt;
can be done by editing the catalog.xml file, and you&#039;ll find&lt;br /&gt;
links to instructions for that at [[Hyrax - THREDDS Configuration]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Multiple BES Configuration====&lt;br /&gt;
&lt;br /&gt;
You can configure a single OLFS to work with multiple BES instances.&lt;br /&gt;
This offers an opportunity to do rudimentary load balancing, or to&lt;br /&gt;
isolate data on one server or another.  See the &lt;br /&gt;
[[Hyrax_-_Configuring_The_OLFS_To_Work_With_Multiple_BES&#039;s|Hyrax configuration chapter]]&lt;br /&gt;
for more information on the subject.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideServer&amp;diff=4913</id>
		<title>UserGuideServer</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideServer&amp;diff=4913"/>
		<updated>2009-10-06T17:06:26Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: /* Installing BES */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[UserGuide|Back to User Guide Contents]]&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Server=&lt;br /&gt;
&lt;br /&gt;
Any server that responds to the messages described in &lt;br /&gt;
[[UserGuideOPeNDAPMessages|OPeNDAP Messages]] using the &lt;br /&gt;
[[UserGuideDataModel|OPeNDAP Data Model]] is an OPeNDAP server.  The&lt;br /&gt;
messages and the data model are published standards, available to&lt;br /&gt;
anyone to use.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group, in addition to publishing and maintaining the&lt;br /&gt;
standards described here, maintains a server that complies with the&lt;br /&gt;
standard.  This is [[Hyrax]].&lt;br /&gt;
&lt;br /&gt;
==Hyrax==&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group produces and supports [[Hyrax]], a modular data server&lt;br /&gt;
that can be used in a variety of ways to serve a wide variety of data&lt;br /&gt;
with OPeNDAP.&lt;br /&gt;
&lt;br /&gt;
Hyrax is flexible enough that it can serve data that currently exist&lt;br /&gt;
in a wide variety of data storage formats, ranging from HDF4 data&lt;br /&gt;
files to netCDF data to data in some arbitrary non-standard format&lt;br /&gt;
using the FreeForm module.&lt;br /&gt;
&lt;br /&gt;
Hyrax is modular, too, which means it can be outfitted to serve the&lt;br /&gt;
particular needs of your data without weighing down its performance&lt;br /&gt;
with features you don&#039;t need.&lt;br /&gt;
&lt;br /&gt;
===How Hyrax Works===&lt;br /&gt;
&lt;br /&gt;
The [[Hyrax]] server is actually a combination of two distinct&lt;br /&gt;
servers, running on the same machine, or on two machines connected&lt;br /&gt;
with a very fast link.  One server serves as the &lt;br /&gt;
user-facing &amp;quot;front end&amp;quot; to the system, while the other provides the&lt;br /&gt;
&amp;quot;engine room&amp;quot;, optimized to turn requests around quickly.&lt;br /&gt;
&lt;br /&gt;
The front end server is called the &#039;&#039;&#039;O&#039;&#039;&#039;PeNDAP &#039;&#039;&#039;L&#039;&#039;&#039;ightweight&lt;br /&gt;
&#039;&#039;&#039;F&#039;&#039;&#039;ront end &#039;&#039;&#039;S&#039;&#039;&#039;erver (OLFS).  It receives requests for data&lt;br /&gt;
and services in multiple formats and forms, and is meant to be as&lt;br /&gt;
&amp;quot;user friendly&amp;quot; as a server can be.  It also handles such chores as&lt;br /&gt;
authentication and authorization-checking, and responding to catalog&lt;br /&gt;
and bot requests.  It can also construct complex data requests from&lt;br /&gt;
multiple requests from its parner server.&lt;br /&gt;
&lt;br /&gt;
[[Image:HyraxArchitecture.jpg|left|300px]]&lt;br /&gt;
&lt;br /&gt;
This other server, called the &#039;&#039;&#039;B&#039;&#039;&#039;ack &#039;&#039;&#039;E&#039;&#039;&#039;nd &#039;&#039;&#039;S&#039;&#039;&#039;erver (BES),&lt;br /&gt;
does only one thing&amp;amp;mdash;provide data&amp;amp;mdash;and is designed to do it&lt;br /&gt;
fast.  It handles the compute-intensive parts of processing an OPeNDAP&lt;br /&gt;
client request for data.  This results in higher performance for small&lt;br /&gt;
requests while not penalizing the larger requests.&lt;br /&gt;
&lt;br /&gt;
Separating the two roles allows several paths to optimizing a server,&lt;br /&gt;
while still resulting in higher performance for small requests.  An OLFS&lt;br /&gt;
controlling multiple BES processes on a machine can process multiple&lt;br /&gt;
requests quicker because while one BES is occupied with retrieving its&lt;br /&gt;
data, another can be processing its data.  An OLFS controlling BES&lt;br /&gt;
processes on multiple machines can implement a rudimentary&lt;br /&gt;
load-balancing scheme to protect servers from overload.  What&#039;s more,&lt;br /&gt;
compute-intensive clients can optimize their processes further by&lt;br /&gt;
sending requests directly to the BES.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Installing Hyrax===&lt;br /&gt;
&lt;br /&gt;
The two parts of [[Hyrax]] are both installed by the same script, but&lt;br /&gt;
they are two different animals, which may require different kinds of&lt;br /&gt;
attention from an administrator.  Testing OLFS requires a working BES,&lt;br /&gt;
so it&#039;s typical to start the post-unpacking process with the BES.&lt;br /&gt;
&lt;br /&gt;
====Installing BES====&lt;br /&gt;
&lt;br /&gt;
The BES is a standalone server.  Its installation involves parking its&lt;br /&gt;
code somewhere to be run as a daemon and configuring your system to&lt;br /&gt;
execute it.&lt;br /&gt;
&lt;br /&gt;
After that, though, there are several configuration options you&#039;ll&lt;br /&gt;
need to address by installing software on your machine, and by editing&lt;br /&gt;
the [[Hyrax_-_BES_Configuration|Hyrax configuration file]], called bes.xml.  Details of these&lt;br /&gt;
options are in the [[Hyrax]] documentation, but these are the&lt;br /&gt;
decisions you&#039;ll have to make:&lt;br /&gt;
&lt;br /&gt;
;What kind of data&lt;br /&gt;
:Hyrax is equipped to serve data stored in any of several different file formats, HDF, netCDF and others.  Each different format requires its own handler, and your machine must have shared libraries containing these handlers installed.  For example, in order to serve netCDF data, the netCDF handler library must be available to Hyrax, and identified in its [[Hyrax_-_BES_Configuration|configuration file]].  The handlers are shared libraries and are installed separately.  Find instructions under [[Hyrax_-_BES_Configuration#Loading_Handlers|Loading Handlers]].&lt;br /&gt;
&lt;br /&gt;
;Where the data lives&lt;br /&gt;
:A server equipped to serve data must be able to find that data.  Lines in the bes.xml file identify the disk location of your data files.  Hyrax can provide a limited amount of browsing capacity to users, through its [[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]].  Access is specified by identifying directories where data resides.&lt;br /&gt;
&lt;br /&gt;
;What kinds of services&lt;br /&gt;
:Along with simply supplying data, Hyrax can supply several different services, including [[UserGuideOPeNDAPMessages#ASCII_Service|serving the data as ASCII values]], and the form-driven [[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]].  The bes.xml file is used to specify the list of services.  The drivers for these services are installed as part of the default installation of Hyrax, but they need to be chosen and identified in bes.xml.&lt;br /&gt;
&lt;br /&gt;
Once these three tasks are accomplished, and once data is moved into&lt;br /&gt;
the appropriate directories, your server should be ready to provide&lt;br /&gt;
data to all comers, but most specifically to its OLFS.&lt;br /&gt;
&lt;br /&gt;
====Installing OLFS====&lt;br /&gt;
&lt;br /&gt;
The OLFS is a Java servlet, so its installation involves&lt;br /&gt;
installing the Tomcat servlet infrastructure, and then configuring&lt;br /&gt;
that with the OLFS.  There are four configuration files, but unless&lt;br /&gt;
yours is an unusual case, you&#039;ll likely only have to look at two of&lt;br /&gt;
them.  See [[Hyrax_-_OLFS_Configuration]] for more information.&lt;br /&gt;
&lt;br /&gt;
Use the&lt;br /&gt;
[[Hyrax_-_OLFS_Configuration#olfs.xml_Configuration_File|olfs.xml]]&lt;br /&gt;
file to specify these important features of the OLFS operation:&lt;br /&gt;
&lt;br /&gt;
;Address of BES&lt;br /&gt;
:The OLFS is the front door to data from the BES.  Use the olfs.xml file to identify where to find this server.&lt;br /&gt;
&lt;br /&gt;
;Dispatch handlers&lt;br /&gt;
:The OLFS &amp;quot;offers&amp;quot; the incoming URL to a series of &amp;quot;dispatch handlers&amp;quot; until one accepts it and executes.  This allows the OLFS to offer directory and catalog services, as well as data services and more.  Use the olfs.xml file to nominate the dispatch handlers (they come with the OLFS, and do not need to be separately installed).&lt;br /&gt;
&lt;br /&gt;
;Catalog requests&lt;br /&gt;
:The OLFS can handle [[Hyrax_-_THREDDS_Configuration|THREDDS]] catalog requests, as well as directory requests, an older part of the DAP standard that also involves data about a collection of data files.  The THREDDS information can be static (provided from a file) or dynamic (generated by a review of the available data).&lt;br /&gt;
&lt;br /&gt;
;File access&lt;br /&gt;
:You may have individual files you want served intact via this server.  These might include documentation of the data files, or of the server.&lt;br /&gt;
&lt;br /&gt;
There are some other features, too, like a bot blocker and a version&lt;br /&gt;
message, as well as the experimental SOAP message handler.  These are&lt;br /&gt;
also configured with&lt;br /&gt;
[[Hyrax_-_OLFS_Configuration#olfs.xml_Configuration_File|olfs.xml]],&lt;br /&gt;
and you&#039;ll find more information about them at the link.&lt;br /&gt;
&lt;br /&gt;
The other configuration file you might need to edit is &lt;br /&gt;
[http://www.unidata.ucar.edu/projects/THREDDS/tech/TDS.html catalog.xml],&lt;br /&gt;
briefly reviewed under [[#THREDDS|THREDDS]], below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====THREDDS====&lt;br /&gt;
&lt;br /&gt;
[http://www.unidata.ucar.edu/projects/THREDDS/tech/TDS.html THREDDS]&lt;br /&gt;
is a catalog standard for scientific data promoted by scientists at&lt;br /&gt;
[http://www.unidata.ucar.edu UCAR].  It allows &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The default file will allow dynamic catalogs to be created and should&lt;br /&gt;
allow your server to respond to THREDDS requests properly.  It&#039;s&lt;br /&gt;
possible you may want to serve a static THREDDS catalog, too.  This&lt;br /&gt;
can be done by editing the catalog.xml file, and you&#039;ll find&lt;br /&gt;
links to instructions for that at [[Hyrax - THREDDS Configuration]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Multiple BES Configuration====&lt;br /&gt;
&lt;br /&gt;
You can configure a single OLFS to work with multiple BES instances.&lt;br /&gt;
This offers an opportunity to do rudimentary load balancing, or to&lt;br /&gt;
isolate data on one server or another.  See the &lt;br /&gt;
[[Hyrax_-_Configuring_The_OLFS_To_Work_With_Multiple_BES&#039;s|Hyrax configuration chapter]]&lt;br /&gt;
for more information on the subject.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideServer&amp;diff=4912</id>
		<title>UserGuideServer</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideServer&amp;diff=4912"/>
		<updated>2009-10-06T17:05:49Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: /* Installing BES */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[UserGuide|Back to User Guide Contents]]&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Server=&lt;br /&gt;
&lt;br /&gt;
Any server that responds to the messages described in &lt;br /&gt;
[[UserGuideOPeNDAPMessages|OPeNDAP Messages]] using the &lt;br /&gt;
[[UserGuideDataModel|OPeNDAP Data Model]] is an OPeNDAP server.  The&lt;br /&gt;
messages and the data model are published standards, available to&lt;br /&gt;
anyone to use.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group, in addition to publishing and maintaining the&lt;br /&gt;
standards described here, maintains a server that complies with the&lt;br /&gt;
standard.  This is [[Hyrax]].&lt;br /&gt;
&lt;br /&gt;
==Hyrax==&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group produces and supports [[Hyrax]], a modular data server&lt;br /&gt;
that can be used in a variety of ways to serve a wide variety of data&lt;br /&gt;
with OPeNDAP.&lt;br /&gt;
&lt;br /&gt;
Hyrax is flexible enough that it can serve data that currently exist&lt;br /&gt;
in a wide variety of data storage formats, ranging from HDF4 data&lt;br /&gt;
files to netCDF data to data in some arbitrary non-standard format&lt;br /&gt;
using the FreeForm module.&lt;br /&gt;
&lt;br /&gt;
Hyrax is modular, too, which means it can be outfitted to serve the&lt;br /&gt;
particular needs of your data without weighing down its performance&lt;br /&gt;
with features you don&#039;t need.&lt;br /&gt;
&lt;br /&gt;
===How Hyrax Works===&lt;br /&gt;
&lt;br /&gt;
The [[Hyrax]] server is actually a combination of two distinct&lt;br /&gt;
servers, running on the same machine, or on two machines connected&lt;br /&gt;
with a very fast link.  One server serves as the &lt;br /&gt;
user-facing &amp;quot;front end&amp;quot; to the system, while the other provides the&lt;br /&gt;
&amp;quot;engine room&amp;quot;, optimized to turn requests around quickly.&lt;br /&gt;
&lt;br /&gt;
The front end server is called the &#039;&#039;&#039;O&#039;&#039;&#039;PeNDAP &#039;&#039;&#039;L&#039;&#039;&#039;ightweight&lt;br /&gt;
&#039;&#039;&#039;F&#039;&#039;&#039;ront end &#039;&#039;&#039;S&#039;&#039;&#039;erver (OLFS).  It receives requests for data&lt;br /&gt;
and services in multiple formats and forms, and is meant to be as&lt;br /&gt;
&amp;quot;user friendly&amp;quot; as a server can be.  It also handles such chores as&lt;br /&gt;
authentication and authorization-checking, and responding to catalog&lt;br /&gt;
and bot requests.  It can also construct complex data requests from&lt;br /&gt;
multiple requests from its parner server.&lt;br /&gt;
&lt;br /&gt;
[[Image:HyraxArchitecture.jpg|left|300px]]&lt;br /&gt;
&lt;br /&gt;
This other server, called the &#039;&#039;&#039;B&#039;&#039;&#039;ack &#039;&#039;&#039;E&#039;&#039;&#039;nd &#039;&#039;&#039;S&#039;&#039;&#039;erver (BES),&lt;br /&gt;
does only one thing&amp;amp;mdash;provide data&amp;amp;mdash;and is designed to do it&lt;br /&gt;
fast.  It handles the compute-intensive parts of processing an OPeNDAP&lt;br /&gt;
client request for data.  This results in higher performance for small&lt;br /&gt;
requests while not penalizing the larger requests.&lt;br /&gt;
&lt;br /&gt;
Separating the two roles allows several paths to optimizing a server,&lt;br /&gt;
while still resulting in higher performance for small requests.  An OLFS&lt;br /&gt;
controlling multiple BES processes on a machine can process multiple&lt;br /&gt;
requests quicker because while one BES is occupied with retrieving its&lt;br /&gt;
data, another can be processing its data.  An OLFS controlling BES&lt;br /&gt;
processes on multiple machines can implement a rudimentary&lt;br /&gt;
load-balancing scheme to protect servers from overload.  What&#039;s more,&lt;br /&gt;
compute-intensive clients can optimize their processes further by&lt;br /&gt;
sending requests directly to the BES.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Installing Hyrax===&lt;br /&gt;
&lt;br /&gt;
The two parts of [[Hyrax]] are both installed by the same script, but&lt;br /&gt;
they are two different animals, which may require different kinds of&lt;br /&gt;
attention from an administrator.  Testing OLFS requires a working BES,&lt;br /&gt;
so it&#039;s typical to start the post-unpacking process with the BES.&lt;br /&gt;
&lt;br /&gt;
====Installing BES====&lt;br /&gt;
&lt;br /&gt;
The BES is a standalone server.  Its installation involves parking its&lt;br /&gt;
code somewhere to be run as a daemon and configuring your system to&lt;br /&gt;
execute it.&lt;br /&gt;
&lt;br /&gt;
After that, though, there are several configuration options you&#039;ll&lt;br /&gt;
need to address by installing software on your machine, and by editing&lt;br /&gt;
the [[Hyrax_-_BES_Configuration|Hyrax configuration file]], called bes.xml.  Details of these&lt;br /&gt;
options are in the [[Hyrax]] documentation, but these are the&lt;br /&gt;
decisions you&#039;ll have to make:&lt;br /&gt;
&lt;br /&gt;
;What kind of data&lt;br /&gt;
:Hyrax is equipped to serve data stored in any of several different file formats, HDF, netCDF and others.  Each different format requires its own handler, and your machine must have shared libraries containing these handlers installed.  For example, in order to serve netCDF data, the netCDF handler library must be available to Hyrax, and identified in its [[configuration file]].  The handlers are shared libraries and are installed separately.  Find instructions under [[Hyrax_-_BES_Configuration#Loading_Handlers|Loading Handlers]].&lt;br /&gt;
&lt;br /&gt;
;Where the data lives&lt;br /&gt;
:A server equipped to serve data must be able to find that data.  Lines in the bes.xml file identify the disk location of your data files.  Hyrax can provide a limited amount of browsing capacity to users, through its [[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]].  Access is specified by identifying directories where data resides.&lt;br /&gt;
&lt;br /&gt;
;What kinds of services&lt;br /&gt;
:Along with simply supplying data, Hyrax can supply several different services, including [[UserGuideOPeNDAPMessages#ASCII_Service|serving the data as ASCII values]], and the form-driven [[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]].  The bes.xml file is used to specify the list of services.  The drivers for these services are installed as part of the default installation of Hyrax, but they need to be chosen and identified in bes.xml.&lt;br /&gt;
&lt;br /&gt;
Once these three tasks are accomplished, and once data is moved into&lt;br /&gt;
the appropriate directories, your server should be ready to provide&lt;br /&gt;
data to all comers, but most specifically to its OLFS.&lt;br /&gt;
&lt;br /&gt;
====Installing OLFS====&lt;br /&gt;
&lt;br /&gt;
The OLFS is a Java servlet, so its installation involves&lt;br /&gt;
installing the Tomcat servlet infrastructure, and then configuring&lt;br /&gt;
that with the OLFS.  There are four configuration files, but unless&lt;br /&gt;
yours is an unusual case, you&#039;ll likely only have to look at two of&lt;br /&gt;
them.  See [[Hyrax_-_OLFS_Configuration]] for more information.&lt;br /&gt;
&lt;br /&gt;
Use the&lt;br /&gt;
[[Hyrax_-_OLFS_Configuration#olfs.xml_Configuration_File|olfs.xml]]&lt;br /&gt;
file to specify these important features of the OLFS operation:&lt;br /&gt;
&lt;br /&gt;
;Address of BES&lt;br /&gt;
:The OLFS is the front door to data from the BES.  Use the olfs.xml file to identify where to find this server.&lt;br /&gt;
&lt;br /&gt;
;Dispatch handlers&lt;br /&gt;
:The OLFS &amp;quot;offers&amp;quot; the incoming URL to a series of &amp;quot;dispatch handlers&amp;quot; until one accepts it and executes.  This allows the OLFS to offer directory and catalog services, as well as data services and more.  Use the olfs.xml file to nominate the dispatch handlers (they come with the OLFS, and do not need to be separately installed).&lt;br /&gt;
&lt;br /&gt;
;Catalog requests&lt;br /&gt;
:The OLFS can handle [[Hyrax_-_THREDDS_Configuration|THREDDS]] catalog requests, as well as directory requests, an older part of the DAP standard that also involves data about a collection of data files.  The THREDDS information can be static (provided from a file) or dynamic (generated by a review of the available data).&lt;br /&gt;
&lt;br /&gt;
;File access&lt;br /&gt;
:You may have individual files you want served intact via this server.  These might include documentation of the data files, or of the server.&lt;br /&gt;
&lt;br /&gt;
There are some other features, too, like a bot blocker and a version&lt;br /&gt;
message, as well as the experimental SOAP message handler.  These are&lt;br /&gt;
also configured with&lt;br /&gt;
[[Hyrax_-_OLFS_Configuration#olfs.xml_Configuration_File|olfs.xml]],&lt;br /&gt;
and you&#039;ll find more information about them at the link.&lt;br /&gt;
&lt;br /&gt;
The other configuration file you might need to edit is &lt;br /&gt;
[http://www.unidata.ucar.edu/projects/THREDDS/tech/TDS.html catalog.xml],&lt;br /&gt;
briefly reviewed under [[#THREDDS|THREDDS]], below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====THREDDS====&lt;br /&gt;
&lt;br /&gt;
[http://www.unidata.ucar.edu/projects/THREDDS/tech/TDS.html THREDDS]&lt;br /&gt;
is a catalog standard for scientific data promoted by scientists at&lt;br /&gt;
[http://www.unidata.ucar.edu UCAR].  It allows &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The default file will allow dynamic catalogs to be created and should&lt;br /&gt;
allow your server to respond to THREDDS requests properly.  It&#039;s&lt;br /&gt;
possible you may want to serve a static THREDDS catalog, too.  This&lt;br /&gt;
can be done by editing the catalog.xml file, and you&#039;ll find&lt;br /&gt;
links to instructions for that at [[Hyrax - THREDDS Configuration]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Multiple BES Configuration====&lt;br /&gt;
&lt;br /&gt;
You can configure a single OLFS to work with multiple BES instances.&lt;br /&gt;
This offers an opportunity to do rudimentary load balancing, or to&lt;br /&gt;
isolate data on one server or another.  See the &lt;br /&gt;
[[Hyrax_-_Configuring_The_OLFS_To_Work_With_Multiple_BES&#039;s|Hyrax configuration chapter]]&lt;br /&gt;
for more information on the subject.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideServer&amp;diff=4911</id>
		<title>UserGuideServer</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideServer&amp;diff=4911"/>
		<updated>2009-10-06T17:00:50Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; [[UserGuide|Back to User Guide Contents]]&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Server=&lt;br /&gt;
&lt;br /&gt;
Any server that responds to the messages described in &lt;br /&gt;
[[UserGuideOPeNDAPMessages|OPeNDAP Messages]] using the &lt;br /&gt;
[[UserGuideDataModel|OPeNDAP Data Model]] is an OPeNDAP server.  The&lt;br /&gt;
messages and the data model are published standards, available to&lt;br /&gt;
anyone to use.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group, in addition to publishing and maintaining the&lt;br /&gt;
standards described here, maintains a server that complies with the&lt;br /&gt;
standard.  This is [[Hyrax]].&lt;br /&gt;
&lt;br /&gt;
==Hyrax==&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group produces and supports [[Hyrax]], a modular data server&lt;br /&gt;
that can be used in a variety of ways to serve a wide variety of data&lt;br /&gt;
with OPeNDAP.&lt;br /&gt;
&lt;br /&gt;
Hyrax is flexible enough that it can serve data that currently exist&lt;br /&gt;
in a wide variety of data storage formats, ranging from HDF4 data&lt;br /&gt;
files to netCDF data to data in some arbitrary non-standard format&lt;br /&gt;
using the FreeForm module.&lt;br /&gt;
&lt;br /&gt;
Hyrax is modular, too, which means it can be outfitted to serve the&lt;br /&gt;
particular needs of your data without weighing down its performance&lt;br /&gt;
with features you don&#039;t need.&lt;br /&gt;
&lt;br /&gt;
===How Hyrax Works===&lt;br /&gt;
&lt;br /&gt;
The [[Hyrax]] server is actually a combination of two distinct&lt;br /&gt;
servers, running on the same machine, or on two machines connected&lt;br /&gt;
with a very fast link.  One server serves as the &lt;br /&gt;
user-facing &amp;quot;front end&amp;quot; to the system, while the other provides the&lt;br /&gt;
&amp;quot;engine room&amp;quot;, optimized to turn requests around quickly.&lt;br /&gt;
&lt;br /&gt;
The front end server is called the &#039;&#039;&#039;O&#039;&#039;&#039;PeNDAP &#039;&#039;&#039;L&#039;&#039;&#039;ightweight&lt;br /&gt;
&#039;&#039;&#039;F&#039;&#039;&#039;ront end &#039;&#039;&#039;S&#039;&#039;&#039;erver (OLFS).  It receives requests for data&lt;br /&gt;
and services in multiple formats and forms, and is meant to be as&lt;br /&gt;
&amp;quot;user friendly&amp;quot; as a server can be.  It also handles such chores as&lt;br /&gt;
authentication and authorization-checking, and responding to catalog&lt;br /&gt;
and bot requests.  It can also construct complex data requests from&lt;br /&gt;
multiple requests from its parner server.&lt;br /&gt;
&lt;br /&gt;
[[Image:HyraxArchitecture.jpg|left|300px]]&lt;br /&gt;
&lt;br /&gt;
This other server, called the &#039;&#039;&#039;B&#039;&#039;&#039;ack &#039;&#039;&#039;E&#039;&#039;&#039;nd &#039;&#039;&#039;S&#039;&#039;&#039;erver (BES),&lt;br /&gt;
does only one thing&amp;amp;mdash;provide data&amp;amp;mdash;and is designed to do it&lt;br /&gt;
fast.  It handles the compute-intensive parts of processing an OPeNDAP&lt;br /&gt;
client request for data.  This results in higher performance for small&lt;br /&gt;
requests while not penalizing the larger requests.&lt;br /&gt;
&lt;br /&gt;
Separating the two roles allows several paths to optimizing a server,&lt;br /&gt;
while still resulting in higher performance for small requests.  An OLFS&lt;br /&gt;
controlling multiple BES processes on a machine can process multiple&lt;br /&gt;
requests quicker because while one BES is occupied with retrieving its&lt;br /&gt;
data, another can be processing its data.  An OLFS controlling BES&lt;br /&gt;
processes on multiple machines can implement a rudimentary&lt;br /&gt;
load-balancing scheme to protect servers from overload.  What&#039;s more,&lt;br /&gt;
compute-intensive clients can optimize their processes further by&lt;br /&gt;
sending requests directly to the BES.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Installing Hyrax===&lt;br /&gt;
&lt;br /&gt;
The two parts of [[Hyrax]] are both installed by the same script, but&lt;br /&gt;
they are two different animals, which may require different kinds of&lt;br /&gt;
attention from an administrator.  Testing OLFS requires a working BES,&lt;br /&gt;
so it&#039;s typical to start the post-unpacking process with the BES.&lt;br /&gt;
&lt;br /&gt;
====Installing BES====&lt;br /&gt;
&lt;br /&gt;
The BES is a standalone server.  Its installation involves parking its&lt;br /&gt;
code somewhere to be run as a daemon and configuring your system to&lt;br /&gt;
execute it.&lt;br /&gt;
&lt;br /&gt;
After that, though, there are several configuration options you&#039;ll&lt;br /&gt;
need to address by installing software on your machine, and by editing&lt;br /&gt;
the [[Hyrax_-_BES_Configuration|Hyrax configuration file]], called bes.xml.  Details of these&lt;br /&gt;
options are in the [[Hyrax]] documentation, but these are the&lt;br /&gt;
decisions you&#039;ll have to make:&lt;br /&gt;
&lt;br /&gt;
;What kind of data&lt;br /&gt;
:Hyrax is equipped to serve data stored in any of several different file formats, HDF, netCDF and others.  Each different format requires its own handler, and your machine must have shared libraries containing these handlers installed.  For example, in order to serve netCDF data, the netCDF handler library must be available to Hyrax, and identified in its configuration file.&lt;br /&gt;
&lt;br /&gt;
;Where the data lives&lt;br /&gt;
:A server equipped to serve data must be able to find that data.  Lines in the bes.xml file identify the disk location of your data files.  Hyrax can provide a limited amount of browsing capacity to users, through its [[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]].  Access is specificed by identifying directories where data resides.&lt;br /&gt;
&lt;br /&gt;
;What kinds of services&lt;br /&gt;
:Along with simply supplying data, Hyrax can supply several different services, including [[UserGuideOPeNDAPMessages#ASCII_Service|serving the data as ASCII values]], and the form-driven [[UserGuideOPeNDAPMessages#WWW_Interface_Service|WWW interface]].  The bes.xml file is used to specify the list of services.  The drivers for these services are installed as part of the default installation of Hyrax, but they need to be chosen and identified in bes.xml.&lt;br /&gt;
&lt;br /&gt;
Once these three tasks are accomplished, and once data is moved into&lt;br /&gt;
the appropriate directories, your server should be ready to provide&lt;br /&gt;
data to all comers, but most specifically to its OLFS.&lt;br /&gt;
&lt;br /&gt;
====Installing OLFS====&lt;br /&gt;
&lt;br /&gt;
The OLFS is a Java servlet, so its installation involves&lt;br /&gt;
installing the Tomcat servlet infrastructure, and then configuring&lt;br /&gt;
that with the OLFS.  There are four configuration files, but unless&lt;br /&gt;
yours is an unusual case, you&#039;ll likely only have to look at two of&lt;br /&gt;
them.  See [[Hyrax_-_OLFS_Configuration]] for more information.&lt;br /&gt;
&lt;br /&gt;
Use the&lt;br /&gt;
[[Hyrax_-_OLFS_Configuration#olfs.xml_Configuration_File|olfs.xml]]&lt;br /&gt;
file to specify these important features of the OLFS operation:&lt;br /&gt;
&lt;br /&gt;
;Address of BES&lt;br /&gt;
:The OLFS is the front door to data from the BES.  Use the olfs.xml file to identify where to find this server.&lt;br /&gt;
&lt;br /&gt;
;Dispatch handlers&lt;br /&gt;
:The OLFS &amp;quot;offers&amp;quot; the incoming URL to a series of &amp;quot;dispatch handlers&amp;quot; until one accepts it and executes.  This allows the OLFS to offer directory and catalog services, as well as data services and more.  Use the olfs.xml file to nominate the dispatch handlers (they come with the OLFS, and do not need to be separately installed).&lt;br /&gt;
&lt;br /&gt;
;Catalog requests&lt;br /&gt;
:The OLFS can handle [[Hyrax_-_THREDDS_Configuration|THREDDS]] catalog requests, as well as directory requests, an older part of the DAP standard that also involves data about a collection of data files.  The THREDDS information can be static (provided from a file) or dynamic (generated by a review of the available data).&lt;br /&gt;
&lt;br /&gt;
;File access&lt;br /&gt;
:You may have individual files you want served intact via this server.  These might include documentation of the data files, or of the server.&lt;br /&gt;
&lt;br /&gt;
There are some other features, too, like a bot blocker and a version&lt;br /&gt;
message, as well as the experimental SOAP message handler.  These are&lt;br /&gt;
also configured with&lt;br /&gt;
[[Hyrax_-_OLFS_Configuration#olfs.xml_Configuration_File|olfs.xml]],&lt;br /&gt;
and you&#039;ll find more information about them at the link.&lt;br /&gt;
&lt;br /&gt;
The other configuration file you might need to edit is &lt;br /&gt;
[http://www.unidata.ucar.edu/projects/THREDDS/tech/TDS.html catalog.xml],&lt;br /&gt;
briefly reviewed under [[#THREDDS|THREDDS]], below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====THREDDS====&lt;br /&gt;
&lt;br /&gt;
[http://www.unidata.ucar.edu/projects/THREDDS/tech/TDS.html THREDDS]&lt;br /&gt;
is a catalog standard for scientific data promoted by scientists at&lt;br /&gt;
[http://www.unidata.ucar.edu UCAR].  It allows &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The default file will allow dynamic catalogs to be created and should&lt;br /&gt;
allow your server to respond to THREDDS requests properly.  It&#039;s&lt;br /&gt;
possible you may want to serve a static THREDDS catalog, too.  This&lt;br /&gt;
can be done by editing the catalog.xml file, and you&#039;ll find&lt;br /&gt;
links to instructions for that at [[Hyrax - THREDDS Configuration]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Multiple BES Configuration====&lt;br /&gt;
&lt;br /&gt;
You can configure a single OLFS to work with multiple BES instances.&lt;br /&gt;
This offers an opportunity to do rudimentary load balancing, or to&lt;br /&gt;
isolate data on one server or another.  See the &lt;br /&gt;
[[Hyrax_-_Configuring_The_OLFS_To_Work_With_Multiple_BES&#039;s|Hyrax configuration chapter]]&lt;br /&gt;
for more information on the subject.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideServer&amp;diff=4909</id>
		<title>UserGuideServer</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideServer&amp;diff=4909"/>
		<updated>2009-10-06T16:34:26Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: new page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; [[UserGuide|Back to User Guide Contents]]&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Server=&lt;br /&gt;
&lt;br /&gt;
Any server that responds to the messages described in &lt;br /&gt;
[[UserGuideOPeNDAPMessages|OPeNDAP Messages]] using the &lt;br /&gt;
[[UserGuideDataModel|OPeNDAP Data Model]] is an OPeNDAP server.  The&lt;br /&gt;
messages and the data model are published standards, available to&lt;br /&gt;
anyone to use.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group, in addition to publishing and maintaining the&lt;br /&gt;
standards described here, maintains a server that complies with the&lt;br /&gt;
standard.  This is [[Hyrax]].&lt;br /&gt;
&lt;br /&gt;
==Hyrax==&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group produces and supports [[Hyrax]], a modular data server&lt;br /&gt;
that can be used in a variety of ways to serve a wide variety of data&lt;br /&gt;
with OPeNDAP.&lt;br /&gt;
&lt;br /&gt;
Hyrax is flexible enough that it can serve data that currently exist&lt;br /&gt;
in a wide variety of data storage formats, ranging from HDF4 data&lt;br /&gt;
files to netCDF data to data in some arbitrary non-standard format&lt;br /&gt;
using the FreeForm module.&lt;br /&gt;
&lt;br /&gt;
Hyrax is modular, too, which means it can be outfitted to serve the&lt;br /&gt;
particular needs of your data without weighing down its performance&lt;br /&gt;
with features you don&#039;t need.&lt;br /&gt;
&lt;br /&gt;
===How Hyrax Works===&lt;br /&gt;
&lt;br /&gt;
The [[Hyrax]] server is actually a combination of two distinct&lt;br /&gt;
servers, running on the same machine, or on two machines connected&lt;br /&gt;
with a very fast link.  One server serves as the &lt;br /&gt;
user-facing &amp;quot;front end&amp;quot; to the system, while the other provides the&lt;br /&gt;
&amp;quot;engine room&amp;quot;, optimized to turn requests around quickly.&lt;br /&gt;
&lt;br /&gt;
The front end server is called the &#039;&#039;&#039;O&#039;&#039;&#039;PeNDAP &#039;&#039;&#039;L&#039;&#039;&#039;ightweight&lt;br /&gt;
&#039;&#039;&#039;F&#039;&#039;&#039;ront end &#039;&#039;&#039;S&#039;&#039;&#039;erver (OLFS).  It receives requests for data&lt;br /&gt;
and services in multiple formats and forms, and is meant to be as&lt;br /&gt;
&amp;quot;user friendly&amp;quot; as a server can be.  It also handles such chores as&lt;br /&gt;
authentication and authorization-checking, and responding to catalog&lt;br /&gt;
and bot requests.  It can also construct complex data requests from&lt;br /&gt;
multiple requests from its parner server.&lt;br /&gt;
&lt;br /&gt;
[[Image:HyraxArchitecture.jpg|left|300px]]&lt;br /&gt;
&lt;br /&gt;
This other server, called the &#039;&#039;&#039;B&#039;&#039;&#039;ack &#039;&#039;&#039;E&#039;&#039;&#039;nd &#039;&#039;&#039;S&#039;&#039;&#039;erver (BES),&lt;br /&gt;
does only one thing&amp;amp;mdash;provide data&amp;amp;mdash;and is designed to do it&lt;br /&gt;
fast.  It handles the compute-intensive parts of processing an OPeNDAP&lt;br /&gt;
client request for data.  This results in higher performance for small&lt;br /&gt;
requests while not penalizing the larger requests.&lt;br /&gt;
&lt;br /&gt;
Separating the two roles allows several paths to optimizing a server,&lt;br /&gt;
while still resulting in higher performance for small requests.  An OLFS&lt;br /&gt;
controlling multiple BES processes on a machine can process multiple&lt;br /&gt;
requests quicker because while one BES is occupied with retrieving its&lt;br /&gt;
data, another can be processing its data.  An OLFS controlling BES&lt;br /&gt;
processes on multiple machines can implement a rudimentary&lt;br /&gt;
load-balancing scheme to protect servers from overload.  What&#039;s more,&lt;br /&gt;
compute-intensive clients can optimize their processes further by&lt;br /&gt;
sending requests directly to the BES.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Installing Hyrax===&lt;br /&gt;
&lt;br /&gt;
The two parts of [[Hyrax]] are both installed by the same script, but&lt;br /&gt;
they are two different animals, which may require different kinds of&lt;br /&gt;
attention from an administrator.  Testing OLFS requires a working BES,&lt;br /&gt;
so it&#039;s typical to start the installation with the BES.&lt;br /&gt;
&lt;br /&gt;
====Installing BES====&lt;br /&gt;
&lt;br /&gt;
The BES is a standalone server.  Its installation involves parking its&lt;br /&gt;
code somewhere to be run as a daemon and configuring your system to&lt;br /&gt;
execute it.&lt;br /&gt;
&lt;br /&gt;
After that, though, there are several configuration options you&#039;ll&lt;br /&gt;
need to address by installing software on your machine, and by editing&lt;br /&gt;
the Hyrax configuration file, called bes.xml.  Details of these&lt;br /&gt;
options are found in the Hyrax documentation, but these are the&lt;br /&gt;
decisions you&#039;ll have to make:&lt;br /&gt;
&lt;br /&gt;
;What kind of data&lt;br /&gt;
:Hyrax is equipped to serve data stored in any of several different file formats, HDF, netCDF and others.  Each different format requires its own handler, and your machine must have shared libraries containing these handlers installed.  For example, in order to serve netCDF data, the netCDF handler library must be available to Hyrax, and identified in its configuration file.&lt;br /&gt;
&lt;br /&gt;
;Where the data lives&lt;br /&gt;
:A server equipped to serve data must be able to find that data.  Lines in the bes.xml file identify the disk location of your data files.  Hyrax can provide a limited amount of browsing capacity to users, through its [[WWW interface]].  Access is specificed by identifying directories where data resides.&lt;br /&gt;
&lt;br /&gt;
;What kinds of services&lt;br /&gt;
:Along with simply supplying data, Hyrax can supply several different services, including [[serving the data as ASCII values]], and the form-driven [[web interface]].  The bes.xml file is used to specify the list of services.  The drivers for these services are installed as part of the default installation of Hyrax, but they need to be chosen and identified in bes.xml.&lt;br /&gt;
&lt;br /&gt;
Once these three tasks are accomplished, and once data is moved into&lt;br /&gt;
the appropriate directories, your server should be ready to provide&lt;br /&gt;
data to all comers, but most specifically to its OLFS.&lt;br /&gt;
&lt;br /&gt;
====Installing OLFS====&lt;br /&gt;
&lt;br /&gt;
The OLFS is a Java servlet, so its [[installation]] involves&lt;br /&gt;
[[installing the Tomcat servlet infrastructure]], and then configuring&lt;br /&gt;
that with the OLFS.  There are four configuration files, but unless&lt;br /&gt;
yours is an unusual case, you&#039;ll likely only have to look at two of&lt;br /&gt;
them.  See [[Hyrax_-_OLFS_Configuration]] for more information.&lt;br /&gt;
&lt;br /&gt;
Use the&lt;br /&gt;
[[Hyrax_-_OLFS_Configuration#olfs.xml_Configuration_File|olfs.xml]]&lt;br /&gt;
file to specify these important features of the OLFS operation:&lt;br /&gt;
&lt;br /&gt;
;Address of BES&lt;br /&gt;
:The OLFS is the front door to data from the BES.  Use the olfs.xml file to identify where to find this server.&lt;br /&gt;
&lt;br /&gt;
;Dispatch handlers&lt;br /&gt;
:The OLFS &amp;quot;offers&amp;quot; the incoming URL to a series of &amp;quot;dispatch handlers&amp;quot; until one accepts it and executes.  This allows the OLFS to offer directory and catalog services, as well as data services and more.  Use the olfs.xml file to nominate the dispatch handlers (they come with the OLFS, and do not need to be separately installed).&lt;br /&gt;
&lt;br /&gt;
;Catalog requests&lt;br /&gt;
:The OLFS can handle [[Hyrax_-_THREDDS_Configuration|THREDDS]] catalog requests, as well as directory requests, an older part of the DAP standard that also involves data about a collection of data files.  The THREDDS information can be static (provided from a file) or dynamic (generated by a review of the available data).&lt;br /&gt;
&lt;br /&gt;
;File access&lt;br /&gt;
:You may have individual files you want served intact via this server.  These might include documentation of the data files, or of the server.&lt;br /&gt;
&lt;br /&gt;
There are some other features, too, like a bot blocker and a version&lt;br /&gt;
message, as well as the experimental SOAP message handler.  These are&lt;br /&gt;
also configured with&lt;br /&gt;
[[Hyrax_-_OLFS_Configuration#olfs.xml_Configuration_File|olfs.xml]],&lt;br /&gt;
and you&#039;ll find more information about them at the link.&lt;br /&gt;
&lt;br /&gt;
====THREDDS====&lt;br /&gt;
&lt;br /&gt;
[http://www.unidata.ucar.edu/projects/THREDDS/tech/TDS.html THREDDS]&lt;br /&gt;
is a catalog standard for scientific data promoted by scientists at&lt;br /&gt;
[http://www.unidata.ucar.edu UCAR].  It allows &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The default file will allow dynamic catalogs to be created and should&lt;br /&gt;
allow your server to respond to THREDDS requests properly.  It&#039;s&lt;br /&gt;
possible you may want to serve a static THREDDS catalog, too.  This&lt;br /&gt;
can be done by editing the catalog.xml file, and you&#039;ll find&lt;br /&gt;
links to instructions for that at [[Hyrax - THREDDS Configuration]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Multiple BES Configuration====&lt;br /&gt;
&lt;br /&gt;
You can configure a single OLFS to work with multiple BES instances.&lt;br /&gt;
This offers an opportunity to do rudimentary load balancing, or to&lt;br /&gt;
isolate data on one server or another.  See the &lt;br /&gt;
[[Hyrax_-_Configuring_The_OLFS_To_Work_With_Multiple_BES&#039;s|Hyrax configuration chapter]]&lt;br /&gt;
for more information on the subject.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Hyrax_-_OLFS_Configuration&amp;diff=4908</id>
		<title>Hyrax - OLFS Configuration</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Hyrax_-_OLFS_Configuration&amp;diff=4908"/>
		<updated>2009-10-06T12:53:23Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: /* Dispatch Handlers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Attention!&#039;&#039;&#039; Major changes have been made to the format and content of the &#039;&#039;olfs.xml&#039;&#039; file since OLFS version 1.4.2 Read this document carefully so that you may fully understand how to configure this new version of the OLFS.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
This document should help you get started configuring the OLFS component of Hyrax. This servlet was developed, compiled, and tested using the java 1.5.0 compiler, the 1.5.0 Java Virtual Machine, and Jakarta Tomcat 6.x.x (which also provided the javax.servlet packages).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note&#039;&#039;&#039;&#039;&#039;: All Examples of web.xml configurations in this document were checked against Jakarta Tomcat 6.0.14&lt;br /&gt;
&lt;br /&gt;
The OLFS web application is composed of two servlets, the OLFS servlet and the Docs servlet.&lt;br /&gt;
&lt;br /&gt;
* The OLFS servlet does the majority of the work in the OLFS web application. It does this by providing a flexible &amp;quot;dispatch&amp;quot; mechanism through which incoming requests are evaluated by a series of DispatchHandlers that can choose to handle the request, or ignore it. The OLFS ships with a standard set of DispathHandlers which handle requests for  OPeNDAP data products, THREDDS catalogs, and OPeNDAP directories. These defalut DispatchHandlers can be augmented by adding custom handlers without the need to recompile the software. All of the DispatchHandlers used by the OLFS are identified in the &#039;&#039;&#039;olfs.xml&#039;&#039;&#039; configuration file.&lt;br /&gt;
&lt;br /&gt;
* The Docs servlet provides clients access to a tree of static documents. By default a minimal set of documents are provide (conaining information about Hyrax), these can be replaced by user supplied documents and images. By changing the images and documents available through the Docs servlet the data provider can further customize their Hyrax installtion.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
=OLFS Servlet Configuration=&lt;br /&gt;
&lt;br /&gt;
The OLFS servlet is the front end (public interface) for [[Hyrax]]. It provides THREDDS catalogs, directory views, logging, and authentication services. The OLFS relies on one or more instances of the [BES] to provide it with data access and basic catalog metadata.&lt;br /&gt;
&lt;br /&gt;
==Dispatch Handlers==&lt;br /&gt;
&lt;br /&gt;
Request dispatch is the process in through which the OLFS determines what actual piece of code is going to respond to a given incoming request. This version of the OLFS handles each incoming request by offering the request to a series of DispatchHandlers. Each DispatchHandler is asked if it can handle the request. The first DispatchHandler to say that it can is then asked to handle the request. The OLFS creates an ordered list of DispatchHandlers by reading the &#039;&#039;&#039;olfs.xml&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
The order of the list is significant. There is no guarantee that two (or more) DispatchHandlers may claim a particular request. Since the first DispatchHandler in the list to claim a request gets to service it, changing the order of the DispatchHandlers can change the behaviour of the OLFS (and thus of Hyrax). For example the URL: &lt;br /&gt;
 http://localhost:8080/opendap/data/ &lt;br /&gt;
Is recognized by both the &#039;&#039;DirectoryDispatchHandler&#039;&#039; and the &#039;&#039;ThreddsDispatchHandler&#039;&#039;  as a request for a directory view: both can provide a such a view. However, only the  &#039;&#039;DirectoryDispatchHandler&#039;&#039; can be configured to not claim the request and pass it on for another handler (in this case the &#039;&#039;ThreddsDispatchHandler&#039;&#039;) to pickup. The result is that if you put the &#039;&#039;ThreddsDispatchHandler&#039;&#039; prior to the &#039;&#039;DirectoryDispatchHandler&#039;&#039; on the list there will be no possible way to get OPeNDAP directory view - the  &#039;&#039;ThreddsDispatchHandler&#039;&#039; will claim them all.&lt;br /&gt;
&lt;br /&gt;
The usefulness of this dispatching scheme is that it creates extensibility. If a third party wishes to add new functionality to Hyrax one way is to write a DispatchHandler. To incorporate it into Hyrax they only need to add it to the list in the &#039;&#039;&#039;olfs.xml&#039;&#039;&#039; and add the java classes to the Tomcat lib directory.&lt;br /&gt;
&lt;br /&gt;
==Files==&lt;br /&gt;
The OLFS servlet gets its configuration from 4 files. In general all of your configuration need will be met by making changes to the first two: &#039;&#039;&#039;olfs.xml&#039;&#039;&#039; and &#039;&#039;&#039;catalog.xml&#039;&#039;&#039; located in the &#039;persistent content directory&#039;: &#039;&#039;$CATALINA_HOME/content/opendap&#039;&#039;&lt;br /&gt;
:&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;olfs.xml&#039;&#039;&#039; &lt;br /&gt;
:&#039;&#039;&#039;&#039;&#039;role:&#039;&#039;&#039;&#039;&#039; Contains the localized OLFS configuration - location of the BES(s), directory view instructions, etc. &lt;br /&gt;
:&#039;&#039;&#039;&#039;&#039;location:&#039;&#039;&#039;&#039;&#039; In the persistent content directory which by default is located at &#039;&#039;$CATALINA_HOME/content/opendap/&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;catalog.xml&#039;&#039;&#039; &lt;br /&gt;
:&#039;&#039;&#039;&#039;&#039;role:&#039;&#039;&#039;&#039;&#039; Master(top-level) THREDDS catalog content for static THREDDS catalogs. &lt;br /&gt;
:&#039;&#039;&#039;&#039;&#039;location:&#039;&#039;&#039;&#039;&#039;  In the persistent content directory which by default is located at &#039;&#039;$CATALINA_HOME/content/opendap/&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;web.xml&#039;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&#039;&#039;&#039;role:&#039;&#039;&#039;&#039;&#039; Core servlet configuration. &lt;br /&gt;
:&#039;&#039;&#039;&#039;&#039;location:&#039;&#039;&#039;&#039;&#039; The servlet&#039;s web.xml file located in the WEB-INF directory of the web application &amp;quot;opendap&amp;quot;. Typically that means &#039;&#039;$CATALINA_HOME/webapps/opendap/WEB-INF/web.xml &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;&#039;&#039;&#039;log4j.xml&#039;&#039;&#039;&lt;br /&gt;
:&#039;&#039;&#039;&#039;&#039;role:&#039;&#039;&#039;&#039;&#039; Contains the logging configuration for Hyrax.&lt;br /&gt;
:&#039;&#039;&#039;&#039;&#039;location:&#039;&#039;&#039;&#039;&#039; The default location for the &#039;&#039;log4j.xml&#039;&#039; is in the WEB-INF directory of the web application &amp;quot;opendap&amp;quot;. Typically that means &#039;&#039;$CATALINA_HOME/webapps/opendap/WEB-INF/log4j.xml&#039;&#039;  However, Hyrax can be configured to look in additional places for the &#039;&#039;log4j.xml&#039;&#039; file. [[Hyrax - Logging Configuration| Read More About It Here]].&lt;br /&gt;
&lt;br /&gt;
=&#039;&#039;&#039;olfs.xml&#039;&#039;&#039; Configuration File=&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Attention!&#039;&#039;&#039; Major changes have been made to the format and content of the &#039;&#039;&#039;olfs.xml&#039;&#039;&#039; file since OLFS version 1.4.2. Read this document carefully so that you may fully understand how to configure this new version of the OLFS.&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For those of you that already have Hyrax this change will render your current olfs.xml obsolete. You have two options, either:&lt;br /&gt;
&lt;br /&gt;
Remove the directory &#039;&#039;$CATALINA_HOME/content/opendap&#039;&#039;. Restarting Tomcat will cause it to be recreated with a new compatible &#039;&#039;&#039;olfs.xm&#039;&#039;&#039;l file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OR&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
2) Copy the file from the web application: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;        cp $CATALINA_HOME/webapps/opendap/initialContent/olfs.xml  $CATALINA_HOME/content/opendap&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Then read the rest of this section to localize your new installation.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;olfs.xml&#039;&#039;&#039; file contains the core configuration of the OLFS. It identifies all of the DispatchHandlers to be used by the OLFS, at it must identify at least one BES to be paired with the OLFS and it controls both view and access behaviours of the OLFS servlet.&lt;br /&gt;
&lt;br /&gt;
==OLFSConfig element==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;&#039;&#039;OLFSConfig&#039;&#039;&amp;gt; element is the document root and it contains three elements that suppy the configuration for the OLFS: &amp;lt;&#039;&#039;BESConfig&#039;&#039;&amp;gt;, &amp;lt;&#039;&#039;DirectoryView&#039;&#039;&amp;gt;, and &amp;lt;&#039;&#039;AllowDirectDataSourceAccess&#039;&#039; &amp;gt;&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;&#039;&#039;DispatchHandlers&#039;&#039;&amp;gt; element==&lt;br /&gt;
The &amp;lt;&#039;&#039;DispatchHandlers&#039;&#039;&amp;gt; element has two child elements: &amp;lt;&#039;&#039;HttpGetHandlers&#039;&#039;&amp;gt; and &amp;lt;&#039;&#039;HttpPostHandlers&#039;&#039;&amp;gt;. The &amp;lt;&#039;&#039;HttpGetHandlers&#039;&#039;&amp;gt; contains and ordered list of the DispatchHandler classes used by the OLFS to handle incoming HTTP GET requests. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;&#039;&#039;HttpGetHandlers&#039;&#039;&amp;gt; element===&lt;br /&gt;
The &amp;lt;&#039;&#039;HttpGetHandlers&#039;&#039;&amp;gt; contains and ordered list of the DispatchHandler classes used by the OLFS to handle incoming HTTP GET requests.  The list order is significant, and permutating the order will (probably negatively) change the behavior of the OLFS. Each DispatchHandler on the list will be asked to handle the request. The first DispatchHandler on the list to claim the request will be asked to build the response.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;&#039;&#039;HttpPostHandlers&#039;&#039;&amp;gt; element===&lt;br /&gt;
The &amp;lt;&#039;&#039;HttpPostHandlers&#039;&#039;&amp;gt; contains and ordered list of the DispatchHandler classes used by the OLFS to handle incoming HTTP POST requests.  The list order is significant, and permutating the order will (probably negatively) change the behavior of the OLFS. Each DispatchHandler on the list will be asked to handle the request. The first DispatchHandler on the list to claim the request will be asked to build the response.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;&#039;&#039;Handler&#039;&#039;&amp;gt; elements====&lt;br /&gt;
&lt;br /&gt;
Both the  &amp;lt;&#039;&#039;HttpGetHandlers&#039;&#039;&amp;gt; and &amp;lt;&#039;&#039;HttpPostHandlers&#039;&#039;&amp;gt; contain an orderd list of &amp;lt;&#039;&#039;Handler&#039;&#039;&amp;gt; elements. Each &amp;lt;&#039;&#039;Handler&#039;&#039;&amp;gt; must have an attribute call &#039;&#039;className&#039;&#039; whose value is set to the fully qualified Java class name for the DispatchHandler implementation to be used. For example:&lt;br /&gt;
&lt;br /&gt;
            &amp;amp;lt;Handler className=&amp;quot;opendap.bes.VersionDispatchHandler&amp;quot; /&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
Names the class &#039;&#039;opendap.bes.VersionDispatchHandler&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Each &amp;lt;&#039;&#039;Handler&#039;&#039;&amp;gt; element may contain a collection of child elements that provide configuration information to the DispatchHandler implementation. In this example:&lt;br /&gt;
            &amp;amp;lt;Handler className=&amp;quot;opendap.bes.DirectoryDispatchHandler&amp;quot;&amp;amp;gt;&lt;br /&gt;
                &amp;amp;lt;DefaultDirectoryView&amp;amp;gt;OPeNDAP&amp;amp;lt;/DefaultDirectoryView&amp;amp;gt;&lt;br /&gt;
            &amp;amp;lt;/Handler&amp;amp;gt;&lt;br /&gt;
The &amp;lt;&#039;&#039;Handler&#039;&#039;&amp;gt; element contains a child element &amp;lt;&#039;&#039;DefaultDirectoryView&#039;&#039;&amp;gt; that specifies the default directory view for Hyrax to the &#039;&#039;DirectoryDispatchHandler&#039;&#039; class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==HTTP GET Handlers==&lt;br /&gt;
&lt;br /&gt;
Hyrax uses the following DispatchHandlers to handle HTTP GET requests:&lt;br /&gt;
&lt;br /&gt;
* BESManager - Provides configuration and access to the BES(s) for the other handlers. &lt;br /&gt;
* BotBlocker - This optional handler may be used to block access to your server individual IP addressesl or groups of IP addresses.&lt;br /&gt;
* StaticCatalogDispatch - Provides static THREDDS catalog services for Hyrax.&lt;br /&gt;
* DapDispatchHandler - Handles all DAP requests.&lt;br /&gt;
* DirectoryDispatchHandler - Handles the OPeNDAP directory view (contents.html)  requests.&lt;br /&gt;
* SpecialRequestDispatchHandler - Handles special requests (help, system properties, staus, etc.)&lt;br /&gt;
* VersionDispatchHandler - Handles the version document requests.&lt;br /&gt;
* FileDispatchHandler - Handles requests for file level access. (README files etc.)&lt;br /&gt;
* BESThreddsDispatchHandler - Provides dynamic THREDDS catalogs of all BES holdings..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== BESManager ===&lt;br /&gt;
&lt;br /&gt;
Provides configuration and access to the BES(s) for the other handlers. This DispatchHandler is key to the function of Hyrax. In it each BES that is connected to a Hyrax installation is defined. The following examples will show a single BES example. &#039;&#039;&#039;[[Hyrax - Configuring The OLFS To Work With Multiple BES&#039;s|For more information on configuring Hyrax to use multiple BES&#039;s look here.]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Each BES is identified using a seperate &amp;lt;&#039;&#039;BES&#039;&#039;&amp;gt; child element inside of the &amp;lt;&#039;&#039;Handler&#039;&#039;&amp;gt; element that references the BESManager class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;&#039;&#039;BES&#039;&#039;&amp;gt; element====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;&#039;&#039;BES&#039;&#039;&amp;gt; element provides the OLFS with connection and control information for a BES. There are 4 child elements in a &amp;lt;&#039;&#039;BES&#039;&#039;&amp;gt; element: &amp;lt;&#039;&#039;prefix&#039;&#039;&amp;gt;, &amp;lt;&#039;&#039;host&#039;&#039;&amp;gt;, &amp;lt;&#039;&#039;port&#039;&#039;&amp;gt;, and &amp;lt;&#039;&#039;ClientPool&#039;&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&#039;&#039;&#039;&amp;lt;prefix&amp;gt;&#039;&#039;&#039; element=====&lt;br /&gt;
This element contains the URL prefix that the OLFS will associate with this BES. This provides a mapping bewteen this BES to the URI space serviced by the OLFS. Essentailly what this means is that the prefix is a token that is placed between the &#039;&#039;host:port/context/&#039;&#039; part of the Hyrax URL and the catalog root used to designate a particular BES instance in the case that multiple BES&#039;s are available to a single OLFS.  For a single BES (the default configuration)  the tag MUST be designated by &amp;quot;/&amp;quot;. The prefix is used to provide a mapping for each BES connected to the OLFS to URI space serviced by the OLFS. &lt;br /&gt;
# There &#039;&#039;&#039;must&#039;&#039;&#039; one (but only one) BES element in the BESManager handler configuration whose prefix has a value of &amp;quot;/&amp;quot; (see &#039;&#039;example 1&#039;&#039;). There may be more than one &amp;lt;&#039;&#039;BES&#039;&#039;&amp;gt; but there must be at least that one.&lt;br /&gt;
# For a single BES (the one with &amp;quot;/&amp;quot; as it&#039;s prefix) no additional effort is required. However, when using multiple BES&#039;s it is neccesary that each BES have a mount point exposed as a directory (aka collection) in URI space where it&#039;s going to appear. See [[Hyrax - Configuring The OLFS To Work With Multiple BES&#039;s|Configuring With Multiple BES&#039;s]] for more information.&lt;br /&gt;
# The prefix string &#039;&#039;&#039;must&#039;&#039;&#039; always begin with the slash (&amp;quot;/&amp;quot;) character. (see &#039;&#039;example 2&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;example 1:&#039;&#039; &lt;br /&gt;
 &amp;lt;prefix&amp;gt;/&amp;lt;/prefix&amp;gt;&lt;br /&gt;
&#039;&#039;example 2:&#039;&#039;&lt;br /&gt;
 &amp;lt;prefix&amp;gt;/data/nc&amp;lt;/prefix&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&#039;&#039;&#039;&amp;lt;host&amp;gt;&#039;&#039;&#039; element=====&lt;br /&gt;
This element contains the host name or IP address of the BES.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;example:&#039;&#039; &lt;br /&gt;
 &amp;lt;host&amp;gt;test.opendap.org&amp;lt;/host &amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&#039;&#039;&#039;&amp;lt;port&amp;gt;&#039;&#039;&#039; element=====&lt;br /&gt;
The port number on which the BES is listening.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;example:&#039;&#039; &lt;br /&gt;
 &amp;lt;port&amp;gt;10002&amp;lt;/port &amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====&#039;&#039;&#039;&amp;lt;ClientPool&amp;gt;&#039;&#039;&#039; element=====&lt;br /&gt;
Configures the behavior of the pool of client connections that the OLFS maintains with the BES. These connections are pooled for efficiency and speed. Currently the only configuration item available is to control the maximum number of concurrent BES client connections that the OLFS may make, the default is 10, but the size should be optimized for your locale by empirical testing. The size of the Client Pool is controlled by the &#039;&#039;maximum&#039;&#039; attribute. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;example:&#039;&#039; &lt;br /&gt;
 &amp;lt;ClientPool maximum=&amp;quot;17&amp;quot; /&amp;gt;&lt;br /&gt;
If the &amp;lt;ClientPool&amp;gt; element is missing the pool size defaults to 10.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== BotBlocker (optional) ===&lt;br /&gt;
&lt;br /&gt;
This optional handler can be used to block access from specific IP addresses and by a ranges of IP addresses using a regular expressions. It turns out that many of the web crawling robots do not respect the robots.txt file when one is provided. Since many sites do not want their data holdings exhaustively queried by automated software, we created a simple robot blocking handler to protect system resources from non-compliant robots.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;IpAddress&amp;gt; element  ====&lt;br /&gt;
The text value of this element should be the IP address of a system which you would like to block from accessing your service. For example:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;IpAddress&amp;gt;128.193.64.33&amp;lt;/IPAddress&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Blocks the system located at 128.193.64.33 from accessing your server. There can be zero or more &amp;lt;IpAddress&amp;gt; elements in the &amp;lt;BotBlocker&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt; IpMatch &amp;gt; element  ====&lt;br /&gt;
The text value of this element should be the regular expression that will be used to match the IP addresses clients attempting to access Hyrax.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;IpMatch&amp;gt;65\.55\.[012]?\d?\d\.[012]?\d?\d&amp;lt;/IpMatch&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Matches all IP address beginning with 65.55 and thus block access for clients whose IP addresses lie in that range. There can be zero or more &amp;lt; IpMatch &amp;gt; elements in the Handler configuration for teh BotBlocker&lt;br /&gt;
&lt;br /&gt;
==== Example Configuration Element ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;Handler className=&amp;quot;opendap.coreServlet.BotBlocker&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;IpAddress&amp;gt;127.0.0.1&amp;lt;/IpAddress&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- This matches all IPv4 addresses, work yours out from here.... --&amp;gt;&lt;br /&gt;
        &amp;lt;!--&amp;lt;IpMatch&amp;gt;[012]?\d?\d\.[012]?\d?\d\.[012]?\d?\d\.[012]?\d?\d&amp;lt;/IpMatch&amp;gt; --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- Any IP starting with 65.55 (MSN bots the don&#039;t respect robots.txt  --&amp;gt;&lt;br /&gt;
        &amp;lt;IpMatch&amp;gt;65\.55\.[012]?\d?\d\.[012]?\d?\d&amp;lt;/IpMatch&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!-- &amp;lt;/Handler&amp;gt;  --&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Static Thredds Catalog Dispatch Handler ===&lt;br /&gt;
&lt;br /&gt;
Serves static THREDDS catalogs. Provides both a presentation view (HTML) for humans using browsers, and direct catalog access (XML). &lt;br /&gt;
&lt;br /&gt;
====&amp;lt;&#039;&#039;prefix&#039;&#039;&amp;gt; element====&lt;br /&gt;
Defines the path component the comes after the servlet context and before all catalog requests. For example, if the prefix is &#039;&#039;thredds&#039;&#039;, then http://localhost:8080/opendap/thredds/ should give you the top-level static catalog (the contents of the file $CATALINA_HOME/content/opendap/catalog.xml)&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;&#039;&#039;useMemoryCache&#039;&#039;&amp;gt; element====&lt;br /&gt;
If the text value of this element is the string &#039;true&#039; this will cause the servlet to ingest all of the static catalog files at startup and hold their contents in memory. [[THREDDS_using_XSLT|See this page for more information about the memory caching operations]]&lt;br /&gt;
&lt;br /&gt;
==== Example Configuration Element ====&lt;br /&gt;
            &amp;lt;Handler className=&amp;quot;opendap.threddsHandler.Dispatch&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;prefix&amp;gt;thredds&amp;lt;/prefix&amp;gt;&lt;br /&gt;
                &amp;lt;useMemoryCache&amp;gt;true&amp;lt;/useMemoryCache&amp;gt;&lt;br /&gt;
            &amp;lt;/Handler&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== DapDispatchHandler ===&lt;br /&gt;
&lt;br /&gt;
Handles DAP request for Hyrax. For example the DapDispatchHandler will handle requests for DDS, DAS, DDX and DAP data . This DispatchHandler has no configuration elements, so it will always be written like this:&lt;br /&gt;
==== Example Configuration Element ====&lt;br /&gt;
            &amp;lt;Handler className=&amp;quot;opendap.bes.DapDispatchHandler&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== DirectoryDispatchHandler ===&lt;br /&gt;
Handles the OPeNDAP directory view (contents.html)  requests. &lt;br /&gt;
==== Example Configuration Element ====&lt;br /&gt;
            &amp;lt;Handler className=&amp;quot;opendap.bes.DirectoryDispatchHandler&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== SpecialRequestDispatchHandler ===&lt;br /&gt;
Handles special requests (help, system properties, staus, etc.). This DispatchHandler has no configuration elements, so it will always be written like this:&lt;br /&gt;
==== Example Configuration Element ====&lt;br /&gt;
            &amp;lt;Handler className=&amp;quot;opendap.coreServlet.SpecialRequestDispatchHandler&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== VersionDispatchHandler ===&lt;br /&gt;
Handles the version document requests. This DispatchHandler has no configuration elements, so it will always be written like this:&lt;br /&gt;
==== Example Configuration Element ====&lt;br /&gt;
            &amp;lt;Handler className=&amp;quot;opendap.bes.VersionDispatchHandler&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== File Dispatch Handler ===&lt;br /&gt;
&lt;br /&gt;
Handles requests for file level access. (README files etc.). This DispatchHandler has a single configuration element &amp;lt;&#039;&#039;AllowDirectDataSourceAccess&#039;&#039;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;&#039;&#039;AllowDirectDataSourceAccess&#039;&#039;&amp;gt; element====&lt;br /&gt;
The &amp;lt;&#039;&#039;AllowDirectDataSourceAccess&#039;&#039; /&amp;gt; element controls the users ability to directly access data sources via the web interface. If this element is present in the OLFS.xml file (and not commented out as in the example below) a client can get an entire data source (such as an HDF file) by simply requesting it through the HTTP URL interface. This is NOT a good practice and is not recommended. By default Hyrax ships with this option turned off and I recommend that you leave it that way unless you really want users to be able to circumvent the OPeNDAP request interface and have direct access to the data products stored on your server.&lt;br /&gt;
&lt;br /&gt;
==== Example Configuration Element ====&lt;br /&gt;
In the following example, the FileDispatchHandler is configured to deny direct access to data sources (note that the &amp;lt;&#039;&#039;AllowDirectDataSourceAccess&#039;&#039; /&amp;gt; element is commented out:&lt;br /&gt;
&lt;br /&gt;
            &amp;amp;lt;Handler className=&amp;quot;opendap.bes.FileDispatchHandler&amp;quot; &amp;amp;gt;&lt;br /&gt;
                &amp;amp;lt;!-- &amp;amp;lt;AllowDirectDataSourceAccess /&amp;amp;gt; --&amp;amp;gt;&lt;br /&gt;
            &amp;amp;lt;/Handler&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== BES Thredds Dispatch Handler ===&lt;br /&gt;
&lt;br /&gt;
Provides dynamic THREDDS catalogs of BES data holdings. &lt;br /&gt;
&lt;br /&gt;
==== Example Configuration Element ====&lt;br /&gt;
&lt;br /&gt;
            &amp;lt;Handler className=&amp;quot;opendap.bes.BESThreddsDispatchHandler&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==HTTP POST Handlers==&lt;br /&gt;
&lt;br /&gt;
Hyrax currently has a single HTTP POST DispatchHandler implementation: &#039;&#039;SOAPRequestDispatcher&#039;&#039;. It provides a prototype SOAP interface for Hyrax. It will handle &#039;&#039;&#039;ALL&#039;&#039;&#039; HTTP POST responses, regardless of the path URI. It will always expect to find a SOAP request in the body of the POST.&lt;br /&gt;
&lt;br /&gt;
=== SOAPRequestDispatcher ===&lt;br /&gt;
Handles &#039;&#039;&#039;ALL&#039;&#039;&#039;  HTTP POST requests that it receives, and assumes that they contain a SOAP request document in the body of the POST message.  This DispatchHandler has a single configuration element &amp;lt;&#039;&#039;OpendapSoapDispatchHandler&#039;&#039;&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====&amp;lt;&#039;&#039;OpendapSoapDispatchHandler&#039;&#039;&amp;gt; element====&lt;br /&gt;
The &amp;lt;&#039;&#039;OpendapSoapDispatchHandler&#039;&#039;&amp;gt; element is used to specify which class is to used to provide the body of the SOAP responses. &lt;br /&gt;
&lt;br /&gt;
In the following example, the DirectoryDispatchHandler is configured to provide the OPeNDAP directory view as the default:&lt;br /&gt;
            &amp;lt;Handler className=&amp;quot;opendap.coreServlet.SOAPRequestDispatcher&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;OpendapSoapDispatchHandler&amp;gt;opendap.bes.SoapDispatchHandler&amp;lt;/OpendapSoapDispatchHandler &amp;gt;&lt;br /&gt;
            &amp;lt;/Handler&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Example olfs.xml file ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;OLFSConfig&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;amp;lt;DispatchHandlers&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;amp;lt;HttpGetHandlers&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
            &amp;amp;lt;Handler className=&amp;quot;opendap.bes.BESManager&amp;quot;&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;amp;lt;BES&amp;amp;gt;&lt;br /&gt;
                    &amp;amp;lt;prefix&amp;amp;gt;/&amp;amp;lt;/prefix&amp;amp;gt;&lt;br /&gt;
                    &amp;amp;lt;host&amp;amp;gt;localhost&amp;amp;lt;/host&amp;amp;gt;&lt;br /&gt;
                    &amp;amp;lt;port&amp;amp;gt;10002&amp;amp;lt;/port&amp;amp;gt;&lt;br /&gt;
                    &amp;amp;lt;ClientPool maximum=&amp;quot;10&amp;quot; /&amp;amp;gt;&lt;br /&gt;
                &amp;amp;lt;/BES&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
            &amp;amp;lt;/Handler&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
            &amp;amp;lt;Handler className=&amp;quot;opendap.coreServlet.SpecialRequestDispatchHandler&amp;quot; /&amp;amp;gt;&lt;br /&gt;
            &lt;br /&gt;
            &amp;amp;lt;Handler className=&amp;quot;opendap.bes.VersionDispatchHandler&amp;quot; /&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
            &amp;amp;lt;Handler className=&amp;quot;opendap.bes.DirectoryDispatchHandler&amp;quot;&amp;amp;gt;&lt;br /&gt;
                &amp;amp;lt;DefaultDirectoryView&amp;amp;gt;OPeNDAP&amp;amp;lt;/DefaultDirectoryView&amp;amp;gt;&lt;br /&gt;
            &amp;amp;lt;/Handler&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
            &amp;amp;lt;Handler className=&amp;quot;opendap.bes.DapDispatchHandler&amp;quot; /&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
            &amp;amp;lt;Handler className=&amp;quot;opendap.bes.FileDispatchHandler&amp;quot; &amp;amp;gt;&lt;br /&gt;
                &amp;amp;lt;!-- &amp;amp;lt;AllowDirectDataSourceAccess /&amp;amp;gt; --&amp;amp;gt;&lt;br /&gt;
            &amp;amp;lt;/Handler&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
            &amp;amp;lt;Handler className=&amp;quot;opendap.bes.ThreddsDispatchHandler&amp;quot; /&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;amp;lt;/HttpGetHandlers&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;amp;lt;HttpPostHandlers&amp;amp;gt;&lt;br /&gt;
            &amp;amp;lt;Handler className=&amp;quot;opendap.coreServlet.SOAPRequestDispatcher&amp;quot; &amp;amp;gt;&lt;br /&gt;
                &amp;amp;lt;OpendapSoapDispatchHandler&amp;amp;gt;opendap.bes.SoapDispatchHandler&amp;amp;lt;/OpendapSoapDispatchHandler&amp;amp;gt;&lt;br /&gt;
            &amp;amp;lt;/Handler&amp;amp;gt;&lt;br /&gt;
        &amp;amp;lt;/HttpPostHandlers&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;amp;lt;/DispatchHandlers&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;/OLFSConfig&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=&#039;&#039;&#039;catalog.xml&#039;&#039;&#039; file=&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;catalog.xml&#039;&#039;&#039; file contains the THREDDS catalog configuration for Hyrax. It&#039;s complex. [[Hyrax - THREDDS Configuration| Read About It Here]].&lt;br /&gt;
&lt;br /&gt;
=&#039;&#039;&#039;log4j.xml&#039;&#039;&#039; file=&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;log4j.xml&#039;&#039;&#039; file contains the logging configuration for Hyrax. It too is complex. [[Hyrax - Logging Configuration| Read About It Here]].&lt;br /&gt;
&lt;br /&gt;
=&#039;&#039;&#039;web.xml&#039;&#039;&#039; file=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;We strongly recommend that you do &#039;&#039;&#039;NOT&#039;&#039;&#039; mess with the web.xml file. At least for now. Future versions of Server and the OLFS may have &amp;quot;user configurable&amp;quot; stuff in the web.xml file, but this version does not. &#039;&#039;&#039;SO JUST DON&#039;T DO IT. OK?&#039;&#039;&#039;&#039;&#039;  Having said that, here are the details regarding the web.xml file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Servlet Definition===&lt;br /&gt;
The OLFS running in the opendap context area needs an entry in the &#039;&#039;&#039;web.xml&#039;&#039;&#039; file. Multiple instances of a servlet and/or several different servlets can be configured in the one web.xml file. For instance you could have a DTS and a Hyrax running in from the same &#039;&#039;&#039;web.xml&#039;&#039;&#039; and thus under the same servlet context. Running multiple instances of the OLFS in a single web.xml file (aka context) will &#039;&#039;&#039;NOT&#039;&#039;&#039; work.&lt;br /&gt;
&lt;br /&gt;
Each a servlet needs a unique name which is specified inside a &amp;lt;&#039;&#039;servlet&#039;&#039;&amp;gt; element in the web.xml file using the &amp;lt;&#039;&#039;servlet-name&#039;&#039;&amp;gt; tag. This is a name of convenience, for example if you where serving data from an ARGOS satellite you might call that servlet &#039;&#039;argos&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Additionally each instance of a &amp;lt;&#039;&#039;servlet&#039;&#039;&amp;gt; must specify which Java class contains the actual servlet to run. This is done in the &amp;lt;&#039;&#039;servlet-class&#039;&#039;&amp;gt; element. For example the OLFS servlet class name is &#039;&#039;opendap.coreServlet.DispatchServlet&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Here is a syntax example combining the two previous example values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;lt;servlet&amp;amp;gt;&lt;br /&gt;
	&amp;amp;lt;servlet-name&amp;amp;gt;hyrax&amp;amp;lt;/servlet-name&amp;amp;gt;&lt;br /&gt;
	&amp;amp;lt;servlet-class&amp;amp;gt;opendap.coreServlet.DispatchServlet&amp;amp;lt;/servlet-name&amp;amp;gt;&lt;br /&gt;
	.&lt;br /&gt;
	.&lt;br /&gt;
	.&lt;br /&gt;
&amp;amp;lt;/servlet&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This servlet could then be accessed as:  &#039;&#039;http://hostname/opendap/servlet/argos&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You may also add to the end of the web.xml file a set of &amp;lt;&#039;&#039;servlet-mapping&#039;&#039;&amp;gt; elements. These allow you to abbreviate the URL or the servlet. By placing the servlet mappings:&lt;br /&gt;
  &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;lt;servlet-mapping&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;servlet-name&amp;amp;gt;argos&amp;amp;lt;/servlet-name&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;url-pattern&amp;amp;gt;/argos&amp;amp;lt;/url-pattern&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;/servlet-mapping&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;servlet-mapping&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;servlet-name&amp;amp;gt;argos&amp;amp;lt;/servlet-name&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;url-pattern&amp;amp;gt;/argos/*&amp;amp;lt;/url-pattern&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;/servlet-mapping&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of the web.xml file our previous example changes it&#039;s URL to: &#039;&#039;http://hostname/opendap/argos&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Eliminating the need for the word servlet in the URL. For more on the &amp;lt;&#039;&#039;servlet-mapping&#039;&#039;&amp;gt; element see the Jakarta-Tomcat documentation.&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;init-param&amp;gt; Elements===&lt;br /&gt;
The OLFS uses &amp;lt;init-param&amp;gt; elements inside of each &amp;lt;servlet&amp;gt; element to get specific configuration information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;init-param&amp;gt;&#039;s common to all OPeNDAP servlets are:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====OLFSConfigFileName====&lt;br /&gt;
This parameter identifies the name of the XML document file that contains the OLFS configuration. This file must be located in the persistent content directory and is typically called &#039;&#039;&#039;olfs.xml&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;amp;lt;init-param&amp;amp;gt;&lt;br /&gt;
	&amp;amp;lt;param-name&amp;amp;gt;OLFSConfigFileName&amp;amp;lt;/param-name&amp;amp;gt;&lt;br /&gt;
	&amp;amp;lt;param-value&amp;amp;gt;olfs.xml&amp;amp;lt;/param-value&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;/init-param&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====DebugOn====&lt;br /&gt;
This controls output to the terminal from which the servlet engine was launched. The value is a list of flags that turn on debugging instrumentation in different parts of the code. Supported values are:&lt;br /&gt;
*&#039;&#039;&#039;probeRequest&#039;&#039;&#039;: Prints a lengthy inspection of the HttpServletRequest object to stdout. &#039;&#039;Don&#039;t leave this on for long, it will clog your Catalina logs.&#039;&#039;&lt;br /&gt;
*&#039;&#039;&#039;DebugInterface&#039;&#039;&#039;: Enables the servers debug interface. This ineractive interface allows a user to look at (and change) the server state via a web browser. &#039;&#039;Enable this only for analysis purposes, disable when finshed!&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Example&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;amp;lt;init-param&amp;amp;gt;&lt;br /&gt;
	&amp;amp;lt;param-name&amp;amp;gt;DebugOn&amp;amp;lt;/param-name&amp;amp;gt;&lt;br /&gt;
	&amp;amp;lt;param-value&amp;amp;gt;probeRequest&amp;amp;lt;/param-value&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;/init-param&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Default&#039;&#039;: If this parameter is not set, or the value field is empty then these features will be disabled - which is what you want unless there is a problem to analyze.&lt;br /&gt;
&lt;br /&gt;
===Example of web.xml content===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;amp;lt;servlet&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;amp;lt;servlet-name&amp;amp;gt;hyrax&amp;amp;lt;/servlet-name&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;amp;lt;servlet-class&amp;amp;gt;opendap.coreServlet.DispatchServlet&amp;amp;lt;/servlet-class&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;amp;lt;init-param&amp;amp;gt;&lt;br /&gt;
        &amp;amp;lt;param-name&amp;amp;gt;DebugOn&amp;amp;lt;/param-name&amp;amp;gt;&lt;br /&gt;
        &amp;amp;lt;param-value&amp;amp;gt;&amp;amp;lt;/param-value&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;/init-param&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;amp;lt;load-on-startup&amp;amp;gt;1&amp;amp;lt;/load-on-startup&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;/servlet&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;servlet-mapping&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;servlet-name&amp;amp;gt;hyrax&amp;amp;lt;/servlet-name&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;url-pattern&amp;amp;gt;*&amp;amp;lt;/url-pattern&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;/servlet-mapping&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;servlet-mapping&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;servlet-name&amp;amp;gt;hyrax&amp;amp;lt;/servlet-name&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;url-pattern&amp;amp;gt;/hyrax&amp;amp;lt;/url-pattern&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;/servlet-mapping&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;servlet-mapping&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;servlet-name&amp;amp;gt;hyrax&amp;amp;lt;/servlet-name&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;url-pattern&amp;amp;gt;/hyrax/*&amp;amp;lt;/url-pattern&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;/servlet-mapping&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Docs Servlet=&lt;br /&gt;
&lt;br /&gt;
The Docs (or documentation) servlet provides the OLFS web application with the ability to serve a tree of static documentation files. By default it will serve the files in the documentation tree provided with the OLFS in the Hyrax distribution. This tree is rooted at &#039;&#039;$CATALINA_HOME/webapps/opendap/docs/&#039;&#039; and contains documentation pertaining to the software in the Hyrax distribution - installation and configuration instruction, release notes, java docs, etc.&lt;br /&gt;
&lt;br /&gt;
If one wishes to replace this information with their own set of web pages, one can remove/replace the files in the default directory. However, installing a new version of Hyrax will cause these files to be overwritten, forcing them to be replaced after the install (and hopefully AFTER the new release documentation had been read and understood by the user).&lt;br /&gt;
&lt;br /&gt;
The Docs servlet provides an alternative to this. If a &#039;&#039;docs&#039;&#039; directory is created in the &#039;&#039;persistent content&#039;&#039; directory for Hyrax the Docs servlet will detect it (when Tomcat is launched) and it will serve files from there instead of from the default location.&lt;br /&gt;
&lt;br /&gt;
This scheme provides 2 beneficial effects:&lt;br /&gt;
&lt;br /&gt;
# It allows localizations of the web documents associated with Hyrax to persist through Hyrax upgrades with no user intervention.&lt;br /&gt;
# It preserves important release documents that ship with the Hyrax software.&lt;br /&gt;
&lt;br /&gt;
In summary,  to provide persistent web pages as part of a Hyrax localization simple create the directory: &#039;&#039;$CATALINA_HOME/content/opendap/&#039;&#039;&#039;docs&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Place your content in there and away you go. If later you wish to view the web based documentation bundled with Hyrax simply change the name of the directory from &#039;&#039;&#039;docs&#039;&#039;&#039; to something else and restart Tomcat. (or, you could just look in the &#039;&#039;$CATALINA_HOME/webapps/opendap/docs&#039;&#039; directory)&lt;br /&gt;
&lt;br /&gt;
In the Docs servlet, if a URL ends in a directory name or a &amp;quot;/&amp;quot; then the servlet will attempt to serve the &#039;&#039;&#039;index.html&#039;&#039;&#039; in that directory. In other words &#039;&#039;&#039;index.html&#039;&#039;&#039; is the default document.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Logging=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Hyrax - Logging Configuration | Logging is a big enough subject we gave it it&#039;s own page.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Authentication &amp;amp; Authorization=&lt;br /&gt;
&lt;br /&gt;
==Request For Input==&lt;br /&gt;
&#039;&#039;So far Hyrax relies on the Tomcat security implementation for authentication services. If after reading this section and the Tomcat documentation on security you are left wanting something more, then please get in touch with us at [http://www.opendap.org OPeNDAP]. We would like to talk with you about your security needs for OPeNDAP Hyrax and possibly develop some use cases that describe your needs. In the future we hope to provide a richer security configuration environment than the one currently offered by Tomcat.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
Hyrax currently relies on the security features implemented by Tomcat for authentication and authorization services. It is recommended that you read carefully and understand the Tomcat  security documentation.&lt;br /&gt;
&lt;br /&gt;
For Tomcat 5.x see:&lt;br /&gt;
*[http://tomcat.apache.org/tomcat-5.5-doc/index.html Tomcat 5.x Documentation]&lt;br /&gt;
**[http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html Section 6: Configuring/Managing User Realms]&lt;br /&gt;
**[http://tomcat.apache.org/tomcat-5.5-doc/ssl-howto.html Section 12: Configuring SSL]&lt;br /&gt;
&lt;br /&gt;
For Tomcat 6.x see:&lt;br /&gt;
*[http://tomcat.apache.org/tomcat-6.0-doc/index.html Tomcat 6.x Documentation]&lt;br /&gt;
**[http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html Section 6: Configuring/Managing User Realms]&lt;br /&gt;
**[http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html Section 12: Configuring SSL]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And that you read chapter 12 of the &lt;br /&gt;
[http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html Java Servlet Specification 2.4]&lt;br /&gt;
that decribes how to configure security constraints at the web application level.&lt;br /&gt;
&lt;br /&gt;
Tomcat security requires fairly extensive additions to the &#039;&#039;&#039;web.xml&#039;&#039;&#039; file. (It is important to keep in mind that altering the &amp;lt;&#039;&#039;servlet&#039;&#039;&amp;gt; definitions may render your Hyrax server inoperable - please see the previous sections that discuss this.)&lt;br /&gt;
&lt;br /&gt;
Examples of security content for the web.xml file can be found in the persistent content directory of the Hyrax server, which by default is located at &#039;&#039;$CATALINA_HOME/content/opendap/&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Limitations ==&lt;br /&gt;
&lt;br /&gt;
Officially Tomcat security supports &#039;&#039;context&#039;&#039; level authentication. What this means is that you can restrict access to the collection of servlets running in a single web application - in other words all of the stuff that is defined in a single &#039;&#039;&#039;web.xml&#039;&#039;&#039; file. You can call out different authentication rules for different &amp;lt;&#039;&#039;url-pattern&#039;&#039;&amp;gt;&#039;s within the web application, but only clients which do not cache ANY security information will be able to easily access the different areas. &lt;br /&gt;
&lt;br /&gt;
For example in your &#039;&#039;&#039;web.xml&#039;&#039;&#039; file you might have:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;amp;lt;security-constraint&amp;amp;gt;&lt;br /&gt;
        &amp;amp;lt;web-resource-collection&amp;amp;gt;&lt;br /&gt;
            &amp;amp;lt;web-resource-name&amp;amp;gt;fnoc1&amp;amp;lt;/web-resource-name&amp;amp;gt;&lt;br /&gt;
            &amp;amp;lt;url-pattern&amp;amp;gt;/hyrax/nc/fnoc1.txt&amp;amp;lt;/url-pattern&amp;amp;gt;&lt;br /&gt;
        &amp;amp;lt;/web-resource-collection&amp;amp;gt;&lt;br /&gt;
        &amp;amp;lt;auth-constraint&amp;amp;gt;&lt;br /&gt;
            &amp;amp;lt;role-name&amp;amp;gt;fn1&amp;amp;lt;/role-name&amp;amp;gt;&lt;br /&gt;
        &amp;amp;lt;/auth-constraint&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;/security-constraint&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;amp;lt;security-constraint&amp;amp;gt;&lt;br /&gt;
        &amp;amp;lt;web-resource-collection&amp;amp;gt;&lt;br /&gt;
             &amp;amp;lt;web-resource-name&amp;amp;gt;fnoc2&amp;amp;lt;/web-resource-name&amp;amp;gt;&lt;br /&gt;
             &amp;amp;lt;url-pattern&amp;amp;gt;/hyrax/nc/fnoc2.txt&amp;amp;lt;/url-pattern&amp;amp;gt;&lt;br /&gt;
         &amp;amp;lt;/web-resource-collection&amp;amp;gt;&lt;br /&gt;
         &amp;amp;lt;auth-constraint&amp;amp;gt;&lt;br /&gt;
             &amp;amp;lt;role-name&amp;amp;gt;fn2&amp;amp;lt;/role-name&amp;amp;gt;&lt;br /&gt;
          &amp;amp;lt;/auth-constraint&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;/security-constraint&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;amp;lt;login-config&amp;amp;gt;&lt;br /&gt;
        &amp;amp;lt;auth-method&amp;amp;gt;BASIC&amp;amp;lt;/auth-method&amp;amp;gt;&lt;br /&gt;
        &amp;amp;lt;realm-name&amp;amp;gt;MyApplicationRealm&amp;amp;lt;/realm-name&amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;/login-config&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where the security roles fn1 and fn2 (defined in the &#039;&#039;&#039;tomcat-users.xml&#039;&#039;&#039; file) have no common members.&lt;br /&gt;
&lt;br /&gt;
The complete URI&#039;s would be:&lt;br /&gt;
&lt;br /&gt;
 http://localhost:8080/mycontext/hyrax/nc/fnoc1.txt&lt;br /&gt;
 http://localhost:8080/mycontext/hyrax/nc/fnoc2.txt&lt;br /&gt;
&lt;br /&gt;
Now - this works, for clients that aren&#039;t too smart - i.e. they don&#039;t cache anything. However, if you access these URLs with a typical browser, once you authenticate for one URI, then you are locked out of the other one until you successfully &amp;quot;reset&amp;quot; the browser (purge all caches).&lt;br /&gt;
&lt;br /&gt;
I think the reason is as follows: In the exchange between Tomcat and the client, Tomcat is sending the header:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;WWW-Authenticate: Basic realm=&amp;quot;MyApplicationRealm&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the client authenticates. When the second URI is accessed Tomcat sends the the same authentication challenge, with the same &amp;lt;code&amp;gt;WWW-Authenticate&amp;lt;/code&amp;gt; header. The client, having recently authenticated to this &#039;&#039;realm-name&#039;&#039; (defined in the &amp;lt;&#039;&#039;login-config&#039;&#039;&amp;gt; element in the web.xml file - see above), resends the authentication information, and, since it&#039;s not valid for that url pattern, the request is denied.&lt;br /&gt;
&lt;br /&gt;
== Persistence ==&lt;br /&gt;
&lt;br /&gt;
You should be careful to back up your modified &#039;&#039;&#039;web.xml&#039;&#039;&#039; file to a location outside of the &#039;&#039;$CATALINA_HOME/webapps/opendap&#039;&#039; directory as new versions of Hyrax will overwrite it when installed. You could use an &#039;&#039;XML ENTITY&#039;&#039; and an &#039;&#039;entity reference&#039;&#039; in the &#039;&#039;&#039;web.xml&#039;&#039;&#039; to cause a local file containing the security configuration to be included in the web.xml. For example adding the &#039;&#039;ENTITY&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;    [&amp;lt;!ENTITY securityConfig      SYSTEM &amp;quot;file:/fully/qualified/path/to/your/security/config.xml&amp;quot;&amp;gt;]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To the &amp;lt;&#039;&#039;!DOCTYPE&#039;&#039;&amp;gt; declaration at the top of the &#039;&#039;&#039;web.xml&#039;&#039;&#039; in conjunction with adding an &#039;&#039;entity reference&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;securityConfig;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To the content of the &amp;lt;&#039;&#039;web-app&#039;&#039;&amp;gt; element would cause your external security configuration to be included in the &#039;&#039;&#039;web.xml&#039;&#039;&#039; file.&lt;br /&gt;
&lt;br /&gt;
Here is an example of an &#039;&#039;ENTITY&#039;&#039; configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;amp;lt;?xml version=&amp;amp;quot;1.0&amp;amp;quot; encoding=&amp;amp;quot;ISO-8859-1&amp;amp;quot;?&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;amp;lt;!DOCTYPE web-app&lt;br /&gt;
        PUBLIC &amp;amp;quot;-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN&amp;amp;quot;&lt;br /&gt;
        &amp;amp;quot;http://java.sun.com/j2ee/dtds/web-app_2_2.dtd&amp;amp;quot;&lt;br /&gt;
        [&amp;amp;lt;!ENTITY securityConfig      SYSTEM &amp;amp;quot;file:/fully/qualified/path/to/your/security/config.xml&amp;amp;quot;&amp;amp;gt;]&lt;br /&gt;
    &amp;amp;gt;&lt;br /&gt;
    &amp;amp;lt;web-app&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;amp;lt;!--&lt;br /&gt;
            Loads a persistent security configuration from the content directory.&lt;br /&gt;
            This configuration may be empty, in which case no security constraints will be&lt;br /&gt;
            applied by Tomcat.&lt;br /&gt;
        --&amp;amp;gt;&lt;br /&gt;
        &amp;amp;amp;securityConfig;&lt;br /&gt;
&lt;br /&gt;
        .&lt;br /&gt;
        .&lt;br /&gt;
        .&lt;br /&gt;
&lt;br /&gt;
    &amp;amp;lt;/web-app&amp;amp;gt;&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will not prevent you from losing your &#039;&#039;&#039;web.xml&#039;&#039;&#039; file when a new version of Hyrax is installed, but adding the &#039;&#039;ENTITY&#039;&#039; stuff to the new &#039;&#039;&#039;web.xml&#039;&#039;&#039; file would be easier than remembering an extensive security configuration. Of course, Y.M.M.V.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Compressed Responses and Tomcat=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Many OPeNDAP clients accept compressed responses. This can greatly increase the efficiency of the client/server interaction by diminishing the number of bytes actually transmitted over &amp;quot;the wire&amp;quot;. Tomcat provides native compression support for the GZIP compression mechanism, however it is NOT turned on by default.&lt;br /&gt;
&lt;br /&gt;
The following example is based on Tomcat 5.15. We recommend that you read carefully the Tomcat documentation related to this topic before proceeding:&lt;br /&gt;
&lt;br /&gt;
*[http://tomcat.apache.org/ Tomcat Home]&lt;br /&gt;
*[http://tomcat.apache.org/tomcat-5.5-doc/index.html Tomcat 5.x documentation.] (See Reference Section for the Apache Tomcat Configuration section)&lt;br /&gt;
*[http://tomcat.apache.org/tomcat-5.5-doc/config/http.html Tomcat 5.x documentation section related to compression.]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Details==&lt;br /&gt;
&lt;br /&gt;
To enable compression you will need to edit the &#039;&#039;$CATALINA_HOME/conf/server.xml&#039;&#039; file. You will need to locate the &amp;lt;&#039;&#039;Connector&#039;&#039;&amp;gt; element associated with your server, typically this will be the only &amp;lt;&#039;&#039;Connector&#039;&#039;&amp;gt; element whose &#039;&#039;port&#039;&#039; attribute is set equal to 8080. To this you will need to add/change several attributes to enable compression.&lt;br /&gt;
&lt;br /&gt;
With my Tomcat 5.5 distribution I found this default &amp;lt;&#039;&#039;Connector&#039;&#039;&amp;gt; element definition in my &#039;&#039;server.xml&#039;&#039; file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;amp;lt;Connector port=&amp;amp;quot;8080&amp;amp;quot; maxHttpHeaderSize=&amp;amp;quot;8192&amp;amp;quot;&lt;br /&gt;
        maxThreads=&amp;amp;quot;150&amp;amp;quot; minSpareThreads=&amp;amp;quot;25&amp;amp;quot; maxSpareThreads=&amp;amp;quot;75&amp;amp;quot;&lt;br /&gt;
        enableLookups=&amp;amp;quot;false&amp;amp;quot; redirectPort=&amp;amp;quot;8443&amp;amp;quot; acceptCount=&amp;amp;quot;100&amp;amp;quot;&lt;br /&gt;
        connectionTimeout=&amp;amp;quot;20000&amp;amp;quot; disableUploadTimeout=&amp;amp;quot;true&amp;amp;quot;&lt;br /&gt;
        compression=&amp;amp;quot;no&amp;amp;quot;&lt;br /&gt;
     /&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You will need to add to this four attributes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        compression=&amp;amp;quot;force&amp;amp;quot;&lt;br /&gt;
        compressionMinSize=&amp;amp;quot;2048&amp;amp;quot;&lt;br /&gt;
        noCompressionUserAgents=&amp;amp;quot;gozilla, traviata&amp;amp;quot;&lt;br /&gt;
        compressableMimeType=&amp;amp;quot;text/html,text/xml&amp;amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that there is a list of compressible MIME types. Basically:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;compression=&amp;quot;no&amp;quot;&#039;&#039;&#039; means nothing gets compressed.&lt;br /&gt;
* &#039;&#039;&#039;compression=&amp;quot;yes&amp;quot;&#039;&#039;&#039; means only the compressible MIME types get compressed.&lt;br /&gt;
* &#039;&#039;&#039;compression=&amp;quot;force&amp;quot;&#039;&#039;&#039; means everything gets compressed (assuming the client accepts gzip and the response is bigger than compressionMinSize)&lt;br /&gt;
&lt;br /&gt;
You MUST set &#039;&#039;&#039;compression=&amp;quot;force&amp;quot;&#039;&#039;&#039; for compression to work with the OPeNDAP data transport.&lt;br /&gt;
&lt;br /&gt;
The final result being:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;amp;lt;Connector port=&amp;amp;quot;8080&amp;amp;quot; maxHttpHeaderSize=&amp;amp;quot;8192&amp;amp;quot;&lt;br /&gt;
        maxThreads=&amp;amp;quot;150&amp;amp;quot; minSpareThreads=&amp;amp;quot;25&amp;amp;quot; maxSpareThreads=&amp;amp;quot;75&amp;amp;quot;&lt;br /&gt;
        enableLookups=&amp;amp;quot;false&amp;amp;quot; redirectPort=&amp;amp;quot;8443&amp;amp;quot; acceptCount=&amp;amp;quot;100&amp;amp;quot;&lt;br /&gt;
        connectionTimeout=&amp;amp;quot;20000&amp;amp;quot; disableUploadTimeout=&amp;amp;quot;true&amp;amp;quot;&lt;br /&gt;
        compression=&amp;amp;quot;force&amp;amp;quot;&lt;br /&gt;
        compressionMinSize=&amp;amp;quot;2048&amp;amp;quot;&lt;br /&gt;
        noCompressionUserAgents=&amp;amp;quot;gozilla, traviata&amp;amp;quot;&lt;br /&gt;
        compressableMimeType=&amp;amp;quot;text/html,text/xml&amp;amp;quot;&lt;br /&gt;
    /&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Restart Tomcat for these changes to take effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= Gotcha&#039;s=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1.&#039;&#039;&#039; Because Hyrax supports two differnt &amp;quot;directory&amp;quot; level views (THREDSS catalog.html and OPeNDAP contents.html) it is possible to have the views incompatible.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
*Your BES configuration allows you to see 3 collections: nc, hdf, and freeform.&lt;br /&gt;
*Your THREDDS catalog configuration only allows you to see nc and freeform.&lt;br /&gt;
If you are in the opendap view for the hdf collection and you click the link to the THREDDS HTML or XML view you will get garbage.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The moral - Make Sure That your BES and THREDDS configurations fundamentally agree about what is visible to the user!&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideIntroduction&amp;diff=4902</id>
		<title>UserGuideIntroduction</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideIntroduction&amp;diff=4902"/>
		<updated>2009-10-01T19:56:03Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: /* The OPeNDAP Client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[UserGuide|Return to top level]]&lt;br /&gt;
&lt;br /&gt;
=What is OPeNDAP?=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OPeNDAP provides a way for researchers to&lt;br /&gt;
access scientific data anywhere on the Internet from a wide variety of new&lt;br /&gt;
&#039;&#039;and existing&#039;&#039;  programs. &lt;br /&gt;
&lt;br /&gt;
The OPeNDAP architecture uses a client/server model, with a &#039;&#039;client&#039;&#039;&lt;br /&gt;
that sends requests for data out onto the network to some &#039;&#039;server&#039;&#039;,&lt;br /&gt;
that answers with the requested data. This is exactly the model used&lt;br /&gt;
by the [http://www.w3.org/hypertext/WWW/TheProject.html &amp;lt;nowiki&amp;gt;World&lt;br /&gt;
Wide Web&amp;lt;/nowiki&amp;gt;] where client browsers submit requests&lt;br /&gt;
to web servers for the data that make up web pages. Of course, OPeNDAP&lt;br /&gt;
clients can do much more than browse this data.  Using flexible data&lt;br /&gt;
types suitable for many uses, including scientific data, the OPeNDAP&lt;br /&gt;
servers deliver real data directly to the client program in the format&lt;br /&gt;
needed by that client.&lt;br /&gt;
&lt;br /&gt;
OPeNDAP clients are very specialized browsers, constructed by linking&lt;br /&gt;
legacy data analysis programs with OPeNDAP-enabled versions of the&lt;br /&gt;
data access APIs they use, or by modifying the programs to use one of&lt;br /&gt;
the OPeNDAP data access APIs.  In addition to providing a&lt;br /&gt;
sophisticated set of network-compatible APIs in several languages,&lt;br /&gt;
there are also libraries of legacy APIs available in OPeNDAP-aware&lt;br /&gt;
versions.  The popular&lt;br /&gt;
[http://www.unidata.ucar.edu/packages/netcdf/guide.txn_toc.html&amp;lt;cite&amp;gt;NetCDF&amp;lt;/cite&amp;gt;] library, for example, can read data from remote&lt;br /&gt;
OPeNDAP data sources as easily as it reads from a local file.&lt;br /&gt;
&lt;br /&gt;
To expand the universe of data available to a user, OPeNDAP incorporates&lt;br /&gt;
a powerful data translation facility, so that data may be stored in&lt;br /&gt;
data structures and formats defined by the data provider, but &lt;br /&gt;
accessed by the user in a manner identical to the access of local data&lt;br /&gt;
files on the user&#039;s own system. Though there are limitations on the&lt;br /&gt;
types of data that may be translated (see&lt;br /&gt;
[[UserGuideDataModel#Translation|Translation]]), &lt;br /&gt;
the facility is flexible and general enough to handle many of the&lt;br /&gt;
possible translations.  There are two important results:&lt;br /&gt;
&lt;br /&gt;
*A user may not need to know that data from one set are stored in a format different from data in another set. Further, it may be possible that &#039;&#039;neither&#039;&#039; data set is stored in a format readable by the original version of the data analysis and display program he or she uses. &lt;br /&gt;
&lt;br /&gt;
*No segment of OPeNDAP users will be effectively cut off from accessing data because of its storage format. A scientist who wishes to make his or her data available to other OPeNDAP users may do so while keeping that data in what may actually be a highly idiosyncratic storage format. (Of course, it doesn&#039;t &#039;&#039;have&#039;&#039; to be in a highly idiosyncratic format.)&lt;br /&gt;
&lt;br /&gt;
The combination of the OPeNDAP network communication model and the data&lt;br /&gt;
translation facility make OPeNDAP a powerful tool for the retrieval,&lt;br /&gt;
sampling, and display of large distributed datasets. Though OPeNDAP was&lt;br /&gt;
developed by oceanographers, its application is not limited to&lt;br /&gt;
oceanographic data. The organizing principles and algorithms may be&lt;br /&gt;
applied to many other fields.&lt;br /&gt;
&lt;br /&gt;
The uniformity with which data appears that makes the system so useful&lt;br /&gt;
for data analysis also eases automating data transport and&lt;br /&gt;
manipulation tasks.  For example, NOAA&#039;s&lt;br /&gt;
[http://ferret.pmel.noaa.gov/Ferret/LAS/home/&amp;lt;nowiki&amp;gt;Live Access Server&lt;br /&gt;
(LAS)&amp;lt;/nowiki&amp;gt;] (see, for example, http://mynasadata.larc.nasa.gov/data.html) uses OPeNDAP, as do many of the real-time observing&lt;br /&gt;
systems that make up the [http://www.ioos.gov&amp;lt;nowiki&amp;gt;Integrated Ocean&lt;br /&gt;
Observing System (IOOS)&amp;lt;/nowiki&amp;gt;], like the [http://gomoos.org&amp;lt;nowiki&amp;gt;Gulf of Maine Ocean&lt;br /&gt;
Observing System (GoMOOS)&amp;lt;/nowiki&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The population of people who may be interested in a system such as&lt;br /&gt;
OPeNDAP may be divided into data consumers and data providers. Though it&lt;br /&gt;
was an important observation to the development of OPeNDAP that the two&lt;br /&gt;
roles are often assumed by the same scientists, the division is a&lt;br /&gt;
useful one for the introduction of the system. The following two&lt;br /&gt;
sections provide a broad introduction to the roles of data consumer&lt;br /&gt;
and data provider. The remainder of this guide is organized around&lt;br /&gt;
this distinction between classes of users.&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Client=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OPeNDAP uses a client/server model. The OPeNDAP&lt;br /&gt;
servers are web servers equipped to interpret an OPeNDAP URL sent to&lt;br /&gt;
them.  An OPeNDAP client composes and sends messages to those&lt;br /&gt;
servers.  There are standalone OPeNDAP clients, but most clients are&lt;br /&gt;
constructed from data analysis programs modified to get their data&lt;br /&gt;
remotely, from the internet, rather than locally, from a file.&lt;br /&gt;
&lt;br /&gt;
Without OPeNDAP, an application program that uses one of the common&lt;br /&gt;
data access APIs such as netCDF will operate as shown in&lt;br /&gt;
[[:Image:unlinked.gif | the figure below]].  The user makes a request&lt;br /&gt;
for data from the application program.  This program uses some data&lt;br /&gt;
access API to read and write data.  The program uses procedures&lt;br /&gt;
defined by that API to access the data, which is typically stored on&lt;br /&gt;
the same host machine.  Some APIs are somewhat more sophisticated than&lt;br /&gt;
this, of course, but their general operation is as simple.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:unlinked.png|actual size]]&lt;br /&gt;
&lt;br /&gt;
The Architecture of a Data Analysis Package &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The operation of an OPeNDAP client is illustrated in the [[:Image:unlinked.gif | figure below]].&lt;br /&gt;
Here, the&lt;br /&gt;
&#039;&#039;same application program&#039;&#039;  that was used in [[:Image:unlinked.gif |&lt;br /&gt;
the figure above]]&lt;br /&gt;
has been modified to use one of the OPeNDAP API libraries.  Now, in addition to being&lt;br /&gt;
able to use local data as before, the application program is able to access&lt;br /&gt;
data from OPeNDAP servers anywhere on the Internet in the same manner as the&lt;br /&gt;
local data.&lt;br /&gt;
&lt;br /&gt;
To make some analysis program into an OPeNDAP client, just re-link it with&lt;br /&gt;
the OPeNDAP API library.  (Or, if your program uses one of the supported legacy API libraries, like netCDF, you can link with the OPeNDAP version of that library.)  This will&lt;br /&gt;
create a program that accepts URLs as well as file pathnames to&lt;br /&gt;
identify data to be read.  (See&lt;br /&gt;
[[UserGuideClient|the OPeNDAP Client]]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:linked.png|actual size]]&lt;br /&gt;
&lt;br /&gt;
The Architecture of a Data Analysis Package Using OPeNDAP&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
OPeNDAP also provides a data translation facility. Data from the original&lt;br /&gt;
data file is translated by the OPeNDAP server into the OPeNDAP data model for&lt;br /&gt;
transmission to the client. Upon receiving the data, the client&lt;br /&gt;
translates the data into the [[UserGuideDataModel| data model]] it&lt;br /&gt;
understands. &lt;br /&gt;
Because the data transmitted from an OPeNDAP server to the client travel&lt;br /&gt;
in the OPeNDAP format, the dataset&#039;s original storage format is completely&lt;br /&gt;
irrelevant to the client. If the client was originally&lt;br /&gt;
designed to read netCDF format files, the data returned by the&lt;br /&gt;
OPeNDAP-netCDF library will appear to have been read from a netCDF file,&lt;br /&gt;
whatever the actual format of the files from which the data were&lt;br /&gt;
read([[Wiki_Testing/OPeNDAPUserGuideFootNotes|4]]). If the&lt;br /&gt;
program expects JGOFS data, the OPeNDAP-JGOFS library will return data&lt;br /&gt;
that seem to have come from a JGOFS dataset, and so on.&lt;br /&gt;
&lt;br /&gt;
OPeNDAP does not pretend to remove all the overhead of data&lt;br /&gt;
searches. A user will still have to keep track of the URLs of&lt;br /&gt;
interesting data in the same way a user must now keep track of the&lt;br /&gt;
names of files.  (You may run across datasets where the data consists&lt;br /&gt;
of OPeNDAP URLs.  These are the OPeNDAP file servers, and have been&lt;br /&gt;
developed by OPeNDAP users to organize datasets consisting of large&lt;br /&gt;
numbers of individual files.)  But it does make the access to that&lt;br /&gt;
data simpler and quicker.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group provides a whole array of client software to&lt;br /&gt;
implement this communication standard.  These range from standalone&lt;br /&gt;
clients to libraries to link with existing software.  There is&lt;br /&gt;
more about these in [[UserGuideOPeNDAPClient| OPeNDAP Client]].&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Services=&lt;br /&gt;
&lt;br /&gt;
The communication between an OPeNDAP client and server is specified by&lt;br /&gt;
the Data Access Protocol (DAP).  This defines the range of messages a&lt;br /&gt;
server must understand and the kinds of replies it makes.&lt;br /&gt;
&lt;br /&gt;
There are two categories of messages an OPeNDAP server can&lt;br /&gt;
understand.  Some are required by the DAP, and others are merely&lt;br /&gt;
suggested.  A server is considered to be DAP-compliant if it can&lt;br /&gt;
respond intelligibly to the required messages.&lt;br /&gt;
&lt;br /&gt;
The requests messages a server is required to understand are these:&lt;br /&gt;
&lt;br /&gt;
;Data Description&lt;br /&gt;
:Data values come in types and sizes.  An array, for example, might consist of 10 integers.  The value &amp;quot;ten&amp;quot; and the type &amp;quot;integer&amp;quot; describe the array.  This request returns information about data types, so that a receiving program can allocate space appropriately.  See [[UserGuideDataModel#DDS| Data Description Structure (DDS)]].&lt;br /&gt;
&lt;br /&gt;
;Data Attribute&lt;br /&gt;
:This is a request to provide information &#039;&#039;about&#039;&#039; data, and typically includes information like units, names of data types, reference information and so on.  See [[UserGuideDataModel#DAS| Data Attribute Structure (DAS)]].&lt;br /&gt;
&lt;br /&gt;
;Data&lt;br /&gt;
:The server also must be able to respond to a request for the data itself.  See [[UserGuideDataModel#DataDDS| data response]].&lt;br /&gt;
&lt;br /&gt;
A server may respond to requests like these, too:&lt;br /&gt;
&lt;br /&gt;
;ASCII&lt;br /&gt;
:Some servers can convert data to ASCII values on the fly.  This allows users to view data using a standard web browser, assuming the data are not too large.  See [[UserGuideOPeNDAPServer#ASCII| ASCII return]].&lt;br /&gt;
&lt;br /&gt;
;Info&lt;br /&gt;
:The info response is a formatted page containing information from the Data Attributes and Data Description responses.  It&#039;s meant to be a human-readable way to show what&#039;s available in a dataset via a standard web browser.  See [[UserGuideOPeNDAPServer#Info| Info response]].&lt;br /&gt;
&lt;br /&gt;
;HTML&lt;br /&gt;
:Very similar to the info response is the HTML response.  This provides not only the information from the info response, but also includes a Javascript form to help you build a request for data from the same data file.  The best description of the HTML form is in the [[QuickStart| Quick Start Guide]].&lt;br /&gt;
&lt;br /&gt;
;SOAP&lt;br /&gt;
:OPeNDAP servers can provide their data in terms of a SOAP request and response.  For more information see [[UserGuideDataModel#SOAP| SOAP Request]].&lt;br /&gt;
&lt;br /&gt;
;DDX&lt;br /&gt;
:The DDX is an XML version of the Data Attribute and Data Description replies.  See [[UserGuideOPeNDAPServer#DDX| DDX Request]].&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Server=&lt;br /&gt;
&lt;br /&gt;
OPeNDAP provides a definition of the communication between client and&lt;br /&gt;
server.  Servers and clients who conform to that standard can&lt;br /&gt;
communicate with each other.  In addition to the OPeNDAP communication&lt;br /&gt;
standard itself, the OPeNDAP group also provides an implementation of&lt;br /&gt;
that standard server protocol, called &#039;&#039;Hyrax.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP data server is made up of two pieces.  You can think of&lt;br /&gt;
them as a front-end and a back-end, though a client will not be aware&lt;br /&gt;
of the separation.  They will often be run on the same machine, and&lt;br /&gt;
even when they are not, a client will see only the front end.&lt;br /&gt;
&lt;br /&gt;
The front-end server is a Tomcat servlet, and is also called the&lt;br /&gt;
&#039;&#039;&#039;OPeNDAP Lightweight Front-End Servlet&#039;&#039;&#039; (OLFS).  Its job is to&lt;br /&gt;
receive your request for data and manage all the different forms such&lt;br /&gt;
a request might take.  For example, you might be asking for the data,&lt;br /&gt;
an ASCII version of the data, or a reply to a SOAP message looking for&lt;br /&gt;
data.  The front-end server can also reply to THREDDS catalog&lt;br /&gt;
requests, for information about the data, and can directly provide&lt;br /&gt;
some information about the data, too.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Back-End Server&#039;&#039;&#039; (BES) is more strictly about performance,&lt;br /&gt;
and is designed to respond quickly and efficiently to requests from&lt;br /&gt;
the OLFS.  It is a pure data server, and has only one format of&lt;br /&gt;
request and response, relying on the OLFS to convert messages to&lt;br /&gt;
whatever format will accommodate the user.  Most users won&#039;t make&lt;br /&gt;
requests directly to the BES.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:HyraxArchitecture.jpg|center|600px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Hyrax&#039;&#039; is an alternative name for the OPeNDAP 4 Data Server.&lt;br /&gt;
&lt;br /&gt;
See&lt;br /&gt;
[[UserGuideDataModel|Data Model]] for a description of the data returned by these&lt;br /&gt;
requests and see [[UserGuideOPeNDAPServer|OPeNDAP Server]] for a description of the&lt;br /&gt;
URL syntax used to send these requests.&lt;br /&gt;
&lt;br /&gt;
See [[Hyrax|the OPeNDAP 4 Data Server documentation]] for a&lt;br /&gt;
description of how to install and configure an OPeNDAP data server (Hyrax).&lt;br /&gt;
&lt;br /&gt;
=Administration and Centralization of Data=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under OPeNDAP, there is no central archive of data.  Data under OPeNDAP&lt;br /&gt;
is organized in a manner similar to the World Wide Web itself.  That&lt;br /&gt;
is, all one need do to make one&#039;s data available is to start up a&lt;br /&gt;
properly configured server on an Internet node that has&lt;br /&gt;
access to the data to be served.  Each data provider is free to join&lt;br /&gt;
and to leave the system when it is convenient, just as any proprietor&lt;br /&gt;
of a web page is free to delete it or add to it as whimsy demands.&lt;br /&gt;
&lt;br /&gt;
Of course, as can also be seen on the World Wide Web, there are some&lt;br /&gt;
disadvantages to the lack of central authority.  If no one knows about&lt;br /&gt;
a web site, no one will visit it.  Similarly, listing a dataset in a&lt;br /&gt;
central data catalog, such as the Global Change Master Directory&lt;br /&gt;
([http://gcmd.gsfc.nasa.gov &amp;lt;cite&amp;gt;http://gcmd.gsfc.nasa.gov/&amp;lt;/cite&amp;gt;]),can make data available to other researchers in a way that simply&lt;br /&gt;
configuring an OPeNDAP server does not.  OPeNDAP provided a facility for&lt;br /&gt;
registering a data set with the GCMD catalog, which makes the data set&lt;br /&gt;
known to the OPeNDAP data location service.  The THREDDS catalog service&lt;br /&gt;
is another way to make information about your data widely available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The remainder of this book will be divided into three major sections:&lt;br /&gt;
instructions on the building and operating of OPeNDAP clients; a tutorial&lt;br /&gt;
and reference on running OPeNDAP servers and making data available to OPeNDAP&lt;br /&gt;
clients; and technical documentation describing the implementation details&lt;br /&gt;
(and the motivation behind many of the design decisions) of the OPeNDAP&lt;br /&gt;
software.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideIntroduction&amp;diff=4901</id>
		<title>UserGuideIntroduction</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideIntroduction&amp;diff=4901"/>
		<updated>2009-10-01T19:55:17Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: /* The OPeNDAP Client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[UserGuide|Return to top level]]&lt;br /&gt;
&lt;br /&gt;
=What is OPeNDAP?=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OPeNDAP provides a way for researchers to&lt;br /&gt;
access scientific data anywhere on the Internet from a wide variety of new&lt;br /&gt;
&#039;&#039;and existing&#039;&#039;  programs. &lt;br /&gt;
&lt;br /&gt;
The OPeNDAP architecture uses a client/server model, with a &#039;&#039;client&#039;&#039;&lt;br /&gt;
that sends requests for data out onto the network to some &#039;&#039;server&#039;&#039;,&lt;br /&gt;
that answers with the requested data. This is exactly the model used&lt;br /&gt;
by the [http://www.w3.org/hypertext/WWW/TheProject.html &amp;lt;nowiki&amp;gt;World&lt;br /&gt;
Wide Web&amp;lt;/nowiki&amp;gt;] where client browsers submit requests&lt;br /&gt;
to web servers for the data that make up web pages. Of course, OPeNDAP&lt;br /&gt;
clients can do much more than browse this data.  Using flexible data&lt;br /&gt;
types suitable for many uses, including scientific data, the OPeNDAP&lt;br /&gt;
servers deliver real data directly to the client program in the format&lt;br /&gt;
needed by that client.&lt;br /&gt;
&lt;br /&gt;
OPeNDAP clients are very specialized browsers, constructed by linking&lt;br /&gt;
legacy data analysis programs with OPeNDAP-enabled versions of the&lt;br /&gt;
data access APIs they use, or by modifying the programs to use one of&lt;br /&gt;
the OPeNDAP data access APIs.  In addition to providing a&lt;br /&gt;
sophisticated set of network-compatible APIs in several languages,&lt;br /&gt;
there are also libraries of legacy APIs available in OPeNDAP-aware&lt;br /&gt;
versions.  The popular&lt;br /&gt;
[http://www.unidata.ucar.edu/packages/netcdf/guide.txn_toc.html&amp;lt;cite&amp;gt;NetCDF&amp;lt;/cite&amp;gt;] library, for example, can read data from remote&lt;br /&gt;
OPeNDAP data sources as easily as it reads from a local file.&lt;br /&gt;
&lt;br /&gt;
To expand the universe of data available to a user, OPeNDAP incorporates&lt;br /&gt;
a powerful data translation facility, so that data may be stored in&lt;br /&gt;
data structures and formats defined by the data provider, but &lt;br /&gt;
accessed by the user in a manner identical to the access of local data&lt;br /&gt;
files on the user&#039;s own system. Though there are limitations on the&lt;br /&gt;
types of data that may be translated (see&lt;br /&gt;
[[UserGuideDataModel#Translation|Translation]]), &lt;br /&gt;
the facility is flexible and general enough to handle many of the&lt;br /&gt;
possible translations.  There are two important results:&lt;br /&gt;
&lt;br /&gt;
*A user may not need to know that data from one set are stored in a format different from data in another set. Further, it may be possible that &#039;&#039;neither&#039;&#039; data set is stored in a format readable by the original version of the data analysis and display program he or she uses. &lt;br /&gt;
&lt;br /&gt;
*No segment of OPeNDAP users will be effectively cut off from accessing data because of its storage format. A scientist who wishes to make his or her data available to other OPeNDAP users may do so while keeping that data in what may actually be a highly idiosyncratic storage format. (Of course, it doesn&#039;t &#039;&#039;have&#039;&#039; to be in a highly idiosyncratic format.)&lt;br /&gt;
&lt;br /&gt;
The combination of the OPeNDAP network communication model and the data&lt;br /&gt;
translation facility make OPeNDAP a powerful tool for the retrieval,&lt;br /&gt;
sampling, and display of large distributed datasets. Though OPeNDAP was&lt;br /&gt;
developed by oceanographers, its application is not limited to&lt;br /&gt;
oceanographic data. The organizing principles and algorithms may be&lt;br /&gt;
applied to many other fields.&lt;br /&gt;
&lt;br /&gt;
The uniformity with which data appears that makes the system so useful&lt;br /&gt;
for data analysis also eases automating data transport and&lt;br /&gt;
manipulation tasks.  For example, NOAA&#039;s&lt;br /&gt;
[http://ferret.pmel.noaa.gov/Ferret/LAS/home/&amp;lt;nowiki&amp;gt;Live Access Server&lt;br /&gt;
(LAS)&amp;lt;/nowiki&amp;gt;] (see, for example, http://mynasadata.larc.nasa.gov/data.html) uses OPeNDAP, as do many of the real-time observing&lt;br /&gt;
systems that make up the [http://www.ioos.gov&amp;lt;nowiki&amp;gt;Integrated Ocean&lt;br /&gt;
Observing System (IOOS)&amp;lt;/nowiki&amp;gt;], like the [http://gomoos.org&amp;lt;nowiki&amp;gt;Gulf of Maine Ocean&lt;br /&gt;
Observing System (GoMOOS)&amp;lt;/nowiki&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The population of people who may be interested in a system such as&lt;br /&gt;
OPeNDAP may be divided into data consumers and data providers. Though it&lt;br /&gt;
was an important observation to the development of OPeNDAP that the two&lt;br /&gt;
roles are often assumed by the same scientists, the division is a&lt;br /&gt;
useful one for the introduction of the system. The following two&lt;br /&gt;
sections provide a broad introduction to the roles of data consumer&lt;br /&gt;
and data provider. The remainder of this guide is organized around&lt;br /&gt;
this distinction between classes of users.&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Client=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OPeNDAP uses a client/server model. The OPeNDAP&lt;br /&gt;
servers are web servers equipped to interpret an OPeNDAP URL sent to&lt;br /&gt;
them.  An OPeNDAP client composes and sends messages to those&lt;br /&gt;
servers.  There are standalone OPeNDAP clients, but most clients are&lt;br /&gt;
constructed from data analysis programs modified to get their data&lt;br /&gt;
remotely, from the internet, rather than locally, from a file.&lt;br /&gt;
&lt;br /&gt;
Without OPeNDAP, an application program that uses one of the common&lt;br /&gt;
data access APIs such as netCDF will operate as shown in&lt;br /&gt;
[[:Image:unlinked.gif | the figure below]].  The user makes a request&lt;br /&gt;
for data from the application program.  This program uses some data&lt;br /&gt;
access API to read and write data.  The program uses procedures&lt;br /&gt;
defined by that API to access the data, which is typically stored on&lt;br /&gt;
the same host machine.  Some APIs are somewhat more sophisticated than&lt;br /&gt;
this, of course, but their general operation is as simple.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:unlinked.png|actual size]]&lt;br /&gt;
&lt;br /&gt;
The Architecture of a Data Analysis Package &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The operation of an OPeNDAP client is illustrated in the [[:Image:unlinked.gif | figure below]].&lt;br /&gt;
Here, the&lt;br /&gt;
&#039;&#039;same application program&#039;&#039;  that was used in [[:Image:unlinked.gif |&lt;br /&gt;
the figure above]]&lt;br /&gt;
has been modified to use one of the OPeNDAP API libraries.  Now, in addition to being&lt;br /&gt;
able to use local data as before, the application program is able to access&lt;br /&gt;
data from OPeNDAP servers anywhere on the Internet in the same manner as the&lt;br /&gt;
local data.&lt;br /&gt;
&lt;br /&gt;
To make some analysis program into an OPeNDAP client, just re-link it with&lt;br /&gt;
the OPeNDAP API library.  (Or, if your program uses one of the supported legacy API libraries, like netCDF, you can link with the OPeNDAP version of that library.)  This will&lt;br /&gt;
create a program that accepts URLs as well as file pathnames to&lt;br /&gt;
identify data to be read.  (See&lt;br /&gt;
[[UserGuideClients|Clients]]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:linked.png|actual size]]&lt;br /&gt;
&lt;br /&gt;
The Architecture of a Data Analysis Package Using OPeNDAP&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
OPeNDAP also provides a data translation facility. Data from the original&lt;br /&gt;
data file is translated by the OPeNDAP server into the OPeNDAP data model for&lt;br /&gt;
transmission to the client. Upon receiving the data, the client&lt;br /&gt;
translates the data into the [[UserGuideDataModel| data model]] it&lt;br /&gt;
understands. &lt;br /&gt;
Because the data transmitted from an OPeNDAP server to the client travel&lt;br /&gt;
in the OPeNDAP format, the dataset&#039;s original storage format is completely&lt;br /&gt;
irrelevant to the client. If the client was originally&lt;br /&gt;
designed to read netCDF format files, the data returned by the&lt;br /&gt;
OPeNDAP-netCDF library will appear to have been read from a netCDF file,&lt;br /&gt;
whatever the actual format of the files from which the data were&lt;br /&gt;
read([[Wiki_Testing/OPeNDAPUserGuideFootNotes|4]]). If the&lt;br /&gt;
program expects JGOFS data, the OPeNDAP-JGOFS library will return data&lt;br /&gt;
that seem to have come from a JGOFS dataset, and so on.&lt;br /&gt;
&lt;br /&gt;
OPeNDAP does not pretend to remove all the overhead of data&lt;br /&gt;
searches. A user will still have to keep track of the URLs of&lt;br /&gt;
interesting data in the same way a user must now keep track of the&lt;br /&gt;
names of files.  (You may run across datasets where the data consists&lt;br /&gt;
of OPeNDAP URLs.  These are the OPeNDAP file servers, and have been&lt;br /&gt;
developed by OPeNDAP users to organize datasets consisting of large&lt;br /&gt;
numbers of individual files.)  But it does make the access to that&lt;br /&gt;
data simpler and quicker.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group provides a whole array of client software to&lt;br /&gt;
implement this communication standard.  These range from standalone&lt;br /&gt;
clients to libraries to link with existing software.  There is&lt;br /&gt;
more about these in [[UserGuideOPeNDAPClient| OPeNDAP Client]].&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Services=&lt;br /&gt;
&lt;br /&gt;
The communication between an OPeNDAP client and server is specified by&lt;br /&gt;
the Data Access Protocol (DAP).  This defines the range of messages a&lt;br /&gt;
server must understand and the kinds of replies it makes.&lt;br /&gt;
&lt;br /&gt;
There are two categories of messages an OPeNDAP server can&lt;br /&gt;
understand.  Some are required by the DAP, and others are merely&lt;br /&gt;
suggested.  A server is considered to be DAP-compliant if it can&lt;br /&gt;
respond intelligibly to the required messages.&lt;br /&gt;
&lt;br /&gt;
The requests messages a server is required to understand are these:&lt;br /&gt;
&lt;br /&gt;
;Data Description&lt;br /&gt;
:Data values come in types and sizes.  An array, for example, might consist of 10 integers.  The value &amp;quot;ten&amp;quot; and the type &amp;quot;integer&amp;quot; describe the array.  This request returns information about data types, so that a receiving program can allocate space appropriately.  See [[UserGuideDataModel#DDS| Data Description Structure (DDS)]].&lt;br /&gt;
&lt;br /&gt;
;Data Attribute&lt;br /&gt;
:This is a request to provide information &#039;&#039;about&#039;&#039; data, and typically includes information like units, names of data types, reference information and so on.  See [[UserGuideDataModel#DAS| Data Attribute Structure (DAS)]].&lt;br /&gt;
&lt;br /&gt;
;Data&lt;br /&gt;
:The server also must be able to respond to a request for the data itself.  See [[UserGuideDataModel#DataDDS| data response]].&lt;br /&gt;
&lt;br /&gt;
A server may respond to requests like these, too:&lt;br /&gt;
&lt;br /&gt;
;ASCII&lt;br /&gt;
:Some servers can convert data to ASCII values on the fly.  This allows users to view data using a standard web browser, assuming the data are not too large.  See [[UserGuideOPeNDAPServer#ASCII| ASCII return]].&lt;br /&gt;
&lt;br /&gt;
;Info&lt;br /&gt;
:The info response is a formatted page containing information from the Data Attributes and Data Description responses.  It&#039;s meant to be a human-readable way to show what&#039;s available in a dataset via a standard web browser.  See [[UserGuideOPeNDAPServer#Info| Info response]].&lt;br /&gt;
&lt;br /&gt;
;HTML&lt;br /&gt;
:Very similar to the info response is the HTML response.  This provides not only the information from the info response, but also includes a Javascript form to help you build a request for data from the same data file.  The best description of the HTML form is in the [[QuickStart| Quick Start Guide]].&lt;br /&gt;
&lt;br /&gt;
;SOAP&lt;br /&gt;
:OPeNDAP servers can provide their data in terms of a SOAP request and response.  For more information see [[UserGuideDataModel#SOAP| SOAP Request]].&lt;br /&gt;
&lt;br /&gt;
;DDX&lt;br /&gt;
:The DDX is an XML version of the Data Attribute and Data Description replies.  See [[UserGuideOPeNDAPServer#DDX| DDX Request]].&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Server=&lt;br /&gt;
&lt;br /&gt;
OPeNDAP provides a definition of the communication between client and&lt;br /&gt;
server.  Servers and clients who conform to that standard can&lt;br /&gt;
communicate with each other.  In addition to the OPeNDAP communication&lt;br /&gt;
standard itself, the OPeNDAP group also provides an implementation of&lt;br /&gt;
that standard server protocol, called &#039;&#039;Hyrax.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP data server is made up of two pieces.  You can think of&lt;br /&gt;
them as a front-end and a back-end, though a client will not be aware&lt;br /&gt;
of the separation.  They will often be run on the same machine, and&lt;br /&gt;
even when they are not, a client will see only the front end.&lt;br /&gt;
&lt;br /&gt;
The front-end server is a Tomcat servlet, and is also called the&lt;br /&gt;
&#039;&#039;&#039;OPeNDAP Lightweight Front-End Servlet&#039;&#039;&#039; (OLFS).  Its job is to&lt;br /&gt;
receive your request for data and manage all the different forms such&lt;br /&gt;
a request might take.  For example, you might be asking for the data,&lt;br /&gt;
an ASCII version of the data, or a reply to a SOAP message looking for&lt;br /&gt;
data.  The front-end server can also reply to THREDDS catalog&lt;br /&gt;
requests, for information about the data, and can directly provide&lt;br /&gt;
some information about the data, too.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Back-End Server&#039;&#039;&#039; (BES) is more strictly about performance,&lt;br /&gt;
and is designed to respond quickly and efficiently to requests from&lt;br /&gt;
the OLFS.  It is a pure data server, and has only one format of&lt;br /&gt;
request and response, relying on the OLFS to convert messages to&lt;br /&gt;
whatever format will accommodate the user.  Most users won&#039;t make&lt;br /&gt;
requests directly to the BES.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:HyraxArchitecture.jpg|center|600px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Hyrax&#039;&#039; is an alternative name for the OPeNDAP 4 Data Server.&lt;br /&gt;
&lt;br /&gt;
See&lt;br /&gt;
[[UserGuideDataModel|Data Model]] for a description of the data returned by these&lt;br /&gt;
requests and see [[UserGuideOPeNDAPServer|OPeNDAP Server]] for a description of the&lt;br /&gt;
URL syntax used to send these requests.&lt;br /&gt;
&lt;br /&gt;
See [[Hyrax|the OPeNDAP 4 Data Server documentation]] for a&lt;br /&gt;
description of how to install and configure an OPeNDAP data server (Hyrax).&lt;br /&gt;
&lt;br /&gt;
=Administration and Centralization of Data=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under OPeNDAP, there is no central archive of data.  Data under OPeNDAP&lt;br /&gt;
is organized in a manner similar to the World Wide Web itself.  That&lt;br /&gt;
is, all one need do to make one&#039;s data available is to start up a&lt;br /&gt;
properly configured server on an Internet node that has&lt;br /&gt;
access to the data to be served.  Each data provider is free to join&lt;br /&gt;
and to leave the system when it is convenient, just as any proprietor&lt;br /&gt;
of a web page is free to delete it or add to it as whimsy demands.&lt;br /&gt;
&lt;br /&gt;
Of course, as can also be seen on the World Wide Web, there are some&lt;br /&gt;
disadvantages to the lack of central authority.  If no one knows about&lt;br /&gt;
a web site, no one will visit it.  Similarly, listing a dataset in a&lt;br /&gt;
central data catalog, such as the Global Change Master Directory&lt;br /&gt;
([http://gcmd.gsfc.nasa.gov &amp;lt;cite&amp;gt;http://gcmd.gsfc.nasa.gov/&amp;lt;/cite&amp;gt;]),can make data available to other researchers in a way that simply&lt;br /&gt;
configuring an OPeNDAP server does not.  OPeNDAP provided a facility for&lt;br /&gt;
registering a data set with the GCMD catalog, which makes the data set&lt;br /&gt;
known to the OPeNDAP data location service.  The THREDDS catalog service&lt;br /&gt;
is another way to make information about your data widely available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The remainder of this book will be divided into three major sections:&lt;br /&gt;
instructions on the building and operating of OPeNDAP clients; a tutorial&lt;br /&gt;
and reference on running OPeNDAP servers and making data available to OPeNDAP&lt;br /&gt;
clients; and technical documentation describing the implementation details&lt;br /&gt;
(and the motivation behind many of the design decisions) of the OPeNDAP&lt;br /&gt;
software.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideIntroduction&amp;diff=4900</id>
		<title>UserGuideIntroduction</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideIntroduction&amp;diff=4900"/>
		<updated>2009-10-01T19:54:07Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: /* What is OPeNDAP? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[UserGuide|Return to top level]]&lt;br /&gt;
&lt;br /&gt;
=What is OPeNDAP?=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OPeNDAP provides a way for researchers to&lt;br /&gt;
access scientific data anywhere on the Internet from a wide variety of new&lt;br /&gt;
&#039;&#039;and existing&#039;&#039;  programs. &lt;br /&gt;
&lt;br /&gt;
The OPeNDAP architecture uses a client/server model, with a &#039;&#039;client&#039;&#039;&lt;br /&gt;
that sends requests for data out onto the network to some &#039;&#039;server&#039;&#039;,&lt;br /&gt;
that answers with the requested data. This is exactly the model used&lt;br /&gt;
by the [http://www.w3.org/hypertext/WWW/TheProject.html &amp;lt;nowiki&amp;gt;World&lt;br /&gt;
Wide Web&amp;lt;/nowiki&amp;gt;] where client browsers submit requests&lt;br /&gt;
to web servers for the data that make up web pages. Of course, OPeNDAP&lt;br /&gt;
clients can do much more than browse this data.  Using flexible data&lt;br /&gt;
types suitable for many uses, including scientific data, the OPeNDAP&lt;br /&gt;
servers deliver real data directly to the client program in the format&lt;br /&gt;
needed by that client.&lt;br /&gt;
&lt;br /&gt;
OPeNDAP clients are very specialized browsers, constructed by linking&lt;br /&gt;
legacy data analysis programs with OPeNDAP-enabled versions of the&lt;br /&gt;
data access APIs they use, or by modifying the programs to use one of&lt;br /&gt;
the OPeNDAP data access APIs.  In addition to providing a&lt;br /&gt;
sophisticated set of network-compatible APIs in several languages,&lt;br /&gt;
there are also libraries of legacy APIs available in OPeNDAP-aware&lt;br /&gt;
versions.  The popular&lt;br /&gt;
[http://www.unidata.ucar.edu/packages/netcdf/guide.txn_toc.html&amp;lt;cite&amp;gt;NetCDF&amp;lt;/cite&amp;gt;] library, for example, can read data from remote&lt;br /&gt;
OPeNDAP data sources as easily as it reads from a local file.&lt;br /&gt;
&lt;br /&gt;
To expand the universe of data available to a user, OPeNDAP incorporates&lt;br /&gt;
a powerful data translation facility, so that data may be stored in&lt;br /&gt;
data structures and formats defined by the data provider, but &lt;br /&gt;
accessed by the user in a manner identical to the access of local data&lt;br /&gt;
files on the user&#039;s own system. Though there are limitations on the&lt;br /&gt;
types of data that may be translated (see&lt;br /&gt;
[[UserGuideDataModel#Translation|Translation]]), &lt;br /&gt;
the facility is flexible and general enough to handle many of the&lt;br /&gt;
possible translations.  There are two important results:&lt;br /&gt;
&lt;br /&gt;
*A user may not need to know that data from one set are stored in a format different from data in another set. Further, it may be possible that &#039;&#039;neither&#039;&#039; data set is stored in a format readable by the original version of the data analysis and display program he or she uses. &lt;br /&gt;
&lt;br /&gt;
*No segment of OPeNDAP users will be effectively cut off from accessing data because of its storage format. A scientist who wishes to make his or her data available to other OPeNDAP users may do so while keeping that data in what may actually be a highly idiosyncratic storage format. (Of course, it doesn&#039;t &#039;&#039;have&#039;&#039; to be in a highly idiosyncratic format.)&lt;br /&gt;
&lt;br /&gt;
The combination of the OPeNDAP network communication model and the data&lt;br /&gt;
translation facility make OPeNDAP a powerful tool for the retrieval,&lt;br /&gt;
sampling, and display of large distributed datasets. Though OPeNDAP was&lt;br /&gt;
developed by oceanographers, its application is not limited to&lt;br /&gt;
oceanographic data. The organizing principles and algorithms may be&lt;br /&gt;
applied to many other fields.&lt;br /&gt;
&lt;br /&gt;
The uniformity with which data appears that makes the system so useful&lt;br /&gt;
for data analysis also eases automating data transport and&lt;br /&gt;
manipulation tasks.  For example, NOAA&#039;s&lt;br /&gt;
[http://ferret.pmel.noaa.gov/Ferret/LAS/home/&amp;lt;nowiki&amp;gt;Live Access Server&lt;br /&gt;
(LAS)&amp;lt;/nowiki&amp;gt;] (see, for example, http://mynasadata.larc.nasa.gov/data.html) uses OPeNDAP, as do many of the real-time observing&lt;br /&gt;
systems that make up the [http://www.ioos.gov&amp;lt;nowiki&amp;gt;Integrated Ocean&lt;br /&gt;
Observing System (IOOS)&amp;lt;/nowiki&amp;gt;], like the [http://gomoos.org&amp;lt;nowiki&amp;gt;Gulf of Maine Ocean&lt;br /&gt;
Observing System (GoMOOS)&amp;lt;/nowiki&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The population of people who may be interested in a system such as&lt;br /&gt;
OPeNDAP may be divided into data consumers and data providers. Though it&lt;br /&gt;
was an important observation to the development of OPeNDAP that the two&lt;br /&gt;
roles are often assumed by the same scientists, the division is a&lt;br /&gt;
useful one for the introduction of the system. The following two&lt;br /&gt;
sections provide a broad introduction to the roles of data consumer&lt;br /&gt;
and data provider. The remainder of this guide is organized around&lt;br /&gt;
this distinction between classes of users.&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Client=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OPeNDAP uses a client/server model. The OPeNDAP&lt;br /&gt;
servers are web servers equipped to interpret an OPeNDAP URL sent to&lt;br /&gt;
them.  An OPeNDAP client composes and sends messages to those&lt;br /&gt;
servers.  There are standalone OPeNDAP clients, but most clients are&lt;br /&gt;
constructed from data analysis programs modified to get their data&lt;br /&gt;
remotely, from the internet, rather than locally, from a file.&lt;br /&gt;
&lt;br /&gt;
Without OPeNDAP, an application program that uses one of the common&lt;br /&gt;
data access APIs such as netCDF will operate as shown in&lt;br /&gt;
[[:Image:unlinked.gif | the figure below]].  The user makes a request&lt;br /&gt;
for data from the application program.  This program uses some data&lt;br /&gt;
access API to read and write data.  The program uses procedures&lt;br /&gt;
defined by that API to access the data, which is typically stored on&lt;br /&gt;
the same host machine.  Some APIs are somewhat more sophisticated than&lt;br /&gt;
this, of course, but their general operation is as simple.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:unlinked.png|actual size]]&lt;br /&gt;
&lt;br /&gt;
The Architecture of a Data Analysis Package &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The operation of an OPeNDAP client is illustrated in the [[:Image:unlinked.gif | figure below]].&lt;br /&gt;
Here, the&lt;br /&gt;
&#039;&#039;same application program&#039;&#039;  that was used in [[:Image:unlinked.gif |&lt;br /&gt;
the figure above]]&lt;br /&gt;
has been modified to use one of the OPeNDAP API libraries.  Now, in addition to being&lt;br /&gt;
able to use local data as before, the application program is able to access&lt;br /&gt;
data from OPeNDAP servers anywhere on the Internet in the same manner as the&lt;br /&gt;
local data.&lt;br /&gt;
&lt;br /&gt;
To make some analysis program into an OPeNDAP client, just re-link it with&lt;br /&gt;
the OPeNDAP API library.  (Or, if your program uses one of the supported legacy API libraries, like netCDF, you can link with the OPeNDAP version of that library.)  This will&lt;br /&gt;
create a program that accepts URLs as well as file pathnames to&lt;br /&gt;
identify data to be read.  (See&lt;br /&gt;
[[Wiki_Testing/OPeNDAPUserGuide3|Section 3.1]]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:linked.png|actual size]]&lt;br /&gt;
&lt;br /&gt;
The Architecture of a Data Analysis Package Using OPeNDAP&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
OPeNDAP also provides a data translation facility. Data from the original&lt;br /&gt;
data file is translated by the OPeNDAP server into the OPeNDAP data model for&lt;br /&gt;
transmission to the client. Upon receiving the data, the client&lt;br /&gt;
translates the data into the [[UserGuideDataModel| data model]] it&lt;br /&gt;
understands. &lt;br /&gt;
Because the data transmitted from an OPeNDAP server to the client travel&lt;br /&gt;
in the OPeNDAP format, the dataset&#039;s original storage format is completely&lt;br /&gt;
irrelevant to the client. If the client was originally&lt;br /&gt;
designed to read netCDF format files, the data returned by the&lt;br /&gt;
OPeNDAP-netCDF library will appear to have been read from a netCDF file,&lt;br /&gt;
whatever the actual format of the files from which the data were&lt;br /&gt;
read([[Wiki_Testing/OPeNDAPUserGuideFootNotes|4]]). If the&lt;br /&gt;
program expects JGOFS data, the OPeNDAP-JGOFS library will return data&lt;br /&gt;
that seem to have come from a JGOFS dataset, and so on.&lt;br /&gt;
&lt;br /&gt;
OPeNDAP does not pretend to remove all the overhead of data&lt;br /&gt;
searches. A user will still have to keep track of the URLs of&lt;br /&gt;
interesting data in the same way a user must now keep track of the&lt;br /&gt;
names of files.  (You may run across datasets where the data consists&lt;br /&gt;
of OPeNDAP URLs.  These are the OPeNDAP file servers, and have been&lt;br /&gt;
developed by OPeNDAP users to organize datasets consisting of large&lt;br /&gt;
numbers of individual files.)  But it does make the access to that&lt;br /&gt;
data simpler and quicker.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group provides a whole array of client software to&lt;br /&gt;
implement this communication standard.  These range from standalone&lt;br /&gt;
clients to libraries to link with existing software.  There is&lt;br /&gt;
more about these in [[UserGuideOPeNDAPClient| OPeNDAP Client]].&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Services=&lt;br /&gt;
&lt;br /&gt;
The communication between an OPeNDAP client and server is specified by&lt;br /&gt;
the Data Access Protocol (DAP).  This defines the range of messages a&lt;br /&gt;
server must understand and the kinds of replies it makes.&lt;br /&gt;
&lt;br /&gt;
There are two categories of messages an OPeNDAP server can&lt;br /&gt;
understand.  Some are required by the DAP, and others are merely&lt;br /&gt;
suggested.  A server is considered to be DAP-compliant if it can&lt;br /&gt;
respond intelligibly to the required messages.&lt;br /&gt;
&lt;br /&gt;
The requests messages a server is required to understand are these:&lt;br /&gt;
&lt;br /&gt;
;Data Description&lt;br /&gt;
:Data values come in types and sizes.  An array, for example, might consist of 10 integers.  The value &amp;quot;ten&amp;quot; and the type &amp;quot;integer&amp;quot; describe the array.  This request returns information about data types, so that a receiving program can allocate space appropriately.  See [[UserGuideDataModel#DDS| Data Description Structure (DDS)]].&lt;br /&gt;
&lt;br /&gt;
;Data Attribute&lt;br /&gt;
:This is a request to provide information &#039;&#039;about&#039;&#039; data, and typically includes information like units, names of data types, reference information and so on.  See [[UserGuideDataModel#DAS| Data Attribute Structure (DAS)]].&lt;br /&gt;
&lt;br /&gt;
;Data&lt;br /&gt;
:The server also must be able to respond to a request for the data itself.  See [[UserGuideDataModel#DataDDS| data response]].&lt;br /&gt;
&lt;br /&gt;
A server may respond to requests like these, too:&lt;br /&gt;
&lt;br /&gt;
;ASCII&lt;br /&gt;
:Some servers can convert data to ASCII values on the fly.  This allows users to view data using a standard web browser, assuming the data are not too large.  See [[UserGuideOPeNDAPServer#ASCII| ASCII return]].&lt;br /&gt;
&lt;br /&gt;
;Info&lt;br /&gt;
:The info response is a formatted page containing information from the Data Attributes and Data Description responses.  It&#039;s meant to be a human-readable way to show what&#039;s available in a dataset via a standard web browser.  See [[UserGuideOPeNDAPServer#Info| Info response]].&lt;br /&gt;
&lt;br /&gt;
;HTML&lt;br /&gt;
:Very similar to the info response is the HTML response.  This provides not only the information from the info response, but also includes a Javascript form to help you build a request for data from the same data file.  The best description of the HTML form is in the [[QuickStart| Quick Start Guide]].&lt;br /&gt;
&lt;br /&gt;
;SOAP&lt;br /&gt;
:OPeNDAP servers can provide their data in terms of a SOAP request and response.  For more information see [[UserGuideDataModel#SOAP| SOAP Request]].&lt;br /&gt;
&lt;br /&gt;
;DDX&lt;br /&gt;
:The DDX is an XML version of the Data Attribute and Data Description replies.  See [[UserGuideOPeNDAPServer#DDX| DDX Request]].&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Server=&lt;br /&gt;
&lt;br /&gt;
OPeNDAP provides a definition of the communication between client and&lt;br /&gt;
server.  Servers and clients who conform to that standard can&lt;br /&gt;
communicate with each other.  In addition to the OPeNDAP communication&lt;br /&gt;
standard itself, the OPeNDAP group also provides an implementation of&lt;br /&gt;
that standard server protocol, called &#039;&#039;Hyrax.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP data server is made up of two pieces.  You can think of&lt;br /&gt;
them as a front-end and a back-end, though a client will not be aware&lt;br /&gt;
of the separation.  They will often be run on the same machine, and&lt;br /&gt;
even when they are not, a client will see only the front end.&lt;br /&gt;
&lt;br /&gt;
The front-end server is a Tomcat servlet, and is also called the&lt;br /&gt;
&#039;&#039;&#039;OPeNDAP Lightweight Front-End Servlet&#039;&#039;&#039; (OLFS).  Its job is to&lt;br /&gt;
receive your request for data and manage all the different forms such&lt;br /&gt;
a request might take.  For example, you might be asking for the data,&lt;br /&gt;
an ASCII version of the data, or a reply to a SOAP message looking for&lt;br /&gt;
data.  The front-end server can also reply to THREDDS catalog&lt;br /&gt;
requests, for information about the data, and can directly provide&lt;br /&gt;
some information about the data, too.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Back-End Server&#039;&#039;&#039; (BES) is more strictly about performance,&lt;br /&gt;
and is designed to respond quickly and efficiently to requests from&lt;br /&gt;
the OLFS.  It is a pure data server, and has only one format of&lt;br /&gt;
request and response, relying on the OLFS to convert messages to&lt;br /&gt;
whatever format will accommodate the user.  Most users won&#039;t make&lt;br /&gt;
requests directly to the BES.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:HyraxArchitecture.jpg|center|600px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Hyrax&#039;&#039; is an alternative name for the OPeNDAP 4 Data Server.&lt;br /&gt;
&lt;br /&gt;
See&lt;br /&gt;
[[UserGuideDataModel|Data Model]] for a description of the data returned by these&lt;br /&gt;
requests and see [[UserGuideOPeNDAPServer|OPeNDAP Server]] for a description of the&lt;br /&gt;
URL syntax used to send these requests.&lt;br /&gt;
&lt;br /&gt;
See [[Hyrax|the OPeNDAP 4 Data Server documentation]] for a&lt;br /&gt;
description of how to install and configure an OPeNDAP data server (Hyrax).&lt;br /&gt;
&lt;br /&gt;
=Administration and Centralization of Data=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under OPeNDAP, there is no central archive of data.  Data under OPeNDAP&lt;br /&gt;
is organized in a manner similar to the World Wide Web itself.  That&lt;br /&gt;
is, all one need do to make one&#039;s data available is to start up a&lt;br /&gt;
properly configured server on an Internet node that has&lt;br /&gt;
access to the data to be served.  Each data provider is free to join&lt;br /&gt;
and to leave the system when it is convenient, just as any proprietor&lt;br /&gt;
of a web page is free to delete it or add to it as whimsy demands.&lt;br /&gt;
&lt;br /&gt;
Of course, as can also be seen on the World Wide Web, there are some&lt;br /&gt;
disadvantages to the lack of central authority.  If no one knows about&lt;br /&gt;
a web site, no one will visit it.  Similarly, listing a dataset in a&lt;br /&gt;
central data catalog, such as the Global Change Master Directory&lt;br /&gt;
([http://gcmd.gsfc.nasa.gov &amp;lt;cite&amp;gt;http://gcmd.gsfc.nasa.gov/&amp;lt;/cite&amp;gt;]),can make data available to other researchers in a way that simply&lt;br /&gt;
configuring an OPeNDAP server does not.  OPeNDAP provided a facility for&lt;br /&gt;
registering a data set with the GCMD catalog, which makes the data set&lt;br /&gt;
known to the OPeNDAP data location service.  The THREDDS catalog service&lt;br /&gt;
is another way to make information about your data widely available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The remainder of this book will be divided into three major sections:&lt;br /&gt;
instructions on the building and operating of OPeNDAP clients; a tutorial&lt;br /&gt;
and reference on running OPeNDAP servers and making data available to OPeNDAP&lt;br /&gt;
clients; and technical documentation describing the implementation details&lt;br /&gt;
(and the motivation behind many of the design decisions) of the OPeNDAP&lt;br /&gt;
software.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideIntroduction&amp;diff=4899</id>
		<title>UserGuideIntroduction</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideIntroduction&amp;diff=4899"/>
		<updated>2009-10-01T19:52:04Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: /* What is OPeNDAP? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[UserGuide|Return to top level]]&lt;br /&gt;
&lt;br /&gt;
=What is OPeNDAP?=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OPeNDAP provides a way for researchers to&lt;br /&gt;
access scientific data anywhere on the Internet from a wide variety of new&lt;br /&gt;
&#039;&#039;and existing&#039;&#039;  programs. &lt;br /&gt;
&lt;br /&gt;
The OPeNDAP architecture uses a client/server model, with a &#039;&#039;client&#039;&#039;&lt;br /&gt;
that sends requests for data out onto the network to some &#039;&#039;server&#039;&#039;,&lt;br /&gt;
that answers with the requested data. This is exactly the model used&lt;br /&gt;
by the [http://www.w3.org/hypertext/WWW/TheProject.html &amp;lt;nowiki&amp;gt;World&lt;br /&gt;
Wide Web&amp;lt;/nowiki&amp;gt;] where client browsers submit requests&lt;br /&gt;
to web servers for the data that make up web pages. Of course, OPeNDAP&lt;br /&gt;
clients can do much more than browse this data.  Using flexible data&lt;br /&gt;
types suitable for many uses, including scientific data, the OPeNDAP&lt;br /&gt;
servers deliver real data directly to the client program in the format&lt;br /&gt;
needed by that client.&lt;br /&gt;
&lt;br /&gt;
OPeNDAP clients are very specialized browsers, constructed by linking&lt;br /&gt;
legacy data analysis programs with OPeNDAP-enabled versions of the&lt;br /&gt;
data access APIs they use, or by modifying the programs to use one of&lt;br /&gt;
the OPeNDAP data access APIs.  In addition to providing a&lt;br /&gt;
sophisticated set of network-compatible APIs in several languages,&lt;br /&gt;
there are also libraries of legacy APIs available in OPeNDAP-aware&lt;br /&gt;
versions.  The popular&lt;br /&gt;
[http://www.unidata.ucar.edu/packages/netcdf/guide.txn_toc.html&amp;lt;cite&amp;gt;NetCDF&amp;lt;/cite&amp;gt;] library, for example, can read data from remote&lt;br /&gt;
OPeNDAP data sources as easily as it reads from a local file.&lt;br /&gt;
&lt;br /&gt;
To expand the universe of data available to a user, OPeNDAP incorporates&lt;br /&gt;
a powerful data translation facility, so that data may be stored in&lt;br /&gt;
data structures and formats defined by the data provider, but &lt;br /&gt;
accessed by the user in a manner identical to the access of local data&lt;br /&gt;
files on the user&#039;s own system. Though there are limitations on the&lt;br /&gt;
types of data that may be translated (see&lt;br /&gt;
[[UserGuideDataModel#Translation|Translation]]), &lt;br /&gt;
the facility is flexible and general enough to handle many of the&lt;br /&gt;
possible translations.  There are two important results:&lt;br /&gt;
&lt;br /&gt;
*A user may not need to know that data from one set are stored in a format different from data in another set. Further, it may be possible that &#039;&#039;neither&#039;&#039; data set is stored in a format readable by the original version of the data analysis and display program he or she uses. &lt;br /&gt;
&lt;br /&gt;
*No segment of OPeNDAP users will be effectively cut off from accessing data because of its storage format. A scientist who wishes to make his or her data available to other OPeNDAP users may do so while keeping that data in what may actually be a highly idiosyncratic storage format. (Of course, it doesn&#039;t &#039;&#039;have&#039;&#039; to be in a highly idiosyncratic format.)&lt;br /&gt;
&lt;br /&gt;
The combination of the OPeNDAP network communication model and the data&lt;br /&gt;
translation facility make OPeNDAP a powerful tool for the retrieval,&lt;br /&gt;
sampling, and display of large distributed datasets. Though OPeNDAP was&lt;br /&gt;
developed by oceanographers, its application is not limited to&lt;br /&gt;
oceanographic data. The organizing principles and algorithms may be&lt;br /&gt;
applied to many other fields.&lt;br /&gt;
&lt;br /&gt;
The uniformity with which data appears that makes the system so useful&lt;br /&gt;
for data analysis also eases automating data transport and&lt;br /&gt;
manipulation tasks.  For example, NOAA&#039;s&lt;br /&gt;
[http://ferret.pmel.noaa.gov/Ferret/LAS/home/ Live Access Server&lt;br /&gt;
(LAS)] (see, for example, [http://mynasadata.larc.nasa.gov/data.html&lt;br /&gt;
My NASA Data]) uses OPeNDAP, as do many of the real-time observing&lt;br /&gt;
systems that make up the [http://www.ioos.gov Integrated Ocean&lt;br /&gt;
Observing System (IOOS)], like [http://gomoos.org Gulf of Maine Ocean&lt;br /&gt;
Observing System].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The population of people who may be interested in a system such as&lt;br /&gt;
OPeNDAP may be divided into data consumers and data providers. Though it&lt;br /&gt;
was an important observation to the development of OPeNDAP that the two&lt;br /&gt;
roles are often assumed by the same scientists, the division is a&lt;br /&gt;
useful one for the introduction of the system. The following two&lt;br /&gt;
sections provide a broad introduction to the roles of data consumer&lt;br /&gt;
and data provider. The remainder of this guide is organized around&lt;br /&gt;
this distinction between classes of users.&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Client=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OPeNDAP uses a client/server model. The OPeNDAP&lt;br /&gt;
servers are web servers equipped to interpret an OPeNDAP URL sent to&lt;br /&gt;
them.  An OPeNDAP client composes and sends messages to those&lt;br /&gt;
servers.  There are standalone OPeNDAP clients, but most clients are&lt;br /&gt;
constructed from data analysis programs modified to get their data&lt;br /&gt;
remotely, from the internet, rather than locally, from a file.&lt;br /&gt;
&lt;br /&gt;
Without OPeNDAP, an application program that uses one of the common&lt;br /&gt;
data access APIs such as netCDF will operate as shown in&lt;br /&gt;
[[:Image:unlinked.gif | the figure below]].  The user makes a request&lt;br /&gt;
for data from the application program.  This program uses some data&lt;br /&gt;
access API to read and write data.  The program uses procedures&lt;br /&gt;
defined by that API to access the data, which is typically stored on&lt;br /&gt;
the same host machine.  Some APIs are somewhat more sophisticated than&lt;br /&gt;
this, of course, but their general operation is as simple.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:unlinked.png|actual size]]&lt;br /&gt;
&lt;br /&gt;
The Architecture of a Data Analysis Package &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The operation of an OPeNDAP client is illustrated in the [[:Image:unlinked.gif | figure below]].&lt;br /&gt;
Here, the&lt;br /&gt;
&#039;&#039;same application program&#039;&#039;  that was used in [[:Image:unlinked.gif |&lt;br /&gt;
the figure above]]&lt;br /&gt;
has been modified to use one of the OPeNDAP API libraries.  Now, in addition to being&lt;br /&gt;
able to use local data as before, the application program is able to access&lt;br /&gt;
data from OPeNDAP servers anywhere on the Internet in the same manner as the&lt;br /&gt;
local data.&lt;br /&gt;
&lt;br /&gt;
To make some analysis program into an OPeNDAP client, just re-link it with&lt;br /&gt;
the OPeNDAP API library.  (Or, if your program uses one of the supported legacy API libraries, like netCDF, you can link with the OPeNDAP version of that library.)  This will&lt;br /&gt;
create a program that accepts URLs as well as file pathnames to&lt;br /&gt;
identify data to be read.  (See&lt;br /&gt;
[[Wiki_Testing/OPeNDAPUserGuide3|Section 3.1]]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:linked.png|actual size]]&lt;br /&gt;
&lt;br /&gt;
The Architecture of a Data Analysis Package Using OPeNDAP&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
OPeNDAP also provides a data translation facility. Data from the original&lt;br /&gt;
data file is translated by the OPeNDAP server into the OPeNDAP data model for&lt;br /&gt;
transmission to the client. Upon receiving the data, the client&lt;br /&gt;
translates the data into the [[UserGuideDataModel| data model]] it&lt;br /&gt;
understands. &lt;br /&gt;
Because the data transmitted from an OPeNDAP server to the client travel&lt;br /&gt;
in the OPeNDAP format, the dataset&#039;s original storage format is completely&lt;br /&gt;
irrelevant to the client. If the client was originally&lt;br /&gt;
designed to read netCDF format files, the data returned by the&lt;br /&gt;
OPeNDAP-netCDF library will appear to have been read from a netCDF file,&lt;br /&gt;
whatever the actual format of the files from which the data were&lt;br /&gt;
read([[Wiki_Testing/OPeNDAPUserGuideFootNotes|4]]). If the&lt;br /&gt;
program expects JGOFS data, the OPeNDAP-JGOFS library will return data&lt;br /&gt;
that seem to have come from a JGOFS dataset, and so on.&lt;br /&gt;
&lt;br /&gt;
OPeNDAP does not pretend to remove all the overhead of data&lt;br /&gt;
searches. A user will still have to keep track of the URLs of&lt;br /&gt;
interesting data in the same way a user must now keep track of the&lt;br /&gt;
names of files.  (You may run across datasets where the data consists&lt;br /&gt;
of OPeNDAP URLs.  These are the OPeNDAP file servers, and have been&lt;br /&gt;
developed by OPeNDAP users to organize datasets consisting of large&lt;br /&gt;
numbers of individual files.)  But it does make the access to that&lt;br /&gt;
data simpler and quicker.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group provides a whole array of client software to&lt;br /&gt;
implement this communication standard.  These range from standalone&lt;br /&gt;
clients to libraries to link with existing software.  There is&lt;br /&gt;
more about these in [[UserGuideOPeNDAPClient| OPeNDAP Client]].&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Services=&lt;br /&gt;
&lt;br /&gt;
The communication between an OPeNDAP client and server is specified by&lt;br /&gt;
the Data Access Protocol (DAP).  This defines the range of messages a&lt;br /&gt;
server must understand and the kinds of replies it makes.&lt;br /&gt;
&lt;br /&gt;
There are two categories of messages an OPeNDAP server can&lt;br /&gt;
understand.  Some are required by the DAP, and others are merely&lt;br /&gt;
suggested.  A server is considered to be DAP-compliant if it can&lt;br /&gt;
respond intelligibly to the required messages.&lt;br /&gt;
&lt;br /&gt;
The requests messages a server is required to understand are these:&lt;br /&gt;
&lt;br /&gt;
;Data Description&lt;br /&gt;
:Data values come in types and sizes.  An array, for example, might consist of 10 integers.  The value &amp;quot;ten&amp;quot; and the type &amp;quot;integer&amp;quot; describe the array.  This request returns information about data types, so that a receiving program can allocate space appropriately.  See [[UserGuideDataModel#DDS| Data Description Structure (DDS)]].&lt;br /&gt;
&lt;br /&gt;
;Data Attribute&lt;br /&gt;
:This is a request to provide information &#039;&#039;about&#039;&#039; data, and typically includes information like units, names of data types, reference information and so on.  See [[UserGuideDataModel#DAS| Data Attribute Structure (DAS)]].&lt;br /&gt;
&lt;br /&gt;
;Data&lt;br /&gt;
:The server also must be able to respond to a request for the data itself.  See [[UserGuideDataModel#DataDDS| data response]].&lt;br /&gt;
&lt;br /&gt;
A server may respond to requests like these, too:&lt;br /&gt;
&lt;br /&gt;
;ASCII&lt;br /&gt;
:Some servers can convert data to ASCII values on the fly.  This allows users to view data using a standard web browser, assuming the data are not too large.  See [[UserGuideOPeNDAPServer#ASCII| ASCII return]].&lt;br /&gt;
&lt;br /&gt;
;Info&lt;br /&gt;
:The info response is a formatted page containing information from the Data Attributes and Data Description responses.  It&#039;s meant to be a human-readable way to show what&#039;s available in a dataset via a standard web browser.  See [[UserGuideOPeNDAPServer#Info| Info response]].&lt;br /&gt;
&lt;br /&gt;
;HTML&lt;br /&gt;
:Very similar to the info response is the HTML response.  This provides not only the information from the info response, but also includes a Javascript form to help you build a request for data from the same data file.  The best description of the HTML form is in the [[QuickStart| Quick Start Guide]].&lt;br /&gt;
&lt;br /&gt;
;SOAP&lt;br /&gt;
:OPeNDAP servers can provide their data in terms of a SOAP request and response.  For more information see [[UserGuideDataModel#SOAP| SOAP Request]].&lt;br /&gt;
&lt;br /&gt;
;DDX&lt;br /&gt;
:The DDX is an XML version of the Data Attribute and Data Description replies.  See [[UserGuideOPeNDAPServer#DDX| DDX Request]].&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Server=&lt;br /&gt;
&lt;br /&gt;
OPeNDAP provides a definition of the communication between client and&lt;br /&gt;
server.  Servers and clients who conform to that standard can&lt;br /&gt;
communicate with each other.  In addition to the OPeNDAP communication&lt;br /&gt;
standard itself, the OPeNDAP group also provides an implementation of&lt;br /&gt;
that standard server protocol, called &#039;&#039;Hyrax.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP data server is made up of two pieces.  You can think of&lt;br /&gt;
them as a front-end and a back-end, though a client will not be aware&lt;br /&gt;
of the separation.  They will often be run on the same machine, and&lt;br /&gt;
even when they are not, a client will see only the front end.&lt;br /&gt;
&lt;br /&gt;
The front-end server is a Tomcat servlet, and is also called the&lt;br /&gt;
&#039;&#039;&#039;OPeNDAP Lightweight Front-End Servlet&#039;&#039;&#039; (OLFS).  Its job is to&lt;br /&gt;
receive your request for data and manage all the different forms such&lt;br /&gt;
a request might take.  For example, you might be asking for the data,&lt;br /&gt;
an ASCII version of the data, or a reply to a SOAP message looking for&lt;br /&gt;
data.  The front-end server can also reply to THREDDS catalog&lt;br /&gt;
requests, for information about the data, and can directly provide&lt;br /&gt;
some information about the data, too.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Back-End Server&#039;&#039;&#039; (BES) is more strictly about performance,&lt;br /&gt;
and is designed to respond quickly and efficiently to requests from&lt;br /&gt;
the OLFS.  It is a pure data server, and has only one format of&lt;br /&gt;
request and response, relying on the OLFS to convert messages to&lt;br /&gt;
whatever format will accommodate the user.  Most users won&#039;t make&lt;br /&gt;
requests directly to the BES.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:HyraxArchitecture.jpg|center|600px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Hyrax&#039;&#039; is an alternative name for the OPeNDAP 4 Data Server.&lt;br /&gt;
&lt;br /&gt;
See&lt;br /&gt;
[[UserGuideDataModel|Data Model]] for a description of the data returned by these&lt;br /&gt;
requests and see [[UserGuideOPeNDAPServer|OPeNDAP Server]] for a description of the&lt;br /&gt;
URL syntax used to send these requests.&lt;br /&gt;
&lt;br /&gt;
See [[Hyrax|the OPeNDAP 4 Data Server documentation]] for a&lt;br /&gt;
description of how to install and configure an OPeNDAP data server (Hyrax).&lt;br /&gt;
&lt;br /&gt;
=Administration and Centralization of Data=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under OPeNDAP, there is no central archive of data.  Data under OPeNDAP&lt;br /&gt;
is organized in a manner similar to the World Wide Web itself.  That&lt;br /&gt;
is, all one need do to make one&#039;s data available is to start up a&lt;br /&gt;
properly configured server on an Internet node that has&lt;br /&gt;
access to the data to be served.  Each data provider is free to join&lt;br /&gt;
and to leave the system when it is convenient, just as any proprietor&lt;br /&gt;
of a web page is free to delete it or add to it as whimsy demands.&lt;br /&gt;
&lt;br /&gt;
Of course, as can also be seen on the World Wide Web, there are some&lt;br /&gt;
disadvantages to the lack of central authority.  If no one knows about&lt;br /&gt;
a web site, no one will visit it.  Similarly, listing a dataset in a&lt;br /&gt;
central data catalog, such as the Global Change Master Directory&lt;br /&gt;
([http://gcmd.gsfc.nasa.gov &amp;lt;cite&amp;gt;http://gcmd.gsfc.nasa.gov/&amp;lt;/cite&amp;gt;]),can make data available to other researchers in a way that simply&lt;br /&gt;
configuring an OPeNDAP server does not.  OPeNDAP provided a facility for&lt;br /&gt;
registering a data set with the GCMD catalog, which makes the data set&lt;br /&gt;
known to the OPeNDAP data location service.  The THREDDS catalog service&lt;br /&gt;
is another way to make information about your data widely available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The remainder of this book will be divided into three major sections:&lt;br /&gt;
instructions on the building and operating of OPeNDAP clients; a tutorial&lt;br /&gt;
and reference on running OPeNDAP servers and making data available to OPeNDAP&lt;br /&gt;
clients; and technical documentation describing the implementation details&lt;br /&gt;
(and the motivation behind many of the design decisions) of the OPeNDAP&lt;br /&gt;
software.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideIntroduction&amp;diff=4898</id>
		<title>UserGuideIntroduction</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideIntroduction&amp;diff=4898"/>
		<updated>2009-10-01T19:35:58Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: /* The OPeNDAP Client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[UserGuide|Return to top level]]&lt;br /&gt;
&lt;br /&gt;
=What is OPeNDAP?=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OPeNDAP provides a way for researchers to&lt;br /&gt;
access scientific data anywhere on the Internet from a wide variety of new&lt;br /&gt;
&#039;&#039;and existing&#039;&#039;  programs. &lt;br /&gt;
&lt;br /&gt;
The OPeNDAP architecture uses a client/server model, with a &#039;&#039;client&#039;&#039;&lt;br /&gt;
that sends requests for data out onto the network to some &#039;&#039;server&#039;&#039;,&lt;br /&gt;
that answers with the requested data. This is exactly the model used&lt;br /&gt;
by the [http://www.w3.org/hypertext/WWW/TheProject.html &amp;lt;nowiki&amp;gt;World&lt;br /&gt;
Wide Web&amp;lt;/nowiki&amp;gt;] where client browsers submit requests&lt;br /&gt;
to web servers for the data that make up web pages. Of course, OPeNDAP&lt;br /&gt;
clients can do much more than browse this data.  Using flexible data&lt;br /&gt;
types suitable for many uses, including scientific data, the OPeNDAP&lt;br /&gt;
servers deliver real data directly to the client program in the format&lt;br /&gt;
needed by that client.&lt;br /&gt;
&lt;br /&gt;
OPeNDAP clients are very specialized browsers, constructed by linking&lt;br /&gt;
legacy data analysis programs with OPeNDAP-enabled versions of the&lt;br /&gt;
data access APIs they use, or by modifying the programs to use one of&lt;br /&gt;
the OPeNDAP data access APIs.  In addition to providing a&lt;br /&gt;
sophisticated set of network-compatible APIs in several languages,&lt;br /&gt;
there are also libraries of legacy APIs available in OPeNDAP-aware&lt;br /&gt;
versions.  The popular&lt;br /&gt;
[http://www.unidata.ucar.edu/packages/netcdf/guide.txn_toc.html&lt;br /&gt;
&amp;lt;cite&amp;gt;NetCDF&amp;lt;/cite&amp;gt;] library, for example, can read data from remote&lt;br /&gt;
OPeNDAP data sources as easily as it reads from a local file.&lt;br /&gt;
&lt;br /&gt;
To expand the universe of data available to a user, OPeNDAP incorporates&lt;br /&gt;
a powerful data translation facility, so that data may be stored in&lt;br /&gt;
data structures and formats defined by the data provider, but &lt;br /&gt;
accessed by the user in a manner identical to the access of local data&lt;br /&gt;
files on the user&#039;s own system. Though there are limitations on the&lt;br /&gt;
types of data that may be translated (see&lt;br /&gt;
[[UserGuideDataModel#Translation|Translation]]), &lt;br /&gt;
the facility is flexible and general enough to handle many of the&lt;br /&gt;
possible translations.  There are two important results:&lt;br /&gt;
&lt;br /&gt;
*A user may not need to know that data from one set are stored in a format different from data in another set. Further, it may be possible that &#039;&#039;neither&#039;&#039; data set is stored in a format readable by the original version of the data analysis and display program he or she uses. &lt;br /&gt;
&lt;br /&gt;
*No segment of OPeNDAP users will be effectively cut off from accessing data because of its storage format. A scientist who wishes to make his or her data available to other OPeNDAP users may do so while keeping that data in what may actually be a highly idiosyncratic storage format. (Of course, it doesn&#039;t &#039;&#039;have&#039;&#039; to be in a highly idiosyncratic format.)&lt;br /&gt;
&lt;br /&gt;
The combination of the OPeNDAP network communication model and the data&lt;br /&gt;
translation facility make OPeNDAP a powerful tool for the retrieval,&lt;br /&gt;
sampling, and display of large distributed datasets. Though OPeNDAP was&lt;br /&gt;
developed by oceanographers, its application is not limited to&lt;br /&gt;
oceanographic data. The organizing principles and algorithms may be&lt;br /&gt;
applied to many other fields.&lt;br /&gt;
&lt;br /&gt;
The uniformity with which data appears that makes the system so useful&lt;br /&gt;
for data analysis also eases automating data transport and&lt;br /&gt;
manipulation tasks.  For example, NOAA&#039;s&lt;br /&gt;
[http://ferret.pmel.noaa.gov/Ferret/LAS/home/ Live Access Server&lt;br /&gt;
(LAS)] (see, for example, [http://mynasadata.larc.nasa.gov/data.html&lt;br /&gt;
My NASA Data]) uses OPeNDAP, as do many of the real-time observing&lt;br /&gt;
systems that make up the [http://www.ioos.gov Integrated Ocean&lt;br /&gt;
Observing System (IOOS)], like [http://gomoos.org Gulf of Maine Ocean&lt;br /&gt;
Observing System].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The population of people who may be interested in a system such as&lt;br /&gt;
OPeNDAP may be divided into data consumers and data providers. Though it&lt;br /&gt;
was an important observation to the development of OPeNDAP that the two&lt;br /&gt;
roles are often assumed by the same scientists, the division is a&lt;br /&gt;
useful one for the introduction of the system. The following two&lt;br /&gt;
sections provide a broad introduction to the roles of data consumer&lt;br /&gt;
and data provider. The remainder of this guide is organized around&lt;br /&gt;
this distinction between classes of users.&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Client=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OPeNDAP uses a client/server model. The OPeNDAP&lt;br /&gt;
servers are web servers equipped to interpret an OPeNDAP URL sent to&lt;br /&gt;
them.  An OPeNDAP client composes and sends messages to those&lt;br /&gt;
servers.  There are standalone OPeNDAP clients, but most clients are&lt;br /&gt;
constructed from data analysis programs modified to get their data&lt;br /&gt;
remotely, from the internet, rather than locally, from a file.&lt;br /&gt;
&lt;br /&gt;
Without OPeNDAP, an application program that uses one of the common&lt;br /&gt;
data access APIs such as netCDF will operate as shown in&lt;br /&gt;
[[:Image:unlinked.gif | the figure below]].  The user makes a request&lt;br /&gt;
for data from the application program.  This program uses some data&lt;br /&gt;
access API to read and write data.  The program uses procedures&lt;br /&gt;
defined by that API to access the data, which is typically stored on&lt;br /&gt;
the same host machine.  Some APIs are somewhat more sophisticated than&lt;br /&gt;
this, of course, but their general operation is as simple.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:unlinked.png|actual size]]&lt;br /&gt;
&lt;br /&gt;
The Architecture of a Data Analysis Package &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The operation of an OPeNDAP client is illustrated in the [[:Image:unlinked.gif | figure below]].&lt;br /&gt;
Here, the&lt;br /&gt;
&#039;&#039;same application program&#039;&#039;  that was used in [[:Image:unlinked.gif |&lt;br /&gt;
the figure above]]&lt;br /&gt;
has been modified to use one of the OPeNDAP API libraries.  Now, in addition to being&lt;br /&gt;
able to use local data as before, the application program is able to access&lt;br /&gt;
data from OPeNDAP servers anywhere on the Internet in the same manner as the&lt;br /&gt;
local data.&lt;br /&gt;
&lt;br /&gt;
To make some analysis program into an OPeNDAP client, just re-link it with&lt;br /&gt;
the OPeNDAP API library.  (Or, if your program uses one of the supported legacy API libraries, like netCDF, you can link with the OPeNDAP version of that library.)  This will&lt;br /&gt;
create a program that accepts URLs as well as file pathnames to&lt;br /&gt;
identify data to be read.  (See&lt;br /&gt;
[[Wiki_Testing/OPeNDAPUserGuide3|Section 3.1]]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:linked.png|actual size]]&lt;br /&gt;
&lt;br /&gt;
The Architecture of a Data Analysis Package Using OPeNDAP&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
OPeNDAP also provides a data translation facility. Data from the original&lt;br /&gt;
data file is translated by the OPeNDAP server into the OPeNDAP data model for&lt;br /&gt;
transmission to the client. Upon receiving the data, the client&lt;br /&gt;
translates the data into the [[UserGuideDataModel| data model]] it&lt;br /&gt;
understands. &lt;br /&gt;
Because the data transmitted from an OPeNDAP server to the client travel&lt;br /&gt;
in the OPeNDAP format, the dataset&#039;s original storage format is completely&lt;br /&gt;
irrelevant to the client. If the client was originally&lt;br /&gt;
designed to read netCDF format files, the data returned by the&lt;br /&gt;
OPeNDAP-netCDF library will appear to have been read from a netCDF file,&lt;br /&gt;
whatever the actual format of the files from which the data were&lt;br /&gt;
read([[Wiki_Testing/OPeNDAPUserGuideFootNotes|4]]). If the&lt;br /&gt;
program expects JGOFS data, the OPeNDAP-JGOFS library will return data&lt;br /&gt;
that seem to have come from a JGOFS dataset, and so on.&lt;br /&gt;
&lt;br /&gt;
OPeNDAP does not pretend to remove all the overhead of data&lt;br /&gt;
searches. A user will still have to keep track of the URLs of&lt;br /&gt;
interesting data in the same way a user must now keep track of the&lt;br /&gt;
names of files.  (You may run across datasets where the data consists&lt;br /&gt;
of OPeNDAP URLs.  These are the OPeNDAP file servers, and have been&lt;br /&gt;
developed by OPeNDAP users to organize datasets consisting of large&lt;br /&gt;
numbers of individual files.)  But it does make the access to that&lt;br /&gt;
data simpler and quicker.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group provides a whole array of client software to&lt;br /&gt;
implement this communication standard.  These range from standalone&lt;br /&gt;
clients to libraries to link with existing software.  There is&lt;br /&gt;
more about these in [[UserGuideOPeNDAPClient| OPeNDAP Client]].&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Services=&lt;br /&gt;
&lt;br /&gt;
The communication between an OPeNDAP client and server is specified by&lt;br /&gt;
the Data Access Protocol (DAP).  This defines the range of messages a&lt;br /&gt;
server must understand and the kinds of replies it makes.&lt;br /&gt;
&lt;br /&gt;
There are two categories of messages an OPeNDAP server can&lt;br /&gt;
understand.  Some are required by the DAP, and others are merely&lt;br /&gt;
suggested.  A server is considered to be DAP-compliant if it can&lt;br /&gt;
respond intelligibly to the required messages.&lt;br /&gt;
&lt;br /&gt;
The requests messages a server is required to understand are these:&lt;br /&gt;
&lt;br /&gt;
;Data Description&lt;br /&gt;
:Data values come in types and sizes.  An array, for example, might consist of 10 integers.  The value &amp;quot;ten&amp;quot; and the type &amp;quot;integer&amp;quot; describe the array.  This request returns information about data types, so that a receiving program can allocate space appropriately.  See [[UserGuideDataModel#DDS| Data Description Structure (DDS)]].&lt;br /&gt;
&lt;br /&gt;
;Data Attribute&lt;br /&gt;
:This is a request to provide information &#039;&#039;about&#039;&#039; data, and typically includes information like units, names of data types, reference information and so on.  See [[UserGuideDataModel#DAS| Data Attribute Structure (DAS)]].&lt;br /&gt;
&lt;br /&gt;
;Data&lt;br /&gt;
:The server also must be able to respond to a request for the data itself.  See [[UserGuideDataModel#DataDDS| data response]].&lt;br /&gt;
&lt;br /&gt;
A server may respond to requests like these, too:&lt;br /&gt;
&lt;br /&gt;
;ASCII&lt;br /&gt;
:Some servers can convert data to ASCII values on the fly.  This allows users to view data using a standard web browser, assuming the data are not too large.  See [[UserGuideOPeNDAPServer#ASCII| ASCII return]].&lt;br /&gt;
&lt;br /&gt;
;Info&lt;br /&gt;
:The info response is a formatted page containing information from the Data Attributes and Data Description responses.  It&#039;s meant to be a human-readable way to show what&#039;s available in a dataset via a standard web browser.  See [[UserGuideOPeNDAPServer#Info| Info response]].&lt;br /&gt;
&lt;br /&gt;
;HTML&lt;br /&gt;
:Very similar to the info response is the HTML response.  This provides not only the information from the info response, but also includes a Javascript form to help you build a request for data from the same data file.  The best description of the HTML form is in the [[QuickStart| Quick Start Guide]].&lt;br /&gt;
&lt;br /&gt;
;SOAP&lt;br /&gt;
:OPeNDAP servers can provide their data in terms of a SOAP request and response.  For more information see [[UserGuideDataModel#SOAP| SOAP Request]].&lt;br /&gt;
&lt;br /&gt;
;DDX&lt;br /&gt;
:The DDX is an XML version of the Data Attribute and Data Description replies.  See [[UserGuideOPeNDAPServer#DDX| DDX Request]].&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Server=&lt;br /&gt;
&lt;br /&gt;
OPeNDAP provides a definition of the communication between client and&lt;br /&gt;
server.  Servers and clients who conform to that standard can&lt;br /&gt;
communicate with each other.  In addition to the OPeNDAP communication&lt;br /&gt;
standard itself, the OPeNDAP group also provides an implementation of&lt;br /&gt;
that standard server protocol, called &#039;&#039;Hyrax.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP data server is made up of two pieces.  You can think of&lt;br /&gt;
them as a front-end and a back-end, though a client will not be aware&lt;br /&gt;
of the separation.  They will often be run on the same machine, and&lt;br /&gt;
even when they are not, a client will see only the front end.&lt;br /&gt;
&lt;br /&gt;
The front-end server is a Tomcat servlet, and is also called the&lt;br /&gt;
&#039;&#039;&#039;OPeNDAP Lightweight Front-End Servlet&#039;&#039;&#039; (OLFS).  Its job is to&lt;br /&gt;
receive your request for data and manage all the different forms such&lt;br /&gt;
a request might take.  For example, you might be asking for the data,&lt;br /&gt;
an ASCII version of the data, or a reply to a SOAP message looking for&lt;br /&gt;
data.  The front-end server can also reply to THREDDS catalog&lt;br /&gt;
requests, for information about the data, and can directly provide&lt;br /&gt;
some information about the data, too.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Back-End Server&#039;&#039;&#039; (BES) is more strictly about performance,&lt;br /&gt;
and is designed to respond quickly and efficiently to requests from&lt;br /&gt;
the OLFS.  It is a pure data server, and has only one format of&lt;br /&gt;
request and response, relying on the OLFS to convert messages to&lt;br /&gt;
whatever format will accommodate the user.  Most users won&#039;t make&lt;br /&gt;
requests directly to the BES.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:HyraxArchitecture.jpg|center|600px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Hyrax&#039;&#039; is an alternative name for the OPeNDAP 4 Data Server.&lt;br /&gt;
&lt;br /&gt;
See&lt;br /&gt;
[[UserGuideDataModel|Data Model]] for a description of the data returned by these&lt;br /&gt;
requests and see [[UserGuideOPeNDAPServer|OPeNDAP Server]] for a description of the&lt;br /&gt;
URL syntax used to send these requests.&lt;br /&gt;
&lt;br /&gt;
See [[Hyrax|the OPeNDAP 4 Data Server documentation]] for a&lt;br /&gt;
description of how to install and configure an OPeNDAP data server (Hyrax).&lt;br /&gt;
&lt;br /&gt;
=Administration and Centralization of Data=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under OPeNDAP, there is no central archive of data.  Data under OPeNDAP&lt;br /&gt;
is organized in a manner similar to the World Wide Web itself.  That&lt;br /&gt;
is, all one need do to make one&#039;s data available is to start up a&lt;br /&gt;
properly configured server on an Internet node that has&lt;br /&gt;
access to the data to be served.  Each data provider is free to join&lt;br /&gt;
and to leave the system when it is convenient, just as any proprietor&lt;br /&gt;
of a web page is free to delete it or add to it as whimsy demands.&lt;br /&gt;
&lt;br /&gt;
Of course, as can also be seen on the World Wide Web, there are some&lt;br /&gt;
disadvantages to the lack of central authority.  If no one knows about&lt;br /&gt;
a web site, no one will visit it.  Similarly, listing a dataset in a&lt;br /&gt;
central data catalog, such as the Global Change Master Directory&lt;br /&gt;
([http://gcmd.gsfc.nasa.gov &amp;lt;cite&amp;gt;http://gcmd.gsfc.nasa.gov/&amp;lt;/cite&amp;gt;]),can make data available to other researchers in a way that simply&lt;br /&gt;
configuring an OPeNDAP server does not.  OPeNDAP provided a facility for&lt;br /&gt;
registering a data set with the GCMD catalog, which makes the data set&lt;br /&gt;
known to the OPeNDAP data location service.  The THREDDS catalog service&lt;br /&gt;
is another way to make information about your data widely available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The remainder of this book will be divided into three major sections:&lt;br /&gt;
instructions on the building and operating of OPeNDAP clients; a tutorial&lt;br /&gt;
and reference on running OPeNDAP servers and making data available to OPeNDAP&lt;br /&gt;
clients; and technical documentation describing the implementation details&lt;br /&gt;
(and the motivation behind many of the design decisions) of the OPeNDAP&lt;br /&gt;
software.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideIntroduction&amp;diff=4897</id>
		<title>UserGuideIntroduction</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideIntroduction&amp;diff=4897"/>
		<updated>2009-10-01T19:33:51Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: /* The OPeNDAP Client */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[UserGuide|Return to top level]]&lt;br /&gt;
&lt;br /&gt;
=What is OPeNDAP?=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OPeNDAP provides a way for researchers to&lt;br /&gt;
access scientific data anywhere on the Internet from a wide variety of new&lt;br /&gt;
&#039;&#039;and existing&#039;&#039;  programs. &lt;br /&gt;
&lt;br /&gt;
The OPeNDAP architecture uses a client/server model, with a &#039;&#039;client&#039;&#039;&lt;br /&gt;
that sends requests for data out onto the network to some &#039;&#039;server&#039;&#039;,&lt;br /&gt;
that answers with the requested data. This is exactly the model used&lt;br /&gt;
by the [http://www.w3.org/hypertext/WWW/TheProject.html &amp;lt;nowiki&amp;gt;World&lt;br /&gt;
Wide Web&amp;lt;/nowiki&amp;gt;] where client browsers submit requests&lt;br /&gt;
to web servers for the data that make up web pages. Of course, OPeNDAP&lt;br /&gt;
clients can do much more than browse this data.  Using flexible data&lt;br /&gt;
types suitable for many uses, including scientific data, the OPeNDAP&lt;br /&gt;
servers deliver real data directly to the client program in the format&lt;br /&gt;
needed by that client.&lt;br /&gt;
&lt;br /&gt;
OPeNDAP clients are very specialized browsers, constructed by linking&lt;br /&gt;
legacy data analysis programs with OPeNDAP-enabled versions of the&lt;br /&gt;
data access APIs they use, or by modifying the programs to use one of&lt;br /&gt;
the OPeNDAP data access APIs.  In addition to providing a&lt;br /&gt;
sophisticated set of network-compatible APIs in several languages,&lt;br /&gt;
there are also libraries of legacy APIs available in OPeNDAP-aware&lt;br /&gt;
versions.  The popular&lt;br /&gt;
[http://www.unidata.ucar.edu/packages/netcdf/guide.txn_toc.html&lt;br /&gt;
&amp;lt;cite&amp;gt;NetCDF&amp;lt;/cite&amp;gt;] library, for example, can read data from remote&lt;br /&gt;
OPeNDAP data sources as easily as it reads from a local file.&lt;br /&gt;
&lt;br /&gt;
To expand the universe of data available to a user, OPeNDAP incorporates&lt;br /&gt;
a powerful data translation facility, so that data may be stored in&lt;br /&gt;
data structures and formats defined by the data provider, but &lt;br /&gt;
accessed by the user in a manner identical to the access of local data&lt;br /&gt;
files on the user&#039;s own system. Though there are limitations on the&lt;br /&gt;
types of data that may be translated (see&lt;br /&gt;
[[UserGuideDataModel#Translation|Translation]]), &lt;br /&gt;
the facility is flexible and general enough to handle many of the&lt;br /&gt;
possible translations.  There are two important results:&lt;br /&gt;
&lt;br /&gt;
*A user may not need to know that data from one set are stored in a format different from data in another set. Further, it may be possible that &#039;&#039;neither&#039;&#039; data set is stored in a format readable by the original version of the data analysis and display program he or she uses. &lt;br /&gt;
&lt;br /&gt;
*No segment of OPeNDAP users will be effectively cut off from accessing data because of its storage format. A scientist who wishes to make his or her data available to other OPeNDAP users may do so while keeping that data in what may actually be a highly idiosyncratic storage format. (Of course, it doesn&#039;t &#039;&#039;have&#039;&#039; to be in a highly idiosyncratic format.)&lt;br /&gt;
&lt;br /&gt;
The combination of the OPeNDAP network communication model and the data&lt;br /&gt;
translation facility make OPeNDAP a powerful tool for the retrieval,&lt;br /&gt;
sampling, and display of large distributed datasets. Though OPeNDAP was&lt;br /&gt;
developed by oceanographers, its application is not limited to&lt;br /&gt;
oceanographic data. The organizing principles and algorithms may be&lt;br /&gt;
applied to many other fields.&lt;br /&gt;
&lt;br /&gt;
The uniformity with which data appears that makes the system so useful&lt;br /&gt;
for data analysis also eases automating data transport and&lt;br /&gt;
manipulation tasks.  For example, NOAA&#039;s&lt;br /&gt;
[http://ferret.pmel.noaa.gov/Ferret/LAS/home/ Live Access Server&lt;br /&gt;
(LAS)] (see, for example, [http://mynasadata.larc.nasa.gov/data.html&lt;br /&gt;
My NASA Data]) uses OPeNDAP, as do many of the real-time observing&lt;br /&gt;
systems that make up the [http://www.ioos.gov Integrated Ocean&lt;br /&gt;
Observing System (IOOS)], like [http://gomoos.org Gulf of Maine Ocean&lt;br /&gt;
Observing System].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The population of people who may be interested in a system such as&lt;br /&gt;
OPeNDAP may be divided into data consumers and data providers. Though it&lt;br /&gt;
was an important observation to the development of OPeNDAP that the two&lt;br /&gt;
roles are often assumed by the same scientists, the division is a&lt;br /&gt;
useful one for the introduction of the system. The following two&lt;br /&gt;
sections provide a broad introduction to the roles of data consumer&lt;br /&gt;
and data provider. The remainder of this guide is organized around&lt;br /&gt;
this distinction between classes of users.&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Client=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OPeNDAP uses a client/server model. The OPeNDAP&lt;br /&gt;
servers are web servers equipped to interpret an OPeNDAP URL sent to&lt;br /&gt;
them.  An OPeNDAP client composes and sends messages to those&lt;br /&gt;
servers.  There are standalone OPeNDAP clients, but most clients are&lt;br /&gt;
constructed from data analysis programs modified to get their data&lt;br /&gt;
remotely, from the internet, rather than locally, from a file.&lt;br /&gt;
&lt;br /&gt;
Without OPeNDAP, an application program that uses one of the common&lt;br /&gt;
data access APIs such as netCDF will operate as shown in&lt;br /&gt;
[[:Image:unlinked.gif | the figure below]].  The user makes a request&lt;br /&gt;
for data from the application program.  This program uses some data&lt;br /&gt;
access API to read and write data.  The program uses procedures&lt;br /&gt;
defined by that API to access the data, which is typically stored on&lt;br /&gt;
the same host machine.  Some APIs are somewhat more sophisticated than&lt;br /&gt;
this, of course, but their general operation is as simple.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:unlinked.png|actual size]]&lt;br /&gt;
&lt;br /&gt;
The Architecture of a Data Analysis Package &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The operation of an OPeNDAP client is illustrated in the [[:Image:unlinked.gif | figure below]].&lt;br /&gt;
Here, the&lt;br /&gt;
&#039;&#039;same application program&#039;&#039;  that was used in [[:Image:unlinked.gif |&lt;br /&gt;
the figure above]]&lt;br /&gt;
has been linked&lt;br /&gt;
with an OPeNDAP version of the data access API library.  Now, in addition to being&lt;br /&gt;
able to use local data as before, the application program is able to access&lt;br /&gt;
data from OPeNDAP servers anywhere on the Internet in exactly the same manner as the&lt;br /&gt;
local data.&lt;br /&gt;
&lt;br /&gt;
To make some analysis program into an OPeNDAP client, just re-link it with&lt;br /&gt;
the OPeNDAP API library.  (Or, if your program uses one of the supported legacy API libraries, like netCDF, you can link with the OPeNDAP version of that library.)  This will&lt;br /&gt;
create a program that accepts URLs as well as file pathnames to&lt;br /&gt;
identify data to be read.  (See&lt;br /&gt;
[[Wiki_Testing/OPeNDAPUserGuide3|Section 3.1]]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:linked.png|actual size]]&lt;br /&gt;
&lt;br /&gt;
The Architecture of a Data Analysis Package Using OPeNDAP&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
OPeNDAP also provides a data translation facility. Data from the original&lt;br /&gt;
data file is translated by the OPeNDAP server into the OPeNDAP data model for&lt;br /&gt;
transmission to the client. Upon receiving the data, the client&lt;br /&gt;
translates the data into the [[UserGuideDataModel| data model]] it&lt;br /&gt;
understands. &lt;br /&gt;
Because the data transmitted from an OPeNDAP server to the client travel&lt;br /&gt;
in the OPeNDAP format, the dataset&#039;s original storage format is completely&lt;br /&gt;
irrelevant to the client. If the client was originally&lt;br /&gt;
designed to read netCDF format files, the data returned by the&lt;br /&gt;
OPeNDAP-netCDF library will appear to have been read from a netCDF file,&lt;br /&gt;
whatever the actual format of the files from which the data were&lt;br /&gt;
read([[Wiki_Testing/OPeNDAPUserGuideFootNotes|4]]). If the&lt;br /&gt;
program expects JGOFS data, the OPeNDAP-JGOFS library will return data&lt;br /&gt;
that seem to have come from a JGOFS dataset, and so on.&lt;br /&gt;
&lt;br /&gt;
OPeNDAP does not pretend to remove all the overhead of data&lt;br /&gt;
searches. A user will still have to keep track of the URLs of&lt;br /&gt;
interesting data in the same way a user must now keep track of the&lt;br /&gt;
names of files.  (You may run across datasets where the data consists&lt;br /&gt;
of OPeNDAP URLs.  These are the OPeNDAP file servers, and have been&lt;br /&gt;
developed by OPeNDAP users to organize datasets consisting of large&lt;br /&gt;
numbers of individual files.)  But it does make the access to that&lt;br /&gt;
data simpler and quicker.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group provides a whole array of client software to&lt;br /&gt;
implement this communication standard.  These range from standalone&lt;br /&gt;
clients to libraries to link with existing software.  There is&lt;br /&gt;
more about these in [[UserGuideOPeNDAPClient| OPeNDAP Client]].&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Services=&lt;br /&gt;
&lt;br /&gt;
The communication between an OPeNDAP client and server is specified by&lt;br /&gt;
the Data Access Protocol (DAP).  This defines the range of messages a&lt;br /&gt;
server must understand and the kinds of replies it makes.&lt;br /&gt;
&lt;br /&gt;
There are two categories of messages an OPeNDAP server can&lt;br /&gt;
understand.  Some are required by the DAP, and others are merely&lt;br /&gt;
suggested.  A server is considered to be DAP-compliant if it can&lt;br /&gt;
respond intelligibly to the required messages.&lt;br /&gt;
&lt;br /&gt;
The requests messages a server is required to understand are these:&lt;br /&gt;
&lt;br /&gt;
;Data Description&lt;br /&gt;
:Data values come in types and sizes.  An array, for example, might consist of 10 integers.  The value &amp;quot;ten&amp;quot; and the type &amp;quot;integer&amp;quot; describe the array.  This request returns information about data types, so that a receiving program can allocate space appropriately.  See [[UserGuideDataModel#DDS| Data Description Structure (DDS)]].&lt;br /&gt;
&lt;br /&gt;
;Data Attribute&lt;br /&gt;
:This is a request to provide information &#039;&#039;about&#039;&#039; data, and typically includes information like units, names of data types, reference information and so on.  See [[UserGuideDataModel#DAS| Data Attribute Structure (DAS)]].&lt;br /&gt;
&lt;br /&gt;
;Data&lt;br /&gt;
:The server also must be able to respond to a request for the data itself.  See [[UserGuideDataModel#DataDDS| data response]].&lt;br /&gt;
&lt;br /&gt;
A server may respond to requests like these, too:&lt;br /&gt;
&lt;br /&gt;
;ASCII&lt;br /&gt;
:Some servers can convert data to ASCII values on the fly.  This allows users to view data using a standard web browser, assuming the data are not too large.  See [[UserGuideOPeNDAPServer#ASCII| ASCII return]].&lt;br /&gt;
&lt;br /&gt;
;Info&lt;br /&gt;
:The info response is a formatted page containing information from the Data Attributes and Data Description responses.  It&#039;s meant to be a human-readable way to show what&#039;s available in a dataset via a standard web browser.  See [[UserGuideOPeNDAPServer#Info| Info response]].&lt;br /&gt;
&lt;br /&gt;
;HTML&lt;br /&gt;
:Very similar to the info response is the HTML response.  This provides not only the information from the info response, but also includes a Javascript form to help you build a request for data from the same data file.  The best description of the HTML form is in the [[QuickStart| Quick Start Guide]].&lt;br /&gt;
&lt;br /&gt;
;SOAP&lt;br /&gt;
:OPeNDAP servers can provide their data in terms of a SOAP request and response.  For more information see [[UserGuideDataModel#SOAP| SOAP Request]].&lt;br /&gt;
&lt;br /&gt;
;DDX&lt;br /&gt;
:The DDX is an XML version of the Data Attribute and Data Description replies.  See [[UserGuideOPeNDAPServer#DDX| DDX Request]].&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Server=&lt;br /&gt;
&lt;br /&gt;
OPeNDAP provides a definition of the communication between client and&lt;br /&gt;
server.  Servers and clients who conform to that standard can&lt;br /&gt;
communicate with each other.  In addition to the OPeNDAP communication&lt;br /&gt;
standard itself, the OPeNDAP group also provides an implementation of&lt;br /&gt;
that standard server protocol, called &#039;&#039;Hyrax.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP data server is made up of two pieces.  You can think of&lt;br /&gt;
them as a front-end and a back-end, though a client will not be aware&lt;br /&gt;
of the separation.  They will often be run on the same machine, and&lt;br /&gt;
even when they are not, a client will see only the front end.&lt;br /&gt;
&lt;br /&gt;
The front-end server is a Tomcat servlet, and is also called the&lt;br /&gt;
&#039;&#039;&#039;OPeNDAP Lightweight Front-End Servlet&#039;&#039;&#039; (OLFS).  Its job is to&lt;br /&gt;
receive your request for data and manage all the different forms such&lt;br /&gt;
a request might take.  For example, you might be asking for the data,&lt;br /&gt;
an ASCII version of the data, or a reply to a SOAP message looking for&lt;br /&gt;
data.  The front-end server can also reply to THREDDS catalog&lt;br /&gt;
requests, for information about the data, and can directly provide&lt;br /&gt;
some information about the data, too.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Back-End Server&#039;&#039;&#039; (BES) is more strictly about performance,&lt;br /&gt;
and is designed to respond quickly and efficiently to requests from&lt;br /&gt;
the OLFS.  It is a pure data server, and has only one format of&lt;br /&gt;
request and response, relying on the OLFS to convert messages to&lt;br /&gt;
whatever format will accommodate the user.  Most users won&#039;t make&lt;br /&gt;
requests directly to the BES.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:HyraxArchitecture.jpg|center|600px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Hyrax&#039;&#039; is an alternative name for the OPeNDAP 4 Data Server.&lt;br /&gt;
&lt;br /&gt;
See&lt;br /&gt;
[[UserGuideDataModel|Data Model]] for a description of the data returned by these&lt;br /&gt;
requests and see [[UserGuideOPeNDAPServer|OPeNDAP Server]] for a description of the&lt;br /&gt;
URL syntax used to send these requests.&lt;br /&gt;
&lt;br /&gt;
See [[Hyrax|the OPeNDAP 4 Data Server documentation]] for a&lt;br /&gt;
description of how to install and configure an OPeNDAP data server (Hyrax).&lt;br /&gt;
&lt;br /&gt;
=Administration and Centralization of Data=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under OPeNDAP, there is no central archive of data.  Data under OPeNDAP&lt;br /&gt;
is organized in a manner similar to the World Wide Web itself.  That&lt;br /&gt;
is, all one need do to make one&#039;s data available is to start up a&lt;br /&gt;
properly configured server on an Internet node that has&lt;br /&gt;
access to the data to be served.  Each data provider is free to join&lt;br /&gt;
and to leave the system when it is convenient, just as any proprietor&lt;br /&gt;
of a web page is free to delete it or add to it as whimsy demands.&lt;br /&gt;
&lt;br /&gt;
Of course, as can also be seen on the World Wide Web, there are some&lt;br /&gt;
disadvantages to the lack of central authority.  If no one knows about&lt;br /&gt;
a web site, no one will visit it.  Similarly, listing a dataset in a&lt;br /&gt;
central data catalog, such as the Global Change Master Directory&lt;br /&gt;
([http://gcmd.gsfc.nasa.gov &amp;lt;cite&amp;gt;http://gcmd.gsfc.nasa.gov/&amp;lt;/cite&amp;gt;]),can make data available to other researchers in a way that simply&lt;br /&gt;
configuring an OPeNDAP server does not.  OPeNDAP provided a facility for&lt;br /&gt;
registering a data set with the GCMD catalog, which makes the data set&lt;br /&gt;
known to the OPeNDAP data location service.  The THREDDS catalog service&lt;br /&gt;
is another way to make information about your data widely available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The remainder of this book will be divided into three major sections:&lt;br /&gt;
instructions on the building and operating of OPeNDAP clients; a tutorial&lt;br /&gt;
and reference on running OPeNDAP servers and making data available to OPeNDAP&lt;br /&gt;
clients; and technical documentation describing the implementation details&lt;br /&gt;
(and the motivation behind many of the design decisions) of the OPeNDAP&lt;br /&gt;
software.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideIntroduction&amp;diff=4893</id>
		<title>UserGuideIntroduction</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideIntroduction&amp;diff=4893"/>
		<updated>2009-10-01T17:51:24Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: removed mention of jgofs and hdf libraries&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[UserGuide|Return to top level]]&lt;br /&gt;
&lt;br /&gt;
=What is OPeNDAP?=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OPeNDAP provides a way for researchers to&lt;br /&gt;
access scientific data anywhere on the Internet from a wide variety of new&lt;br /&gt;
&#039;&#039;and existing&#039;&#039;  programs. &lt;br /&gt;
&lt;br /&gt;
The OPeNDAP architecture uses a client/server model, with a &#039;&#039;client&#039;&#039;&lt;br /&gt;
that sends requests for data out onto the network to some &#039;&#039;server&#039;&#039;,&lt;br /&gt;
that answers with the requested data. This is exactly the model used&lt;br /&gt;
by the [http://www.w3.org/hypertext/WWW/TheProject.html &amp;lt;nowiki&amp;gt;World&lt;br /&gt;
Wide Web&amp;lt;/nowiki&amp;gt;] where client browsers submit requests&lt;br /&gt;
to web servers for the data that make up web pages. Of course, OPeNDAP&lt;br /&gt;
clients can do much more than browse this data.  Using flexible data&lt;br /&gt;
types suitable for many uses, including scientific data, the OPeNDAP&lt;br /&gt;
servers deliver real data directly to the client program in the format&lt;br /&gt;
needed by that client.&lt;br /&gt;
&lt;br /&gt;
OPeNDAP clients are very specialized browsers, constructed by linking&lt;br /&gt;
legacy data analysis programs with OPeNDAP-enabled versions of the&lt;br /&gt;
data access APIs they use, or by modifying the programs to use one of&lt;br /&gt;
the OPeNDAP data access APIs.  In addition to providing a&lt;br /&gt;
sophisticated set of network-compatible APIs in several languages,&lt;br /&gt;
there are also libraries of legacy APIs available in OPeNDAP-aware&lt;br /&gt;
versions.  The popular&lt;br /&gt;
[http://www.unidata.ucar.edu/packages/netcdf/guide.txn_toc.html&lt;br /&gt;
&amp;lt;cite&amp;gt;NetCDF&amp;lt;/cite&amp;gt;] library, for example, can read data from remote&lt;br /&gt;
OPeNDAP data sources as easily as it reads from a local file.&lt;br /&gt;
&lt;br /&gt;
To expand the universe of data available to a user, OPeNDAP incorporates&lt;br /&gt;
a powerful data translation facility, so that data may be stored in&lt;br /&gt;
data structures and formats defined by the data provider, but &lt;br /&gt;
accessed by the user in a manner identical to the access of local data&lt;br /&gt;
files on the user&#039;s own system. Though there are limitations on the&lt;br /&gt;
types of data that may be translated (see&lt;br /&gt;
[[UserGuideDataModel#Translation|Translation]]), &lt;br /&gt;
the facility is flexible and general enough to handle many of the&lt;br /&gt;
possible translations.  There are two important results:&lt;br /&gt;
&lt;br /&gt;
*A user may not need to know that data from one set are stored in a format different from data in another set. Further, it may be possible that &#039;&#039;neither&#039;&#039; data set is stored in a format readable by the original version of the data analysis and display program he or she uses. &lt;br /&gt;
&lt;br /&gt;
*No segment of OPeNDAP users will be effectively cut off from accessing data because of its storage format. A scientist who wishes to make his or her data available to other OPeNDAP users may do so while keeping that data in what may actually be a highly idiosyncratic storage format. (Of course, it doesn&#039;t &#039;&#039;have&#039;&#039; to be in a highly idiosyncratic format.)&lt;br /&gt;
&lt;br /&gt;
The combination of the OPeNDAP network communication model and the data&lt;br /&gt;
translation facility make OPeNDAP a powerful tool for the retrieval,&lt;br /&gt;
sampling, and display of large distributed datasets. Though OPeNDAP was&lt;br /&gt;
developed by oceanographers, its application is not limited to&lt;br /&gt;
oceanographic data. The organizing principles and algorithms may be&lt;br /&gt;
applied to many other fields.&lt;br /&gt;
&lt;br /&gt;
The uniformity with which data appears that makes the system so useful&lt;br /&gt;
for data analysis also eases automating data transport and&lt;br /&gt;
manipulation tasks.  For example, NOAA&#039;s&lt;br /&gt;
[http://ferret.pmel.noaa.gov/Ferret/LAS/home/ Live Access Server&lt;br /&gt;
(LAS)] (see, for example, [http://mynasadata.larc.nasa.gov/data.html&lt;br /&gt;
My NASA Data]) uses OPeNDAP, as do many of the real-time observing&lt;br /&gt;
systems that make up the [http://www.ioos.gov Integrated Ocean&lt;br /&gt;
Observing System (IOOS)], like [http://gomoos.org Gulf of Maine Ocean&lt;br /&gt;
Observing System].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The population of people who may be interested in a system such as&lt;br /&gt;
OPeNDAP may be divided into data consumers and data providers. Though it&lt;br /&gt;
was an important observation to the development of OPeNDAP that the two&lt;br /&gt;
roles are often assumed by the same scientists, the division is a&lt;br /&gt;
useful one for the introduction of the system. The following two&lt;br /&gt;
sections provide a broad introduction to the roles of data consumer&lt;br /&gt;
and data provider. The remainder of this guide is organized around&lt;br /&gt;
this distinction between classes of users.&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Client=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OPeNDAP uses a client/server model. The OPeNDAP&lt;br /&gt;
servers are web servers equipped to interpret an OPeNDAP URL sent to&lt;br /&gt;
them.  An OPeNDAP client composes and sends messages to those&lt;br /&gt;
servers.  There are standalone OPeNDAP clients, but most clients are&lt;br /&gt;
constructed from data analysis programs modified to get their data&lt;br /&gt;
remotely, from the internet, rather than locally, from a file.&lt;br /&gt;
&lt;br /&gt;
Without OPeNDAP, an application program that uses one of the common&lt;br /&gt;
data access APIs such as netCDF will operate as shown in&lt;br /&gt;
[[:Image:unlinked.gif | the figure below]].  The user makes a request&lt;br /&gt;
for data from the application program.  This program uses some data&lt;br /&gt;
access API to read and write data.  The program uses procedures&lt;br /&gt;
defined by that API to access the data, which is typically stored on&lt;br /&gt;
the same host machine.  Some APIs are somewhat more sophisticated than&lt;br /&gt;
this, of course, but their general operation is as simple.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:unlinked.png|actual size]]&lt;br /&gt;
&lt;br /&gt;
The Architecture of a Data Analysis Package &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The operation of an OPeNDAP client is illustrated in the [[:Image:unlinked.gif | figure below]].&lt;br /&gt;
Here, the&lt;br /&gt;
&#039;&#039;same application program&#039;&#039;  that was used in [[:Image:unlinked.gif |&lt;br /&gt;
the figure above]]&lt;br /&gt;
has been linked&lt;br /&gt;
with an OPeNDAP version of the data access API library.  Now, in addition to being&lt;br /&gt;
able to use local data as before, the application program is able to access&lt;br /&gt;
data from OPeNDAP servers anywhere on the Internet in exactly the same manner as the&lt;br /&gt;
local data.&lt;br /&gt;
&lt;br /&gt;
To make some analysis program into an OPeNDAP client, just re-link it with&lt;br /&gt;
the OPeNDAP implementation of the supported API library.  This is a simple&lt;br /&gt;
process, generally requiring only a few minutes.  This will&lt;br /&gt;
create a program that accepts URLs as well as file pathnames to&lt;br /&gt;
identify data to be read.  (See&lt;br /&gt;
[[Wiki_Testing/OPeNDAPUserGuide3|Section 3.1]]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:linked.png|actual size]]&lt;br /&gt;
&lt;br /&gt;
The Architecture of a Data Analysis Package Using OPeNDAP&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
OPeNDAP also provides a data translation facility. Data from the original&lt;br /&gt;
data file is translated by the OPeNDAP server into the OPeNDAP data model for&lt;br /&gt;
transmission to the client. Upon receiving the data, the client&lt;br /&gt;
translates the data into the [[UserGuideDataModel| data model]] it&lt;br /&gt;
understands. &lt;br /&gt;
Because the data transmitted from an OPeNDAP server to the client travel&lt;br /&gt;
in the OPeNDAP format, the dataset&#039;s original storage format is completely&lt;br /&gt;
irrelevant to the client. If the client was originally&lt;br /&gt;
designed to read netCDF format files, the data returned by the&lt;br /&gt;
OPeNDAP-netCDF library will appear to have been read from a netCDF file,&lt;br /&gt;
whatever the actual format of the files from which the data were&lt;br /&gt;
read([[Wiki_Testing/OPeNDAPUserGuideFootNotes|4]]). If the&lt;br /&gt;
program expects JGOFS data, the OPeNDAP-JGOFS library will return data&lt;br /&gt;
that seem to have come from a JGOFS dataset, and so on.&lt;br /&gt;
&lt;br /&gt;
OPeNDAP does not pretend to remove all the overhead of data&lt;br /&gt;
searches. A user will still have to keep track of the URLs of&lt;br /&gt;
interesting data in the same way a user must now keep track of the&lt;br /&gt;
names of files.  (You may run across datasets where the data consists&lt;br /&gt;
of OPeNDAP URLs.  These are the OPeNDAP file servers, and have been&lt;br /&gt;
developed by OPeNDAP users to organize datasets consisting of large&lt;br /&gt;
numbers of individual files.)  But it does make the access to that&lt;br /&gt;
data simpler and quicker.&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP group provides a whole array of client software to&lt;br /&gt;
implement this communication standard.  These range from standalone&lt;br /&gt;
clients to libraries to link with existing software.  There is&lt;br /&gt;
more about these in [[UserGuideOPeNDAPClient| OPeNDAP Client]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Services=&lt;br /&gt;
&lt;br /&gt;
The communication between an OPeNDAP client and server is specified by&lt;br /&gt;
the Data Access Protocol (DAP).  This defines the range of messages a&lt;br /&gt;
server must understand and the kinds of replies it makes.&lt;br /&gt;
&lt;br /&gt;
There are two categories of messages an OPeNDAP server can&lt;br /&gt;
understand.  Some are required by the DAP, and others are merely&lt;br /&gt;
suggested.  A server is considered to be DAP-compliant if it can&lt;br /&gt;
respond intelligibly to the required messages.&lt;br /&gt;
&lt;br /&gt;
The requests messages a server is required to understand are these:&lt;br /&gt;
&lt;br /&gt;
;Data Description&lt;br /&gt;
:Data values come in types and sizes.  An array, for example, might consist of 10 integers.  The value &amp;quot;ten&amp;quot; and the type &amp;quot;integer&amp;quot; describe the array.  This request returns information about data types, so that a receiving program can allocate space appropriately.  See [[UserGuideDataModel#DDS| Data Description Structure (DDS)]].&lt;br /&gt;
&lt;br /&gt;
;Data Attribute&lt;br /&gt;
:This is a request to provide information &#039;&#039;about&#039;&#039; data, and typically includes information like units, names of data types, reference information and so on.  See [[UserGuideDataModel#DAS| Data Attribute Structure (DAS)]].&lt;br /&gt;
&lt;br /&gt;
;Data&lt;br /&gt;
:The server also must be able to respond to a request for the data itself.  See [[UserGuideDataModel#DataDDS| data response]].&lt;br /&gt;
&lt;br /&gt;
A server may respond to requests like these, too:&lt;br /&gt;
&lt;br /&gt;
;ASCII&lt;br /&gt;
:Some servers can convert data to ASCII values on the fly.  This allows users to view data using a standard web browser, assuming the data are not too large.  See [[UserGuideOPeNDAPServer#ASCII| ASCII return]].&lt;br /&gt;
&lt;br /&gt;
;Info&lt;br /&gt;
:The info response is a formatted page containing information from the Data Attributes and Data Description responses.  It&#039;s meant to be a human-readable way to show what&#039;s available in a dataset via a standard web browser.  See [[UserGuideOPeNDAPServer#Info| Info response]].&lt;br /&gt;
&lt;br /&gt;
;HTML&lt;br /&gt;
:Very similar to the info response is the HTML response.  This provides not only the information from the info response, but also includes a Javascript form to help you build a request for data from the same data file.  The best description of the HTML form is in the [[QuickStart| Quick Start Guide]].&lt;br /&gt;
&lt;br /&gt;
;SOAP&lt;br /&gt;
:OPeNDAP servers can provide their data in terms of a SOAP request and response.  For more information see [[UserGuideDataModel#SOAP| SOAP Request]].&lt;br /&gt;
&lt;br /&gt;
;DDX&lt;br /&gt;
:The DDX is an XML version of the Data Attribute and Data Description replies.  See [[UserGuideOPeNDAPServer#DDX| DDX Request]].&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Server=&lt;br /&gt;
&lt;br /&gt;
OPeNDAP provides a definition of the communication between client and&lt;br /&gt;
server.  Servers and clients who conform to that standard can&lt;br /&gt;
communicate with each other.  In addition to the OPeNDAP communication&lt;br /&gt;
standard itself, the OPeNDAP group also provides an implementation of&lt;br /&gt;
that standard server protocol, called &#039;&#039;Hyrax.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP data server is made up of two pieces.  You can think of&lt;br /&gt;
them as a front-end and a back-end, though a client will not be aware&lt;br /&gt;
of the separation.  They will often be run on the same machine, and&lt;br /&gt;
even when they are not, a client will see only the front end.&lt;br /&gt;
&lt;br /&gt;
The front-end server is a Tomcat servlet, and is also called the&lt;br /&gt;
&#039;&#039;&#039;OPeNDAP Lightweight Front-End Servlet&#039;&#039;&#039; (OLFS).  Its job is to&lt;br /&gt;
receive your request for data and manage all the different forms such&lt;br /&gt;
a request might take.  For example, you might be asking for the data,&lt;br /&gt;
an ASCII version of the data, or a reply to a SOAP message looking for&lt;br /&gt;
data.  The front-end server can also reply to THREDDS catalog&lt;br /&gt;
requests, for information about the data, and can directly provide&lt;br /&gt;
some information about the data, too.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Back-End Server&#039;&#039;&#039; (BES) is more strictly about performance,&lt;br /&gt;
and is designed to respond quickly and efficiently to requests from&lt;br /&gt;
the OLFS.  It is a pure data server, and has only one format of&lt;br /&gt;
request and response, relying on the OLFS to convert messages to&lt;br /&gt;
whatever format will accommodate the user.  Most users won&#039;t make&lt;br /&gt;
requests directly to the BES.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:HyraxArchitecture.jpg|center|600px]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Hyrax&#039;&#039; is an alternative name for the OPeNDAP 4 Data Server.&lt;br /&gt;
&lt;br /&gt;
See&lt;br /&gt;
[[UserGuideDataModel|Data Model]] for a description of the data returned by these&lt;br /&gt;
requests and see [[UserGuideOPeNDAPServer|OPeNDAP Server]] for a description of the&lt;br /&gt;
URL syntax used to send these requests.&lt;br /&gt;
&lt;br /&gt;
See [[Hyrax|the OPeNDAP 4 Data Server documentation]] for a&lt;br /&gt;
description of how to install and configure an OPeNDAP data server (Hyrax).&lt;br /&gt;
&lt;br /&gt;
=Administration and Centralization of Data=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under OPeNDAP, there is no central archive of data.  Data under OPeNDAP&lt;br /&gt;
is organized in a manner similar to the World Wide Web itself.  That&lt;br /&gt;
is, all one need do to make one&#039;s data available is to start up a&lt;br /&gt;
properly configured server on an Internet node that has&lt;br /&gt;
access to the data to be served.  Each data provider is free to join&lt;br /&gt;
and to leave the system when it is convenient, just as any proprietor&lt;br /&gt;
of a web page is free to delete it or add to it as whimsy demands.&lt;br /&gt;
&lt;br /&gt;
Of course, as can also be seen on the World Wide Web, there are some&lt;br /&gt;
disadvantages to the lack of central authority.  If no one knows about&lt;br /&gt;
a web site, no one will visit it.  Similarly, listing a dataset in a&lt;br /&gt;
central data catalog, such as the Global Change Master Directory&lt;br /&gt;
([http://gcmd.gsfc.nasa.gov &amp;lt;cite&amp;gt;http://gcmd.gsfc.nasa.gov/&amp;lt;/cite&amp;gt;]),can make data available to other researchers in a way that simply&lt;br /&gt;
configuring an OPeNDAP server does not.  OPeNDAP provided a facility for&lt;br /&gt;
registering a data set with the GCMD catalog, which makes the data set&lt;br /&gt;
known to the OPeNDAP data location service.  The THREDDS catalog service&lt;br /&gt;
is another way to make information about your data widely available.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The remainder of this book will be divided into three major sections:&lt;br /&gt;
instructions on the building and operating of OPeNDAP clients; a tutorial&lt;br /&gt;
and reference on running OPeNDAP servers and making data available to OPeNDAP&lt;br /&gt;
clients; and technical documentation describing the implementation details&lt;br /&gt;
(and the motivation behind many of the design decisions) of the OPeNDAP&lt;br /&gt;
software.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=UserGuideOPeNDAPMessages&amp;diff=4892</id>
		<title>UserGuideOPeNDAPMessages</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=UserGuideOPeNDAPMessages&amp;diff=4892"/>
		<updated>2009-10-01T17:36:59Z</updated>

		<summary type="html">&lt;p&gt;TomSgouros: expunged aliases&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[UserGuide|Back to User Guide Contents]]&lt;br /&gt;
&lt;br /&gt;
=The OPeNDAP Messages=&lt;br /&gt;
&lt;br /&gt;
An OPeNDAP server is in the business of making replies to queries for&lt;br /&gt;
data and other services.  The queries come in the form of specially&lt;br /&gt;
formed URLs and the replies consist of MIME documents whose&lt;br /&gt;
contents are described in the sections below.  (Technically speaking, the response document headers aren&#039;t exactly right, but they function in the same way.)&lt;br /&gt;
&lt;br /&gt;
All the requests start with a root URL, and they all are in the form&lt;br /&gt;
of a GET, using a suffix on the root URL and a constraint expression&lt;br /&gt;
to indicate which service is requested and what the parameters are.&lt;br /&gt;
&lt;br /&gt;
(There is also an experimental SOAP interface that uses a POST to&lt;br /&gt;
request data.)&lt;br /&gt;
&lt;br /&gt;
The replies come in three categories: Ancillary data, Data, and the&lt;br /&gt;
other services.  The following sections cover each of them, beginning&lt;br /&gt;
with the ancillary data messages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Ancillary data==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to use some data set, a user must have some information at&lt;br /&gt;
his or her disposal that is not strictly included in the data&lt;br /&gt;
itself. This information, called ancillary data, describes the shape&lt;br /&gt;
and size of the data types that make up the data set, and provides&lt;br /&gt;
information about many of the data set&#039;s attributes, as well. OPeNDAP&lt;br /&gt;
uses two different structures, to supply this ancillary information&lt;br /&gt;
about an OPeNDAP data set. The Dataset Descriptor Structure (DDS)&lt;br /&gt;
describes the data set&#039;s structure and the relationships between its&lt;br /&gt;
variables, and the Dataset Attribute Structure (DAS) provides&lt;br /&gt;
information about the variables themselves. Both structures are&lt;br /&gt;
described in the following sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Dataset Descriptor Structure===&lt;br /&gt;
&lt;br /&gt;
In order to translate data from one data model into another, OPeNDAP must&lt;br /&gt;
have some knowledge about the types of the variables, and their&lt;br /&gt;
semantics, that comprise a given data set. It must also know something&lt;br /&gt;
about the relations of those variables&amp;amp;mdash;even those relations which&lt;br /&gt;
are only implicit in the dataset&#039;s own API. This knowledge about the&lt;br /&gt;
dataset&#039;s structure is contained in a text description of the dataset&lt;br /&gt;
called the &amp;quot;Dataset Description Structure&amp;quot; (DDS).&lt;br /&gt;
&lt;br /&gt;
The DDS does not describe how the information in the data set is&lt;br /&gt;
physically stored, nor does it describe how the &amp;quot;native&amp;quot; API is used&lt;br /&gt;
to access that data. Those pieces of information are contained in the&lt;br /&gt;
API itself and in the OPeNDAP server, respectively.  The DDS contains&lt;br /&gt;
knowledge about the dataset variables and the interrelations of those&lt;br /&gt;
variables.  The server uses the DDS to describe the structure of a&lt;br /&gt;
particular dataset to a client.&lt;br /&gt;
&lt;br /&gt;
The DDS is a textual description of the variables and their classes&lt;br /&gt;
that make up some data set. The DDS syntax is based on the variable&lt;br /&gt;
declaration and definition syntax of C and C++. A variable that is a&lt;br /&gt;
member of one of the base type classes is declared by writing the&lt;br /&gt;
class name followed by the variable name. The type constructor classes&lt;br /&gt;
are declared using C&#039;s brace notation. A grammar for the syntax is&lt;br /&gt;
given in the table below. (Note that the&lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;Dataset&amp;lt;/font&amp;gt; keyword has the same syntactic function&lt;br /&gt;
as Structure but is used for the specific job of enclosing the entire&lt;br /&gt;
data set even when it does not technically need an enclosing element.)&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;3&amp;quot;&lt;br /&gt;
! &amp;quot;data set !! &amp;lt;font color=&#039;green&#039;&amp;gt;Dataset&amp;lt;/font&amp;gt; &amp;lt;font color=&#039;green&#039;&amp;gt;{ declarations } name;&lt;br /&gt;
|- &lt;br /&gt;
|&amp;quot;declaration ||   &amp;lt;font color=&#039;green&#039;&amp;gt;List&amp;lt;/font&amp;gt; declaration&lt;br /&gt;
|-&lt;br /&gt;
|  ||&amp;quot;base-type&amp;quot; var;&lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;font color=&#039;green&#039;&amp;gt;Structure&amp;lt;/font&amp;gt; {&amp;quot;declarations&amp;quot;} &amp;quot;var&amp;quot;;&lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;font color=&#039;green&#039;&amp;gt;Sequence&amp;lt;/font&amp;gt; {&amp;quot;declarations&amp;quot;} &amp;quot;var&amp;quot;;&lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;font color=&#039;green&#039;&amp;gt;Grid&amp;lt;/font&amp;gt; { &amp;lt;font color=&#039;green&#039;&amp;gt;ARRAY&amp;lt;/font&amp;gt; &amp;lt;font color=&#039;green&#039;&amp;gt;:&amp;lt;/font&amp;gt; &amp;quot;declaration&amp;quot; &amp;lt;font color=&#039;green&#039;&amp;gt;MAPS&amp;lt;/font&amp;gt;: &amp;quot;declarations&amp;quot; &amp;lt;font color=&#039;green&#039;&amp;gt; } &amp;lt;/font&amp;gt;&amp;quot;var&amp;quot;;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;base-type&amp;quot; || &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;Byte&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| || &amp;lt;font color=&#039;green&#039;&amp;gt;Int32&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| || &amp;lt;font color=&#039;green&#039;&amp;gt;UInt32&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| || &amp;lt;font color=&#039;green&#039;&amp;gt;Float64&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| || &amp;lt;font color=&#039;green&#039;&amp;gt;String&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| || &amp;lt;font color=&#039;green&#039;&amp;gt;Url&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;var&amp;quot;  ||  &amp;quot;name&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| || &amp;quot;name  array-decl&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;array-decl&amp;quot; || [integer ]&lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;font color=&#039;green&#039;&amp;gt;[&amp;quot;name&amp;quot; = integer]&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;name&amp;quot;  ||User-chosen name of data set, variable, or array dimension.&lt;br /&gt;
  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
Dataset Descriptor Structure Syntax&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A DDS is returned in response to a request for the DDS, and it is also&lt;br /&gt;
part of the data return.  The request URL for the DDS is composed of&lt;br /&gt;
the root URL, with the suffix &amp;quot;.dds&amp;quot;.  For example, if a data set is&lt;br /&gt;
located at &amp;lt;font&lt;br /&gt;
color=&amp;quot;green&amp;quot;&amp;gt;http:/tests.opendap.org/data/mydata.dat&amp;lt;/font&amp;gt; then&lt;br /&gt;
you&#039;ll find the DDS at &amp;lt;font&lt;br /&gt;
color=&amp;quot;green&amp;quot;&amp;gt;http:/tests.opendap.org/data/mydata.dat.dds&amp;lt;/font&amp;gt; &lt;br /&gt;
&lt;br /&gt;
An example DDS entry is shown below.  (There are more in&lt;br /&gt;
[[UserGuideDataModel|Data_Models]], where there&#039;s also an explanation&lt;br /&gt;
of the information implied by the data model.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Dataset { &lt;br /&gt;
  Int32 catalog_number;&lt;br /&gt;
  Sequence {&lt;br /&gt;
    String experimenter;&lt;br /&gt;
    Int32 time;&lt;br /&gt;
    Structure {&lt;br /&gt;
      Float64 latitude;&lt;br /&gt;
      Float64 longitude;&lt;br /&gt;
    } location;&lt;br /&gt;
    Sequence {&lt;br /&gt;
      Float64 depth;&lt;br /&gt;
      Float64 salinity;&lt;br /&gt;
      Float64 oxygen;&lt;br /&gt;
      Float64 temperature;&lt;br /&gt;
    } cast;&lt;br /&gt;
  } station;&lt;br /&gt;
} data;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example Dataset Descriptor Entry.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
===Dataset Attribute Structure===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Dataset Attribute Structure&amp;quot; (DAS) is used to store attributes&lt;br /&gt;
for variables in the dataset. An attribute is any piece of information&lt;br /&gt;
about a variable that the creator wants to bind with that variable&lt;br /&gt;
&#039;&#039;excluding&#039;&#039; the type and size, which are part of the DDS.&lt;br /&gt;
Typical attributes might range from error measurements to&lt;br /&gt;
text describing how the data was collected or processed. &lt;br /&gt;
&lt;br /&gt;
In principle, attributes are not processed by software, other than to&lt;br /&gt;
be displayed. However, many systems rely on attributes to store extra&lt;br /&gt;
information that is necessary to perform certain manipulations of&lt;br /&gt;
data. In effect, attributes are used to store information that is used&lt;br /&gt;
&amp;quot;by convention&amp;quot; rather than &amp;quot;by design&amp;quot;. OPeNDAP can effectively&lt;br /&gt;
support these conventions by passing the attributes from data set to&lt;br /&gt;
user program via the DAS. (Of course, OPeNDAP cannot enforce&lt;br /&gt;
conventions in datasets where they were not followed in the first&lt;br /&gt;
place.0&lt;br /&gt;
&lt;br /&gt;
The syntax for attributes in a DAS is given in the table below. Every&lt;br /&gt;
attribute of a variable is a triple: attribute name, type and value.&lt;br /&gt;
The name of an attribute is an identifier, consisting of alphanumeric&lt;br /&gt;
characters, plus &amp;quot;_&amp;quot; and &amp;quot;/&amp;quot;. The type of an attribute may be one of:&lt;br /&gt;
&amp;quot;Byte&amp;quot;, &amp;quot;Int32&amp;quot;, &amp;quot;UInt32&amp;quot;, &amp;quot;Float64&amp;quot;, &amp;quot;String&amp;quot; or &amp;quot;Url&amp;quot;. An attribute&lt;br /&gt;
may be scalar or vector. In the latter case the values of the vector&lt;br /&gt;
are separated by commas (,) in the textual representation of the DAS.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;3&amp;quot;&lt;br /&gt;
!&amp;quot;DAS&amp;quot;     !!  &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;Attributes&amp;lt;/font&amp;gt; &amp;quot;{var-attr-list}&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;var-attr-list&amp;quot; || &amp;quot;var-attr&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|  ||&amp;quot;var-attr-list&amp;quot; &amp;quot;var-attr&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|  || (empty list)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;var-attr&amp;quot; || &amp;quot;variable&amp;quot; {&amp;quot;attr-list&amp;quot;} &lt;br /&gt;
|-&lt;br /&gt;
| ||&amp;quot;container&amp;quot; {var-attr-list}&lt;br /&gt;
|-&lt;br /&gt;
| ||&amp;quot;global-attr&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;global-attr&amp;quot; || &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;Global&amp;lt;/font&amp;gt; &amp;quot;variable&amp;quot; {&amp;quot;attr-list&amp;quot;} &lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;attr-list&amp;quot; || attr-triple;&lt;br /&gt;
|-&lt;br /&gt;
| ||  &amp;quot;attr-list&amp;quot; &amp;quot;attr-triple&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|  ||&amp;quot;(empty list)&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;attr-triple&amp;quot; || attr-type  attribute  attr-val-vec;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;attr-val-vec&amp;quot; || &amp;quot;attr-val&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;quot;attr-val-vec&amp;quot;, &amp;quot;attr-val&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;attr-val&amp;quot; || numeric value&lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;quot;variable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;quot;string&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;attr-type&amp;quot; || &amp;quot;Byte&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;Int32&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;UInt32&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;Float64&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;String&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|  || &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;Url&amp;lt;/font&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;variable&amp;quot; || user-chosen variable name&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;attribute&amp;quot; || user-chosen attribute name&lt;br /&gt;
|-&lt;br /&gt;
|&amp;quot;container&amp;quot; || user-chosen container name&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dataset Attribute Structure Syntax&lt;br /&gt;
&lt;br /&gt;
A DAS is returned in response to a request for the DAS.  Unlike the&lt;br /&gt;
DDS, it is not part of the data return.  The request URL for the DAS&lt;br /&gt;
is composed of the root URL, with the suffix &amp;quot;.das&amp;quot;.  For example, if&lt;br /&gt;
a data set is located at &amp;lt;font&lt;br /&gt;
color=&amp;quot;green&amp;quot;&amp;gt;http:/tests.opendap.org/data/mydata.dat&amp;lt;/font&amp;gt; then&lt;br /&gt;
you&#039;ll find the DAS at &amp;lt;font&lt;br /&gt;
color=&amp;quot;green&amp;quot;&amp;gt;http:/tests.opendap.org/data/mydata.dat.das&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Containers====&lt;br /&gt;
&lt;br /&gt;
An attribute can contain another attribute, or a set of attributes.&lt;br /&gt;
This is roughly comparable to the way compound variables can contain&lt;br /&gt;
other variables in the DDS.  The container defines a new lexical scope&lt;br /&gt;
for the attributes it contains.&lt;br /&gt;
&lt;br /&gt;
Consider the following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Attributes {&lt;br /&gt;
   Bill {&lt;br /&gt;
      String LastName &amp;quot;Evans&amp;quot;;&lt;br /&gt;
      Byte Age 53;&lt;br /&gt;
      String DaughterName &amp;quot;Matilda&amp;quot;;&lt;br /&gt;
      Matilda {&lt;br /&gt;
         String LastName &amp;quot;Fink&amp;quot;;&lt;br /&gt;
         Byte Age 26;&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An Example of Attribute Containers&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Here, the attribute &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;Bill.LastName&amp;lt;/font&amp;gt; would be associated with the string &amp;quot;Evans&amp;quot;, and &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;Bill.Age&amp;lt;/font&amp;gt; with the number 53.  However, the attribute &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;Bill.Matilda.LastName&amp;lt;/font&amp;gt; would be associated with the string &amp;quot;Fink&amp;quot; and &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;Bill.Matilda.Age&amp;lt;/font&amp;gt; with the number 26.&lt;br /&gt;
&lt;br /&gt;
Using container attributes as above, you can construct a DAS that&lt;br /&gt;
exactly mirrors the construction of a DDS that uses compound data&lt;br /&gt;
types, like &amp;quot;Structure&amp;quot; and &amp;quot;Sequence&amp;quot;. Note that though&lt;br /&gt;
the &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;Bill&amp;lt;/font&amp;gt; attribute is a container, it has attributes of its own, as well.  This exactly corresponds to the situation where, for&lt;br /&gt;
example, a &amp;quot;Sequence&amp;quot; would have attributes belonging to it, as&lt;br /&gt;
well as attributes for each of its member variables.  Suppose the&lt;br /&gt;
Sequence represented a single time series of measurements, where&lt;br /&gt;
several different data types are measured at each time.  The Sequence&lt;br /&gt;
attributes might be the time and location of the measurements, and the&lt;br /&gt;
individual variables might have attributes describing the method or&lt;br /&gt;
accuracy of that measurement.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Global Attributes====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A &amp;quot;global attribute&amp;quot; is not bound to a&lt;br /&gt;
particular identifier in a dataset; these attributes are stored in one&lt;br /&gt;
or more containers with the name &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;Global&amp;lt;/font&amp;gt; or ending with&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;_Global&amp;lt;/font&amp;gt;.  Global attributes are used to describe attributes of an entire dataset.  For example, a global attribute might contain the&lt;br /&gt;
name of the satellite or ship from which the data was collected.&lt;br /&gt;
Here&#039;s an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Attributes {&lt;br /&gt;
   Bill {&lt;br /&gt;
      String LastName &amp;quot;Evans&amp;quot;;&lt;br /&gt;
      Byte Age 53;&lt;br /&gt;
      String DaughterName &amp;quot;Matilda&amp;quot;;&lt;br /&gt;
      Matilda {&lt;br /&gt;
         String LastName &amp;quot;Fink&amp;quot;;&lt;br /&gt;
         Byte Age 26;&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
   Global {&lt;br /&gt;
      String Name &amp;quot;FamilyData&amp;quot;;&lt;br /&gt;
      String DateCompiled &amp;quot;11/17/98&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An Example of Global Attributes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Global attributes can be used to define a certain view of a dataset.&lt;br /&gt;
For example, consider the following DAS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Attributes {&lt;br /&gt;
   CTD {&lt;br /&gt;
      String Ship &amp;quot;Oceanus&amp;quot;;&lt;br /&gt;
      Temp {&lt;br /&gt;
         String Name &amp;quot;Temperature&amp;quot;;&lt;br /&gt;
      }&lt;br /&gt;
      Salt {&lt;br /&gt;
         String Name &amp;quot;Salinity&amp;quot;;&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
   Global {&lt;br /&gt;
      String Names &amp;quot;OPeNDAP&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
   FNO_Global {&lt;br /&gt;
      String Names &amp;quot;FNO&amp;quot;;&lt;br /&gt;
      CTD {&lt;br /&gt;
         Temp {&lt;br /&gt;
            String FNOName &amp;quot;TEMPERATURE&amp;quot;;&lt;br /&gt;
         }&lt;br /&gt;
         Salinity {&lt;br /&gt;
            String FNOName &amp;quot;SALINITY&amp;quot;;&lt;br /&gt;
         }&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An Example of Global Attributes In Use&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, a dataset contains temperature and salinity measurements.  To&lt;br /&gt;
aid processing of this dataset by some OPeNDAP client, long names are&lt;br /&gt;
supplied for the &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;Temp&amp;lt;/font&amp;gt; and &amp;lt;font&lt;br /&gt;
color=&amp;quot;green&amp;quot;&amp;gt;Salt&amp;lt;/font&amp;gt; variables.  However, a different client&lt;br /&gt;
(FNO) spells variable names differently.  Since it is seldom practical&lt;br /&gt;
to come up with general-purpose translation tables, the dataset&lt;br /&gt;
administrator has chosen to include these synonyms under the &amp;lt;font&lt;br /&gt;
color=&amp;quot;green&amp;quot;&amp;gt;FNO_Global&amp;lt;/font&amp;gt; attributes, as a convenience to those&lt;br /&gt;
users.&lt;br /&gt;
&lt;br /&gt;
Using global attributes, a dataset or catalog administrator can create&lt;br /&gt;
a layer of attributes to make OPeNDAP datasets conform to&lt;br /&gt;
several different dataset naming standards.  This becomes significant&lt;br /&gt;
when trying to compile an OPeNDAP dataset database.&lt;br /&gt;
&lt;br /&gt;
==Data Transmission==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An OPeNDAP server returns data to a client in response to a request&lt;br /&gt;
URL composed of the root URL, with the suffix &amp;quot;.dods&amp;quot;.&lt;br /&gt;
For example, if a data set is located at &amp;lt;font&lt;br /&gt;
color=&amp;quot;green&amp;quot;&amp;gt;http:/tests.opendap.org/data/mydata.dat&amp;lt;/font&amp;gt; then&lt;br /&gt;
you&#039;ll find the data at &amp;lt;font&lt;br /&gt;
color=&amp;quot;green&amp;quot;&amp;gt;http:/tests.opendap.org/data/mydata.dat.dods&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data is returned in a MIME document that consists of two parts: the&lt;br /&gt;
[[#Dataset_Descriptor_Structure|DDS]], and the data encoded according&lt;br /&gt;
to the description in&lt;br /&gt;
[[UserGuideDataModel#External_Data_Representation|External Data&lt;br /&gt;
Representation]].  (The returned document is sometimes called the&lt;br /&gt;
DataDDS.)  The two parts are separated by this string:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot; face=&amp;quot;Courier&amp;quot;&amp;gt;Data:&amp;amp;lt;CR&amp;amp;gt;&amp;amp;lt;NL&amp;amp;gt;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The DDS included is modified according to any&lt;br /&gt;
[[#Constraint_Expression|constraint expression]] that may have been&lt;br /&gt;
applied.  That is, the returned DDS describes the returned data.  &lt;br /&gt;
&lt;br /&gt;
For example, consider a a request for data from a data set with a DDS&lt;br /&gt;
like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Dataset {&lt;br /&gt;
    Grid {&lt;br /&gt;
      Array:&lt;br /&gt;
        Int16 sst[time = 1857][lat = 89][lon = 180];&lt;br /&gt;
      Maps:&lt;br /&gt;
        Float64 time[time = 1857];&lt;br /&gt;
        Float32 lat[lat = 89];&lt;br /&gt;
        Float32 lon[lon = 180];&lt;br /&gt;
    } sst;&lt;br /&gt;
    Float64 time_bnds[time = 1857][nbnds = 2];&lt;br /&gt;
} sst.mnmean.nc;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the&lt;br /&gt;
[http://test.opendap.org/dap/data/nc/sst.mnmean.nc.gz.dds DDS] of a&lt;br /&gt;
typical gridded dataset.  Suppose, though, that you ask for only the&lt;br /&gt;
time values of the data set.  The DDS of the result will look like&lt;br /&gt;
this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Dataset {&lt;br /&gt;
    Float64 time[time = 1857];&lt;br /&gt;
} sst.mnmean.nc;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This &lt;br /&gt;
[http://test.opendap.org/dap/data/nc/sst.mnmean.nc.gz.dds?time DDS]&lt;br /&gt;
will be included in the DataDDS return, ahead of the encoded&lt;br /&gt;
array of 1857 64-bit time values.&lt;br /&gt;
&lt;br /&gt;
For more information about sampling OPeNDAP data sets, see the section&lt;br /&gt;
below about [[#Constraint_Expressions|constraint expressions]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;NOTE:A request for data from an OPeNDAP client will&lt;br /&gt;
generally make three different service requests, for data attributes&lt;br /&gt;
(DAS), data descriptors (DDS), and for data.  The prepackaged OPeNDAP&lt;br /&gt;
clients do this for you, so you may not be aware that three requests&lt;br /&gt;
are made for each URL.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Other Services==&lt;br /&gt;
&lt;br /&gt;
In addition to the &lt;br /&gt;
[[#Data_Transmission|data]],&lt;br /&gt;
[[#Dataset_Descriptor_Structure|DDS]],&lt;br /&gt;
and&lt;br /&gt;
[[#Dataset_Attribute_Structure|DAS]],&lt;br /&gt;
an OPeNDAP server &#039;&#039;may&#039;&#039; provide any or all of the &lt;br /&gt;
services described in the sections that follow.&lt;br /&gt;
&lt;br /&gt;
===ASCII Service===&lt;br /&gt;
&lt;br /&gt;
This service returns an ASCII representation of the requested data.&lt;br /&gt;
This can make the data available to a wide variety of standard web&lt;br /&gt;
browsers.  This service is activated when the server receives a URL&lt;br /&gt;
ending with &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;.asc&amp;lt;/font&amp;gt; or &amp;lt;font&lt;br /&gt;
color=&amp;quot;green&amp;quot;&amp;gt;.ascii&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Click&lt;br /&gt;
[http://test.opendap.org/dap/data/nc/sst.mnmean.nc.gz.asc?sst&amp;amp;#91;1:3&amp;amp;#93;&amp;amp;#91;45:48&amp;amp;#93;&amp;amp;#91;90:95&amp;amp;#93;&amp;lt;nowiki&amp;gt;http://test.opendap.org/dap/data/nc/sst.mnmean.nc.gz.asc?sst[1:3][45:48][90:95]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
to see an ASCII response.&lt;br /&gt;
&lt;br /&gt;
Note that unlike the data response, the ASCII response does not&lt;br /&gt;
contain a DDS for the returned data.  Instead it just returns the&lt;br /&gt;
simple text message.&lt;br /&gt;
&lt;br /&gt;
The [[QuickStart|Quick Start Guide]] contains many examples of the&lt;br /&gt;
ASCII response.&lt;br /&gt;
&lt;br /&gt;
===Info Service===&lt;br /&gt;
&lt;br /&gt;
The Info service formats information from a data set&#039;s DAS and DDS&lt;br /&gt;
into a single HTML document suitable for viewing in a web browser.&lt;br /&gt;
The returned document may include information about both the data&lt;br /&gt;
server itself (such as server functions implemented), and the dataset&lt;br /&gt;
referenced in the URL.  The server administrator determines what&lt;br /&gt;
information is returned in response to such a request.  The services&lt;br /&gt;
is activated by a URL ending in &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;.info&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Click&lt;br /&gt;
http://test.opendap.org/dap/data/nc/sst.mnmean.nc.gz.info&lt;br /&gt;
to see an Info response.&lt;br /&gt;
&lt;br /&gt;
===WWW Interface Service===&lt;br /&gt;
&lt;br /&gt;
The WWW service is another way to browse a server&#039;s data&lt;br /&gt;
interactively.  You can use this either to look at an individual data&lt;br /&gt;
file, or a directory of files (or &amp;amp;quot;files&amp;amp;quot; since a server may&lt;br /&gt;
contain logical entities that look like files).&lt;br /&gt;
&lt;br /&gt;
The server uses a data set&#039;s DDS and DAS to construct a web form you&lt;br /&gt;
can use to construct a URL that subsamples the data set (using a&lt;br /&gt;
[[#Constraint_Expressions|constraint expression]]). You can copy the&lt;br /&gt;
resulting URL into another browser, or use one of the buttons on the&lt;br /&gt;
form to download data.&lt;br /&gt;
&lt;br /&gt;
[[Image:Reynolds_ifh.png|actual size]]&lt;br /&gt;
&lt;br /&gt;
If a server receives a URL that either ends in a slash &lt;br /&gt;
(&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;/&amp;lt;/font&amp;gt;) or &lt;br /&gt;
&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;contents.html&amp;lt;/font&amp;gt;, it returns a web page that&lt;br /&gt;
looks like a standard web browser&#039;s directory view.&lt;br /&gt;
&lt;br /&gt;
[[Image:Test.oopendap.org_directory_view.png|actual size]]&lt;br /&gt;
&lt;br /&gt;
Each link in the directory view opens up the WWW service version of&lt;br /&gt;
that data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The [[QuickStart#An_Easier_Way|Quick Start Guide]] contains more&lt;br /&gt;
information about browsing OPeNDAP data interactively.&lt;br /&gt;
&lt;br /&gt;
===Version Service===&lt;br /&gt;
&lt;br /&gt;
This service returns the version information for the&lt;br /&gt;
OPeNDAP server software running on the server.  This service is&lt;br /&gt;
triggered by a URL ending with &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;.ver&amp;lt;/font&amp;gt;.  The&lt;br /&gt;
return is a short text message containing the relevant version&lt;br /&gt;
numbers.&lt;br /&gt;
&lt;br /&gt;
===SOAP===&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP server provided by the OPeNDAP group contains an&lt;br /&gt;
experimental SOAP service, allowing users to make requests and get&lt;br /&gt;
responses by exchanging SOAP XML documents.  This is an experimental&lt;br /&gt;
service, and if you&#039;re writing an application depending on it, it&#039;s&lt;br /&gt;
best to contact the OPeNDAP developer team.&lt;br /&gt;
&lt;br /&gt;
===DDX===&lt;br /&gt;
&lt;br /&gt;
The DDX is an XML version of the DAS and DDS, combined.  It is&lt;br /&gt;
triggered by a URL ending with &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;.ddx&amp;lt;/font&amp;gt;.  You&lt;br /&gt;
can find the schema for the DDX at [http://xml.opendap.org/dap/dap2.xsd http://xml.opendap.org/dap/dap2.xsd].&lt;br /&gt;
&lt;br /&gt;
The DDX is designed to contain data, too, but this is not yet&lt;br /&gt;
implemented.  You will see an empty dataBLOB element at the end of&lt;br /&gt;
each DDX, which will eventually hold returned data.&lt;br /&gt;
&lt;br /&gt;
The DDX response can be modified with a&lt;br /&gt;
[[#Constraint_Expressions|constraint expression]].  Like the DDS, the&lt;br /&gt;
DDX will describe only the data actually returned.&lt;br /&gt;
&lt;br /&gt;
The DDX and the DataDDX (containing the dataBLOB) are the nucleus of what will become version 4 of the DAP.&lt;br /&gt;
&lt;br /&gt;
===THREDDS===&lt;br /&gt;
&lt;br /&gt;
Some OPeNDAP servers (including [[Hyrax]], the server supplied by the OPeNDAP group) can make sensible replies to requests for THREDDS&lt;br /&gt;
catalog information.  This can serve to &amp;amp;quot;advertise&amp;amp;quot; a&lt;br /&gt;
server&#039;s data by having it appear in catalogs accumulated by THREDDS&lt;br /&gt;
browsers.  For more information about THREDDS, see the&lt;br /&gt;
[http://www.unidata.ucar.edu/projects/THREDDS/tech/TDS.html THREDDS]&lt;br /&gt;
home page.&lt;br /&gt;
&lt;br /&gt;
=Constraint Expressions=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The OPeNDAP software is not only a data transport mechanism. Using&lt;br /&gt;
OPeNDAP, you can subsample the data you are looking at. That is, you&lt;br /&gt;
can request an entire data file, or just a small piece of it.&lt;br /&gt;
&lt;br /&gt;
==Selecting Data: Using Constraint Expressions==&lt;br /&gt;
&lt;br /&gt;
The URL such as this one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://test.opendap.org/dap/data/nc/sst.mnmean.nc.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
refers to the entire dataset contained in the mnmean.nc file. A user&lt;br /&gt;
may, however, choose to sample the dataset simply by modifying the&lt;br /&gt;
submitted URL. The constraint expression attached to the URL directs&lt;br /&gt;
that the data set specified by the first part of the URL be sampled to&lt;br /&gt;
select only the data of interest from a dataset.&lt;br /&gt;
&lt;br /&gt;
Because the expression modifies the URL used to access data, this&lt;br /&gt;
works even for programs that do not have a built-in way to accomplish&lt;br /&gt;
such selections.  This can vastly reduce the amount of data a program&lt;br /&gt;
needs to process, and reduce the network load of transmitting that&lt;br /&gt;
data to the client.&lt;br /&gt;
&lt;br /&gt;
===Constraint Expression Syntax=== &lt;br /&gt;
&lt;br /&gt;
A constraint expression is appended to the target URL following a&lt;br /&gt;
question mark, as in the following examples:&lt;br /&gt;
&lt;br /&gt;
[http://test.opendap.org/dap/data/nc/sst.mnmean.nc.gz.asc?sst&amp;amp;#91;3&amp;amp;#93;&amp;amp;#91;4&amp;amp;#93;&amp;amp;#91;5&amp;amp;#93; &amp;lt;nowiki&amp;gt;.../nc/sst.mnmean.nc.gz?sst[3][4][5]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
[http://test.opendap.org/dap/data/nc/sst.mnmean.nc.gz.asc?sst&amp;amp;#91;0:1&amp;amp;#93;&amp;amp;#91;13:16&amp;amp;#93;&amp;amp;#91;103:105&amp;amp;#93; &amp;lt;nowiki&amp;gt;.../nc/sst.mnmean.nc.gz?sst[0:1][13:16][103:105]&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
[http://test.opendap.org/dap/data/nc/sst.mnmean.nc.gz.asc?geogrid(sst,62,206,56,210,&amp;amp;#34;19722&amp;amp;#60;time&amp;amp;#60;19755&amp;amp;#34;) &amp;lt;nowiki&amp;gt;.../nc/sst.mnmean.nc.gz?geogrid(sst,62,206,56,210,&amp;quot;19722&amp;lt;time&amp;lt;19755&amp;quot;)&amp;lt;/nowiki&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
[http://test.opendap.org/dap/data/ff/gsodock.dat.asc?Time,Sea_Temp .../ff/gsodock.dat?Time,Sea_Temp]&lt;br /&gt;
&lt;br /&gt;
[http://test.opendap.org/dap/data/ff/gsodock.dat.asc?Time,Sea_Temp&amp;amp;Time%3C35234.1 .../ff/gsodock.dat?Time,Sea_Temp&amp;amp;Time%3C35234.1]&lt;br /&gt;
&lt;br /&gt;
[http://test.opendap.org/dap/data/ff/gsodock.dat.asc?Time,Sea_Temp&amp;amp;Time%3C35234.1&amp;amp;Sea_Temp%3C18 .../ff/gsodock.dat?Time,Sea_Temp&amp;amp;Time%3C35234.1&amp;amp;Sea_Temp%3C18]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;CAUTION:&amp;lt;/font&amp;gt; An OPeNDAP data set can contain an extraordinary amount of data.  You almost certainly do &#039;&#039;not&#039;&#039; want to make an unconstrained request to a data set without knowing something about it.  Familiarize yourself with the DDS and DAS before asking for data; it can prevent overload.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A constraint expression consists of two parts: a projection and a selection, separated by an ampersand (&amp;amp;). Either part may contain several sub-expressions. Either part may be present, or both.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...?proj_1,proj_2,...,proj_n&amp;amp;sel_1&amp;amp;sel_2&amp;amp;...&amp;amp;sel_m&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A projection is simply a comma-separated list of the variables that&lt;br /&gt;
are to be returned to the client. If an array is to be subsampled, the&lt;br /&gt;
projection specifies the manner in which the sampling is to be&lt;br /&gt;
done. If the selection is omitted, all the variables in the projection&lt;br /&gt;
list are returned. If the projection is omitted, the entire dataset is&lt;br /&gt;
returned, subject to the evaluation of the selection expression. The&lt;br /&gt;
projection can also include functional expressions of the form: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...?function(arg_1,arg_2,...,arg_n)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the arguments are variables from the dataset, scalar values, or&lt;br /&gt;
other functions.  (See [[#Constraint_Expression_Functions|Constraint&lt;br /&gt;
Expression Functions]] below.)&lt;br /&gt;
&lt;br /&gt;
A selection expression leads with an ampersand and is a boolean&lt;br /&gt;
expression of the form &amp;quot;variable operator variable&amp;quot;, &amp;quot;variable operator&lt;br /&gt;
value&amp;quot; or &amp;quot;function(arg_1,arg_2,...,arg_n)&amp;quot;, where&lt;br /&gt;
&lt;br /&gt;
;operator&lt;br /&gt;
:Can be one of the relational operators listed in the table below.&lt;br /&gt;
;variable&lt;br /&gt;
:Can be any variable recorded in the dataset.&lt;br /&gt;
;value&lt;br /&gt;
:Can be any scalar, string, function, or list of numbers (Lists are denoted by comma-separated items enclosed in curly braces ,for example, {3,11,4.5}.); and &lt;br /&gt;
;function&lt;br /&gt;
:Is a function defined by the server to operate on variables or values, and to return a boolean value. &lt;br /&gt;
&lt;br /&gt;
Each selection clause begins with an ampersand (&amp;amp;).  You can think of&lt;br /&gt;
this as representing the &amp;quot;AND&amp;quot; boolean operation, but remember that it&lt;br /&gt;
is actually a prefix operator, not an infix operator. That is, it must&lt;br /&gt;
appear at the beginning of each selection clause, no matter what. This&lt;br /&gt;
means that a constraint expression that contains no projection clause&lt;br /&gt;
must still have an &amp;amp; in front of the first selection clause.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There is no limit on the number of selection clauses that can be combined to create a compound constraint expression. Data that produces a true (non-zero) value for the entire selection expression will be included in the data returned to the client by the server. If only a part of some data structure, such as a Sequence, satisfies the selection criteria, then only that part will be returned.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;NOTE: Due to the differences in data model paradigms,&lt;br /&gt;
selection is not implemented for the OPeNDAP array data types, such as&lt;br /&gt;
Grid or Array. However, many OPeNDAP servers implement selection&lt;br /&gt;
functions you can use for the same effect.  (See&lt;br /&gt;
[[#Constraint_Expression_Functions|Constraint Expression Functions]]&lt;br /&gt;
below for more about functions.)  &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Simple Constraint Expression Examples====&lt;br /&gt;
&lt;br /&gt;
Consider the DDS below.  This is the description of a dataset&lt;br /&gt;
containing station data including temperature, oxygen, and&lt;br /&gt;
salinity. Each station also contains 20 oxygen data points, taken at&lt;br /&gt;
20 fixed depths, used for calibration of the data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Dataset {&lt;br /&gt;
   Sequence{&lt;br /&gt;
      Int32 day;&lt;br /&gt;
      Int32 month;&lt;br /&gt;
      Int32 year;&lt;br /&gt;
      Float64 lat;&lt;br /&gt;
      Float64 lon;&lt;br /&gt;
      Float64 O2cal[20];&lt;br /&gt;
      Sequence{&lt;br /&gt;
         Float64 press;&lt;br /&gt;
         Float64 temp;&lt;br /&gt;
         Float64 O2;&lt;br /&gt;
         Float64 salt;&lt;br /&gt;
      } cast;&lt;br /&gt;
      String comments;&lt;br /&gt;
   } station;&lt;br /&gt;
} arabian-sea;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Sample Data Descriptor&lt;br /&gt;
&lt;br /&gt;
The following URL will return only the pressure and temperature pairs&lt;br /&gt;
of this dataset. (Note that the constraint expression parser removes&lt;br /&gt;
all spaces, tabs, and newline characters before the expression is&lt;br /&gt;
parsed.) There is only a projection clause, without a selection, in&lt;br /&gt;
this constraint expression.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://oceans.edu/jg/exp1O2/cruise?station.cast.press,station.cast.temp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have assumed that the dataset was stored in the JGOFS format on the&lt;br /&gt;
remote host oceans.edu, in a file called explO2/cruise. For the sake&lt;br /&gt;
of brevity, from here on we will omit the first part of the URL, to&lt;br /&gt;
concentrate on the constraint expression alone.&lt;br /&gt;
&lt;br /&gt;
If we only want to see pressure and temperature pairs below 500 meters&lt;br /&gt;
deep, we can modify the constraint expression by adding a selection&lt;br /&gt;
clause.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
?station.cast.press,station.cast.temp&amp;amp;station.cast.press&amp;gt;500.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to retrieve all of each cast that has any temperature reading&lt;br /&gt;
greater than 22 degrees, use the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
?station.cast&amp;amp;station.cast.temp&amp;gt;22.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Simple constraint expressions may be combined into compound&lt;br /&gt;
expressions by appending them to one another. To retrieve all stations&lt;br /&gt;
west of 60 degrees West and north of the equator:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
?station&amp;amp;station.lat&amp;gt;0.0&amp;amp;station.lon&amp;lt;-60.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As was mentioned, the logical OR can be implemented using a list of&lt;br /&gt;
scalars. The following expression will select only stations taken&lt;br /&gt;
north of the equator in April, May, June, or July.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
?station&amp;amp;station.lat&amp;gt;0.0&amp;amp;station.month={4,5,6,7}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If our dataset contained a field called monsoon-month, indicating the&lt;br /&gt;
month in which monsoons happened that year, we could modify the last&lt;br /&gt;
example search to include those months as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
?station&amp;amp;station.lat&amp;gt;O.O&amp;amp;station.month={4,5,6,7,station.monsoon-month}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words, a list can contain both values and other variables. If monsoon-month was itself a list of months, a search could be written as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
?station&amp;amp;station.lat&amp;gt;0.0&amp;amp;station.month=station.monsoon-month&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For arrays and grids, there is a special way to select data within the&lt;br /&gt;
projection clause. Suppose we want to see only the first five oxygen&lt;br /&gt;
calibration points for each station. The constraint expression for&lt;br /&gt;
this would be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
?station.02cal[0:4]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
By specifying a stride value, we can also select a hyperslab of the&lt;br /&gt;
oxygen calibration array:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
?station.02cal[0:5:19]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This expression will return every fifth member of the 02cal array. In&lt;br /&gt;
other words, the result will be a four-element array containing only&lt;br /&gt;
the first, sixth, eleventh, and sixteenth members of the 02cal&lt;br /&gt;
array. Each dimension of a multi-dimensional arrays may be subsampled&lt;br /&gt;
in an analogous way. The return value is an array of the same number&lt;br /&gt;
of dimensions as the sampled array, with each dimension size equal to&lt;br /&gt;
the number of elements selected from it.&lt;br /&gt;
&lt;br /&gt;
===Operators, Special Functions, and Data Types===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The constraint expression syntax defines a number of operators for&lt;br /&gt;
each data type. These operators are listed in the table below.&lt;br /&gt;
&lt;br /&gt;
All the&lt;br /&gt;
operators defined for the scalar base types are boolean operators&lt;br /&gt;
whose result depends on the specified comparison between its&lt;br /&gt;
arguments. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
Constraint Expression Operators.&lt;br /&gt;
 {| border=&amp;quot;3&amp;quot;&lt;br /&gt;
! Class !! Operators&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Simple Types&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Byte, Int*, UInt*, Float* 	  || &amp;lt; &amp;gt; = != &amp;lt;= &amp;gt;=&lt;br /&gt;
|-&lt;br /&gt;
| String  || = !=  ~=&lt;br /&gt;
|-&lt;br /&gt;
| URL || = != ~=&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Compound Types&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Array|| [start:stop] [start:stride:stop]&lt;br /&gt;
|-&lt;br /&gt;
| Structure || .  /&lt;br /&gt;
|-&lt;br /&gt;
| Sequence || .  /&lt;br /&gt;
|-&lt;br /&gt;
| Grid || [start:stop] [start:stride:stop] .&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Individual fields of type&lt;br /&gt;
constructors may be accessed using the dot (&amp;lt;font&lt;br /&gt;
color=&#039;green&#039;&amp;gt;.&amp;lt;/font&amp;gt;) operator or the virtual file system syntax. If&lt;br /&gt;
a structure &amp;lt;font color=&#039;green&#039;&amp;gt;s&amp;lt;/font&amp;gt; has two fields &amp;lt;font&lt;br /&gt;
color=&#039;green&#039;&amp;gt;time&amp;lt;/font&amp;gt; and &amp;lt;font color=&#039;green&#039;&amp;gt;temperature&amp;lt;/font&amp;gt;,&lt;br /&gt;
then those fields may be accessed using &lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;s.time&amp;lt;/font&amp;gt; and &lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;s.temperature&amp;lt;/font&amp;gt; or as &lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;s/time&amp;lt;/font&amp;gt; and &lt;br /&gt;
&amp;lt;font color=&#039;green&#039;&amp;gt;s/temperature&amp;lt;/font&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The ~= operator returns true when the character string on the left of&lt;br /&gt;
the operator matches the regular expression on the right. See &lt;br /&gt;
[[#Pattern_Matching_with_Constraint_Expressions|Pattern Matching with Constraint Expressions]]&lt;br /&gt;
for a discussion of regular expressions.&lt;br /&gt;
&lt;br /&gt;
The array operator [] is used to subsample the given array.  You can find several examples of its use in the [[QuickStart#Peeking_at_Data|Quick Start Guide]].&lt;br /&gt;
&lt;br /&gt;
===Constraint Expression Functions===&lt;br /&gt;
&lt;br /&gt;
An OPeNDAP data server may define its own set of functions that may be&lt;br /&gt;
used in a constraint expression. For example, the oceans.edu data server&lt;br /&gt;
we&#039;ve been imagining might define a sigma1()&lt;br /&gt;
function to return the density of the water at the given temperature,&lt;br /&gt;
salinity and pressure. A query like the following would return all the&lt;br /&gt;
stations containing water samples whose density exceeded 1.0275g/cm3. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
?station.cast&amp;amp;sigma1(station.cast.temp,&lt;br /&gt;
                     station.cast.salt,&lt;br /&gt;
                     station.cast.press)&amp;gt;27.5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Functions like this one are not a standard part of the OPeNDAP&lt;br /&gt;
architecture, and may vary from one server to another. A user may&lt;br /&gt;
query a server for a list of such functions by sending a URL with a&lt;br /&gt;
constraint expression that calls the &amp;quot;version()&amp;quot; function.&lt;br /&gt;
&lt;br /&gt;
This will return a list of functions implemented.  Call any of the&lt;br /&gt;
functions with no arguments to see a description of the arguments.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
http://test.opendap.org/dap/data/nc/sst.mnmean.nc.gz.asc?version()&lt;br /&gt;
&lt;br /&gt;
And: &lt;br /&gt;
&lt;br /&gt;
http://test.opendap.org/dap/data/nc/sst.mnmean.nc.gz.asc?geogrid()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
Note: When using functions, be careful to remember that a function used in a&lt;br /&gt;
projection can return any value, but when used in a selection clause,&lt;br /&gt;
it must either return a boolean value, or be part of a test that&lt;br /&gt;
returns a boolean value.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Pattern Matching with Constraint Expressions===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are three operators defined to compare one String data type to&lt;br /&gt;
another. The = operator returns TRUE if its two input character&lt;br /&gt;
strings are identical, and the != operator returns TRUE if the Strings&lt;br /&gt;
do not match. A third operator, ~= is provided that returns TRUE if&lt;br /&gt;
the String to the left of the operator matches the regular expression&lt;br /&gt;
in the String on the right.&lt;br /&gt;
&lt;br /&gt;
A regular expression is simply a character string containing wildcard&lt;br /&gt;
characters that allow it to match patterns within a longer string. For&lt;br /&gt;
example, the following constraint expression might return all the&lt;br /&gt;
stations on the sample cruise at which a shark was sighted:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
?station&amp;amp;station.comment~=&amp;quot;.*shark.*&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Most characters in a regular expression match themselves. That is, an&lt;br /&gt;
&amp;quot;f&amp;quot; in a regular expression matches an &amp;quot;f&amp;quot; in the target string. There&lt;br /&gt;
are several special characters, however, that provide more&lt;br /&gt;
sophisticated pattern-matching capabilities.&lt;br /&gt;
&lt;br /&gt;
;.&lt;br /&gt;
:The period matches any single character except a newline. &lt;br /&gt;
; * + ?&lt;br /&gt;
:These are postfix operators, which indicate to try to match the preceding regular expression repetitively (as many times as possible). Thus, o* matches any number of o&#039;s. The operators differ in that o* also matches zero o&#039;s, o+ matches only a series of one or more o&#039;s, and o? matches only zero or one o. &lt;br /&gt;
;&amp;quot;[ ... ]&amp;quot;&lt;br /&gt;
:Define a &amp;quot;character set,&amp;quot; which begins with [ and is terminated by ]. In the simplest case, the characters between the two brackets are what this set can match. The expression [Ss] matches either an upper or lower case s. Brackets can also contain character ranges, so [0-9] matches all the numerals. If the first character within the brackets is a caret ( ), the expression will only match characters that do not appear in the brackets. For example, [ 0-9]* only matches character strings that contain no numerals. &lt;br /&gt;
;^$&lt;br /&gt;
:These are special characters that match the empty string at the beginning or end of a line. &lt;br /&gt;
; \|&lt;br /&gt;
:These two characters define a logical OR between the largest possible expression on either side of the operator. So, for example, the string Endeavor\|Oceanus matches either Endeavor or Oceanus. The scope of the OR can be contained with the grouping operators, \( and \). &lt;br /&gt;
; \( \)&lt;br /&gt;
:These are used to group a series of characters into an expression, or for the OR function. So, for example, \(abc\)* matches zero or more repetitions of the string abc2. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are several more special characters and several other features&lt;br /&gt;
of the characters described here, but they are beyond the scope of&lt;br /&gt;
this guide. The OPeNDAP regular expression syntax is the same as that&lt;br /&gt;
used in the Emacs editor. See the documentation for Emacs for a&lt;br /&gt;
complete description of all the pattern- matching capabilities of&lt;br /&gt;
regular expressions. &lt;br /&gt;
&lt;br /&gt;
===Optimizing the Query===&lt;br /&gt;
&lt;br /&gt;
Using the tools provided by OPeNDAP, a user can build quite elaborate&lt;br /&gt;
and sophisticated constraint expressions that will return precisely&lt;br /&gt;
the data he or she wishes to examine. However, as the complexity of&lt;br /&gt;
the constraint expression increases, so does the time necessary to&lt;br /&gt;
process that expression. There are some techniques a user may user to&lt;br /&gt;
optimize the evaluation of a constraint that will ease the load on the&lt;br /&gt;
server, and provide faster replies to OPeNDAP dataset queries. &lt;br /&gt;
&lt;br /&gt;
The OPeNDAP constraint expression evaluator uses a &amp;quot;lazy evaluation&amp;quot;&lt;br /&gt;
algorithm. This means that the sub-clauses of the selection clause are&lt;br /&gt;
evaluated in order, and parsing halts when any sub-clause returns&lt;br /&gt;
FALSE. Consider a constraint expression that looks like this:   &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
?station&amp;amp;station.cast.O2&amp;gt;15.0&amp;amp;station.cast.temp&amp;gt;22.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the server encounters a station with no oxygen values over 15.0, it&lt;br /&gt;
does not bother to look at the temperature records at all. The first&lt;br /&gt;
sub- clause evaluates FALSE, so the second clause is never even&lt;br /&gt;
parsed. &lt;br /&gt;
&lt;br /&gt;
A careful user may use this feature to his or her advantage. In the&lt;br /&gt;
above example, the order of the clauses does not really matter; there&lt;br /&gt;
are the same number of temperature and oxygen measurements at each&lt;br /&gt;
station. However, consider the following expression: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
?station&amp;amp;station.cast.O2&amp;gt;15.0&amp;amp;station.month={3,4,5}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For each station there is only one month value, while there are many&lt;br /&gt;
oxygen values. Passing a constraint expression like this one will&lt;br /&gt;
force the server to sort through all the oxygen data for each station&lt;br /&gt;
(which could be in the thousands of points), only to throw the data&lt;br /&gt;
away when it finds that the month requested does not match the month&lt;br /&gt;
value stored in the station data. This would be far better done with&lt;br /&gt;
the clauses reversed: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
?station&amp;amp;station.month={3,4,5}&amp;amp;station.cast.O2&amp;gt;15.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This expression will evaluate much more quickly because unwanted&lt;br /&gt;
stations may be quickly discarded by the first sub-clause of the&lt;br /&gt;
selection. The server will only examine each oxygen value in the&lt;br /&gt;
station if it already knows that the station might be worth keeping.   &lt;br /&gt;
&lt;br /&gt;
This sort of optimization becomes even more important when one of the&lt;br /&gt;
clauses contains a URL. In general, any selection sub-clause&lt;br /&gt;
containing a URL should be left to the end of the selection. This way,&lt;br /&gt;
the OPeNDAP server will only be forced to go to the network for data&lt;br /&gt;
if absolutely necessary to evaluate the constraint expression.&lt;/div&gt;</summary>
		<author><name>TomSgouros</name></author>
	</entry>
</feed>