Here is a data file, containing a sequence of four data types. (This data file and several of the other examples in this chapter are available here.)
Here is the data file, called
ffsimple.dat:
Latitude and Longitude: -63.223548 54.118314 -176.161101 149.408117 -47.303545 -176.161101 11.7125 34.4634 -25.928001 -0.777265 20.7288 35.8953 -28.286662 35.591879 23.6377 35.3314 12.588231 149.408117 28.6583 34.5260 -63.223548 55.319598 0.4503 33.8830 54.118314 -136.940570 10.4085 32.0661 -38.818812 91.411330 13.9978 35.0173 -34.577065 30.172129 20.9096 35.4705 27.331551 -155.233735 23.0917 35.2694 11.624981 -113.660611 27.5036 33.7004
The file consists of a single header line, followed by a sequence of records, each of which contains a latitude, longitude, temperature, and salinity.
Here is a format file you can use to read ffsimple.dat. It is
called ffsimple.fmt:
ASCII_file_header "Latitude/Longitude Limits" minmax_title 1 24 char 0 latitude_min 25 36 double 6 latitude_max 37 46 double 6 longitude_min 47 59 double 6 longitude_max 60 70 double 6 ASCII_data "lat/lon" latitude 1 10 double 6 longitude 12 22 double 6 temp 24 30 double 4 salt 32 38 double 4 ASCII_output_data "output" latitude 1 10 double 3 longitude_deg 11 15 short 0 longitude_min 16 19 short 0 longitude_sec 20 23 short 0 salt 31 40 double 2 temp 41 50 double 2
The format file consists of three sections. The first shows FreeForm ND how to parse the file header. The second section describes the contents of the data file. The third part describes how to write the data to another file. This part is not important for the OPeNDAP FreeForm ND Data Handler, but is useful for debugging the input descriptions.
Download the ffsimple files described above, and type:
> newform ffsimple.dat
You should see results like this:
Welcome to Newform release 4.2.3 -- an NGDC FreeForm ND application
(ffsimple.fmt) ASCII_input_file_header "Latitude/Longitude Limits"
File ffsimple.dat contains 1 header record (71 bytes)
Each record contains 6 fields and is 71 characters long.
(ffsimple.fmt) ASCII_input_data "lat/lon"
File ffsimple.dat contains 10 data records (390 bytes)
Each record contains 5 fields and is 39 characters long.
(ffsimple.fmt) ASCII_output_data "output"
Program memory contains 10 data records (510 bytes)
Each record contains 7 fields and is 51 characters long.
-47.304 -176 9 40 34.46 11.71
-25.928 0 -46 38 35.90 20.73
-28.287 35 35 31 35.33 23.64
12.588 149 24 29 34.53 28.66
-63.224 55 19 11 33.88 0.45
54.118 -136 56 26 32.07 10.41
-38.819 91 24 41 35.02 14.00
-34.577 30 10 20 35.47 20.91
27.332 -155 14 1 35.27 23.09
11.625 -113 39 38 33.70 27.50
100\% processed
Now take both the ffsimple files and put them into a directory
in your web server's document root directory. (Refer to the
The OPeNDAP User Guide for some tips on figuring out where that is.)
Here's an example, on a computer on which the web server document root
is /export/home/http/htdocs:
> mkdir /export/home/http/htdocs/data > cp ffsimple.* /export/home/http/htdocs/data
Now, using a common web browser such as Netscape Navigator, enter the following URL (substitute your machine name and CGI directory for the ones in the example):
http://test.opendap.org/opendap/nph-dods/data/ff/ffsimple.dat.asc
You should get something like the following in your web browser's window:
latitude, longitude, temp, salt -47.3035, -176.161, 11.7125, 34.4634 -25.928, -0.777265, 20.7288, 35.8953 -28.2867, 35.5919, 23.6377, 35.3314 12.5882, 149.408, 28.6583, 34.526 -63.2235, 55.3196, 0.4503, 33.883 54.1183, -136.941, 10.4085, 32.0661 -38.8188, 91.4113, 13.9978, 35.0173 -34.5771, 30.1721, 20.9096, 35.4705 27.3316, -155.234, 23.0917, 35.2694 11.625, -113.661, 27.5036, 33.7004
Try this URL:
http://test.opendap.org/opendap/nph-dods/data/ffsimple.dat.dds
This will show a description of the dataset structure (See The OPeNDAP User Guide for a detailed description of the DAP2 "Dataset Description Structure," or DDS.):
Dataset {
Sequence {
Float64 latitude;
Float64 longitude;
Float64 temp;
Float64 salt;
} lat/lon;
} ffsimple;