3.1.2 Getrectg function variables 3.1 The Archive File 3.2 The Index
NVODS Home

3.1.3 Another example

In the Levitus Ocean Atlas example above, the time axis is faked using the start time, the stop time and the interval. Some datasets consist of many similar files, corresponding to different times. These datasets can benefit from using a catalog server to indicate the time at which data was measured.

A catalog server is an OPeNDAP server, serving a file that associates time data or other data values with OPeNDAP data URLs. (See the OPeNDAP Server Installation Guidefor more information about setting up servers.)

For example, the ASCII reply (see OPeNDAP User Guide) of the catalog server corresponding to the Total Ozone Mapping Spectrometer (TOMS) project looks like this:

TOMS.type, TOMS.year, TOMS.month, TOMS.day, TOMS.DODS_URL
"ep", 2000, 1, 1, "http://daac.gsfc.nasa.gov/..."
"ep", 2000, 1, 2, "http://daac.gsfc.nasa.gov/..."
"ep", 2000, 1, 3, "http://daac.gsfc.nasa.gov/..."
"ep", 2000, 1, 4, "http://daac.gsfc.nasa.gov/..."

The OPeNDAP Matlab GUI (the getrectg function, actually) contains a provision for accessing this kind of catalog, but nominating a function to deal with this data.

The archive M-file for the TOMS project looks like this:

%      Total Ozone Mapping Spectrometer Daily Dataset

% FUNCTIONS -- REQUIRED
GetFunctionName = 'getrectg';

% FUNCTIONS -- OPTIONAL
Cat_m_File = 'ffcsquery';
CatalogServer = [ 'http://daac.gsfc.nasa.gov/daac-bin/nph-ff/DODS/catalog/', ...
                'toms-cat.dat'];

% VARIABLES -- REQUIRED
LonRange = [-180 180];
LatRange = [90 -90];
TimeRange = [1978.83287671233,2000.5];
DepthRange = [0 0];
DepthUnits = '';
Resolution = 138.75;

DataName = 'TOMS Global Level 3 Daily Gridded - GSFC';
LongitudeName = 'LONGITUDE';
LatitudeName = 'LATITUDE';
TimeName = '';
DepthName = '';
SelectableVariables = str2mat('Total_Ozone','Reflectivity');
DodsName = str2mat('TOTAL_OZONE','REFLECTIVITY');

DataNull = [nan nan nan nan 0 999];

Data_Use_Policy = '';

Acknowledge = '';

Comments1 = sprintf('%s\n', ...

The ffcsquery function is packaged with the OPeNDAP Matlab GUI and is called by getrectg, using the CatalogServer identified. To adapt this, you could create a catalog server, and use ffcsquery, or it might be simpler to write a catalog function (Cat_m_File) that cheats and has the URLs and time values encoded within.


Tom Sgouros, December 21, 2004